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

Merge branch 'feat/74-naudit-smartnic-support' into 'develop'

Resolve "(NAUDIT) SmartNIC support"

See merge request !330
parents e8de2be8 147287b6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -230,6 +230,7 @@ enum DeviceDriverEnum {
  DEVICEDRIVER_IETF_SLICE = 14;
  DEVICEDRIVER_NCE = 15;
  DEVICEDRIVER_SMARTNIC = 16;
  DEVICEDRIVER_MORPHEUS = 17;
}

enum DeviceOperationalStatusEnum {
+28 −0
Original line number Diff line number Diff line
#!/bin/bash
# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

PROJECTDIR=`pwd`

cd $PROJECTDIR/src
RCFILE=$PROJECTDIR/coverage/.coveragerc
COVERAGEFILE=$PROJECTDIR/coverage/.coverage

# Destroy old coverage file and configure the correct folder on the .coveragerc file
rm -f $COVERAGEFILE
cat $PROJECTDIR/coverage/.coveragerc.template | sed s+~/tfs-ctrl+$PROJECTDIR+g > $RCFILE

# Run unitary tests and analyze coverage of code at same time
coverage run --rcfile=$RCFILE --append -m pytest -s --log-level=INFO --verbose \
    device/tests/test_unitary_morpheus.py
+1 −0
Original line number Diff line number Diff line
@@ -51,6 +51,7 @@ class DeviceTypeEnum(Enum):
    SMARTNIC                        = 'smartnic'
    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
@@ -39,6 +39,7 @@ class ORM_DeviceDriverEnum(enum.Enum):
    OC                    = DeviceDriverEnum.DEVICEDRIVER_OC
    QKD                   = DeviceDriverEnum.DEVICEDRIVER_QKD
    SMARTNIC              = DeviceDriverEnum.DEVICEDRIVER_SMARTNIC
    MORPHEUS              = DeviceDriverEnum.DEVICEDRIVER_MORPHEUS

grpc_to_enum__device_driver = functools.partial(
    grpc_to_enum, DeviceDriverEnum, ORM_DeviceDriverEnum)
+2 −0
Original line number Diff line number Diff line
@@ -20,6 +20,8 @@ build device:
  stage: build
  before_script:
    - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
    - docker ps -aq | xargs -r docker rm -f
    - containerlab destroy --all --cleanup || true
  script:
    - docker buildx build -t "$IMAGE_NAME:$IMAGE_TAG" -f ./src/$IMAGE_NAME/Dockerfile .
    - docker tag "$IMAGE_NAME:$IMAGE_TAG" "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG"
Loading