Commit 43e1339e authored by Waleed Akbar's avatar Waleed Akbar
Browse files

Merge branch 'feat/345-cttc-fix-ci-cd-and-unit-tests-for-dscm-pluggables' of...

Merge branch 'feat/345-cttc-fix-ci-cd-and-unit-tests-for-dscm-pluggables' of ssh://labs.etsi.org:29419/tfs/controller into feat/412-cttc-e2e-dscm-pluggable-improvements-and-tests
parents 8586676f 89d4b346
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -174,6 +174,7 @@ cython_debug/
# Other
/tmp
.github
coverage/

# Sqlite
*.db
+89 −0
Original line number Diff line number Diff line
# Copyright 2022-2025 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.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: pluggablesservice
spec:
  selector:
    matchLabels:
      app: pluggablesservice
  #replicas: 1
  template:
    metadata:
      labels:
        app: pluggablesservice
    spec:
      terminationGracePeriodSeconds: 5
      containers:
        - name: server
          image: labs.etsi.org:5050/tfs/controller/pluggables:latest
          imagePullPolicy: Always
          ports:
            - containerPort: 30220
          env:
            - name: LOG_LEVEL
              value: "INFO"
          readinessProbe:
            exec:
              command: ["/bin/grpc_health_probe", "-addr=:30220"]
          livenessProbe:
            exec:
              command: ["/bin/grpc_health_probe", "-addr=:30220"]
          resources:
            requests:
              cpu: 250m
              memory: 128Mi
            limits:
              cpu: 1000m
              memory: 1024Mi
---
apiVersion: v1
kind: Service
metadata:
  name: pluggablesservice
  labels:
    app: pluggablesservice
spec:
  type: ClusterIP
  selector:
    app: pluggablesservice
  ports:
    - name: grpc
      protocol: TCP
      port: 30220
      targetPort: 30220
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
  name: pluggablesservice-hpa
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: pluggablesservice
  minReplicas: 1
  maxReplicas: 20
  metrics:
    - type: Resource
      resource:
        name: cpu
        target:
          type: Utilization
          averageUtilization: 80
  #behavior:
  #  scaleDown:
  #    stabilizationWindowSeconds: 30
+4 −0
Original line number Diff line number Diff line
@@ -75,4 +75,8 @@ enum KpiSampleType {

    KPISAMPLETYPE_INT_IS_DROP        = 2201;
    KPISAMPLETYPE_INT_DROP_REASON    = 2202;

    // PLUGGABLES
    KPISAMPLETYPE_PRE_FEC_BER              = 2301;
    KPISAMPLETYPE_RECEIVED_POWER_PLUGGABLE = 2302;
}
+0 −0

File moved.

+2 −2
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ RCFILE=$PROJECTDIR/coverage/.coveragerc
# to run integration test: -m integration
python3 -m pytest --log-level=info --log-cli-level=info --verbose -m "not integration" \
    pluggables/tests/test_pluggables_with_SBI.py
# python3 -m pytest --log-level=info --log-cli-level=info --verbose \
#     pluggables/tests/test_Pluggables.py
python3 -m pytest --log-level=info --log-cli-level=info --verbose -m "not integration"\
    pluggables/tests/test_pluggables.py

echo "Bye!"
Loading