Commit 3aea4dc0 authored by Shayan Hajipour's avatar Shayan Hajipour
Browse files

feat: IETF_SLICE and NCE types added to context proto and python Enum types.

- l3nm_emulated ConfigRules.py changed to match string vlan values.
parent c31a36bf
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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 {
+3 −0
Original line number Diff line number Diff line
@@ -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
+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]]:
+3 −0
Original line number Diff line number Diff line
@@ -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

+18 −0
Original line number Diff line number Diff line
@@ -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(
Loading