Commit 654eb432 authored by Jose Luis Carcel's avatar Jose Luis Carcel
Browse files

Morpheus Client Extension

parent 5fb0bdea
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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:
+1 −0
Original line number Diff line number Diff line
@@ -204,6 +204,7 @@ enum DeviceDriverEnum {
  DEVICEDRIVER_GNMI_OPENCONFIG = 8;
  DEVICEDRIVER_FLEXSCALE = 9;
  DEVICEDRIVER_IETF_ACTN = 10;
  DEVICEDRIVER_SMARTNIC = 12;
}

enum DeviceOperationalStatusEnum {
+1 −0
Original line number Diff line number Diff line
@@ -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'
+11 −0
Original line number Diff line number Diff line
@@ -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),
+1 −0
Original line number Diff line number Diff line
@@ -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):
Loading