Resolve "(CTTC) Elaboration of the service component to handler IETF Slice and NCE domains"

Closes #243 (closed)

Merge request reports

Loading
+2 −0
Changes for proto/context.proto: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -224,6 +224,8 @@ enum DeviceDriverEnum {
  DEVICEDRIVER_OC = 11;
  DEVICEDRIVER_QKD = 12;
  DEVICEDRIVER_IETF_L3VPN = 13;
  DEVICEDRIVER_IETF_SLICE = 14;
  DEVICEDRIVER_NCE = 15;
}

enum DeviceOperationalStatusEnum {
+3 −3
Changes for src/common/tools/context_queries/Slice.py: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -13,14 +13,14 @@
# limitations under the License.

import logging
import grpc
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
from common.method_wrappers.ServiceExceptions import InvalidArgumentsException
from common.proto.context_pb2 import ContextId, Slice, SliceFilter, SliceId
from context.client.ContextClient import ContextClient


+2 −0
Changes for src/common/tools/descriptor/Tools.py: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -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]]:
+1 −2
Changes for src/common/tools/grpc/ConfigRules.py: 1 added line, 2 removed lines.
Original line number Diff line number Diff line
@@ -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)

+2 −0
Changes for src/common/DeviceTypes.py: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -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,3 +53,4 @@ class DeviceTypeEnum(Enum):

    # ETSI TeraFlowSDN controller
    TERAFLOWSDN_CONTROLLER          = 'teraflowsdn'
    IETF_SLICE                      = 'ietf-slice'
Loading
Loading