Commit 6b03c8fc authored by Javier Mateos Najari's avatar Javier Mateos Najari
Browse files

feat(morpheus): add morpheus driver to controller

parent 60436188
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -226,6 +226,7 @@ enum DeviceDriverEnum {
  DEVICEDRIVER_IETF_L3VPN = 13;
  DEVICEDRIVER_IETF_SLICE = 14;
  DEVICEDRIVER_NCE = 15;
  DEVICEDRIVER_MORPHEUS = 16;
}

enum DeviceOperationalStatusEnum {
+1 −0
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ class DeviceTypeEnum(Enum):
    XR_CONSTELLATION                = 'xr-constellation'
    QKD_NODE                        = 'qkd-node'
    OPEN_ROADM                      = 'openroadm'
    MORPHEUS                        = 'morpheus'

    # ETSI TeraFlowSDN controller
    TERAFLOWSDN_CONTROLLER          = 'teraflowsdn'
+1 −0
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ class ORM_DeviceDriverEnum(enum.Enum):
    IETF_SLICE            = DeviceDriverEnum.DEVICEDRIVER_IETF_SLICE
    OC                    = DeviceDriverEnum.DEVICEDRIVER_OC
    QKD                   = DeviceDriverEnum.DEVICEDRIVER_QKD
    MORPHEUS              = DeviceDriverEnum.DEVICEDRIVER_MORPHEUS

grpc_to_enum__device_driver = functools.partial(
    grpc_to_enum, DeviceDriverEnum, ORM_DeviceDriverEnum)
+11 −0
Original line number Diff line number Diff line
@@ -217,3 +217,14 @@ if LOAD_ALL_DEVICE_DRIVERS:
                FilterFieldEnum.DRIVER     : DeviceDriverEnum.DEVICEDRIVER_QKD,
            }
        ]))

if LOAD_ALL_DEVICE_DRIVERS:
    from .morpheus.MorpheusApiDriver import MorpheusAPIDriver
    DRIVERS.append(
        (MorpheusAPIDriver, [
            {
                # Close enough, it does optical switching
                FilterFieldEnum.DEVICE_TYPE: DeviceTypeEnum.MORPHEUS,
                FilterFieldEnum.DRIVER     : DeviceDriverEnum.DEVICEDRIVER_MORPHEUS,
            }
        ]))
+1 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ class AddDeviceForm(FlaskForm):
    device_drivers_optical_tfs = BooleanField('OPTICAL TFS')
    device_drivers_ietf_actn = BooleanField('IETF ACTN')
    device_drivers_qkd = BooleanField('QKD')
    device_drivers_morpheus = BooleanField('MORPHEUS')

    device_config_address = StringField('connect/address',default='127.0.0.1',validators=[DataRequired(), Length(min=5)])
    device_config_port = StringField('connect/port',default='0',validators=[DataRequired(), Length(min=1)])
Loading