Commit c061494a authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Merge branch...

Merge branch 'feat/243-cttc-elaboration-of-the-service-component-to-handler-ietf-slice-and-nce-domains' into 'develop'

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

See merge request !308
parents c573b492 b09b6ca2
Loading
Loading
Loading
Loading
+2 −0
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 {
+2 −0
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'
+3 −3
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
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
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)

Loading