Commit 4ae74b74 authored by Andrea Sgambelluri's avatar Andrea Sgambelluri
Browse files

Merge branch...

Merge branch 'feat/349-new-monitoring-updates-for-optical-controller-integration' of https://labs.etsi.org/rep/tfs/controller into cnit_ofc26
parents 0c182e3f 2f24be4b
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -19,10 +19,13 @@ PROJECTDIR=`pwd`
cd $PROJECTDIR/src
RCFILE=$PROJECTDIR/coverage/.coveragerc

export KFK_SERVER_ADDRESS='127.0.0.1:9092'
export KFK_SERVER_ADDRESS='127.0.0.1:9094'

CRDB_SQL_ADDRESS=$(kubectl get service cockroachdb-public --namespace crdb -o jsonpath='{.spec.clusterIP}')
export CRDB_URI="cockroachdb://tfs:tfs123@${CRDB_SQL_ADDRESS}:26257/tfs_analytics?sslmode=require"

python3 -m pytest --log-level=DEBUG --log-cli-level=INFO --verbose \
    analytics/backend/tests/test_backend.py
# python3 -m pytest --log-level=DEBUG --log-cli-level=INFO --verbose \
#     analytics/backend/tests/test_backend.py

python3 -m pytest --log-level=DEBUG --log-cli-level=DEBUG --verbose \
    analytics/backend/tests/test_backend.py::test_start_analytics_backend_for_mgon_agent
 No newline at end of file
+4 −2
Original line number Diff line number Diff line
@@ -19,9 +19,11 @@ PROJECTDIR=`pwd`
cd $PROJECTDIR/src
RCFILE=$PROJECTDIR/coverage/.coveragerc

export KFK_SERVER_ADDRESS='127.0.0.1:9092'
export KFK_SERVER_ADDRESS='127.0.0.1:9094'
CRDB_SQL_ADDRESS=$(kubectl get service cockroachdb-public --namespace crdb -o jsonpath='{.spec.clusterIP}')
export CRDB_URI="cockroachdb://tfs:tfs123@${CRDB_SQL_ADDRESS}:26257/tfs_analytics?sslmode=require"

python3 -m pytest --log-level=DEBUG --log-cli-level=INFO --verbose \
    analytics/frontend/tests/test_frontend.py
    analytics/frontend/tests/test_frontend.py::test_StartAnalyzer_MGON_Agent
# python3 -m pytest --log-level=DEBUG --log-cli-level=INFO --verbose \
#     analytics/frontend/tests/test_frontend.py
+3 −3
Original line number Diff line number Diff line
@@ -21,10 +21,10 @@ export KFK_SERVER_ADDRESS='127.0.0.1:9094'

# This is unit test (should be tested with container-lab running)
python3 -m pytest --log-level=info --log-cli-level=info --verbose \
    telemetry/backend/tests/gnmi_oc/test_unit_GnmiOpenConfigCollector.py 
    telemetry/backend/tests/gnmi_oc/test_unit_GnmiOpenConfigCollector.py::test_full_workflow

# This is integration test (should be tested with container-lab running)
python3 -m pytest --log-level=info --log-cli-level=info --verbose \
    telemetry/backend/tests/gnmi_oc/test_integration_GnmiOCcollector.py
# python3 -m pytest --log-level=info --log-cli-level=info --verbose \
#     telemetry/backend/tests/gnmi_oc/test_integration_GnmiOCcollector.py

echo "Bye!"
+6 −6
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ class DaskStreamer(threading.Thread):
        window_size       = None,
        cluster_instance  = None,
        producer_instance = AnalyzerHelper.initialize_kafka_producer()
                 ):
        ) -> None:
        super().__init__()
        self.key            = key
        self.input_kpis     = input_kpis
+19 −0
Original line number Diff line number Diff line
@@ -15,6 +15,25 @@
import pandas as pd
from analytics.backend.service.AnalyzerHandlers import Handlers

def create_analysis_request_message_for_mgon_agent():
    return {
        "request_id":      "test_request_mgon_001",
        "oper_mode":       "test_mode",
        "input_kpi_list":  ["6e22f180-ba28-4641-b190-2287bf448888"],
        "output_kpi_list": ["6e22f180-ba28-4641-b190-2287bf181818"],
        "task_type":       Handlers.AGGREGATION_HANDLER.value,
        "task_parameter":  {
            "avg": [-5, -20],
        },
        "duration":        90,
        "batch_duration":  20,
        "window_size":     None,
        "batch_size":      5,
        "interval":        5,
    }



def get_input_kpi_list():
    return ["1e22f180-ba28-4641-b190-2287bf446666", "6e22f180-ba28-4641-b190-2287bf448888", 'kpi_3']

Loading