Commit a0aacd58 authored by Pablo Armingol's avatar Pablo Armingol
Browse files

Driver BGP-LS

parent 41e52b80
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -191,6 +191,7 @@ enum DeviceDriverEnum {
  DEVICEDRIVER_IETF_NETWORK_TOPOLOGY = 4;
  DEVICEDRIVER_ONF_TR_352 = 5;
  DEVICEDRIVER_XR = 6;
  DEVICEDRIVER_BGPLS = 7;
}

enum DeviceOperationalStatusEnum {
+3 −1
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ class DeviceTypeEnum(Enum):
    EMULATED_P4_SWITCH              = 'emu-p4-switch'
    EMULATED_PACKET_ROUTER          = 'emu-packet-router'
    EMULATED_PACKET_SWITCH          = 'emu-packet-switch'
    EMULATED_BGPLS_ASNUMBER         = 'emu-bgpls-asnumber'

    # Real device types
    DATACENTER                      = 'datacenter'
@@ -39,3 +40,4 @@ class DeviceTypeEnum(Enum):
    PACKET_ROUTER                   = 'packet-router'
    PACKET_SWITCH                   = 'packet-switch'
    XR_CONSTELLATION                = 'xr-constellation'
    BGPLS_ASNUMBER                  = 'bgpls-asnumber'
 No newline at end of file
+3 −0
Original line number Diff line number Diff line
@@ -43,6 +43,9 @@ DEVICE_MICROWAVE_DRIVERS = [DeviceDriverEnum.DEVICEDRIVER_IETF_NETWORK_TOPOLOGY]
DEVICE_P4_TYPE      = DeviceTypeEnum.P4_SWITCH.value
DEVICE_P4_DRIVERS   = [DeviceDriverEnum.DEVICEDRIVER_P4]

DEVICE_BGPLS_TYPE      = DeviceTypeEnum.BGPLS_ASNUMBER.value
DEVICE_BGPLS_DRIVERS   = [DeviceDriverEnum.DEVICEDRIVER_BGPLS]

def json_device_id(device_uuid : str):
    return {'device_uuid': {'uuid': device_uuid}}

+1 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ def validate_device_driver_enum(message):
        'DEVICEDRIVER_IETF_NETWORK_TOPOLOGY',
        'DEVICEDRIVER_ONF_TR_352',
        'DEVICEDRIVER_XR',
        'DEVICEDRIVER_BGPLS',
    ]

def validate_device_operational_status_enum(message):
+1 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ class ORM_DeviceDriverEnum(enum.Enum):
    IETF_NETWORK_TOPOLOGY = DeviceDriverEnum.DEVICEDRIVER_IETF_NETWORK_TOPOLOGY
    ONF_TR_352            = DeviceDriverEnum.DEVICEDRIVER_ONF_TR_352
    XR                    = DeviceDriverEnum.DEVICEDRIVER_XR
    BGPLS                 = DeviceDriverEnum.DEVICEDRIVER_BGPLS

grpc_to_enum__device_driver = functools.partial(
    grpc_to_enum, DeviceDriverEnum, ORM_DeviceDriverEnum)
Loading