From d1cdcb0bc12e4bd451a312ddd4a7d97b6a1e1cd7 Mon Sep 17 00:00:00 2001 From: softir Date: Wed, 16 Sep 2020 11:23:26 +0200 Subject: [PATCH 01/43] CT-147: modified linting stage for common package --- .gitlab-ci.yml | 1 + csp-lmc-common/.gitlab-ci.yml | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3a4366d..a89d2bf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -36,6 +36,7 @@ cache: # pages: create the badges stages: - build_common + - linting_common - test_common - publish_common - build diff --git a/csp-lmc-common/.gitlab-ci.yml b/csp-lmc-common/.gitlab-ci.yml index 0be7f45..faa5fd1 100644 --- a/csp-lmc-common/.gitlab-ci.yml +++ b/csp-lmc-common/.gitlab-ci.yml @@ -80,19 +80,18 @@ test:csp-lmc-common: - make test # # linting stage -.linting_common: + +linting:csp-lmc-common: extends: .test_common - stage: linting + stage: linting_common dependencies: [] script: - apt-get -y update - apt-get install -y python3-pip python3-setuptools python3-wheel --no-install-recommends - cd $COMMON_BUILD_PATH - make lint - -linting:csp-lmc-common: - extends: .linting_common - dependencies: [] + - pwd + - ls -alR # # Publish csp-lmc-common python package -- GitLab From 2ed0da781fd617f1374d2a3e99476994cb536328 Mon Sep 17 00:00:00 2001 From: softir Date: Wed, 16 Sep 2020 11:55:30 +0200 Subject: [PATCH 02/43] CT-147: try to run pylint without starting the devices. --- csp-lmc-common/.gitlab-ci.yml | 16 +++++++++++++--- csp-lmc-common/requirements.txt | 3 +++ 2 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 csp-lmc-common/requirements.txt diff --git a/csp-lmc-common/.gitlab-ci.yml b/csp-lmc-common/.gitlab-ci.yml index faa5fd1..04eca0f 100644 --- a/csp-lmc-common/.gitlab-ci.yml +++ b/csp-lmc-common/.gitlab-ci.yml @@ -82,16 +82,26 @@ test:csp-lmc-common: # linting stage linting:csp-lmc-common: - extends: .test_common + image: nexus.engageska-portugal.pt/ska-docker/ska-python-buildenv:latest stage: linting_common + tags: + - docker-executor + artifacts: + paths: + - ./$COMMON_BUILD_PATH/build/ dependencies: [] script: - apt-get -y update - apt-get install -y python3-pip python3-setuptools python3-wheel --no-install-recommends + - python3 -m pip install pylint2junit - cd $COMMON_BUILD_PATH - - make lint - - pwd + - python3 -m pip install --extra-index-url https://nexus.engageska-portugal.pt/repository/pypi/simple -r requirements.txt + - mkdir -p build/reports + - pylint --output-format=parseable csp_lmc_common | tee /build/csp_lmc_common-code-analysis.stdout + - pylint --output-format=pylint2junit.JunitReporter csp_lmc_common > /build/reports/csp-lmc-common-linting.xml - ls -alR + variables: + COMMON_BUILD_PATH: csp-lmc-common # # Publish csp-lmc-common python package diff --git a/csp-lmc-common/requirements.txt b/csp-lmc-common/requirements.txt new file mode 100644 index 0000000..0d09264 --- /dev/null +++ b/csp-lmc-common/requirements.txt @@ -0,0 +1,3 @@ +numpy == 1.17.2 +pytango >= 9.3.2 +lmcbaseclasses >= 0.6.4 -- GitLab From 777cdb0bfbae104e63b37faf2bce4d8183c591b4 Mon Sep 17 00:00:00 2001 From: softir Date: Wed, 16 Sep 2020 12:00:39 +0200 Subject: [PATCH 03/43] CT-147: fix issue in output directory to store results. --- csp-lmc-common/.gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/csp-lmc-common/.gitlab-ci.yml b/csp-lmc-common/.gitlab-ci.yml index 04eca0f..d1a89d1 100644 --- a/csp-lmc-common/.gitlab-ci.yml +++ b/csp-lmc-common/.gitlab-ci.yml @@ -97,8 +97,8 @@ linting:csp-lmc-common: - cd $COMMON_BUILD_PATH - python3 -m pip install --extra-index-url https://nexus.engageska-portugal.pt/repository/pypi/simple -r requirements.txt - mkdir -p build/reports - - pylint --output-format=parseable csp_lmc_common | tee /build/csp_lmc_common-code-analysis.stdout - - pylint --output-format=pylint2junit.JunitReporter csp_lmc_common > /build/reports/csp-lmc-common-linting.xml + - pylint --output-format=parseable csp_lmc_common | tee ./build/csp_lmc_common-code-analysis.stdout + - pylint --output-format=pylint2junit.JunitReporter csp_lmc_common > ./build/reports/csp-lmc-common-linting.xml - ls -alR variables: COMMON_BUILD_PATH: csp-lmc-common -- GitLab From b69fcd4281924dafecc385c2f3faaa82450e2428 Mon Sep 17 00:00:00 2001 From: softir Date: Wed, 16 Sep 2020 12:25:00 +0200 Subject: [PATCH 04/43] CT-147: specified default image to use. Moved page stage before publish. --- .gitlab-ci.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a89d2bf..3014950 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,7 @@ # GitLab CI in conjunction with GitLab Runner can use Docker Engine to test and build any application. # Docker, when used with GitLab CI, runs each job in a separate and isolated container using the predefined image that is set up in .gitlab-ci.yml. # In this case we use the latest python docker image to build and test this project. -#image: nexus.engageska-portugal.pt/ska-docker/ska-python-buildenv:latest +image: nexus.engageska-portugal.pt/ska-docker/ska-python-buildenv:latest variables: DOCKER_DRIVER: overlay2 @@ -32,8 +32,9 @@ cache: # build: build the docker images for csp-lmc-mid and csp-lmc-low # test: execute tests on csp-lmc-common, csp-lmc-mid, csp-lmc-low # package: create the python packages for common, mid and low -# publish: publish on nexus the mid and low images and the common python package -# pages: create the badges +# publish: publish on nexus the mid common python packages +# pages: move the metrics files to the right folder +# release release the images for csp-lmc-low and mid (only manual) stages: - build_common - linting_common @@ -42,8 +43,8 @@ stages: - build - test - linting - - publish - pages + - publish - release .install_pip: &install_pip |- @@ -72,7 +73,7 @@ pages: script: - pwd - python3 -m pip install junitparser - #update coverage o the last release + #update coverage to the last release - python3 -m pip install --upgrade coverage - ls -lR # copy the content of packages folders in public -- GitLab From 33436db6fa7eee3b74c2bf14c0bf7bbe403a9f4d Mon Sep 17 00:00:00 2001 From: softir Date: Wed, 16 Sep 2020 14:13:17 +0200 Subject: [PATCH 05/43] CT-147: no need to start docker containers to run tests. Commented connection to TANGO DB in CspMaster and CspSubarray. --- csp-lmc-common/.gitlab-ci.yml | 15 +- csp-lmc-common/conftest.py | 87 -------- csp-lmc-common/csp_lmc_common/CspMaster.py | 48 ++--- csp-lmc-common/csp_lmc_common/CspSubarray.py | 42 ++-- csp-lmc-common/csp_lmc_common/__init__.py | 8 + csp-lmc-common/requirements-tst.txt | 9 + csp-lmc-common/requirements.txt | 1 + csp-lmc-common/setup.py | 8 +- csp-lmc-common/tests/CspMaster_test.py | 188 ------------------ csp-lmc-common/tests/CspSubarray_test.py | 111 ----------- csp-lmc-common/tests/conftest.py | 166 ++++++++++++++++ csp-lmc-common/tests/unit/CspMaster_test.py | 130 ++++++++++++ csp-lmc-common/tests/unit/CspSubarray_test.py | 100 ++++++++++ csp-lmc-common/tests/unit/conftest.py | 75 +++++++ 14 files changed, 552 insertions(+), 436 deletions(-) delete mode 100644 csp-lmc-common/conftest.py create mode 100644 csp-lmc-common/requirements-tst.txt delete mode 100755 csp-lmc-common/tests/CspMaster_test.py delete mode 100755 csp-lmc-common/tests/CspSubarray_test.py create mode 100644 csp-lmc-common/tests/conftest.py create mode 100755 csp-lmc-common/tests/unit/CspMaster_test.py create mode 100755 csp-lmc-common/tests/unit/CspSubarray_test.py create mode 100644 csp-lmc-common/tests/unit/conftest.py diff --git a/csp-lmc-common/.gitlab-ci.yml b/csp-lmc-common/.gitlab-ci.yml index d1a89d1..81e2e6a 100644 --- a/csp-lmc-common/.gitlab-ci.yml +++ b/csp-lmc-common/.gitlab-ci.yml @@ -70,14 +70,23 @@ build:csp-lmc-common_image: paths: - ./$COMMON_BUILD_PATH/build/ variables: - COMMON_BUILD_PATH: csp-lmc-common/docker + COMMON_BUILD_PATH: csp-lmc-common test:csp-lmc-common: extends: .test_common stage: test_common script: - - cd $COMMON_BUILD_PATH - - make test + - cd $COMMON_BUILD_PATH + - pwd + - python3 -m pip install -r requirements-tst.txt + - python3 -m pip install --extra-index-url https://nexus.engageska-portugal.pt/repository/pypi/simple -r requirements.txt + - python3 setup.py test |tee setup_py_test.stdout + - pwd + - mkdir -p build/reports + - ls -alR + - mv setup_py_test.stdout build/csp-lmc-common-setup-test.stdout + - mv htmlcov build/csp-lmc-common_htmlcov + - mv coverage.xml build # # linting stage diff --git a/csp-lmc-common/conftest.py b/csp-lmc-common/conftest.py deleted file mode 100644 index 080583b..0000000 --- a/csp-lmc-common/conftest.py +++ /dev/null @@ -1,87 +0,0 @@ -""" -A module defining a list of fixture functions. -""" -import importlib -import pytest - -import tango -from unittest import mock -from tango import DeviceProxy -from tango.test_context import DeviceTestContext - -@pytest.fixture(scope="class") -def tango_context(request): - """Creates and returns a TANGO DeviceTestContext object. - - Parameters - ---------- - request: _pytest.fixtures.SubRequest - A request object gives access to the requesting test context. - """ - test_properties = { - 'CspMaster': {'SkaLevel': '2', - 'CspCbf': 'mid_csp_cbf/sub_elt/master', - 'CspPss': 'mid_csp_pss/sub_elt/master', - 'CspPst': 'mid_csp_pst/sub_elt/master', - }, - 'CspSubarray': {'CspMaster': 'common/elt/master', - 'CbfSubarray': 'mid_csp_cbf/sub_elt/subarray_01', - 'PssSubarray': 'mid_csp_pss/sub_elt/subarray_01', - 'SubID' : 1, - }, - } - # TODO: package_name and class_name can be used in future - # fq_test_class_name = request.cls.__module__ - # fq_test_class_name_details = fq_test_class_name.split(".") - # package_name = fq_test_class_name_details[1] - # class_name = module_name = fq_test_class_name_details[1] - test_class_name = request.cls.__name__ - class_name = test_class_name.split('Test', 1)[-1] - module = importlib.import_module("{}.{}".format("csp_lmc_common", class_name)) - klass = getattr(module, class_name) - tango_context = DeviceTestContext(klass, properties=test_properties.get(class_name)) - tango_context.start() - yield tango_context - tango_context.stop() - -# -# NOTE: if initialize_device is called, the tests crash with error because during the -# CspMaster and CspMaster access to the TANGO DB to get the memorized attributes. -# Need to mock the call to the TANGO DB get_device_attribute -@pytest.fixture(scope="function") -def initialize_device(tango_context): - """Re-initializes the device. - - Parameters - ---------- - tango_context: tango.test_context.DeviceTestContext - Context to run a device without a database. - """ - yield tango_context.device.Init() - -@pytest.fixture(scope="class") -def cbf_master(): - """Create DeviceProxy for the CbfMaster device - to test the device with the TANGO DB - """ - database = tango.Database() - instance_list = database.get_device_exported_for_class('CbfMaster') - for instance in instance_list.value_string: - try: - return tango.DeviceProxy(instance) - except tango.DevFailed: - continue - - -@pytest.fixture(scope="class") -def csp_master(): - """Create DeviceProxy for the CspMaster device - to test the device with the TANGO DB - """ - database = tango.Database() - instance_list = database.get_device_exported_for_class('CspMaster') - for instance in instance_list.value_string: - try: - return tango.DeviceProxy(instance) - except tango.DevFailed: - continue diff --git a/csp-lmc-common/csp_lmc_common/CspMaster.py b/csp-lmc-common/csp_lmc_common/CspMaster.py index 0199ba8..89d082d 100644 --- a/csp-lmc-common/csp_lmc_common/CspMaster.py +++ b/csp-lmc-common/csp_lmc_common/CspMaster.py @@ -1212,12 +1212,12 @@ class CspMaster(SKAMaster): self._build_state = '{}, {}, {}'.format(release.name, release.version, release.description) self._version_id = release.version # connect to TANGO DB - csp_tango_db = tango.Database() + #csp_tango_db = tango.Database() # read the CSP memorized attributes from the TANGO DB. # Note: a memorized attribute has defined the attribute # property '__value' - attribute_properties = csp_tango_db.get_device_attribute_property(self.get_name(), - {'adminMode': ['__value']}) + #attribute_properties = csp_tango_db.get_device_attribute_property(self.get_name(), + # {'adminMode': ['__value']}) # set init values for the CSP Element and Sub-element SCM states self.set_state(tango.DevState.INIT) self._health_state = HealthState.OK @@ -1233,16 +1233,16 @@ class CspMaster(SKAMaster): # build a dictionary with the (attr_name, value) of the memorized attributes # use memorized atrtibute if present, otherwise the default one - memorized_attr_dict = {attr_name : int(value[0]) for attr_name, db_key in attribute_properties.items() - for key, value in db_key.items() - if key == '__value'} - try: - self._admin_mode = memorized_attr_dict['adminMode'] - if self._admin_mode not in [AdminMode.ONLINE, AdminMode.MAINTENANCE]: - self._health_state = HealthState.UNKNOWN - self.set_state(tango.DevState.DISABLE) - except KeyError as key_err: - self.logger.info("Key {} not found".format(key_err)) + #memorized_attr_dict = {attr_name : int(value[0]) for attr_name, db_key in attribute_properties.items() + # for key, value in db_key.items() + # if key == '__value'} + #try: + # self._admin_mode = memorized_attr_dict['adminMode'] + # if self._admin_mode not in [AdminMode.ONLINE, AdminMode.MAINTENANCE]: + # self._health_state = HealthState.UNKNOWN + # self.set_state(tango.DevState.DISABLE) + #except KeyError as key_err: + # self.logger.info("Key {} not found".format(key_err)) # initialize list with CSP sub-element FQDNs self._se_fqdn = [] @@ -1260,17 +1260,17 @@ class CspMaster(SKAMaster): # read the sub-elements adminMode (memorized) attributes from # the TANGO DB. # Note: a memorized attribute has defined the attribute property '__value' - for fqdn in self._se_fqdn: - attribute_properties = csp_tango_db.get_device_attribute_property(fqdn, - {'adminMode': ['__value']}) - self.logger.info("fqdn: {} attribute_properties: {}".format(fqdn, attribute_properties)) - try: - admin_mode_memorized = attribute_properties['adminMode']['__value'] - self._se_admin_mode[fqdn] = int(admin_mode_memorized[0]) - except KeyError as key_err: - msg = ("No key {} found for sub-element {}" - " adminMode attribute".format(key_err, fqdn)) - self.logger.info(msg) + #for fqdn in self._se_fqdn: + # attribute_properties = csp_tango_db.get_device_attribute_property(fqdn, + # {'adminMode': ['__value']}) + # self.logger.info("fqdn: {} attribute_properties: {}".format(fqdn, attribute_properties)) + # try: + # admin_mode_memorized = attribute_properties['adminMode']['__value'] + # self._se_admin_mode[fqdn] = int(admin_mode_memorized[0]) + # except KeyError as key_err: + # msg = ("No key {} found for sub-element {}" + # " adminMode attribute".format(key_err, fqdn)) + # self.logger.info(msg) # _se_proxies: the sub-element proxies # implemented as dictionary: diff --git a/csp-lmc-common/csp_lmc_common/CspSubarray.py b/csp-lmc-common/csp_lmc_common/CspSubarray.py index d81b535..f52a859 100644 --- a/csp-lmc-common/csp_lmc_common/CspSubarray.py +++ b/csp-lmc-common/csp_lmc_common/CspSubarray.py @@ -156,25 +156,25 @@ class CspSubarray(SKASubarray): device._sc_subarray_obs_state = defaultdict(lambda: ObsState.IDLE) device._sc_subarray_obs_mode = defaultdict(lambda: ObsMode.IDLE) device._mutex_obs_state = threading.Lock() - device._csp_tango_db = tango.Database() + #device._csp_tango_db = tango.Database() # read the CSP memorized attributes from the TANGO DB. # Note: a memorized attribute has defined the attribute # property '__value' - attribute_properties = device._csp_tango_db.get_device_attribute_property(device.get_name(), - {'adminMode': ['__value']}) + #attribute_properties = device._csp_tango_db.get_device_attribute_property(device.get_name(), + # {'adminMode': ['__value']}) # build a dictionary with the (attr_name, value) of the memorized attributes # use memorized atrtibute if present, otherwise the default one - memorized_attr_dict = {attr_name : int(value[0]) for attr_name, db_key in attribute_properties.items() - for key, value in db_key.items() - if key == '__value'} - try: - device._admin_mode = memorized_attr_dict['adminMode'] - if device._admin_mode not in [AdminMode.ONLINE, AdminMode.MAINTENANCE]: - device._health_state = HealthState.UNKNOWN - device.set_state(tango.DevState.DISABLE) + #memorized_attr_dict = {attr_name : int(value[0]) for attr_name, db_key in attribute_properties.items() + # for key, value in db_key.items() + # if key == '__value'} + #try: + # device._admin_mode = memorized_attr_dict['adminMode'] + # if device._admin_mode not in [AdminMode.ONLINE, AdminMode.MAINTENANCE]: + # device._health_state = HealthState.UNKNOWN + # device.set_state(tango.DevState.DISABLE) - except KeyError as key_err: - device.logger.info("Key {} not found".format(key_err)) + #except KeyError as key_err: + # device.logger.info("Key {} not found".format(key_err)) # list of sub-array sub-component FQDNs device._sc_subarray_fqdn = [] @@ -1653,14 +1653,14 @@ class CspSubarray(SKASubarray): return # read the sub-componet adminMode (memorized) attribute from # the CSP.LMC TANGO DB. - attribute_properties = self._csp_tango_db.get_device_attribute_property(fqdn, - {'adminMode': ['__value']}) - self.logger.debug("fqdn: {} attribute_properties: {}".format(fqdn, attribute_properties)) - try: - admin_mode_memorized = attribute_properties['adminMode']['__value'] - self._sc_subarray_admin_mode[fqdn] = int(admin_mode_memorized[0]) - except KeyError as key_error: - self.logger.warning("No key {} found".format(str(key_error))) + #attribute_properties = self._csp_tango_db.get_device_attribute_property(fqdn, + # {'adminMode': ['__value']}) + #self.logger.debug("fqdn: {} attribute_properties: {}".format(fqdn, attribute_properties)) + #try: + # admin_mode_memorized = attribute_properties['adminMode']['__value'] + # self._sc_subarray_admin_mode[fqdn] = int(admin_mode_memorized[0]) + #except KeyError as key_error: + # self.logger.warning("No key {} found".format(str(key_error))) try: log_msg = "Trying connection to " + str(fqdn) + " device" self.logger.info(log_msg) diff --git a/csp-lmc-common/csp_lmc_common/__init__.py b/csp-lmc-common/csp_lmc_common/__init__.py index e69de29..6714272 100644 --- a/csp-lmc-common/csp_lmc_common/__init__.py +++ b/csp-lmc-common/csp_lmc_common/__init__.py @@ -0,0 +1,8 @@ +__all__ = [ + "CspMaster", + "CspSubarray", +] + +from .CspMaster import CspMaster +from .CspSubarray import CspSubarray + diff --git a/csp-lmc-common/requirements-tst.txt b/csp-lmc-common/requirements-tst.txt new file mode 100644 index 0000000..67c373b --- /dev/null +++ b/csp-lmc-common/requirements-tst.txt @@ -0,0 +1,9 @@ +pytest +pytest-bdd +pytest-cov +pytest-json-report +pytest-mock +#pytest-xdist == 1.34.0 +pycodestyle +coverage +mock diff --git a/csp-lmc-common/requirements.txt b/csp-lmc-common/requirements.txt index 0d09264..c1deb4d 100644 --- a/csp-lmc-common/requirements.txt +++ b/csp-lmc-common/requirements.txt @@ -1,3 +1,4 @@ numpy == 1.17.2 pytango >= 9.3.2 +jsonschema >= 3.2.0 lmcbaseclasses >= 0.6.4 diff --git a/csp-lmc-common/setup.py b/csp-lmc-common/setup.py index f0281d5..e61ff13 100644 --- a/csp-lmc-common/setup.py +++ b/csp-lmc-common/setup.py @@ -8,6 +8,7 @@ import os import sys +import setuptools from setuptools import setup, find_packages setup_dir = os.path.dirname(os.path.abspath(__file__)) @@ -38,7 +39,10 @@ setup( install_requires = [ 'pytango >9.3.1', 'future', - 'lmcbaseclasses==0.6.5+221be16f' + 'lmcbaseclasses==0.6.5' + ], + dependency_links=[ + 'https://nexus.engageska-portugal.pt/repository/pypi/simple' ], setup_requires=[ 'pytest-runner', @@ -47,7 +51,7 @@ setup( ], test_suite="test", entry_points={'console_scripts':[ - 'CspMaster = csp_lmc_common.CspMaster:main', + 'CspMaster=csp_lmc_common.CspMaster:main', 'CspSubarray=csp_lmc_common.CspSubarray:main']}, classifiers=[ "Development Status :: 3 - Alpha", diff --git a/csp-lmc-common/tests/CspMaster_test.py b/csp-lmc-common/tests/CspMaster_test.py deleted file mode 100755 index 20231c3..0000000 --- a/csp-lmc-common/tests/CspMaster_test.py +++ /dev/null @@ -1,188 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -# -# This file is part of the csp-lmc project -# -# -# -# Distributed under the terms of the BSD-3-Clause license. -# See LICENSE.txt for more info. -"""Contain the tests for the CspMaster.""" - -# Standard imports -import sys -import os -import time -import numpy as np -# Tango imports -import tango -from tango import DevState -from tango.test_context import DeviceTestContext -import pytest - -#Local imports -from csp_lmc_common.CspMaster import CspMaster -from ska.base.control_model import AdminMode, HealthState - -# Device test case -@pytest.mark.usefixtures("tango_context", "cbf_master") - -class TestCspMaster(object): - properties = {'SkaLevel': '2', - 'CspCbf': 'mid_csp_cbf/sub_elt/master', - 'CspPss': 'mid_csp_pss/sub_elt/master', - 'CspPst': 'mid_csp_pst/sub_elt/master', - } - - def test_State(self, cbf_master, tango_context): - """Test for State after initialization - NOTE: the CspMaster device state is ALARM because - this device relies on several forwarded attributes. - """ - # reinitalize Csp Master and CbfMaster devices - cbf_master.Init() - time.sleep(2) - csp_state = tango_context.device.state() - assert csp_state not in [DevState.FAULT, DevState.DISABLE] - - def test_adminMode_offline(self, tango_context): - """ Test the adminMode attribute w/r""" - tango_context.device.adminMode = AdminMode.OFFLINE - time.sleep(3) - assert tango_context.device.adminMode.value == AdminMode.OFFLINE - - def test_adminMode_online(self, tango_context): - """ Test the adminMode attribute w/r""" - tango_context.device.adminMode = AdminMode.ONLINE - time.sleep(3) - assert tango_context.device.adminMode.value == AdminMode.ONLINE - - def test_write_invalid_admin_mode(self, tango_context): - - with pytest.raises(tango.DevFailed) as df: - tango_context.device.adminMode = 7 - assert "Set value for attribute adminMode is negative or above the maximun authorized" in str(df.value.args[0].desc) - - def test_cspHealthState(self, tango_context): - """ Test the CSP initial healthState. - NOTE: to build the CSP healthState, the sub-elements - not ONLINE or MAINTENACE are not taken into account. - """ - assert tango_context.device.healthState == HealthState.OK - - def test_cbfAdminMode(self, tango_context): - """ Test the CBF adminMode attribute w/r""" - tango_context.device.cspCbfAdminMode = AdminMode.ONLINE - time.sleep(3) - assert tango_context.device.cspCbfAdminMode.value == AdminMode.ONLINE - - def test_cbfHealthState(self, tango_context): - """ Test the CBF initial healthState """ - tango_context.device.cspCbfHealthState == HealthState.OK - - def test_pssState(self, tango_context): - """ Test the PSS initial State """ - assert tango_context.device.cspPssState == DevState.DISABLE - - def test_pssHealthState(self, tango_context): - """ Test the PSS initial healthState """ - assert tango_context.device.cspPssHealthState == HealthState.UNKNOWN - - def test_pssAdminMode(self, tango_context): - """ Test the PSS initial adminMode """ - pss_admin = tango_context.device.cspPssAdminMode - assert pss_admin == AdminMode.NOT_FITTED - - def test_write_adminMode_of_not_running_device(self, tango_context): - assert tango_context.device.cspPssAdminMode == AdminMode.NOT_FITTED - tango_context.device.cspPssAdminMode == AdminMode.ONLINE - time.sleep(3) - assert tango_context.device.cspPssAdminMode == AdminMode.NOT_FITTED - - def test_pstState(self, tango_context): - """ Test the PST initial State """ - assert tango_context.device.cspPstState == DevState.DISABLE - - def test_pstHealthState(self, tango_context): - """ Test the PST initial healthState """ - assert tango_context.device.cspPstHealthState == HealthState.UNKNOWN - - def test_pstAdminMode(self, tango_context): - """ Test the PST initial adminMode """ - assert tango_context.device.cspPstAdminMode == AdminMode.NOT_FITTED - - def test_subelement_cbf_address(self, tango_context): - """Test the cbfMasterAdress value""" - cbf_addr = tango_context.device.cbfMasterAddress - cbf_addr_property = self.properties['CspCbf'] - assert cbf_addr == cbf_addr_property - - def test_subelement_pss_address(self, tango_context): - """Test the pssMasterAdress value""" - pss_addr = tango_context.device.pssMasterAddress - pss_addr_property = self.properties['CspPss'] - assert pss_addr == pss_addr_property - - def test_subelement_pst_address(self, tango_context): - """Test the pstMasterAdress value""" - pst_addr = tango_context.device.pstMasterAddress - pst_addr_property = self.properties['CspPst'] - assert pst_addr == pst_addr_property - - def test_configure_On_command_duration_time(self, tango_context): - tango_context.device.onCmdDurationExpected = 3 - assert tango_context.device.onCmdDurationExpected == 3 - - def test_configure_Off_command_duration_time(self, tango_context): - tango_context.device.offCmdDurationExpected = 3 - assert tango_context.device.offCmdDurationExpected == 3 - - def test_configure_Standby_command_duration_time(self, tango_context): - tango_context.device.standbyCmdDurationExpected = 3 - assert tango_context.device.standbyCmdDurationExpected == 3 - - def test_On_valid_state(self, tango_context, cbf_master): - """ - Test to execute the On command on the CbfMaster and to verify the - attributes related dto command execution: execution measured time, - timeout, command progress. - """ - #reinit CSP and CBFTest master devices - cbf_master.Init() - # sleep for a while to wait state transition - time.sleep(3) - # check CspMstar state - assert tango_context.device.cspCbfState == DevState.STANDBY - # issue the "On" command on CbfTestMaster device - argin = [tango_context.device.cbfMasterAddress,] - tango_context.device.On(argin) - time.sleep(4) - assert tango_context.device.cspCbfState == DevState.ON - time_measured = tango_context.device.onCmdDurationMeasured - assert time_measured >= 0 - # verify the command does not timeout - on_timeout = tango_context.device.onCmdTimeoutExpired - assert not on_timeout - # verify the command progress is 100 - assert tango_context.device.onCommandProgress == 100 - failure = tango_context.device.onCmdFailure - assert not failure - failure_message = tango_context.device.onFailureMessage - assert failure_message =='' - - def test_Standby_valid_state(self, tango_context, cbf_master): - assert tango_context.device.cspCbfState == DevState.ON - # issue the "On" command on CbfTestMaster device - argin = [tango_context.device.cbfMasterAddress,] - tango_context.device.Standby(argin) - time.sleep(4) - assert tango_context.device.cspCbfState == DevState.STANDBY - standby_timeout = tango_context.device.standbyCmdTimeoutExpired - assert not standby_timeout - assert tango_context.device.standbyCommandProgress == 100 - num_of_task = tango_context.device.numOfDevCompletedTask - assert num_of_task == 1 - list_of_task = tango_context.device.listOfDevCompletedTask - assert tango_context.device.cbfMasterAddress in list_of_task - time_measured = tango_context.device.standbyCmdDurationMeasured - assert time_measured >= 0 diff --git a/csp-lmc-common/tests/CspSubarray_test.py b/csp-lmc-common/tests/CspSubarray_test.py deleted file mode 100755 index 2847e71..0000000 --- a/csp-lmc-common/tests/CspSubarray_test.py +++ /dev/null @@ -1,111 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -# -# This file is part of the csp-lmc project -# -# -# -# Distributed under the terms of the BSD-3-Clause license. -# See LICENSE.txt for more info. -"""Contain the tests for the CspMaster.""" - -# Standard imports -import sys -import os -import time -import pytest -# Tango imports -import tango -from tango import DevState -from tango.test_context import DeviceTestContext -#Local imports -from csp_lmc_common.CspSubarray import CspSubarray -from ska.base.control_model import AdminMode, ObsState, HealthState - -# Device test case -@pytest.mark.usefixtures("tango_context", "csp_master") - -class TestCspSubarray(object): - properties = {'CspMaster': 'common/elt/master', - 'CbfSubarray': 'mid_csp_cbf/sub_elt/subarray_01', - 'PssSubarray': 'mid_csp_pss/sub_elt/subarray_01', - 'SubID': 1, - } - - @classmethod - def mocking(cls): - """Mock external libraries.""" - # Example : Mock numpy - # cls.numpy = SKASubarray.numpy = MagicMock() - # PROTECTED REGION ID(SKASubarray.test_mocking) ENABLED START # - # PROTECTED REGION END # // SKASubarray.test_mocking - - def test_init_State(self, tango_context): - """Test for State at initialization """ - state = tango_context.device.state() - assert state not in [DevState.FAULT] - - def test_cbfsubarray_state(self, tango_context): - assert tango_context.device.cbfSubarrayState == DevState.OFF - - def test_cbfsubarray_adminMode(self, tango_context): - assert tango_context.device.cbfSubarrayAdminMode == AdminMode.MAINTENANCE - - def test_cbfsubarray_healthState(self, tango_context): - assert tango_context.device.cbfSubarrayHealthState == HealthState.OK - - def test_psssubarray_state(self, tango_context): - assert tango_context.device.pssSubarrayState == DevState.DISABLE - - def test_psssubarray_adminMode(self, tango_context): - assert tango_context.device.pssSubarrayAdminMode == AdminMode.NOT_FITTED - - def test_psssubarray_healthState(self, tango_context): - assert tango_context.device.pssSubarrayHealthState == HealthState.UNKNOWN - - def test_psssubarray_obsState(self, tango_context): - assert tango_context.device.pssSubarrayObsState == ObsState.IDLE - - def test_init_obsState(self, tango_context): - """Test the obsState value at initialization """ - obs_state = tango_context.device.obsState - assert obs_state == ObsState.EMPTY - - def test_commands_progress(self, tango_context): - """Test xxCmdProgress attributes """ - assert tango_context.device.scanCmdProgress == 0 - assert tango_context.device.endScanCmdProgress == 0 - assert tango_context.device.goToIdleCmdProgress == 0 - ''' - def test_configure_invalid_state(self, tango_context): - """ Test Configure command execution when subarray - State is not ON - """ - with pytest.raises(tango.DevFailed) as df: - tango_context.device.Configure("") - assert "Command Configure not allowed" in df.value.args[0].desc - - def test_subarray_off(self, tango_context, csp_master): - """ Test subarray state after power-on - NOTE: this is a wrong behaviour of CbfSubarray that - starts in DISABLE state with adminMode = ONLINE and - it moves to OFF only after a power-on. - The CbfSubarray has to start in OFF State when it is - ONLINE and there is no need to power-on it. - This behavior has to be changed - """ - csp_master.On(["mid_csp_cbf/sub_elt/master",]) - time.sleep(4) - csp_state = csp_master.State() - state = tango_context.device.cbfSubarrayState - assert state == DevState.OFF - ''' - - #def test_remove_timing_beams_while_add_is_running_state(self, tango_context): - # """ Test the execution of the RemovingTimingBeams" while - # the AddTimingBeams is already running - # """ - # tango_context.device.AddTimingBeams([1,2,3]) - # with pytest.raises(tango.DevFailed) as df: - # tango_context.device.RemoveTimingBeams([1,2]) - # assert "Can't execute command" in df.value.args[0].desc diff --git a/csp-lmc-common/tests/conftest.py b/csp-lmc-common/tests/conftest.py new file mode 100644 index 0000000..4748ce8 --- /dev/null +++ b/csp-lmc-common/tests/conftest.py @@ -0,0 +1,166 @@ +""" +This module contains pytest fixtures and other test setups common to +all ska.low.mccs tests: unit, integration and functional (BDD) +""" +import json +import pytest + + +def pytest_addoption(parser): + """ + Pytest hook; implemented to add the `--true-context` option, used to + indicate that a true Tango subsystem is available, so there is no + need for a MultiDeviceTestContext + + :param parser: the command line options parser + :type parser: an argparse parser + """ + parser.addoption( + "--true-context", + action="store_true", + help=( + "Tell pytest that you have a true Tango context and don't " + "need to spin up a Tango test context" + ), + ) + + +def _load_data_from_json(path): + """ + Loads a dataset from a named json file. + + :param path: path to the JSON file from which the dataset is to be + loaded. + :type name: string + """ + with open(path, "r") as json_file: + return json.load(json_file) + + +def _load_devices(path, device_names): + """ + Loads device configuration data for specified devices from a + specified JSON configuration file. + + :param path: path to the JSON configuration file + :type path: string + :param device_names: names of the devices for which configuration + data should be loaded + :type device_names: list of string + """ + configuration = _load_data_from_json(path) + devices_by_class = {} + + servers = configuration["servers"] + for server in servers: + print("server:{}".format(server)) + for device_name in servers[server]: + if device_name in device_names: + for class_name, device_info in servers[server][device_name].items(): + if class_name not in devices_by_class: + devices_by_class[class_name] = [] + for fqdn, device_specs in device_info.items(): + devices_by_class[class_name].append( + {"name": fqdn, **device_specs} + ) + + devices_info = [] + for device_class in devices_by_class: + device_info = [] + for device in devices_by_class[device_class]: + device_info.append(device) + + devices_info.append({"class": device_class, "devices": device_info}) + + print("devices_info:{}".format(devices_info)) + return devices_info + + +@pytest.fixture(scope="module") +def devices_to_load(request): + """ + Fixture that returns the "devices_to_load" variable from the module + under test. This variable is a dictionary containing three entries: + + * "path": the path to a JSON file containing device configuration + information in dsconfig format + * "package": the package from which classes will be loaded; for + example, if the package is "ska.low.mccs", then if the JSON + configuration file refers to a class named "MccsMaster", then this + will be interpretated as the ska.low.mccs.MccsMaster class + * "devices": a list of names of the devices that are to be loaded. + + """ + return getattr(request.module, "devices_to_load") + + +@pytest.fixture(scope="module") +def device_to_load(request): + """ + Fixture that returns the "device_to_load" variable from the module + under test. This variable is a dictionary containing three entries: + + * "path": the path to a JSON file containing device configuration + information in dsconfig format + * "package": the package from which classes will be loaded; for + example, if the package is "ska.low.mccs", then if the JSON + configuration file refers to a class named "MccsMaster", then this + will be interpretated as the ska.low.mccs.MccsMaster class + * "device": the name of the devices that is to be loaded. + + """ + return getattr(request.module, "device_to_load", None) + + +@pytest.fixture(scope="module") +def device_info(device_to_load): + """ + Constructs a device_info dictionary in the form required by + tango.test_context.DeviceTestContext, with the device as specified + by the device_to_load fixture + + :param device_to_load: fixture that provides a specification of the + device that is to be included in the devices_info dictionary + :type device_to_load: specification of devices to be loaded + :type device_to_load: dictionary + """ + devices = _load_devices( + path=device_to_load["path"], device_names=[device_to_load["device"]] + ) + print("devices:{}".format(devices)) + print("devices[0]:{}".format(devices[0])) + print("devices[0] class:{}".format(devices[0]["class"])) + class_to_import = devices[0]["class"] + print("class to import:{}".format(class_to_import)) + package = __import__(device_to_load["package"], fromlist=class_to_import) + print("package:{}".format(package)) + + return { + "class": getattr(package, devices[0]["class"]), + "properties": devices[0]["devices"][0]["properties"], + } + + +@pytest.fixture(scope="module") +def devices_info(devices_to_load): + """ + Constructs a devices_info dictionary in the form required by + tango.test_context.MultiDeviceTestContext, with devices as specified + by the devices_to_load fixture + + :param devices_to_load: fixture that provides a specification of the + devices that are to be included in the devices_info dictionary + :type devices_to_load: specification of devices to be loaded + :type devices_to_load: dictionary + """ + devices = _load_devices( + path=devices_to_load["path"], device_names=devices_to_load["devices"] + ) + + classes_to_import = list(set(device["class"] for device in devices)) + package = __import__(devices_to_load["package"], fromlist=classes_to_import) + + for device in devices: + device["class"] = getattr(package, device["class"]) + + return devices diff --git a/csp-lmc-common/tests/unit/CspMaster_test.py b/csp-lmc-common/tests/unit/CspMaster_test.py new file mode 100755 index 0000000..b95bb65 --- /dev/null +++ b/csp-lmc-common/tests/unit/CspMaster_test.py @@ -0,0 +1,130 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# +# This file is part of the csp-lmc project +# +# +# +# Distributed under the terms of the BSD-3-Clause license. +# See LICENSE.txt for more info. +"""Contain the tests for the CspMaster.""" + +# Standard imports +import numpy as np +import pytest +import tango +from tango import DevState +from tango.test_context import DeviceTestContext + +#Local imports +from csp_lmc_common import CspMaster +from ska.base.control_model import AdminMode, HealthState + +device_to_load = { + "path": "docker/config/csplmc_dsconfig.json", + "package": "csp_lmc_common", + "device": "commaster", +} +# Device test case + +@pytest.mark.mock_device_proxy +class TestCspMaster: + + def test_State(self, device_under_test): + """Test for State after initialization + NOTE: the CspMaster device state is ALARM because + this device relies on several forwarded attributes. + """ + # reinitalize Csp Master and CbfMaster devices + csp_state = device_under_test.State() + print(csp_state) + assert csp_state not in [DevState.FAULT, DevState.DISABLE] + + def test_adminMode_offline(self, device_under_test): + """ Test the adminMode attribute w/r""" + device_under_test.adminMode = AdminMode.OFFLINE + assert device_under_test.adminMode.value == AdminMode.OFFLINE + + def test_adminMode_online(self, device_under_test): + """ Test the adminMode attribute w/r""" + device_under_test.adminMode = AdminMode.ONLINE + assert device_under_test.adminMode.value == AdminMode.ONLINE + + def test_write_invalid_admin_mode(self, device_under_test): + + with pytest.raises(tango.DevFailed) as df: + device_under_test.adminMode = 7 + assert "Set value for attribute adminMode is negative or above the maximun authorized" in str(df.value.args[0].desc) + + def test_cspHealthState(self, device_under_test): + """ Test the CSP initial healthState. + NOTE: to build the CSP healthState, the sub-elements + not ONLINE or MAINTENACE are not taken into account. + """ + assert device_under_test.healthState == HealthState.OK + + def test_cbfAdminMode(self, device_under_test): + """ Test the CBF adminMode attribute w/r""" + assert device_under_test.cspCbfAdminMode == AdminMode.NOT_FITTED + + def test_cbfHealthState(self, device_under_test): + """ Test the CBF initial healthState """ + device_under_test.cspCbfHealthState == HealthState.OK + + def test_pssState(self, device_under_test): + """ Test the PSS initial State """ + assert device_under_test.cspPssState == DevState.DISABLE + + def test_pssHealthState(self, device_under_test): + """ Test the PSS initial healthState """ + assert device_under_test.cspPssHealthState == HealthState.UNKNOWN + + def test_pssAdminMode(self, device_under_test): + """ Test the PSS initial adminMode """ + pss_admin = device_under_test.cspPssAdminMode + assert pss_admin == AdminMode.NOT_FITTED + + def test_pstState(self, device_under_test): + """ Test the PST initial State """ + assert device_under_test.cspPstState == DevState.DISABLE + + def test_pstHealthState(self, device_under_test): + """ Test the PST initial healthState """ + assert device_under_test.cspPstHealthState == HealthState.UNKNOWN + + def test_pstAdminMode(self, device_under_test): + """ Test the PST initial adminMode """ + assert device_under_test.cspPstAdminMode == AdminMode.NOT_FITTED + + def test_subelement_cbf_address(self, device_under_test, device_info): + """Test the cbfMasterAdress value""" + cbf_addr = device_under_test.cbfMasterAddress + master_property = device_info['properties'] + cbf_addr_from_property = master_property['CspCbf'] + assert cbf_addr == cbf_addr_from_property[0] + + def test_subelement_pss_address(self, device_under_test, device_info): + """Test the pssMasterAdress value""" + pss_addr = device_under_test.pssMasterAddress + master_property = device_info['properties'] + pss_addr_from_property = master_property['CspPss'] + assert pss_addr == pss_addr_from_property[0] + + def test_subelement_pst_address(self, device_under_test, device_info): + """Test the pstMasterAdress value""" + pst_addr = device_under_test.pstMasterAddress + master_property = device_info['properties'] + pst_addr_from_property = master_property['CspPst'] + assert pst_addr == pst_addr_from_property[0] + + def test_configure_On_command_duration_time(self, device_under_test): + device_under_test.onCmdDurationExpected = 3 + assert device_under_test.onCmdDurationExpected == 3 + + def test_configure_Off_command_duration_time(self, device_under_test): + device_under_test.offCmdDurationExpected = 3 + assert device_under_test.offCmdDurationExpected == 3 + + def test_configure_Standby_command_duration_time(self, device_under_test): + device_under_test.standbyCmdDurationExpected = 3 + assert device_under_test.standbyCmdDurationExpected == 3 diff --git a/csp-lmc-common/tests/unit/CspSubarray_test.py b/csp-lmc-common/tests/unit/CspSubarray_test.py new file mode 100755 index 0000000..1eb3950 --- /dev/null +++ b/csp-lmc-common/tests/unit/CspSubarray_test.py @@ -0,0 +1,100 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# +# This file is part of the csp-lmc project +# +# +# +# Distributed under the terms of the BSD-3-Clause license. +# See LICENSE.txt for more info. +"""Contain the tests for the CspMaster.""" + +# Standard imports +import pytest +# Tango imports +import tango +from tango import DevState +from tango.test_context import DeviceTestContext +#Local imports +from csp_lmc_common import CspSubarray +from ska.base.control_model import AdminMode, ObsState, HealthState + +# Device test case +device_to_load = { + "path": "docker/config/csplmc_dsconfig.json", + "package": "csp_lmc_common", + "device": "comsub1", +} + +@pytest.mark.mock_device_proxy +class TestCspSubarray: + def test_init_State(self, device_under_test): + """Test for State at initialization """ + state = device_under_test.State() + print("state:{}".format(state)) + assert state not in [DevState.FAULT] + + def test_cbfsubarray_state(self, device_under_test): + assert device_under_test.cbfSubarrayState == DevState.DISABLE + + def test_cbfsubarray_adminMode(self, device_under_test): + assert device_under_test.cbfSubarrayAdminMode == AdminMode.NOT_FITTED + + def test_cbfsubarray_healthState(self, device_under_test): + assert device_under_test.cbfSubarrayHealthState == HealthState.UNKNOWN + + def test_psssubarray_state(self, device_under_test): + assert device_under_test.pssSubarrayState == DevState.DISABLE + + def test_psssubarray_adminMode(self, device_under_test): + assert device_under_test.pssSubarrayAdminMode == AdminMode.NOT_FITTED + + def test_psssubarray_healthState(self, device_under_test): + assert device_under_test.pssSubarrayHealthState == HealthState.UNKNOWN + + def test_psssubarray_obsState(self, device_under_test): + assert device_under_test.pssSubarrayObsState == ObsState.IDLE + + def test_init_obsState(self, device_under_test): + """Test the obsState value at initialization """ + obs_state = device_under_test.obsState + assert obs_state == ObsState.EMPTY + + def test_commands_progress(self, device_under_test): + """Test xxCmdProgress attributes """ + assert device_under_test.scanCmdProgress == 0 + assert device_under_test.endScanCmdProgress == 0 + assert device_under_test.goToIdleCmdProgress == 0 + ''' + def test_configure_invalid_state(self, device_under_test): + """ Test Configure command execution when subarray + State is not ON + """ + with pytest.raises(tango.DevFailed) as df: + device_under_test.Configure("") + assert "Command Configure not allowed" in df.value.args[0].desc + + def test_subarray_off(self, device_under_test, csp_master): + """ Test subarray state after power-on + NOTE: this is a wrong behaviour of CbfSubarray that + starts in DISABLE state with adminMode = ONLINE and + it moves to OFF only after a power-on. + The CbfSubarray has to start in OFF State when it is + ONLINE and there is no need to power-on it. + This behavior has to be changed + """ + csp_master.On(["mid_csp_cbf/sub_elt/master",]) + time.sleep(4) + csp_state = csp_master.State() + state = device_under_test.cbfSubarrayState + assert state == DevState.OFF + ''' + + #def test_remove_timing_beams_while_add_is_running_state(self, device_under_test): + # """ Test the execution of the RemovingTimingBeams" while + # the AddTimingBeams is already running + # """ + # device_under_test.AddTimingBeams([1,2,3]) + # with pytest.raises(tango.DevFailed) as df: + # device_under_test.RemoveTimingBeams([1,2]) + # assert "Can't execute command" in df.value.args[0].desc diff --git a/csp-lmc-common/tests/unit/conftest.py b/csp-lmc-common/tests/unit/conftest.py new file mode 100644 index 0000000..3d0e2e9 --- /dev/null +++ b/csp-lmc-common/tests/unit/conftest.py @@ -0,0 +1,75 @@ +""" +This module contains pytest fixtures and other test setups for the +ska.low.mccs unit tests +""" +from collections import defaultdict +import pytest + +# import tango +from tango.test_context import DeviceTestContext + + +def pytest_itemcollected(item): + """ + pytest hook implementation; add the "forked" custom mark to all + tests that use the `device_context` fixture, causing them to be + sandboxed in their own process + + param item: the collected test for which this hook is called + type item: a collected test + """ + if "device_under_test" in item.fixturenames: + item.add_marker("forked") + + +def pytest_configure(config): + """ + pytest hook, used here to register custom marks to get rid of spurious + warnings + """ + config.addinivalue_line( + "markers", "mock_device_proxy: the test requires tango.DeviceProxy to be mocked" + ) + + +# @pytest.fixture(scope="module") +# def device_info(request): +# """ +# Pytest fixture that retrieves the `device_info` (note singular +# "device") attribute from the module under test. The `device_info` +# attribute contains information about the device under test, such as +# property values, necessary to stand up that device in a +# tango.DeviceTestContext for unit testing. + +# :param request: A pytest object giving access to the requesting test +# context. +# :type request: _pytest.fixtures.SubRequest +# """ +# yield getattr(request.module, "device_info") + + +@pytest.fixture(scope="function") +def device_under_test(request, device_info, mocker): + """ + Creates and returns a DeviceProxy under a DeviceTestContext. + + For tests that are marked with the custom "mock_device_proxy" marker + (i.e. `@pytest.mark.mock_device_proxy`), `tango.DeviceProxy` will be + mocked prior to initialisation of the device under test. + + :param device_info: Information about the device under test that is + needed to stand the device up in a DeviceTestContext, such as + the device class and properties + :type device_info: dict + """ + mock_device_proxy = request.node.get_closest_marker("mock_device_proxy") is not None + if mock_device_proxy: + mock_device_proxies = defaultdict(mocker.Mock) + mocker.patch( + "tango.DeviceProxy", side_effect=lambda fqdn: mock_device_proxies[fqdn] + ) + + with DeviceTestContext( + device_info["class"], properties=device_info["properties"] + ) as device_under_test: + yield device_under_test -- GitLab From fe79e4de760f10a6820e729cbae40580ee8ccf5e Mon Sep 17 00:00:00 2001 From: softir Date: Wed, 16 Sep 2020 14:24:18 +0200 Subject: [PATCH 06/43] CT-147: changed image to run tests. --- csp-lmc-common/.gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csp-lmc-common/.gitlab-ci.yml b/csp-lmc-common/.gitlab-ci.yml index 81e2e6a..17eb1a8 100644 --- a/csp-lmc-common/.gitlab-ci.yml +++ b/csp-lmc-common/.gitlab-ci.yml @@ -61,7 +61,7 @@ build:csp-lmc-common_image: # .test_common: - image: nexus.engageska-portugal.pt/ska-docker/tango-builder:latest + image: nexus.engageska-portugal.pt/ska-docker/ska-python-buildenv:latest before_script: - docker login -u $DOCKER_REGISTRY_USERNAME -p $DOCKER_REGISTRY_PASSWORD $DOCKER_REGISTRY_HOST tags: -- GitLab From 1f7b44304c9a4a2b88f7fb5bd62a422f4059dbb9 Mon Sep 17 00:00:00 2001 From: softir Date: Wed, 16 Sep 2020 14:31:25 +0200 Subject: [PATCH 07/43] CT-147: fix docker login error. --- csp-lmc-common/.gitlab-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/csp-lmc-common/.gitlab-ci.yml b/csp-lmc-common/.gitlab-ci.yml index 17eb1a8..bad97a8 100644 --- a/csp-lmc-common/.gitlab-ci.yml +++ b/csp-lmc-common/.gitlab-ci.yml @@ -62,8 +62,6 @@ build:csp-lmc-common_image: .test_common: image: nexus.engageska-portugal.pt/ska-docker/ska-python-buildenv:latest - before_script: - - docker login -u $DOCKER_REGISTRY_USERNAME -p $DOCKER_REGISTRY_PASSWORD $DOCKER_REGISTRY_HOST tags: - docker-executor artifacts: -- GitLab From 4511d614fd85e4cf11be2230c79b61fd8c78dc26 Mon Sep 17 00:00:00 2001 From: softir Date: Wed, 16 Sep 2020 14:47:47 +0200 Subject: [PATCH 08/43] CT-147: csp-lmc-common files used for metrics moved from docker/build to build. --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3014950..50dff4d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -68,7 +68,7 @@ pages: - docker-executor stage: pages variables: - COMMON_PATH: csp-lmc-common/docker + COMMON_PATH: csp-lmc-common/ MIDCSP_PATH: csp-lmc-mid/docker script: - pwd @@ -80,6 +80,7 @@ pages: # path to all files is relative to the repository # that has been cloned during the build - cp -R $COMMON_PATH/build/ public + - ls -l public - cp -R $MIDCSP_PATH/build/* public - ls -lR - junitparser merge public/reports/csp-lmc-common-unit-tests.xml public/reports/csp-lmc-mid-unit-tests.xml public/reports/unit-tests.xml -- GitLab From dbd0329109f04b40b59e9dd70e7803b7f19ac346 Mon Sep 17 00:00:00 2001 From: softir Date: Wed, 16 Sep 2020 15:08:09 +0200 Subject: [PATCH 09/43] CT-147: try to fix the problem of the csp-lmc-common-unit-tests.xml that is not found during pages pipeline stage --- csp-lmc-common/setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csp-lmc-common/setup.cfg b/csp-lmc-common/setup.cfg index 22862a6..935d6a4 100644 --- a/csp-lmc-common/setup.cfg +++ b/csp-lmc-common/setup.cfg @@ -25,7 +25,7 @@ addopts = --forked --cov-report=term --cov-report=html --cov-report=xml - --junitxml=/build/reports/csp-lmc-common-unit-tests.xml + --junitxml=build/reports/csp-lmc-common-unit-tests.xml console_output_style = progress junit_family=legacy filterwarnings = -- GitLab From f8496e4251ec7437c9fd69fea3554a562068d95d Mon Sep 17 00:00:00 2001 From: toor Date: Wed, 16 Sep 2020 21:09:21 +0200 Subject: [PATCH 10/43] CT-147: first step to move csp-lmc-mid project to k8s --- csp-lmc-mid/docker/.release | 22 ------- .../Makefile | 0 .../MidCspSubarrayConfiguration_test.py | 0 .../{ => integration}/MidCspSubarray_test.py | 0 .../{ => integration}/configScan_sub1.json | 0 .../{ => integration}/configScan_sub2.json | 0 .../test_ConfigureScan_ADR4.json | 0 .../test_ConfigureScan_basic.json | 0 .../test_ConfigureScan_invalid_cbf_json.json | 0 .../test_ConfigureScan_without_configID.json | 0 ...test_ConfigureScan_without_outputlink.json | 0 .../test_requirements.txt | 0 .../utils.py | 0 .../tests/test_ConfigureScan_basic.json | 63 ------------------- 14 files changed, 85 deletions(-) delete mode 100644 csp-lmc-mid/docker/.release rename csp-lmc-mid/tests/{acceptance_tests => integration}/Makefile (100%) rename csp-lmc-mid/tests/{acceptance_tests => integration}/MidCspSubarrayConfiguration_test.py (100%) rename csp-lmc-mid/tests/{ => integration}/MidCspSubarray_test.py (100%) rename csp-lmc-mid/tests/{ => integration}/configScan_sub1.json (100%) rename csp-lmc-mid/tests/{ => integration}/configScan_sub2.json (100%) rename csp-lmc-mid/tests/{acceptance_tests => integration}/test_ConfigureScan_ADR4.json (100%) rename csp-lmc-mid/tests/{acceptance_tests => integration}/test_ConfigureScan_basic.json (100%) rename csp-lmc-mid/tests/{acceptance_tests => integration}/test_ConfigureScan_invalid_cbf_json.json (100%) rename csp-lmc-mid/tests/{acceptance_tests => integration}/test_ConfigureScan_without_configID.json (100%) rename csp-lmc-mid/tests/{acceptance_tests => integration}/test_ConfigureScan_without_outputlink.json (100%) rename csp-lmc-mid/tests/{acceptance_tests => integration}/test_requirements.txt (100%) rename csp-lmc-mid/tests/{acceptance_tests => integration}/utils.py (100%) delete mode 100644 csp-lmc-mid/tests/test_ConfigureScan_basic.json diff --git a/csp-lmc-mid/docker/.release b/csp-lmc-mid/docker/.release deleted file mode 100644 index f5a4952..0000000 --- a/csp-lmc-mid/docker/.release +++ /dev/null @@ -1,22 +0,0 @@ -# -*- coding: utf-8 -*- -# -# This file is part of the CSP.LMC prototype project -# -# -# Distributed under the terms of the BSD-3-Clause license. -# See LICENSE.txt for more info. - -"""Release information for Python Package""" - -name = """MID CSP.LMC""" -version = "0.6.9" -version_info = version.split(".") -description = """SKA MID CSP.LMC Classes""" -author = "E.G" -author_email = "elisabetta.giani@inaf.it" -license = """BSD-3-Clause""" -url = """www.tango-controls.org""" -copyright = """""" - -release=0.6.9 -tag=mid-csp-lmc-0.6.9 diff --git a/csp-lmc-mid/tests/acceptance_tests/Makefile b/csp-lmc-mid/tests/integration/Makefile similarity index 100% rename from csp-lmc-mid/tests/acceptance_tests/Makefile rename to csp-lmc-mid/tests/integration/Makefile diff --git a/csp-lmc-mid/tests/acceptance_tests/MidCspSubarrayConfiguration_test.py b/csp-lmc-mid/tests/integration/MidCspSubarrayConfiguration_test.py similarity index 100% rename from csp-lmc-mid/tests/acceptance_tests/MidCspSubarrayConfiguration_test.py rename to csp-lmc-mid/tests/integration/MidCspSubarrayConfiguration_test.py diff --git a/csp-lmc-mid/tests/MidCspSubarray_test.py b/csp-lmc-mid/tests/integration/MidCspSubarray_test.py similarity index 100% rename from csp-lmc-mid/tests/MidCspSubarray_test.py rename to csp-lmc-mid/tests/integration/MidCspSubarray_test.py diff --git a/csp-lmc-mid/tests/configScan_sub1.json b/csp-lmc-mid/tests/integration/configScan_sub1.json similarity index 100% rename from csp-lmc-mid/tests/configScan_sub1.json rename to csp-lmc-mid/tests/integration/configScan_sub1.json diff --git a/csp-lmc-mid/tests/configScan_sub2.json b/csp-lmc-mid/tests/integration/configScan_sub2.json similarity index 100% rename from csp-lmc-mid/tests/configScan_sub2.json rename to csp-lmc-mid/tests/integration/configScan_sub2.json diff --git a/csp-lmc-mid/tests/acceptance_tests/test_ConfigureScan_ADR4.json b/csp-lmc-mid/tests/integration/test_ConfigureScan_ADR4.json similarity index 100% rename from csp-lmc-mid/tests/acceptance_tests/test_ConfigureScan_ADR4.json rename to csp-lmc-mid/tests/integration/test_ConfigureScan_ADR4.json diff --git a/csp-lmc-mid/tests/acceptance_tests/test_ConfigureScan_basic.json b/csp-lmc-mid/tests/integration/test_ConfigureScan_basic.json similarity index 100% rename from csp-lmc-mid/tests/acceptance_tests/test_ConfigureScan_basic.json rename to csp-lmc-mid/tests/integration/test_ConfigureScan_basic.json diff --git a/csp-lmc-mid/tests/acceptance_tests/test_ConfigureScan_invalid_cbf_json.json b/csp-lmc-mid/tests/integration/test_ConfigureScan_invalid_cbf_json.json similarity index 100% rename from csp-lmc-mid/tests/acceptance_tests/test_ConfigureScan_invalid_cbf_json.json rename to csp-lmc-mid/tests/integration/test_ConfigureScan_invalid_cbf_json.json diff --git a/csp-lmc-mid/tests/acceptance_tests/test_ConfigureScan_without_configID.json b/csp-lmc-mid/tests/integration/test_ConfigureScan_without_configID.json similarity index 100% rename from csp-lmc-mid/tests/acceptance_tests/test_ConfigureScan_without_configID.json rename to csp-lmc-mid/tests/integration/test_ConfigureScan_without_configID.json diff --git a/csp-lmc-mid/tests/acceptance_tests/test_ConfigureScan_without_outputlink.json b/csp-lmc-mid/tests/integration/test_ConfigureScan_without_outputlink.json similarity index 100% rename from csp-lmc-mid/tests/acceptance_tests/test_ConfigureScan_without_outputlink.json rename to csp-lmc-mid/tests/integration/test_ConfigureScan_without_outputlink.json diff --git a/csp-lmc-mid/tests/acceptance_tests/test_requirements.txt b/csp-lmc-mid/tests/integration/test_requirements.txt similarity index 100% rename from csp-lmc-mid/tests/acceptance_tests/test_requirements.txt rename to csp-lmc-mid/tests/integration/test_requirements.txt diff --git a/csp-lmc-mid/tests/acceptance_tests/utils.py b/csp-lmc-mid/tests/integration/utils.py similarity index 100% rename from csp-lmc-mid/tests/acceptance_tests/utils.py rename to csp-lmc-mid/tests/integration/utils.py diff --git a/csp-lmc-mid/tests/test_ConfigureScan_basic.json b/csp-lmc-mid/tests/test_ConfigureScan_basic.json deleted file mode 100644 index 51f2dd6..0000000 --- a/csp-lmc-mid/tests/test_ConfigureScan_basic.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "id": "sbi-mvp01-20200325-00001-science_A", - "frequencyBand": "1", - "delayModelSubscriptionPoint": "ska_mid/tm_leaf_node/csp_subarray_01/delayModel", - - "fsp": [ - { - "fspID": 1, - "functionMode": "CORR", - "frequencySliceID": 1, - "corrBandwidth": 0, - "integrationTime": 140, - "fspChannelOffset": 0, - "channelAveragingMap": [ - [0, 1], - [744, 1], - [1488, 1], - [2232, 1], - [2976, 1], - [3720, 1], - [4464, 1], - [5208, 1], - [5952, 1], - [6696, 1], - [7440, 1], - [8184, 1], - [8928, 1], - [9672, 1], - [10416, 1], - [11160, 1], - [11904, 1], - [12648, 1], - [13392, 1], - [14136, 1] - ], - "outputLinkMap": [ - [0, 4], - [744, 8], - [1480, 12], - [2234, 16], - [2978, 20], - [3722, 24], - [4466, 28], - [5208, 32], - [5952, 36], - [6696, 40], - [7440, 44], - [8184, 48], - [8928, 52], - [9672, 56], - [10416, 60], - [11160, 64], - [11904, 68], - [12648, 72], - [13392, 76], - [14136, 80] - ], - "outputHost": [[0, "192.168.0.1"], [8184, "192.168.0.2"]], - "outputMac": [[0, "06-00-00-00-00-01"]], - "outputPort": [[0, 9000, 1], [8184, 9000, 1]] - } - ] -} -- GitLab From e55ed87365b8ca558ed8de0d9abc0da63d99f71e Mon Sep 17 00:00:00 2001 From: toor Date: Wed, 16 Sep 2020 23:01:10 +0200 Subject: [PATCH 11/43] CT-147: first step in moving csp-lmc-mid from docker-compose to k8s --- .gitlab-ci.yml | 2 +- csp-lmc-mid/.gitlab-ci.yml | 78 +- csp-lmc-mid/.make/.make-release-support | 106 + csp-lmc-mid/.make/k8s.mk | 283 ++ csp-lmc-mid/.make/postdeploy.mk | 130 + csp-lmc-mid/.make/release.mk | 119 + csp-lmc-mid/.release | 22 + csp-lmc-mid/Dockerfile | 10 + csp-lmc-mid/Makefile | 91 + csp-lmc-mid/charts/csp-proto/Chart.yaml | 6 + .../charts/csp-proto/data/configuration.json | 1563 ++++++++++ .../charts/csp-proto/data/cspconfig.json | 838 ++++++ csp-lmc-mid/charts/csp-proto/secrets/.gitkeep | 0 csp-lmc-mid/charts/csp-proto/secrets/tls.crt | 20 + csp-lmc-mid/charts/csp-proto/secrets/tls.key | 28 + .../charts/csp-proto/templates/_helpers.tpl | 32 + .../charts/csp-proto/templates/csplmc.yaml | 147 + csp-lmc-mid/charts/csp-proto/values.yaml | 79 + csp-lmc-mid/charts/csp-proto/values.yaml.new | 59 + csp-lmc-mid/charts/mid-csp/Chart.lock | 9 + csp-lmc-mid/charts/mid-csp/Chart.yaml | 15 + .../mid-csp/charts/cbf-proto/Chart.yaml | 6 + .../charts/cbf-proto/data/midcbfconfig.json | 1719 +++++++++++ .../mid-csp/charts/cbf-proto/secrets/.gitkeep | 0 .../charts/cbf-proto/templates/_helpers.tpl | 32 + .../charts/cbf-proto/templates/midcbf.yaml | 146 + .../mid-csp/charts/cbf-proto/values.yaml | 154 + .../charts/mid-csp/charts/csp-proto-0.5.3.tgz | Bin 0 -> 10344 bytes .../mid-csp/charts/tango-base-0.1.1.tgz | Bin 0 -> 8849 bytes csp-lmc-mid/charts/mid-csp/requirements.lock | 9 + csp-lmc-mid/charts/mid-csp/secrets/.gitkeep | 0 csp-lmc-mid/charts/mid-csp/secrets/tls.crt | 20 + csp-lmc-mid/charts/mid-csp/secrets/tls.key | 28 + csp-lmc-mid/docker/.make/Makefile.mk | 4 +- csp-lmc-mid/docker/config/config_result.json | 2542 +++++++++++++++++ csp-lmc-mid/docker/mid-cbf-mcs.yml | 4 +- csp-lmc-mid/docker/mid-csp-lmc.yml | 4 +- csp-lmc-mid/requirements-tst.txt | 9 + csp-lmc-mid/requirements.txt | 5 + csp-lmc-mid/setup.cfg | 2 +- csp-lmc-mid/setup.py | 1 - csp-lmc-mid/test-harness/Makefile | 31 + csp-lmc-mid/test-harness/README.md | 3 + csp-lmc-mid/test-harness/requirements-tst.txt | 9 + csp-lmc-mid/test-harness/requirements.txt | 5 + .../{ => integration}/MidCspMaster_test.py | 4 +- .../MidCspSubarrayConfiguration_test.py | 381 --- .../tests/integration/MidCspSubarray_test.py | 156 +- .../integration/test_ConfigureScan_basic.json | 107 +- csp-lmc-mid/tests/integration/utils.py | 2 +- .../tests/test_data/configScan_sub1.json | 63 + .../tests/test_data/configScan_sub2.json | 63 + .../test_data/test_ConfigureScan_ADR4.json | 77 + .../test_data/test_ConfigureScan_basic.json | 63 + .../test_ConfigureScan_invalid_cbf_json.json | 63 + .../test_ConfigureScan_without_configID.json | 62 + ...test_ConfigureScan_without_outputlink.json | 41 + .../tests/unit/midcspsubarray_unit_test.py | 2 +- csp-lmc-mid/tests/unit/utils.py | 2 +- csp-lmc-mid/tools/adr8_cbf_plot.py | 138 + csp-lmc-mid/tools/adr8_plot.py | 119 + 61 files changed, 9143 insertions(+), 570 deletions(-) create mode 100644 csp-lmc-mid/.make/.make-release-support create mode 100644 csp-lmc-mid/.make/k8s.mk create mode 100644 csp-lmc-mid/.make/postdeploy.mk create mode 100644 csp-lmc-mid/.make/release.mk create mode 100644 csp-lmc-mid/.release create mode 100644 csp-lmc-mid/Dockerfile create mode 100644 csp-lmc-mid/Makefile create mode 100644 csp-lmc-mid/charts/csp-proto/Chart.yaml create mode 100644 csp-lmc-mid/charts/csp-proto/data/configuration.json create mode 100644 csp-lmc-mid/charts/csp-proto/data/cspconfig.json create mode 100644 csp-lmc-mid/charts/csp-proto/secrets/.gitkeep create mode 100644 csp-lmc-mid/charts/csp-proto/secrets/tls.crt create mode 100644 csp-lmc-mid/charts/csp-proto/secrets/tls.key create mode 100644 csp-lmc-mid/charts/csp-proto/templates/_helpers.tpl create mode 100644 csp-lmc-mid/charts/csp-proto/templates/csplmc.yaml create mode 100644 csp-lmc-mid/charts/csp-proto/values.yaml create mode 100644 csp-lmc-mid/charts/csp-proto/values.yaml.new create mode 100644 csp-lmc-mid/charts/mid-csp/Chart.lock create mode 100644 csp-lmc-mid/charts/mid-csp/Chart.yaml create mode 100644 csp-lmc-mid/charts/mid-csp/charts/cbf-proto/Chart.yaml create mode 100644 csp-lmc-mid/charts/mid-csp/charts/cbf-proto/data/midcbfconfig.json create mode 100644 csp-lmc-mid/charts/mid-csp/charts/cbf-proto/secrets/.gitkeep create mode 100644 csp-lmc-mid/charts/mid-csp/charts/cbf-proto/templates/_helpers.tpl create mode 100644 csp-lmc-mid/charts/mid-csp/charts/cbf-proto/templates/midcbf.yaml create mode 100644 csp-lmc-mid/charts/mid-csp/charts/cbf-proto/values.yaml create mode 100644 csp-lmc-mid/charts/mid-csp/charts/csp-proto-0.5.3.tgz create mode 100644 csp-lmc-mid/charts/mid-csp/charts/tango-base-0.1.1.tgz create mode 100644 csp-lmc-mid/charts/mid-csp/requirements.lock create mode 100644 csp-lmc-mid/charts/mid-csp/secrets/.gitkeep create mode 100644 csp-lmc-mid/charts/mid-csp/secrets/tls.crt create mode 100644 csp-lmc-mid/charts/mid-csp/secrets/tls.key create mode 100644 csp-lmc-mid/docker/config/config_result.json create mode 100644 csp-lmc-mid/requirements-tst.txt create mode 100644 csp-lmc-mid/requirements.txt create mode 100644 csp-lmc-mid/test-harness/Makefile create mode 100644 csp-lmc-mid/test-harness/README.md create mode 100644 csp-lmc-mid/test-harness/requirements-tst.txt create mode 100644 csp-lmc-mid/test-harness/requirements.txt rename csp-lmc-mid/tests/{ => integration}/MidCspMaster_test.py (99%) delete mode 100644 csp-lmc-mid/tests/integration/MidCspSubarrayConfiguration_test.py create mode 100644 csp-lmc-mid/tests/test_data/configScan_sub1.json create mode 100644 csp-lmc-mid/tests/test_data/configScan_sub2.json create mode 100644 csp-lmc-mid/tests/test_data/test_ConfigureScan_ADR4.json create mode 100644 csp-lmc-mid/tests/test_data/test_ConfigureScan_basic.json create mode 100644 csp-lmc-mid/tests/test_data/test_ConfigureScan_invalid_cbf_json.json create mode 100644 csp-lmc-mid/tests/test_data/test_ConfigureScan_without_configID.json create mode 100644 csp-lmc-mid/tests/test_data/test_ConfigureScan_without_outputlink.json create mode 100644 csp-lmc-mid/tools/adr8_cbf_plot.py create mode 100644 csp-lmc-mid/tools/adr8_plot.py diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 50dff4d..bebdd60 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -41,8 +41,8 @@ stages: - test_common - publish_common - build - - test - linting + - test - pages - publish - release diff --git a/csp-lmc-mid/.gitlab-ci.yml b/csp-lmc-mid/.gitlab-ci.yml index 1b8306a..28cfc4a 100644 --- a/csp-lmc-mid/.gitlab-ci.yml +++ b/csp-lmc-mid/.gitlab-ci.yml @@ -52,7 +52,7 @@ build:csp-lmc-mid_image: - cd $BUILD_PATH - make build variables: - BUILD_PATH: csp-lmc-mid/docker + BUILD_PATH: csp-lmc-mid # test:csp-lmc-mid: # stage: test @@ -76,38 +76,76 @@ build:csp-lmc-mid_image: # .test: - image: nexus.engageska-portugal.pt/ska-docker/tango-builder:latest - before_script: - - docker login -u $DOCKER_REGISTRY_USERNAME -p $DOCKER_REGISTRY_PASSWORD $DOCKER_REGISTRY_HOST - tags: - - docker-executor + stage: test artifacts: paths: - ./$BUILD_PATH/build/ variables: - BUILD_PATH: csp-lmc-mid/docker - -test:csp-lmc-mid: + BUILD_PATH: csp-lmc-mid + # +#unit:csp-lmc-mid: +# extends: .test +# stage: test +# script: +# - cd $BUILD_PATH +# - pwd +# - python3 -m pip install -r requirements-tst.txt +# - python3 -m pip install --extra-index-url https://nexus.engageska-portugal.pt/repository/pypi/simple -r requirements.txt +# - python3 setup.py test --addopts='-k-integration' |tee setup_py_test.stdout +# - pwd +# - mkdir -p build/reports +# - ls -alR +# - mv setup_py_test.stdout build/csp-lmc-mid-setup-test.stdout +# - mv htmlcov build/csp-lmc-mid_htmlcov +# - mv coverage.xml build + +integration:csp-lmc-mid: + tags: + - auto-k8sv2 extends: .test - stage: test + image: nexus.engageska-portugal.pt/ska-docker/ska-python-buildenv:latest script: + - curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.18.2/bin/linux/amd64/kubectl + - chmod +x ./kubectl + - sudo mv ./kubectl /usr/local/bin/kubectl + - curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 + - chmod 700 get_helm.sh + - ./get_helm.sh + - kubectl get pod --all-namespaces + - kubectl get namespaces - cd $BUILD_PATH - - make test + - export KUBE_NAMESPACE="ci-$CI_COMMIT_SHORT_SHA" + - make k8s_test + after_script: + - export KUBE_NAMESPACE="ci-$CI_COMMIT_SHORT_SHA" + - cd $BUILD_PATH + - pwd + - make delete + - make delete_namespace # linting stage -.linting: - extends: .test +# +linting:csp-lmc-mid: + image: nexus.engageska-portugal.pt/ska-docker/ska-python-buildenv:latest stage: linting + tags: + - docker-executor + artifacts: + paths: + - ./$BUILD_PATH/build/ dependencies: [] script: - apt-get -y update - apt-get install -y python3-pip python3-setuptools python3-wheel --no-install-recommends + - python3 -m pip install pylint2junit - cd $BUILD_PATH - - make lint - -linting:csp-lmc-mid: - extends: .linting - dependencies: [] + - python3 -m pip install --extra-index-url https://nexus.engageska-portugal.pt/repository/pypi/simple -r requirements.txt + - mkdir -p build/reports + - pylint --output-format=parseable csp_lmc_mid | tee ./build/csp_lmc_mid-code-analysis.stdout + - pylint --output-format=pylint2junit.JunitReporter csp_lmc_mid > ./build/reports/csp-lmc-mid-linting.xml + - ls -alR + variables: + BUILD_PATH: csp-lmc-mid # # Publish csp-lmc-mid python package @@ -122,7 +160,7 @@ linting:csp-lmc-mid: tags: - docker-executor before_script: - - python3 -m pip install twine + - pip install twine .publish_python_dev: extends: .publish_python @@ -171,4 +209,4 @@ release csp-lmc-mid image: refs: - master variables: - BUILD_PATH: csp-lmc-mid/docker + BUILD_PATH: csp-lmc-mid diff --git a/csp-lmc-mid/.make/.make-release-support b/csp-lmc-mid/.make/.make-release-support new file mode 100644 index 0000000..f1f3a2c --- /dev/null +++ b/csp-lmc-mid/.make/.make-release-support @@ -0,0 +1,106 @@ +#!/bin/bash +# +# Copyright 2015 Xebia Nederland B.V. +# Modifications copyright 2019 SKA Organisation +# +# 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. +# +function hasChanges() { + test -n "$(git status -s .)" +} + +function getRelease() { + awk -F= '/^release=/{print $2}' .release +} + +function getBaseTag() { + sed -n -e "s/^tag=\(.*\)$(getRelease)\$/\1/p" .release +} + +function getTag() { + if [ -z "$1" ] ; then + awk -F= '/^tag/{print $2}' .release + else + echo "$(getBaseTag)$1" + fi +} + +function setRelease() { + if [ -n "$1" ] ; then + sed -i.x -e "s/^tag=.*/tag=$(getTag $1)/" .release + sed -i.x -e "s/^release=.*/release=$1/g" .release + rm -f .release.x + runPreTagCommand "$1" + else + echo "ERROR: missing release version parameter " >&2 + return 1 + fi +} + +function runPreTagCommand() { + if [ -n "$1" ] ; then + COMMAND=$(sed -n -e "s/@@RELEASE@@/$1/g" -e 's/^pre_tag_command=\(.*\)/\1/p' .release) + if [ -n "$COMMAND" ] ; then + if ! OUTPUT=$(bash -c "$COMMAND" 2>&1) ; then echo $OUTPUT >&2 && exit 1 ; fi + fi + else + echo "ERROR: missing release version parameter " >&2 + return 1 + fi +} + +function tagExists() { + tag=${1:-$(getTag)} + test -n "$tag" && test -n "$(git tag | grep "^$tag\$")" +} + +function differsFromRelease() { + tag=$(getTag) + ! tagExists $tag || test -n "$(git diff --shortstat -r $tag .)" +} + +function getVersion() { + result=$(getRelease) + + if differsFromRelease; then + result="$result-$(git log -n 1 --format=%h .)" + fi + + if hasChanges ; then + result="$result-dirty" + fi + echo $result +} + +function nextPatchLevel() { + version=${1:-$(getRelease)} + major_and_minor=$(echo $version | cut -d. -f1,2) + patch=$(echo $version | cut -d. -f3) + version=$(printf "%s.%d" $major_and_minor $(($patch + 1))) + echo $version +} + +function nextMinorLevel() { + version=${1:-$(getRelease)} + major=$(echo $version | cut -d. -f1); + minor=$(echo $version | cut -d. -f2); + version=$(printf "%d.%d.0" $major $(($minor + 1))) ; + echo $version +} + +function nextMajorLevel() { + version=${1:-$(getRelease)} + major=$(echo $version | cut -d. -f1); + version=$(printf "%d.0.0" $(($major + 1))) + echo $version +} diff --git a/csp-lmc-mid/.make/k8s.mk b/csp-lmc-mid/.make/k8s.mk new file mode 100644 index 0000000..15673e2 --- /dev/null +++ b/csp-lmc-mid/.make/k8s.mk @@ -0,0 +1,283 @@ +IMAGE_TO_RUN_TEST ?= nexus.engageska-portugal.pt/ska-docker/ska-python-buildenv:latest +k8s: ## Which kubernetes are we connected to + @echo "Kubernetes cluster-info:" + @kubectl cluster-info + @echo "" + @echo "kubectl version:" + @kubectl version + @echo "" + @echo "Helm version:" + @helm version --client + +namespace: ## create the kubernetes namespace + kubectl describe namespace $(KUBE_NAMESPACE) || kubectl create namespace $(KUBE_NAMESPACE) + +delete_namespace: ## delete the kubernetes namespace + @if [ "default" == "$(KUBE_NAMESPACE)" ] || [ "kube-system" == "$(KUBE_NAMESPACE)" ]; then \ + echo "You cannot delete Namespace: $(KUBE_NAMESPACE)"; \ + exit 1; \ + else \ + kubectl describe namespace $(KUBE_NAMESPACE) && kubectl delete namespace $(KUBE_NAMESPACE); \ + fi + +deploy: namespace mkcerts depends ## deploy the helm chart + @helm install $(HELM_RELEASE) charts/$(HELM_CHART)/ \ + --namespace $(KUBE_NAMESPACE) \ + --set xauthority="$(XAUTHORITYx)" \ + --set display="$(DISPLAY)" \ + --set ingress.hostname=$(INGRESS_HOST) \ + --set helmTests=false + +delete: ## delete the helm chart release + @helm uninstall $(HELM_RELEASE) --namespace $(KUBE_NAMESPACE) + +install: namespace mkcerts ## install the helm chart + @helm install $(HELM_RELEASE) charts/$(HELM_CHART)/ \ + --namespace $(KUBE_NAMESPACE) \ + --set xauthority="$(XAUTHORITYx)" \ + --set display="$(DISPLAY)" \ + --set ingress.hostname=$(INGRESS_HOST) + +show: mkcerts ## show the helm chart + @helm template $(HELM_RELEASE) charts/$(HELM_CHART)/ \ + --namespace $(KUBE_NAMESPACE) \ + --set xauthority="$(XAUTHORITYx)" \ + --set display="$(DISPLAY)" \ + --set ingress.hostname=$(INGRESS_HOST) + +chart_lint: ## lint check the helm chart + @helm lint charts/$(HELM_CHART)/ \ + --namespace $(KUBE_NAMESPACE) \ + --set ingress.hostname=$(INGRESS_HOST) \ + --set xauthority="$(XAUTHORITYx)" \ + --set display="$(DISPLAY)" \ + +helm_delete: ## delete the helm chart release (with Tiller) + @helm delete $(HELM_RELEASE) --purge \ + + +traefik: ## install the helm chart for traefik (in the kube-system namespace). @param: EXTERNAL_IP (i.e. private ip of the master node). + @TMP=`mktemp -d`; \ + $(helm_add_stable_repo) && \ + helm fetch stable/traefik --untar --untardir $$TMP && \ + helm template $(helm_install_shim) $$TMP/traefik -n traefik0 --namespace kube-system \ + --set externalIP="$(EXTERNAL_IP)" \ + | kubectl apply -n kube-system -f - && \ + rm -rf $$TMP ; \ + + +delete_traefik: ## delete the helm chart for traefik. @param: EXTERNAL_IP + @TMP=`mktemp -d`; \ + $(helm_add_stable_repo) && \ + helm fetch stable/traefik --untar --untardir $$TMP && \ + helm template $(helm_install_shim) $$TMP/traefik -n traefik0 --namespace kube-system \ + --set externalIP="$(EXTERNAL_IP)" \ + | kubectl delete -n kube-system -f - && \ + rm -rf $$TMP + +describe: ## describe Pods executed from Helm chart + @for i in `kubectl -n $(KUBE_NAMESPACE) get pods -l app.kubernetes.io/instance=$(HELM_RELEASE) -o=name`; \ + do echo "---------------------------------------------------"; \ + echo "Describe for $${i}"; \ + echo kubectl -n $(KUBE_NAMESPACE) describe $${i}; \ + echo "---------------------------------------------------"; \ + kubectl -n $(KUBE_NAMESPACE) describe $${i}; \ + echo "---------------------------------------------------"; \ + echo ""; echo ""; echo ""; \ + done + +logs: ## show Helm chart POD logs + @for i in `kubectl -n $(KUBE_NAMESPACE) get pods -l app.kubernetes.io/instance=$(HELM_RELEASE) -o=name`; \ + do \ + echo "---------------------------------------------------"; \ + echo "Logs for $${i}"; \ + echo kubectl -n $(KUBE_NAMESPACE) logs $${i}; \ + echo kubectl -n $(KUBE_NAMESPACE) get $${i} -o jsonpath="{.spec.initContainers[*].name}"; \ + echo "---------------------------------------------------"; \ + for j in `kubectl -n $(KUBE_NAMESPACE) get $${i} -o jsonpath="{.spec.initContainers[*].name}"`; do \ + RES=`kubectl -n $(KUBE_NAMESPACE) logs $${i} -c $${j} 2>/dev/null`; \ + echo "initContainer: $${j}"; echo "$${RES}"; \ + echo "---------------------------------------------------";\ + done; \ + echo "Main Pod logs for $${i}"; \ + echo "---------------------------------------------------"; \ + for j in `kubectl -n $(KUBE_NAMESPACE) get $${i} -o jsonpath="{.spec.containers[*].name}"`; do \ + RES=`kubectl -n $(KUBE_NAMESPACE) logs $${i} -c $${j} 2>/dev/null`; \ + echo "Container: $${j}"; echo "$${RES}"; \ + echo "---------------------------------------------------";\ + done; \ + echo "---------------------------------------------------"; \ + echo ""; echo ""; echo ""; \ + done + +localip: ## set local Minikube IP in /etc/hosts file for Ingress $(INGRESS_HOST) + @new_ip=`minikube ip` && \ + existing_ip=`grep $(INGRESS_HOST) /etc/hosts || true` && \ + echo "New IP is: $${new_ip}" && \ + echo "Existing IP: $${existing_ip}" && \ + if [ -z "$${existing_ip}" ]; then echo "$${new_ip} $(INGRESS_HOST)" | sudo tee -a /etc/hosts; \ + else sudo perl -i -ne "s/\d+\.\d+.\d+\.\d+/$${new_ip}/ if /$(INGRESS_HOST)/; print" /etc/hosts; fi && \ + echo "/etc/hosts is now: " `grep $(INGRESS_HOST) /etc/hosts` + +mkcerts: ## Make dummy certificates for $(INGRESS_HOST) and Ingress + @if [ ! -f charts/$(HELM_CHART)/secrets/tls.key ]; then \ + openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 \ + -keyout charts/$(HELM_CHART)/secrets/tls.key \ + -out charts/$(HELM_CHART)/secrets/tls.crt \ + -subj "/CN=$(INGRESS_HOST)/O=Minikube"; \ + else \ + echo "SSL cert already exits in charts/$(HELM_CHART)/secrets ... skipping"; \ + fi + +# Utility target to install Helm dependencies +helm_dependencies: + @which helm ; rc=$$?; \ + if [[ $$rc != 0 ]]; then \ + curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3; \ + chmod 700 get_helm.sh; \ + ./get_helm.sh; \ + fi; \ + helm version --client + +# Utility target to install K8s dependencies +kubectl_dependencies: + @([ -n "$(KUBE_CONFIG_BASE64)" ] && [ -n "$(KUBECONFIG)" ]) || (echo "unset variables [KUBE_CONFIG_BASE64/KUBECONFIG] - abort!"; exit 1) + @which kubectl ; rc=$$?; \ + if [[ $$rc != 0 ]]; then \ + curl -L -o /usr/bin/kubectl "https://storage.googleapis.com/kubernetes-release/release/$(KUBERNETES_VERSION)/bin/linux/amd64/kubectl"; \ + chmod +x /usr/bin/kubectl; \ + mkdir -p /etc/deploy; \ + echo $(KUBE_CONFIG_BASE64) | base64 -d > $(KUBECONFIG); \ + fi + @echo -e "\nkubectl client version:" + @kubectl version --client + @echo -e "\nkubectl config view:" + @kubectl config view + @echo -e "\nkubectl config get-contexts:" + @kubectl config get-contexts + @echo -e "\nkubectl version:" + @kubectl version + +kubeconfig: ## export current KUBECONFIG as base64 ready for KUBE_CONFIG_BASE64 + @KUBE_CONFIG_BASE64=`kubectl config view --flatten | base64 -w 0`; \ + echo "KUBE_CONFIG_BASE64: $$(echo $${KUBE_CONFIG_BASE64} | cut -c 1-40)..."; \ + echo "appended to: PrivateRules.mak"; \ + echo -e "\n\n# base64 encoded from: kubectl config view --flatten\nKUBE_CONFIG_BASE64 = $${KUBE_CONFIG_BASE64}" >> PrivateRules.mak + +wait: + @echo "Waiting for device servers to be ready" + @date + @kubectl -n $(KUBE_NAMESPACE) get pods -l cspServer + @kubectl -n $(KUBE_NAMESPACE) wait --for=condition=ready --timeout=120s -l cspServer pods + @date + +# +# defines a function to copy the ./test-harness directory into the K8s TEST_RUNNER +# and then runs the requested make target in the container. +# capture the output of the test in a tar file +# stream the tar file base64 encoded to the Pod logs +# +k8s_test = tar -c . | \ + kubectl run $(TEST_RUNNER) \ + --namespace $(KUBE_NAMESPACE) -i --wait --restart=Never \ + --image-pull-policy=IfNotPresent \ + --image=$(IMAGE_TO_RUN_TEST) -- \ + /bin/bash -c "tar xv --strip-components 1 --warning=all && \ + python3 -m pip install --extra-index-url https://nexus.engageska-portugal.pt/repository/pypi/simple -r requirements.txt &&\ + python3 -m pip install . &&\ + cd test-harness &&\ + make TANGO_HOST=databaseds-tango-base-$(HELM_RELEASE):10000 $1 && \ + tar -czvf /tmp/build.tgz build && \ + echo '~~~~BOUNDARY~~~~' && \ + cat /tmp/build.tgz | base64 && \ + echo '~~~~BOUNDARY~~~~'" \ + 2>&1 + +# run the test function +# save the status +# clean out build dir +# print the logs minus the base64 encoded payload +# pull out the base64 payload and unpack build/ dir +# base64 payload is given a boundary "~~~~BOUNDARY~~~~" and extracted using perl +# clean up the run to completion container +# exit the saved status +k8s_test: deploy wait## test the application on K8s + @echo "KUBE_NAMESPACE: $(KUBE_NAMESPACE)" + $(call k8s_test,test); \ + status=$$?; \ + rm -fr build; \ + kubectl --namespace $(KUBE_NAMESPACE) logs $(TEST_RUNNER) | perl -ne 'BEGIN {$$on=1;}; if (index($$_, "~~~~BOUNDARY~~~~")!=-1){$$on+=1;next;}; print if $$on % 2;'; \ + kubectl --namespace $(KUBE_NAMESPACE) logs $(TEST_RUNNER) | \ + perl -ne 'BEGIN {$$on=0;}; if (index($$_, "~~~~BOUNDARY~~~~")!=-1){$$on+=1;next;}; print if $$on % 2;' | \ + base64 -d | tar -xzf -; \ + kubectl --namespace $(KUBE_NAMESPACE) delete pod $(TEST_RUNNER); \ + exit $$status + + +rlint: ## run lint check on Helm Chart using gitlab-runner + if [ -n "$(RDEBUG)" ]; then DEBUG_LEVEL=debug; else DEBUG_LEVEL=warn; fi && \ + gitlab-runner --log-level $${DEBUG_LEVEL} exec $(EXECUTOR) \ + --docker-privileged \ + --docker-disable-cache=false \ + --docker-host $(DOCKER_HOST) \ + --docker-volumes $(DOCKER_VOLUMES) \ + --docker-pull-policy always \ + --timeout $(TIMEOUT) \ + --env "DOCKER_HOST=$(DOCKER_HOST)" \ + --env "DOCKER_REGISTRY_USER_LOGIN=$(DOCKER_REGISTRY_USER_LOGIN)" \ + --env "CI_REGISTRY_PASS_LOGIN=$(CI_REGISTRY_PASS_LOGIN)" \ + --env "CI_REGISTRY=$(CI_REGISTRY)" \ + lint-check-chart || true + +# K8s testing with local gitlab-runner +# Run the powersupply tests in the TEST_RUNNER run to completion Pod: +# set namespace +# install dependencies for Helm and kubectl +# deploy into namespace +# run test in run to completion Pod +# extract Pod logs +# set test return code +# delete +# delete namespace +# return result +rk8s_test: ## run k8s_test on K8s using gitlab-runner + if [ -n "$(RDEBUG)" ]; then DEBUG_LEVEL=debug; else DEBUG_LEVEL=warn; fi && \ + KUBE_NAMESPACE=`git rev-parse --abbrev-ref HEAD | tr -dc 'A-Za-z0-9\-' | tr '[:upper:]' '[:lower:]'` && \ + gitlab-runner --log-level $${DEBUG_LEVEL} exec $(EXECUTOR) \ + --docker-privileged \ + --docker-disable-cache=false \ + --docker-host $(DOCKER_HOST) \ + --docker-volumes $(DOCKER_VOLUMES) \ + --docker-pull-policy always \ + --timeout $(TIMEOUT) \ + --env "DOCKER_HOST=$(DOCKER_HOST)" \ + --env "DOCKER_REGISTRY_USER_LOGIN=$(DOCKER_REGISTRY_USER_LOGIN)" \ + --env "CI_REGISTRY_PASS_LOGIN=$(CI_REGISTRY_PASS_LOGIN)" \ + --env "CI_REGISTRY=$(CI_REGISTRY)" \ + --env "KUBE_CONFIG_BASE64=$(KUBE_CONFIG_BASE64)" \ + --env "KUBECONFIG=$(KUBECONFIG)" \ + --env "KUBE_NAMESPACE=$${KUBE_NAMESPACE}" \ + test-chart || true + + +helm_tests: ## run Helm chart tests + helm test $(HELM_RELEASE) --cleanup + +ingress_check: ## curl test Tango REST API - https://tango-controls.readthedocs.io/en/latest/development/advanced/rest-api.html#tango-rest-api-implementations + @echo "---------------------------------------------------" + @echo "Test HTTP:"; echo "" + curl -u "tango-cs:tango" -XGET http://$(INGRESS_HOST)/tango/rest/rc4/hosts/databaseds-tango-example-$(HELM_RELEASE)/10000 | json_pp + @echo "", echo "" + @echo "---------------------------------------------------" + @echo "Test HTTPS:"; echo "" + curl -k -u "tango-cs:tango" -XGET https://$(INGRESS_HOST)/tango/rest/rc4/hosts/databaseds-tango-example-$(HELM_RELEASE)/10000 | json_pp + @echo "" + +help: ## show this help. + @echo "make targets:" + @grep -hE '^[0-9a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' + @echo ""; echo "make vars (+defaults):" + @grep -hE '^[0-9a-zA-Z_-]+ \?=.*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = " \?\= "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | sed -e 's/\#\#/ \#/' + +depends: + helm dependency update charts/$(HELM_CHART)/ diff --git a/csp-lmc-mid/.make/postdeploy.mk b/csp-lmc-mid/.make/postdeploy.mk new file mode 100644 index 0000000..ffc6536 --- /dev/null +++ b/csp-lmc-mid/.make/postdeploy.mk @@ -0,0 +1,130 @@ +.PHONY: k8s_test smoketest template_tests tango_rest_ingress_check + +# +# IMAGE_TO_TEST defines the tag of the Docker image to test +# +IMAGE_TO_TEST ?= nexus.engageska-portugal.pt/ska-docker/tango-vscode:0.2.4## docker image that will be run for testing purpose +#IMAGE_TO_TEST = $(DOCKER_REGISTRY_HOST)/$(DOCKER_REGISTRY_USER)/$(PROJECT):latest +# Test runner - run to completion job in K8s +TEST_RUNNER = test-makefile-runner-$(CI_JOB_ID)-$(KUBE_NAMESPACE)-$(HELM_RELEASE)##name of the pod running the k8s_tests +# +# defines a function to copy the ./test-harness directory into the K8s TEST_RUNNER +# and then runs the requested make target in the container. +# capture the output of the test in a build folder inside the container +# +TANGO_HOST = databaseds-tango-base-$(HELM_RELEASE):10000 +MARK ?= fast## this will allow to add the mark parameter of pytest +SLEEPTIME ?= 30s ##amount of sleep time for the smoketest target + +# +# defines a function to copy the ./test-harness directory into the K8s TEST_RUNNER +# and then runs the requested make target in the container. +# capture the output of the test in a tar file +# stream the tar file base64 encoded to the Pod logs +# +ktest = tar -c post-deployment/ | \ + kubectl run $(TEST_RUNNER) \ + --namespace $(KUBE_NAMESPACE) -i --wait --restart=Never \ + --image-pull-policy=IfNotPresent \ + --image=$(IMAGE_TO_TEST) -- \ + /bin/bash -c "mkdir csp-lmc-mid && tar xv --directory csp-lmc-mid --strip-components 1 --warning=all && cd csp-lmc-mid && \ + make KUBE_NAMESPACE=$(KUBE_NAMESPACE) HELM_RELEASE=$(HELM_RELEASE) TANGO_HOST=$(TANGO_HOST) MARK=$(MARK) $1 && \ + tar -czvf /tmp/build.tgz build && \ + echo '~~~~BOUNDARY~~~~' && \ + cat /tmp/build.tgz | base64 && \ + echo '~~~~BOUNDARY~~~~'" \ + 2>&1 + +# run the test function +# save the status +# clean out build dir +# print the logs minus the base64 encoded payload +# pull out the base64 payload and unpack build/ dir +# base64 payload is given a boundary "~~~~BOUNDARY~~~~" and extracted using perl +# clean up the run to completion container +# exit the saved status +ktest: smoketest## test the application on K8s + $(call ktest,test); \ + status=$$?; \ + rm -fr build; \ + kubectl --namespace $(KUBE_NAMESPACE) logs $(TEST_RUNNER) | \ + perl -ne 'BEGIN {$$on=0;}; if (index($$_, "~~~~BOUNDARY~~~~")!=-1){$$on+=1;next;}; print if $$on % 2;' | \ + base64 -d | tar -xzf -; \ + kubectl --namespace $(KUBE_NAMESPACE) delete pod $(TEST_RUNNER); \ + exit $$status + + +smoketest: ## check that the number of waiting containers is zero (10 attempts, wait time 30s). + @echo "Smoke test START"; \ + n=10; \ + while [ $$n -gt 0 ]; do \ + waiting=`kubectl get pods -n $(KUBE_NAMESPACE) -o=jsonpath='{.items[*].status.containerStatuses[*].state.waiting.reason}' | wc -w`; \ + echo "Waiting containers=$$waiting"; \ + if [ $$waiting -ne 0 ]; then \ + echo "Waiting $(SLEEPTIME) for pods to become running...#$$n"; \ + sleep $(SLEEPTIME); \ + fi; \ + if [ $$waiting -eq 0 ]; then \ + echo "Smoke test SUCCESS"; \ + exit 0; \ + fi; \ + if [ $$n -eq 1 ]; then \ + waiting=`kubectl get pods -n $(KUBE_NAMESPACE) -o=jsonpath='{.items[*].status.containerStatuses[*].state.waiting.reason}' | wc -w`; \ + echo "Smoke test FAILS"; \ + echo "Found $$waiting waiting containers: "; \ + kubectl get pods -n $(KUBE_NAMESPACE) -o=jsonpath='{range .items[*].status.containerStatuses[?(.state.waiting)]}{.state.waiting.message}{"\n"}{end}'; \ + exit 1; \ + fi; \ + n=`expr $$n - 1`; \ + done + +template_tests: + rc=0; \ + for chrt in `ls charts/`; do \ + helm unittest -f template_tests/*_test.yaml charts/$$chrt \ + || rc=2 && continue; \ + done; \ + exit $$rc + +tango_rest_ingress_check: ## curl test Tango REST API - https://tango-controls.readthedocs.io/en/latest/development/advanced/rest-api.html#tango-rest-api-implementations + @echo "---------------------------------------------------" + @echo "Test HTTP:"; echo "" + curl -u "tango-cs:tango" -XGET http://tango.rest.$(INGRESS_HOST)/tango/rest/rc4/hosts/databaseds-tango-base-$(HELM_RELEASE)/10000 | json_pp + # @echo "", echo "" + # @echo "---------------------------------------------------" + # @echo "Test HTTPS:"; echo "" + # curl -k -u "tango-cs:tango" -XGET https://tango.rest.$(INGRESS_HOST)/tango/rest/rc4/hosts/databaseds-tango-base-$(HELM_RELEASE)/10000 | json_pp + # @echo "" + +oet_podname = $(shell kubectl get pods -l app=rest-oet-$(HELM_RELEASE) -o=jsonpath='{..metadata.name}') +sut_cdm_ver= $(shell kubectl exec -it $(oet_podname) pip list | grep "cdm-shared-library" | awk ' {print $$2}' | awk 'BEGIN { FS = "+" } ; {print $$1}') +sut_cdm_cur_ver=$(shell grep "cdm-shared-library" post-deployment/SUT_requirements.txt | awk 'BEGIN { FS = "==" } ; {print $$2}') +sut_oet_ver = $(shell kubectl exec -it $(oet_podname) pip list | grep "observation-execution-tool" | awk ' {print $$2}' | awk 'BEGIN { FS = "+" } ; {print $$1}') +sut_oet_cur_ver=$(shell grep "observation-execution-tool" post-deployment/SUT_requirements.txt | awk 'BEGIN { FS = "==" } ; {print $$2}') + +check_oet_packages: + @echo "MVP is based on cdm-shared-library=$(sut_cdm_ver)" + @echo "Test are based on cdm-shared-library=$(sut_cdm_cur_ver)" + @if [ $(sut_cdm_ver) != $(sut_cdm_cur_ver) ] ; then \ + echo "Warning: cdm-shared-library package for MVP is not the same as used for testing!"; \ + fi + @echo "MVP is based on observation-execution-tool=$(sut_oet_ver)" + @echo "Test are based on observation-execution-tool=$(sut_oet_cur_ver)" + @if [ $(sut_oet_ver) != $(sut_oet_cur_ver) ] ; then \ + echo "Warning: observation-execution-tool package for MVP is not the same as used for testing!"; \ + fi + +##the following section is for developers requiring the testing pod to be instantiated with a volume mappig to skampi +-include dev-testing.mk + +timestamp=$(shell date -u +"%s") + +sleepy_time: + sleep 5s + +measure_time: + time1=$$SECONDS; \ + make sleepy_time; \ + time2=$$SECONDS; \ + elapsed=$$((time2 - time1)); \ + echo $$elapsed diff --git a/csp-lmc-mid/.make/release.mk b/csp-lmc-mid/.make/release.mk new file mode 100644 index 0000000..1abb8f1 --- /dev/null +++ b/csp-lmc-mid/.make/release.mk @@ -0,0 +1,119 @@ +# +# Copyright 2015 Xebia Nederland B.V. +# +# 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. +# +ifeq ($(strip $(PROJECT)),) + NAME=$(shell basename $(CURDIR)) +else + NAME=$(PROJECT) +endif + +RELEASE_SUPPORT := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))/.make-release-support + +ifeq ($(strip $(DOCKER_REGISTRY_HOST)),) + DOCKER_REGISTRY_HOST = nexus.engageska-portugal.pt +endif + +ifeq ($(strip $(DOCKER_REGISTRY_USER)),) + DOCKER_REGISTRY_USER = ska-docker +endif + +IMAGE=$(DOCKER_REGISTRY_HOST)/$(DOCKER_REGISTRY_USER)/$(NAME) + +VERSION=$(shell . $(RELEASE_SUPPORT) ; getVersion) +TAG=$(shell . $(RELEASE_SUPPORT); getTag) + +SHELL=/bin/bash + +DOCKER_BUILD_CONTEXT=. +DOCKER_FILE_PATH=Dockerfile + +.PHONY: pre-build docker-build post-build build release patch-release minor-release major-release tag check-status check-release showver \ + push pre-push do-push post-push + +build: pre-build docker-build post-build ## build the application image + +pre-build: + +post-build: + +pre-push: + +post-push: + +docker-build: .release + docker build $(DOCKER_BUILD_ARGS) -t $(IMAGE):$(VERSION) $(DOCKER_BUILD_CONTEXT) -f $(DOCKER_FILE_PATH) --build-arg DOCKER_REGISTRY_HOST=$(DOCKER_REGISTRY_HOST) --build-arg DOCKER_REGISTRY_USER=$(DOCKER_REGISTRY_USER) + @DOCKER_MAJOR=$(shell docker -v | sed -e 's/.*version //' -e 's/,.*//' | cut -d\. -f1) ; \ + DOCKER_MINOR=$(shell docker -v | sed -e 's/.*version //' -e 's/,.*//' | cut -d\. -f2) ; \ + if [ $$DOCKER_MAJOR -eq 1 ] && [ $$DOCKER_MINOR -lt 10 ] ; then \ + echo docker tag -f $(IMAGE):$(VERSION) $(IMAGE):latest ;\ + docker tag -f $(IMAGE):$(VERSION) $(IMAGE):latest ;\ + else \ + echo docker tag $(IMAGE):$(VERSION) $(IMAGE):latest ;\ + docker tag $(IMAGE):$(VERSION) $(IMAGE):latest ; \ + fi + +.release: + @echo "release=0.0.0" > .release + @echo "tag=$(NAME)-0.0.0" >> .release + @echo INFO: .release created + @cat .release + +release: check-status check-release build push + +push: pre-push do-push post-push ## push the image to the Docker registry + +do-push: +# docker push $(IMAGE):$(VERSION) + docker push $(IMAGE):latest + +snapshot: build push + +showver: .release + @. $(RELEASE_SUPPORT); getVersion + +bump-patch-release: VERSION := $(shell . $(RELEASE_SUPPORT); nextPatchLevel) +bump-patch-release: .release tag + +bump-minor-release: VERSION := $(shell . $(RELEASE_SUPPORT); nextMinorLevel) +bump-minor-release: .release tag + +bump-major-release: VERSION := $(shell . $(RELEASE_SUPPORT); nextMajorLevel) +bump-major-release: .release tag + +patch-release: tag-patch-release release + @echo $(VERSION) + +minor-release: tag-minor-release release + @echo $(VERSION) + +major-release: tag-major-release release + @echo $(VERSION) + +tag: TAG=$(shell . $(RELEASE_SUPPORT); getTag $(VERSION)) +tag: check-status +# @. $(RELEASE_SUPPORT) ; ! tagExists $(TAG) || (echo "ERROR: tag $(TAG) for version $(VERSION) already tagged in git" >&2 && exit 1) ; + @. $(RELEASE_SUPPORT) ; setRelease $(VERSION) +# git add . +# git commit -m "bumped to version $(VERSION)" ; +# git tag $(TAG) ; +# @ if [ -n "$(shell git remote -v)" ] ; then git push --tags ; else echo 'no remote to push tags to' ; fi + +check-status: + @. $(RELEASE_SUPPORT) ; ! hasChanges || (echo "ERROR: there are still outstanding changes" >&2 && exit 1) ; + +check-release: .release + @. $(RELEASE_SUPPORT) ; tagExists $(TAG) || (echo "ERROR: version not yet tagged in git. make [minor,major,patch]-release." >&2 && exit 1) ; + @. $(RELEASE_SUPPORT) ; ! differsFromRelease $(TAG) || (echo "ERROR: current directory differs from tagged $(TAG). make [minor,major,patch]-release." ; exit 1) + diff --git a/csp-lmc-mid/.release b/csp-lmc-mid/.release new file mode 100644 index 0000000..f5a4952 --- /dev/null +++ b/csp-lmc-mid/.release @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +# +# This file is part of the CSP.LMC prototype project +# +# +# Distributed under the terms of the BSD-3-Clause license. +# See LICENSE.txt for more info. + +"""Release information for Python Package""" + +name = """MID CSP.LMC""" +version = "0.6.9" +version_info = version.split(".") +description = """SKA MID CSP.LMC Classes""" +author = "E.G" +author_email = "elisabetta.giani@inaf.it" +license = """BSD-3-Clause""" +url = """www.tango-controls.org""" +copyright = """""" + +release=0.6.9 +tag=mid-csp-lmc-0.6.9 diff --git a/csp-lmc-mid/Dockerfile b/csp-lmc-mid/Dockerfile new file mode 100644 index 0000000..2456a5e --- /dev/null +++ b/csp-lmc-mid/Dockerfile @@ -0,0 +1,10 @@ +FROM nexus.engageska-portugal.pt/ska-docker/ska-python-buildenv:9.3.2 AS buildenv +FROM nexus.engageska-portugal.pt/ska-docker/ska-python-runtime:9.3.2 AS runtime + +# create ipython profile to so that itango doesn't fail if ipython hasn't run yet +RUN ipython profile create + +ENV PATH=/home/tango/.local/bin:$PATH +RUN python3 -m pip install . --extra-index-url https://nexus.engageska-portugal.pt/repository/pypi/simple + +CMD ["/venv/bin/python","/app/csp_lmc_mid/MidCspMaster.py"] diff --git a/csp-lmc-mid/Makefile b/csp-lmc-mid/Makefile new file mode 100644 index 0000000..7ba51c4 --- /dev/null +++ b/csp-lmc-mid/Makefile @@ -0,0 +1,91 @@ +# +# Project makefile for a Tango project. You should normally only need to modify +# DOCKER_REGISTRY_USER and PROJECT below. +# + +# +# DOCKER_REGISTRY_HOST, DOCKER_REGISTRY_USER and PROJECT are combined to define +# the Docker tag for this project. The definition below inherits the standard +# value for DOCKER_REGISTRY_HOST (=rnexus.engageska-portugal.pt) and overwrites +# DOCKER_REGISTRY_USER and PROJECT to give a final Docker tag of +# nexus.engageska-portugal.pt/tango-example/powersupply +# +PROJECT = mid-csp-lmc +DSCONFIG_JSON_FILE ?= csp-lmc-mid/charts/csp-lmc-mid/data/configuration.json + + +# KUBE_NAMESPACE defines the Kubernetes Namespace that will be deployed to +# using Helm. If this does not already exist it will be created +KUBE_NAMESPACE ?= integration + +# HELM_RELEASE is the release that all Kubernetes resources will be labelled +# with +HELM_RELEASE ?= test + +# HELM_CHART the chart name +HELM_CHART ?= mid-csp + +# HELM CHART PACKAGE +HELM_PACKAGE ?= charts/csp-proto + +# INGRESS_HOST is the host name used in the Ingress resource definition for +# publishing services via the Ingress Controller +INGRESS_HOST ?= $(HELM_RELEASE).$(HELM_CHART).local + +# Optional creation of the tango-base dependency +ENABLE_TANGO_BASE ?= true + +# Fixed variables +# Timeout for gitlab-runner when run locally +TIMEOUT = 86400 +# Helm version +HELM_VERSION = v3.2.4 +# kubectl version +KUBERNETES_VERSION = v1.14.1 + +# Docker, K8s and Gitlab CI variables +# gitlab-runner debug mode - turn on with non-empty value +RDEBUG ?= +# gitlab-runner executor - shell or docker +EXECUTOR ?= shell +# DOCKER_HOST connector to gitlab-runner - local domain socket for shell exec +DOCKER_HOST ?= unix:///var/run/docker.sock +# DOCKER_VOLUMES pass in local domain socket for DOCKER_HOST +DOCKER_VOLUMES ?= /var/run/docker.sock:/var/run/docker.sock +# registry credentials - user/pass/registry - set these in PrivateRules.mak +DOCKER_REGISTRY_USER_LOGIN ?= ## registry credentials - user - set in PrivateRules.mak +CI_REGISTRY_PASS_LOGIN ?= ## registry credentials - pass - set in PrivateRules.mak +CI_REGISTRY ?= gitlab.com/ska-telescope/csp-lmc + +CI_PROJECT_DIR ?= . + +KUBE_CONFIG_BASE64 ?= ## base64 encoded kubectl credentials for KUBECONFIG +KUBECONFIG ?= /etc/deploy/config ## KUBECONFIG location + +XAUTHORITYx ?= ${XAUTHORITY} +ifneq ($(CI_JOB_ID),) +THIS_HOST := $(shell ifconfig | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p' | head -n1) +DISPLAY := $(THIS_HOST):0 +endif + +# define private overrides for above variables in here +-include PrivateRules.mak + +# Test runner - run to completion job in K8s +TEST_RUNNER = test-runner-$(HELM_CHART)-$(HELM_RELEASE) + +# +# include makefile to pick up the standard Make targets, e.g., 'make build' +# build, 'make push' docker push procedure, etc. The other Make targets +# ('make interactive', 'make test', etc.) are defined in this file. +# +include .make/release.mk +include .make/k8s.mk +include .make/postdeploy.mk + +package: ## package all existing charts into a git based repo + mkdir -p helm-repo + helm package $(HELM_PACKAGE) --destination ./helm-repo ; \ + cd ./helm-repo && helm repo index . + +.PHONY: all test up down help k8s show lint deploy delete logs describe mkcerts localip namespace delete_namespace ingress_check kubeconfig kubectl_dependencies helm_dependencies rk8s_test k8s_test rlint diff --git a/csp-lmc-mid/charts/csp-proto/Chart.yaml b/csp-lmc-mid/charts/csp-proto/Chart.yaml new file mode 100644 index 0000000..f022adf --- /dev/null +++ b/csp-lmc-mid/charts/csp-proto/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for deploying the Mid_CSP.LMC devices on Kubernetes +name: csp-proto +version: 0.5.3 +icon: https://www.skatelescope.org/wp-content/uploads/2016/07/09545_NEW_LOGO_2014.png diff --git a/csp-lmc-mid/charts/csp-proto/data/configuration.json b/csp-lmc-mid/charts/csp-proto/data/configuration.json new file mode 100644 index 0000000..fd23f9d --- /dev/null +++ b/csp-lmc-mid/charts/csp-proto/data/configuration.json @@ -0,0 +1,1563 @@ +{ + "servers": { + "CspMaster": { + "csp": { + "CspMaster": { + "mid_csp/elt/master": { + "attribute_properties": { + "adminMode": { + "abs_change": [ + "-1", + "1" + ] + }, + "fspMembership": { + "__root_att": [ + "mid_csp_cbf/sub_elt/master/reportFSPSubarrayMembership" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "reportFSPAdminMode": { + "__root_att": [ + "mid_csp_cbf/sub_elt/master/reportFSPAdminMode" + ] + }, + "reportFSPHealthState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/master/reportFSPHealthState" + ] + }, + "reportFSPState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/master/reportFSPState" + ] + }, + "reportVCCAdminMode": { + "__root_att": [ + "mid_csp_cbf/sub_elt/master/reportVCCAdminMode" + ] + }, + "reportVCCHealthState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/master/reportVCCHealthState" + ] + }, + "reportVCCState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/master/reportVCCState" + ] + }, + "vccMembership": { + "__root_att": [ + "mid_csp_cbf/sub_elt/master/reportVCCSubarrayMembership" + ] + } + }, + "properties": { + "CspMidCbf": [ + "mid_csp_cbf/sub_elt/master" + ], + "CspMidPss": [ + "mid_csp_pss/sub_elt/master" + ], + "CspMidPst": [ + "mid_csp_pst/sub_elt/master" + ], + "CspSubarrays": [ + "mid_csp/elt/subarray_01", + "mid_csp/elt/subarray_02", + "mid_csp/elt/subarray_03" + ], + "MaxCapabilities": [ + "Subarray:16", + "VlbiBeam:20", + "TimingBeam:16", + "SearchBeam:1500" + ], + "polled_attr": [ + "healthstate", + "1000", + "adminmode", + "1000", + "state", + "1000", + "csppststate", + "1000", + "cspcbfstate", + "1000", + "csppsthealthstate", + "1000", + "pssadminmode", + "1000", + "cbfadminmode", + "1000", + "csppssstate", + "1000", + "pstadminmode", + "1000", + "commandprogress", + "3000", + "cspcbfhealthstate", + "1000", + "csppsshealthstate", + "1000" + ] + } + } + } + } + }, + "CspSubarray": { + "sub1": { + "CspSubarray": { + "mid_csp/elt/subarray_01": { + "attribute_properties": { + "adminMode": { + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "obsState": { + "abs_change": [ + "-1", + "1" + ] + }, + "receptors": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_01/receptors" + ] + }, + "vccHealthState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_01/vccHealthState" + ] + }, + "vccState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_01/vccState" + ] + }, + "cbfOutputLink": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_01/outputLinksDistribution" + ] + } + }, + "properties": { + "CspMaster": [ + "mid_csp/elt/master" + ], + "SubID": [ + "1" + ], + "polled_attr": [ + "state", + "1000", + "healthstate", + "1000", + "adminmode", + "1000", + "obsstate", + "1000", + "obsmode", + "1000" + ] + } + } + } + }, + "sub2": { + "CspSubarray": { + "mid_csp/elt/subarray_02": { + "attribute_properties": { + "adminMode": { + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "obsState": { + "abs_change": [ + "-1", + "1" + ] + }, + "receptors": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_02/receptors" + ] + }, + "vccHealthState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_02/vccHealthState" + ] + }, + "vccState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_02/vccState" + ] + }, + "cbfOutputLink": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_02/outputLinksDistribution" + ] + } + }, + "properties": { + "CspMaster": [ + "mid_csp/elt/master" + ], + "SubID": [ + "2" + ], + "polled_attr": [ + "state", + "1000", + "healthstate", + "1000", + "adminmode", + "1000", + "obsstate", + "1000", + "obsmode", + "1000" + ] + } + } + } + }, + "sub3": { + "CspSubarray": { + "mid_csp/elt/subarray_03": { + "attribute_properties": { + "adminMode": { + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "obsState": { + "abs_change": [ + "-1", + "1" + ] + }, + "receptors": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_03/receptors" + ] + }, + "vccHealthState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_03/vccHealthState" + ] + }, + "vccState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_03/vccState" + ] + }, + "cbfOutputLink": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_03/outputLinksDistribution" + ] + } + }, + "properties": { + "CspMaster": [ + "mid_csp/elt/master" + ], + "SubID": [ + "3" + ], + "polled_attr": [ + "state", + "1000", + "healthstate", + "1000", + "adminmode", + "1000", + "obsstate", + "1000", + "obsmode", + "1000" + ] + } + } + } + } + }, + "CspTelState": { + "csp": { + "CspTelState": { + "mid_csp/elt/telstate": { + "attribute_properties": { + }, + "properties": { + } + } + } + } + }, + "DataBaseds": { + "2": { + "DataBase": { + "sys/database/2": {} + } + } + }, + "CbfMaster": { + "master": { + "CbfMaster": { + "mid_csp_cbf/sub_elt/master": { + "attribute_properties": { + "adminMode": { + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "CbfSubarray": [ + "mid_csp_cbf/sub_elt/subarray_01", + "mid_csp_cbf/sub_elt/subarray_02", + "mid_csp_cbf/sub_elt/subarray_03" + ], + "FSP": [ + "mid_csp_cbf/fsp/01", + "mid_csp_cbf/fsp/02", + "mid_csp_cbf/fsp/03", + "mid_csp_cbf/fsp/04" + ], + "MaxCapabilities": [ + "VCC:4", + "FSP:4", + "Subarray:3" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ], + "polled_attr": [ + "reportfspstate", + "1000", + "reportvccadminmode", + "1000", + "reportvcchealthstate", + "1000", + "receptortovcc", + "1000", + "reportvccsubarraymembership", + "1000", + "reportfspsubarraymembership", + "1000", + "reportfsphealthstate", + "1000", + "healthstate", + "1000", + "adminmode", + "1000", + "subarrayscanid", + "1000", + "reportfspadminmode", + "1000", + "commandprogress", + "2000", + "reportsubarrayhealthstate", + "1000", + "reportvccstate", + "1000", + "reportsubarrayadminmode", + "1000", + "vcctoreceptor", + "3000", + "reportsubarraystate", + "3000", + "state", + "1000" + ] + } + } + } + } + }, + "CbfSubarrayMulti": { + "cbfSubarray-01": { + "CbfSubarray": { + "mid_csp_cbf/sub_elt/subarray_01": { + "attribute_properties": { + "adminMode": { + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "obsState": { + "abs_change": [ + "-1", + "1" + ] + }, + "scanID": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "FSP": [ + "mid_csp_cbf/fsp/01", + "mid_csp_cbf/fsp/02", + "mid_csp_cbf/fsp/03", + "mid_csp_cbf/fsp/04" + ], + "FspSubarray": [ + "mid_csp_cbf/fspSubarray/01_01", + "mid_csp_cbf/fspSubarray/02_01", + "mid_csp_cbf/fspSubarray/03_01", + "mid_csp_cbf/fspSubarray/04_01" + ], + "SW1Address": [ + "mid_csp_cbf/sw1/01" + ], + "SW2Address": [ + "mid_csp_cbf/sw2/01" + ], + "SubID": [ + "1" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ], + "polled_attr": [ + "state", + "1000", + "healthstate", + "1000", + "adminmode", + "1000", + "fsphealthstate", + "1000", + "fspstate", + "1000", + "vccstate", + "1000", + "vcchealthstate", + "1000", + "obsstate", + "1000", + "scanid", + "1000", + "outputLinksDistribution", + "1000" + ] + } + } + }, + "SearchWindow": { + "mid_csp_cbf/sw1/01": {}, + "mid_csp_cbf/sw2/01": {} + } + }, + "cbfSubarray-02": { + "CbfSubarray": { + "mid_csp_cbf/sub_elt/subarray_02": { + "attribute_properties": { + "adminMode": { + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "obsState": { + "abs_change": [ + "-1", + "1" + ] + }, + "scanID": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "FSP": [ + "mid_csp_cbf/fsp/01", + "mid_csp_cbf/fsp/02", + "mid_csp_cbf/fsp/03", + "mid_csp_cbf/fsp/04" + ], + "FspSubarray": [ + "mid_csp_cbf/fspSubarray/01_02", + "mid_csp_cbf/fspSubarray/02_02", + "mid_csp_cbf/fspSubarray/03_02", + "mid_csp_cbf/fspSubarray/04_02" + ], + "SW1Address": [ + "mid_csp_cbf/sw1/02" + ], + "SW2Address": [ + "mid_csp_cbf/sw2/02" + ], + "SubID": [ + "2" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ], + "polled_attr": [ + "scanid", + "1000", + "healthstate", + "1000", + "state", + "1000", + "obsstate", + "1000", + "vcchealthstate", + "1000", + "adminmode", + "1000", + "fspstate", + "1000", + "fsphealthstate", + "1000", + "vccstate", + "1000" + ] + } + } + }, + "SearchWindow": { + "mid_csp_cbf/sw1/02": {}, + "mid_csp_cbf/sw2/02": {} + } + }, + "cbfSubarray-03": { + "CbfSubarray": { + "mid_csp_cbf/sub_elt/subarray_03": { + "attribute_properties": { + "adminMode": { + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "obsState": { + "abs_change": [ + "-1", + "1" + ] + }, + "scanID": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "FSP": [ + "mid_csp_cbf/fsp/01", + "mid_csp_cbf/fsp/02", + "mid_csp_cbf/fsp/03", + "mid_csp_cbf/fsp/04" + ], + "FspSubarray": [ + "mid_csp_cbf/fspSubarray/01_03", + "mid_csp_cbf/fspSubarray/02_03", + "mid_csp_cbf/fspSubarray/03_03", + "mid_csp_cbf/fspSubarray/04_03" + ], + "SW1Address": [ + "mid_csp_cbf/sw1/03" + ], + "SW2Address": [ + "mid_csp_cbf/sw2/03" + ], + "SubID": [ + "3" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ], + "polled_attr": [ + "scanid", + "1000", + "healthstate", + "1000", + "state", + "1000", + "obsstate", + "1000", + "vcchealthstate", + "1000", + "adminmode", + "1000", + "fspstate", + "1000", + "fsphealthstate", + "1000", + "vccstate", + "1000" + ] + } + } + }, + "SearchWindow": { + "mid_csp_cbf/sw1/03": {}, + "mid_csp_cbf/sw2/03": {} + } + } + }, + "FspMulti": { + "fsp-01": { + "Fsp": { + "mid_csp_cbf/fsp/01": { + "attribute_properties": { + "adminMode": { + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "subarrayMembership": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "CorrelationAddress": [ + "mid_csp_cbf/fsp_corr/01" + ], + "FspID": [ + "1" + ], + "PSSAddress": [ + "mid_csp_cbf/fsp_pss/01" + ], + "PSTAddress": [ + "mid_csp_cbf/fsp_pst/01" + ], + "VLBIAddress": [ + "mid_csp_cbf/fsp_vlbi/01" + ], + "FspSubarray": [ + "mid_csp_cbf/fspSubarray/01_01", + "mid_csp_cbf/fspSubarray/01_02", + "mid_csp_cbf/fspSubarray/01_03" + ], + "polled_attr": [ + "adminmode", + "1000", + "healthstate", + "1000", + "state", + "1000", + "subarraymembership", + "1000" + ] + } + } + }, + "FspCorr": { + "mid_csp_cbf/fsp_corr/01": {} + }, + "FspPss": { + "mid_csp_cbf/fsp_pss/01": {} + }, + "FspPst": { + "mid_csp_cbf/fsp_pst/01": {} + }, + "FspSubarray": { + "mid_csp_cbf/fspSubarray/01_01": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_01" + ], + "FspID": [ + "1" + ], + "SubID": [ + "1" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + }, + "mid_csp_cbf/fspSubarray/01_02": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_02" + ], + "FspID": [ + "1" + ], + "SubID": [ + "2" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + }, + "mid_csp_cbf/fspSubarray/01_03": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_03" + ], + "FspID": [ + "1" + ], + "SubID": [ + "3" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + } + }, + "FspVlbi": { + "mid_csp_cbf/fsp_vlbi/01": {} + } + }, + "fsp-02": { + "Fsp": { + "mid_csp_cbf/fsp/02": { + "attribute_properties": { + "adminMode": { + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "subarrayMembership": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "CorrelationAddress": [ + "mid_csp_cbf/fsp_corr/02" + ], + "FspID": [ + "2" + ], + "PSSAddress": [ + "mid_csp_cbf/fsp_pss/02" + ], + "PSTAddress": [ + "mid_csp_cbf/fsp_pst/02" + ], + "VLBIAddress": [ + "mid_csp_cbf/fsp_vlbi/02" + ], + "FspSubarray": [ + "mid_csp_cbf/fspSubarray/02_01", + "mid_csp_cbf/fspSubarray/02_02", + "mid_csp_cbf/fspSubarray/02_03" + ], + "polled_attr": [ + "adminmode", + "1000", + "healthstate", + "1000", + "state", + "1000", + "subarraymembership", + "1000" + ] + } + } + }, + "FspCorr": { + "mid_csp_cbf/fsp_corr/02": {} + }, + "FspPss": { + "mid_csp_cbf/fsp_pss/02": {} + }, + "FspPst": { + "mid_csp_cbf/fsp_pst/02": {} + }, + "FspSubarray": { + "mid_csp_cbf/fspSubarray/02_01": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_01" + ], + "FspID": [ + "2" + ], + "SubID": [ + "1" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + }, + "mid_csp_cbf/fspSubarray/02_02": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_02" + ], + "FspID": [ + "2" + ], + "SubID": [ + "2" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + }, + "mid_csp_cbf/fspSubarray/02_03": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_03" + ], + "FspID": [ + "2" + ], + "SubID": [ + "3" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + } + }, + "FspVlbi": { + "mid_csp_cbf/fsp_vlbi/02": {} + } + }, + "fsp-03": { + "Fsp": { + "mid_csp_cbf/fsp/03": { + "attribute_properties": { + "adminMode": { + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "subarrayMembership": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "CorrelationAddress": [ + "mid_csp_cbf/fsp_corr/03" + ], + "FspID": [ + "3" + ], + "PSSAddress": [ + "mid_csp_cbf/fsp_pss/03" + ], + "PSTAddress": [ + "mid_csp_cbf/fsp_pst/03" + ], + "VLBIAddress": [ + "mid_csp_cbf/fsp_vlbi/03" + ], + "FspSubarray": [ + "mid_csp_cbf/fspSubarray/03_01", + "mid_csp_cbf/fspSubarray/03_02" + ], + "polled_attr": [ + "adminmode", + "1000", + "healthstate", + "1000", + "state", + "1000", + "subarraymembership", + "1000" + ] + } + } + }, + "FspCorr": { + "mid_csp_cbf/fsp_corr/03": {} + }, + "FspPss": { + "mid_csp_cbf/fsp_pss/03": {} + }, + "FspPst": { + "mid_csp_cbf/fsp_pst/03": {} + }, + "FspSubarray": { + "mid_csp_cbf/fspSubarray/03_01": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_01" + ], + "FspID": [ + "3" + ], + "SubID": [ + "1" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + }, + "mid_csp_cbf/fspSubarray/03_02": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_02" + ], + "FspID": [ + "3" + ], + "SubID": [ + "2" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + }, + "mid_csp_cbf/fspSubarray/03_03": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_03" + ], + "FspID": [ + "3" + ], + "SubID": [ + "3" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + } + }, + "FspVlbi": { + "mid_csp_cbf/fsp_vlbi/03": {} + } + }, + "fsp-04": { + "Fsp": { + "mid_csp_cbf/fsp/04": { + "attribute_properties": { + "adminMode": { + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "subarrayMembership": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "CorrelationAddress": [ + "mid_csp_cbf/fsp_corr/04" + ], + "FspID": [ + "4" + ], + "PSSAddress": [ + "mid_csp_cbf/fsp_pss/04" + ], + "PSTAddress": [ + "mid_csp_cbf/fsp_pst/04" + ], + "VLBIAddress": [ + "mid_csp_cbf/fsp_vlbi/04" + ], + "FspSubarray": [ + "mid_csp_cbf/fspSubarray/04_01", + "mid_csp_cbf/fspSubarray/04_02" + ], + "polled_attr": [ + "adminmode", + "1000", + "healthstate", + "1000", + "state", + "1000", + "subarraymembership", + "1000" + ] + } + } + }, + "FspCorr": { + "mid_csp_cbf/fsp_corr/04": {} + }, + "FspPss": { + "mid_csp_cbf/fsp_pss/04": {} + }, + "FspPst": { + "mid_csp_cbf/fsp_pst/04": {} + }, + "FspSubarray": { + "mid_csp_cbf/fspSubarray/04_01": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_01" + ], + "FspID": [ + "4" + ], + "SubID": [ + "1" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + }, + "mid_csp_cbf/fspSubarray/04_02": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_02" + ], + "FspID": [ + "4" + ], + "SubID": [ + "2" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + }, + "mid_csp_cbf/fspSubarray/04_03": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_03" + ], + "FspID": [ + "4" + ], + "SubID": [ + "3" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + } + }, + "FspVlbi": { + "mid_csp_cbf/fsp_vlbi/04": {} + } + } + }, + "VccMulti": { + "vcc-001": { + "Vcc": { + "mid_csp_cbf/vcc/001": { + "attribute_properties": { + "adminMode": { + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "subarrayMembership": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "Band1And2Address": [ + "mid_csp_cbf/vcc_band12/001" + ], + "Band3Address": [ + "mid_csp_cbf/vcc_band3/001" + ], + "Band4Address": [ + "mid_csp_cbf/vcc_band4/001" + ], + "Band5Address": [ + "mid_csp_cbf/vcc_band5/001" + ], + "SW1Address": [ + "mid_csp_cbf/vcc_sw1/001" + ], + "SW2Address": [ + "mid_csp_cbf/vcc_sw2/001" + ], + "VccID": [ + "1" + ], + "polled_attr": [ + "state", + "1000", + "healthstate", + "1000", + "adminmode", + "1000", + "subarraymembership", + "1000" + ] + } + } + }, + "VccBand1And2": { + "mid_csp_cbf/vcc_band12/001": {} + }, + "VccBand3": { + "mid_csp_cbf/vcc_band3/001": {} + }, + "VccBand4": { + "mid_csp_cbf/vcc_band4/001": {} + }, + "VccBand5": { + "mid_csp_cbf/vcc_band5/001": {} + }, + "VccSearchWindow": { + "mid_csp_cbf/vcc_sw1/001": {}, + "mid_csp_cbf/vcc_sw2/001": {} + } + }, + "vcc-002": { + "Vcc": { + "mid_csp_cbf/vcc/002": { + "attribute_properties": { + "adminMode": { + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "subarrayMembership": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "Band1And2Address": [ + "mid_csp_cbf/vcc_band12/002" + ], + "Band3Address": [ + "mid_csp_cbf/vcc_band3/002" + ], + "Band4Address": [ + "mid_csp_cbf/vcc_band4/002" + ], + "Band5Address": [ + "mid_csp_cbf/vcc_band5/002" + ], + "SW1Address": [ + "mid_csp_cbf/vcc_sw1/002" + ], + "SW2Address": [ + "mid_csp_cbf/vcc_sw2/002" + ], + "VccID": [ + "2" + ], + "polled_attr": [ + "state", + "1000", + "healthstate", + "1000", + "adminmode", + "1000", + "subarraymembership", + "1000" + ] + } + } + }, + "VccBand1And2": { + "mid_csp_cbf/vcc_band12/002": {} + }, + "VccBand3": { + "mid_csp_cbf/vcc_band3/002": {} + }, + "VccBand4": { + "mid_csp_cbf/vcc_band4/002": {} + }, + "VccBand5": { + "mid_csp_cbf/vcc_band5/002": {} + }, + "VccSearchWindow": { + "mid_csp_cbf/vcc_sw1/002": {}, + "mid_csp_cbf/vcc_sw2/002": {} + } + }, + "vcc-003": { + "Vcc": { + "mid_csp_cbf/vcc/003": { + "attribute_properties": { + "adminMode": { + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "subarrayMembership": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "Band1And2Address": [ + "mid_csp_cbf/vcc_band12/003" + ], + "Band3Address": [ + "mid_csp_cbf/vcc_band3/003" + ], + "Band4Address": [ + "mid_csp_cbf/vcc_band4/003" + ], + "Band5Address": [ + "mid_csp_cbf/vcc_band5/003" + ], + "SW1Address": [ + "mid_csp_cbf/vcc_sw1/003" + ], + "SW2Address": [ + "mid_csp_cbf/vcc_sw2/003" + ], + "VccID": [ + "3" + ], + "polled_attr": [ + "state", + "1000", + "healthstate", + "1000", + "adminmode", + "1000", + "subarraymembership", + "1000" + ] + } + } + }, + "VccBand1And2": { + "mid_csp_cbf/vcc_band12/003": {} + }, + "VccBand3": { + "mid_csp_cbf/vcc_band3/003": {} + }, + "VccBand4": { + "mid_csp_cbf/vcc_band4/003": {} + }, + "VccBand5": { + "mid_csp_cbf/vcc_band5/003": {} + }, + "VccSearchWindow": { + "mid_csp_cbf/vcc_sw1/003": {}, + "mid_csp_cbf/vcc_sw2/003": {} + } + }, + "vcc-004": { + "Vcc": { + "mid_csp_cbf/vcc/004": { + "attribute_properties": { + "adminMode": { + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "subarrayMembership": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "Band1And2Address": [ + "mid_csp_cbf/vcc_band12/004" + ], + "Band3Address": [ + "mid_csp_cbf/vcc_band3/004" + ], + "Band4Address": [ + "mid_csp_cbf/vcc_band4/004" + ], + "Band5Address": [ + "mid_csp_cbf/vcc_band5/004" + ], + "SW1Address": [ + "mid_csp_cbf/vcc_sw1/004" + ], + "SW2Address": [ + "mid_csp_cbf/vcc_sw2/004" + ], + "VccID": [ + "4" + ], + "polled_attr": [ + "state", + "1000", + "healthstate", + "1000", + "adminmode", + "1000", + "subarraymembership", + "1000" + ] + } + } + }, + "VccBand1And2": { + "mid_csp_cbf/vcc_band12/004": {} + }, + "VccBand3": { + "mid_csp_cbf/vcc_band3/004": {} + }, + "VccBand4": { + "mid_csp_cbf/vcc_band4/004": {} + }, + "VccBand5": { + "mid_csp_cbf/vcc_band5/004": {} + }, + "VccSearchWindow": { + "mid_csp_cbf/vcc_sw1/004": {}, + "mid_csp_cbf/vcc_sw2/004": {} + } + } + }, + "DataBaseds": { + "2": { + "DataBase": { + "sys/database/2": {} + } + } + }, + "TangoAccessControl": { + "1": { + "TangoAccessControl": { + "sys/access_control/1": {} + } + } + }, + "TangoTest": { + "test": { + "TangoTest": { + "sys/tg_test/1": {} + } + } + } + } +} + diff --git a/csp-lmc-mid/charts/csp-proto/data/cspconfig.json b/csp-lmc-mid/charts/csp-proto/data/cspconfig.json new file mode 100644 index 0000000..08bb41f --- /dev/null +++ b/csp-lmc-mid/charts/csp-proto/data/cspconfig.json @@ -0,0 +1,838 @@ +{ + "servers": { + "MidCspCapabilityMonitor": { + "monitor": { + "CspCapabilityMonitor": { + "mid_csp/capability_monitor/vcc": { + "properties": { + "CapabilityDevices": [ + "mid_csp/vcc/004", + "mid_csp/vcc/003", + "mid_csp/vcc/002", + "mid_csp/vcc/001" + ], + "SkaLevel": [ + "2" + ] + } + }, + "mid_csp/capability_monitor/timing_beams": { + "properties": { + "CapabilityDevices": [ + "mid_csp/timing_beams/04", + "mid_csp/timing_beams/03", + "mid_csp/timing_beams/01", + "mid_csp/timing_beams/02" + ], + "SkaLevel": [ + "2" + ] + } + }, + "mid_csp/capability_monitor/vlbi_beams": { + "properties": { + "CapabilityDevices": [ + "mid_csp/vlbi_beams/03", + "mid_csp/vlbi_beams/04", + "mid_csp/vlbi_beams/02", + "mid_csp/vlbi_beams/01" + ], + "SkaLevel": [ + "2" + ] + } + } + }, + "CspSearchBeamsMonitor": { + "mid_csp/capability_monitor/search_beams": { + "properties": { + "CapabilityDevices": [ + "mid_csp/search_beams/04", + "mid_csp/search_beams/03", + "mid_csp/search_beams/01", + "mid_csp/search_beams/02" + ], + "SkaLevel": [ + "2" + ] + } + } + } + } + }, + "MidCspMaster": { + "master": { + "MidCspMasterBase": { + "mid_csp/elt/master": { + "attribute_properties": { + "adminMode": { + "__value": [ + "0" + ], + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "reportFSPAdminMode": { + "__root_att": [ + "mid_csp_cbf/sub_elt/master/reportFSPAdminMode" + ] + }, + "reportFSPHealthState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/master/reportFSPHealthState" + ] + }, + "reportFSPState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/master/reportFSPState" + ] + }, + "reportSearchBeamAdminMode": { + "__root_att": [ + "mid_csp/capability_monitor/search_beams/capabilityAdminMode" + ] + }, + "reportSearchBeamHealthState": { + "__root_att": [ + "mid_csp/capability_monitor/search_beams/capabilityHealthState" + ] + }, + "reportSearchBeamObsState": { + "__root_att": [ + "mid_csp/capability_monitor/search_beams/capabilityObsState" + ] + }, + "reportSearchBeamState": { + "__root_att": [ + "mid_csp/capability_monitor/search_beams/capabilityState" + ] + }, + "reportTimingBeamAdminMode": { + "__root_att": [ + "mid_csp/capability_monitor/timing_beams/capabilityAdminMode" + ] + }, + "reportTimingBeamHealthState": { + "__root_att": [ + "mid_csp/capability_monitor/timing_beams/capabilityHealthState" + ] + }, + "reportTimingBeamObsState": { + "__root_att": [ + "mid_csp/capability_monitor/timing_beams/capabilityObsState" + ] + }, + "reportTimingBeamState": { + "__root_att": [ + "mid_csp/capability_monitor/timing_beams/capabilityState" + ] + }, + "reportVCCAdminMode": { + "__root_att": [ + "mid_csp_cbf/sub_elt/master/reportVCCAdminMode" + ] + }, + "reportVCCHealthState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/master/reportVCCHealthState" + ] + }, + "reportVCCState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/master/reportVCCState" + ] + }, + "reportVlbiBeamAdminMode": { + "__root_att": [ + "mid_csp/capability_monitor/vlbi_beams/capabilityAdminMode" + ] + }, + "reportVlbiBeamHealthState": { + "__root_att": [ + "mid_csp/capability_monitor/vlbi_beams/capabilityHealthState" + ] + }, + "reportVlbiBeamObsState": { + "__root_att": [ + "mid_csp/capability_monitor/vlbi_beams/capabilityObsState" + ] + }, + "reportVlbiBeamState": { + "__root_att": [ + "mid_csp/capability_monitor/vlbi_beams/capabilityState" + ] + }, + "searchBeamMembership": { + "__root_att": [ + "mid_csp/capability_monitor/search_beams/capabilityMembership" + ] + }, + "timingBeamMembership": { + "__root_att": [ + "mid_csp/capability_monitor/timing_beams/capabilityMembership" + ] + }, + "unassignedSearchBeamIDs": { + "__root_att": [ + "mid_csp/capability_monitor/search_beams/unassignedIDs" + ] + }, + "numOfUnassignedSearchBeams": { + "__root_att": [ + "mid_csp/capability_monitor/search_beams/numOfUnassignedIDs" + ] + }, + "numOfReservedSearchBeams": { + "__root_att": [ + "mid_csp/capability_monitor/search_beams/numOfReservedIDs" + ] + }, + "unassignedTimingBeamIDs": { + "__root_att": [ + "mid_csp/capability_monitor/timing_beams/unassignedIDs" + ] + }, + "numOfUnassignedTimingBeams": { + "__root_att": [ + "mid_csp/capability_monitor/timing_beams/numOfUnassignedIDs" + ] + }, + "numOfUnassignedVlbiBeams": { + "__root_att": [ + "mid_csp/capability_monitor/vlbi_beams/numOfUnassignedIDs" + ] + }, + "unassignedVlbiBeamIDs": { + "__root_att": [ + "mid_csp/capability_monitor/vlbi_beams/unassignedIDs" + ] + }, + "vccMembership": { + "__root_att": [ + "mid_csp_cbf/sub_elt/master/reportVCCSubarrayMembership" + ] + }, + "vlbiBeamMembership": { + "__root_att": [ + "mid_csp/capability_monitor/vlbi_beams/capabilityMembership" + ] + } + }, + "properties": { + "CspCbf": [ + "mid_csp_cbf/sub_elt/master" + ], + "CspPss": [ + "mid_csp_pss/sub_elt/master" + ], + "CspPst": [ + "mid_csp_pst/sub_elt/master" + ], + "CspSubarrays": [ + "mid_csp/elt/subarray_01", + "mid_csp/elt/subarray_02", + "mid_csp/elt/subarray_03" + ], + "MaxCapabilities": [ + "VCC:4", + "SearchBeams:1500", + "TimingBeams:16", + "VlbiBeams:20" + ], + "SearchBeamsMonitor": [ + "mid_csp/capability_monitor/search_beams" + ], + "TimingBeamsMonitor": [ + "mid_csp/capability_monitor/timing_beams" + ], + "VlbiBeamsMonitor": [ + "mid_csp/capability_monitor/vlbi_beams" + ], + "SkaLevel": [ + "1" + ], + "polled_attr": [ + "healthstate", + "1000", + "adminmode", + "1000", + "state", + "1000", + "csppssadminmode", + "1000", + "csppstadminmode", + "1000", + "cspcbfadminmode", + "1000", + "oncommandprogress", + "1500", + "offcommandprogress", + "1500", + "offcmddurationexpected", + "1500", + "standbycommandprogress", + "1500", + "oncmddurationexpected", + "1500", + "standbycmddurationexpected", + "1500", + "oncmddurationmeasured", + "1500", + "offcmddurationmeasured", + "1500", + "standbycmddurationmeasured", + "1500", + "offcmdtimeoutexpired", + "1500", + "oncmdtimeoutexpired", + "1500", + "csppssstate", + "1000", + "standbycmdtimeoutexpired", + "1000", + "csppststate", + "1000", + "cspcbfhealthstate", + "1000", + "csppsshealthstate", + "1000", + "csppsthealthstate", + "1000", + "cspcbfadminmode", + "1000", + "oncmdfailure", + "2000", + "offcmdfailure", + "2000", + "standbycmdfailure", + "2000", + "cspcbfstate", + "1000" + ] + } + } + } + } + }, + "MidCspSubarray": { + "subarray1": { + "MidCspSubarrayBase": { + "mid_csp/elt/subarray_01": { + "attribute_properties": { + "adminMode": { + "__value": [ + "0" + ], + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "obsState": { + "abs_change": [ + "-1", + "1" + ] + }, + "assignedFspHealthState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_01/fspHealthState" + ] + }, + "assignedFspState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_01/fspState" + ] + }, + "assignedReceptors": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_01/receptors" + ] + }, + "assignedVccHealthState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_01/vccHealthState" + ] + }, + "assignedVccState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_01/vccState" + ] + } + }, + "properties": { + "CbfSubarray": [ + "mid_csp_cbf/sub_elt/subarray_01" + ], + "CspMaster": [ + "mid_csp/elt/master" + ], + "PssSubarray": [ + "mid_csp_pss/sub_elt/subarray_01" + ], + "SkaLevel": [ + "2" + ], + "SubID": [ + "1" + ], + "SubarrayProcModeCorrelation": [ + "mid_csp/elt/correlation-01" + ], + "SubarrayProcModePss": [ + "mid_csp/elt/pss-01" + ], + "SubarrayProcModePst": [ + "mid_csp/elt/pst-01" + ], + "SubarrayProcModeVlbi": [ + "mid_csp/elt/vlbi-01" + ], + "polled_attr": [ + "healthstate", + "1000", + "obsmode", + "1000", + "failureraisedflag", + "1000", + "timeoutexpiredflag", + "1000", + "scancmdprogress", + "1500", + "removeresourcescmdprogress", + "1500", + "addresourcescmdprogress", + "1500", + "endscancmdprogress", + "1500", + "gotoidlecmdprogress", + "1500" + ] + } + } + }, + "MidCspSubarrayProcModeCorrelation": { + "mid_csp/elt/correlation-01": { + "properties": { + "CapID": [ + "1" + ], + "CapType": [ + "CORRELATION" + ], + "subID": [ + "1" + ] + } + } + }, + "MidCspSubarrayProcModePss": { + "mid_csp/elt/pss-01": { + "properties": { + "CapID": [ + "1" + ], + "CapType": [ + "PSS" + ], + "subID": [ + "1" + ] + } + } + }, + "MidCspSubarrayProcModePst": { + "mid_csp/elt/pst-01": { + "properties": { + "CapID": [ + "1" + ], + "CapType": [ + "PST" + ], + "subID": [ + "1" + ] + } + } + }, + "MidCspSubarrayProcModeVlbi": { + "mid_csp/elt/vlbi-01": { + "properties": { + "CapID": [ + "1" + ], + "CapType": [ + "VLBI" + ], + "subID": [ + "1" + ] + } + } + } + }, + "subarray2": { + "MidCspSubarrayBase": { + "mid_csp/elt/subarray_02": { + "attribute_properties": { + "adminMode": { + "__value": [ + "0" + ], + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "obsState": { + "abs_change": [ + "-1", + "1" + ] + }, + "assignedFspHealthState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_02/fspHealthState" + ] + }, + "assignedFspState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_02/fspState" + ] + }, + "assignedReceptors": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_02/receptors" + ] + }, + "assignedVccHealthState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_02/vccHealthState" + ] + }, + "assignedVccState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_02/vccState" + ] + } + }, + "properties": { + "CbfSubarray": [ + "mid_csp_cbf/sub_elt/subarray_02" + ], + "CspMaster": [ + "mid_csp/elt/master" + ], + "PssSubarray": [ + "mid_csp_pss/sub_elt/subarray_02" + ], + "SkaLevel": [ + "2" + ], + "SubID": [ + "2" + ], + "SubarrayProcModeCorrelation": [ + "mid_csp/elt/correlation-02" + ], + "SubarrayProcModePss": [ + "mid_csp/elt/pss-02" + ], + "SubarrayProcModePst": [ + "mid_csp/elt/pst-02" + ], + "SubarrayProcModeVlbi": [ + "mid_csp/elt/vlbi-02" + ], + "polled_attr": [ + "healthstate", + "1000", + "obsmode", + "1000", + "failureraisedflag", + "1000", + "timeoutexpiredflag", + "1000", + "scancmdprogress", + "1500", + "removeresourcescmdprogress", + "1500", + "addresourcescmdprogress", + "1500", + "endscancmdprogress", + "1500", + "gotoidlecmdprogress", + "1500" + ] + } + } + }, + "MidCspSubarrayProcModeCorrelation": { + "mid_csp/elt/correlation-02": { + "properties": { + "CapID": [ + "1" + ], + "CapType": [ + "CORRELATION" + ], + "subID": [ + "2" + ] + } + } + }, + "MidCspSubarrayProcModePss": { + "mid_csp/elt/pss-02": { + "properties": { + "CapID": [ + "1" + ], + "CapType": [ + "PSS" + ], + "subID": [ + "2" + ] + } + } + }, + "MidCspSubarrayProcModePst": { + "mid_csp/elt/pst-02": { + "properties": { + "CapID": [ + "1" + ], + "CapType": [ + "PST" + ], + "subID": [ + "2" + ] + } + } + }, + "MidCspSubarrayProcModeVlbi": { + "mid_csp/elt/vlbi-02": { + "properties": { + "CapID": [ + "1" + ], + "CapType": [ + "VLBI" + ], + "subID": [ + "2" + ] + } + } + } + }, + "subarray3": { + "MidCspSubarrayBase": { + "mid_csp/elt/subarray_03": { + "attribute_properties": { + "adminMode": { + "__value": [ + "0" + ], + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "obsState": { + "abs_change": [ + "-1", + "1" + ] + }, + "assignedFspHealthState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_03/fspHealthState" + ] + }, + "assignedFspState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_03/fspState" + ] + }, + "assignedReceptors": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_03/receptors" + ] + }, + "assignedVccHealthState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_03/vccHealthState" + ] + }, + "assignedVccState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_03/vccState" + ] + } + }, + "properties": { + "CbfSubarray": [ + "mid_csp_cbf/sub_elt/subarray_03" + ], + "CspMaster": [ + "mid_csp/elt/master" + ], + "PssSubarray": [ + "mid_csp_pss/sub_elt/subarray_03" + ], + "SkaLevel": [ + "2" + ], + "SubID": [ + "3" + ], + "SubarrayProcModeCorrelation": [ + "mid_csp/elt/correlation-03" + ], + "SubarrayProcModePss": [ + "mid_csp/elt/pss-03" + ], + "SubarrayProcModePst": [ + "mid_csp/elt/pst-03" + ], + "SubarrayProcModeVlbi": [ + "mid_csp/elt/vlbi-03" + ], + "polled_attr": [ + "healthstate", + "1000", + "obsmode", + "1000", + "failureraisedflag", + "1000", + "timeoutexpiredflag", + "1000", + "scancmdprogress", + "1500", + "removeresourcescmdprogress", + "1500", + "addresourcescmdprogress", + "1500", + "endscancmdprogress", + "1500", + "gotoidlecmdprogress", + "1500" + ] + } + } + }, + "MidCspSubarrayProcModeCorrelation": { + "mid_csp/elt/correlation-03": { + "properties": { + "CapID": [ + "1" + ], + "CapType": [ + "CORRELATION" + ], + "subID": [ + "3" + ] + } + } + }, + "MidCspSubarrayProcModePss": { + "mid_csp/elt/pss-03": { + "properties": { + "CapID": [ + "1" + ], + "CapType": [ + "PSS" + ], + "subID": [ + "3" + ] + } + } + }, + "MidCspSubarrayProcModePst": { + "mid_csp/elt/pst-03": { + "properties": { + "CapID": [ + "1" + ], + "CapType": [ + "PST" + ], + "subID": [ + "3" + ] + } + } + }, + "MidCspSubarrayProcModeVlbi": { + "mid_csp/elt/vlbi-03": { + "properties": { + "CapID": [ + "1" + ], + "CapType": [ + "VLBI" + ], + "subID": [ + "3" + ] + } + } + } + } + }, + "DataBaseds": { + "2": { + "DataBase": { + "sys/database/2": {} + } + } + }, + "TangoAccessControl": { + "1": { + "TangoAccessControl": { + "sys/access_control/1": {} + } + } + }, + "TangoTest": { + "test": { + "TangoTest": { + "sys/tg_test/1": {} + } + } + } + } +} diff --git a/csp-lmc-mid/charts/csp-proto/secrets/.gitkeep b/csp-lmc-mid/charts/csp-proto/secrets/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/csp-lmc-mid/charts/csp-proto/secrets/tls.crt b/csp-lmc-mid/charts/csp-proto/secrets/tls.crt new file mode 100644 index 0000000..281f413 --- /dev/null +++ b/csp-lmc-mid/charts/csp-proto/secrets/tls.crt @@ -0,0 +1,20 @@ +-----BEGIN CERTIFICATE----- +MIIDRTCCAi2gAwIBAgIUCWlGy8z2r11G2Sc52B0zjGpytywwDQYJKoZIhvcNAQEL +BQAwMjEdMBsGA1UEAwwUdGVzdC5jc3AtcHJvdG8ubG9jYWwxETAPBgNVBAoMCE1p +bmlrdWJlMB4XDTIwMDkwNDA2NDM0OFoXDTIxMDkwNDA2NDM0OFowMjEdMBsGA1UE +AwwUdGVzdC5jc3AtcHJvdG8ubG9jYWwxETAPBgNVBAoMCE1pbmlrdWJlMIIBIjAN +BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA+y4kIIi+hU5fNdV1JTc4qCDh2VAO +lhXX5LmJAQbWWkzOWszOcqGB0g6P4CNIAgNVmFjPoPNsbxlBrKFpoI78p4y1iW4C +LOGkg4gwND1f8SNE7VJyqCiMti7SdBFF6LRNdp6WwmVKVuRdN4Tk+B+39dlTSVjx +Ykziqy7vRLwBsJlbhxIFRkFNdmzpucYTcjUfB4PM5my30ZGdqMnsZ5Mpzw/BkC+s +VRVMSKq1nmtgMYIZUTgdue/sC/SKuqH4FffiQZ6RLAABl1qXFU/A2RkjSn3VBuYh +CWXPgSvi5mxCWDqf4lGZR+yxWMD+t7AG4IuLUl+KeV8PIjvMWSKb+Fdy9wIDAQAB +o1MwUTAdBgNVHQ4EFgQUdnM99TO9Jn3Oi16QbSIqeDkQr1cwHwYDVR0jBBgwFoAU +dnM99TO9Jn3Oi16QbSIqeDkQr1cwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0B +AQsFAAOCAQEA5d3w4vrLHbto4NGfKyjORnqQyxEeI5eZe9xRBaxobdhMlFDshNjC +GTcOdcAiGU9jRn95fItJZraXMYCR+Ysf9edU+YEaVnKioWnCUflxBNa2tZ7c+sNC +zqvcRIYZIGGg1J4RYZ0i0XJsYKn+RCuhSPjR3C1nSN47PPjnk85hnUyofdGHDJ2W +p71ozY2o3lKuw9NiU9kqnW2NRW/QBZvKnGHdq2izP8ciZZJtCsz8Tz9I1AzL2qqx +G8UThABjlIVMzhoRjzQ6vI5mcP/ucJZ1nU2/sqOGI4aLVRNTlv5DsiuPmC6zHD/s +ApaI7734oQBu6SkIrJLNyNwk2cQusgX44Q== +-----END CERTIFICATE----- diff --git a/csp-lmc-mid/charts/csp-proto/secrets/tls.key b/csp-lmc-mid/charts/csp-proto/secrets/tls.key new file mode 100644 index 0000000..5747df7 --- /dev/null +++ b/csp-lmc-mid/charts/csp-proto/secrets/tls.key @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQD7LiQgiL6FTl81 +1XUlNzioIOHZUA6WFdfkuYkBBtZaTM5azM5yoYHSDo/gI0gCA1WYWM+g82xvGUGs +oWmgjvynjLWJbgIs4aSDiDA0PV/xI0TtUnKoKIy2LtJ0EUXotE12npbCZUpW5F03 +hOT4H7f12VNJWPFiTOKrLu9EvAGwmVuHEgVGQU12bOm5xhNyNR8Hg8zmbLfRkZ2o +yexnkynPD8GQL6xVFUxIqrWea2AxghlROB257+wL9Iq6ofgV9+JBnpEsAAGXWpcV +T8DZGSNKfdUG5iEJZc+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OEI18D +Ga/GorxdovA6dyoqjgOMkWzRz0XdubyKr7muDEZH+wKBgDw3y6Ujx0fTgENMgrLD +lj205wSOUZe9a5QJQ3HbsKh2qDY0nK2COMo8OW76+a5Vlk2PJLyXQGU2Ceuj+rUq +yY3+cVQfjI3dYv+5nTh4O1XRiZwVhHm/AkUlQ5n0C9KSa4Ejhpb8A7RUDAC8B8cn +p+IuCq0Nk9KtGwdvh9fH/hJ5 +-----END PRIVATE KEY----- diff --git a/csp-lmc-mid/charts/csp-proto/templates/_helpers.tpl b/csp-lmc-mid/charts/csp-proto/templates/_helpers.tpl new file mode 100644 index 0000000..c1891ce --- /dev/null +++ b/csp-lmc-mid/charts/csp-proto/templates/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "csp-proto.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "csp-proto.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "csp-proto.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/csp-lmc-mid/charts/csp-proto/templates/csplmc.yaml b/csp-lmc-mid/charts/csp-proto/templates/csplmc.yaml new file mode 100644 index 0000000..29afbb5 --- /dev/null +++ b/csp-lmc-mid/charts/csp-proto/templates/csplmc.yaml @@ -0,0 +1,147 @@ +{{ if .Values.csplmc.enabled }} + +--- +# Device Server configurations +apiVersion: v1 +kind: ConfigMap +metadata: + name: "csp-proto-configuration-json-{{ template "csp-proto.name" . }}-{{ .Release.Name }}" + namespace: {{ .Release.Namespace }} +data: + cspconfig.json: +{{ (tpl (.Files.Glob "data/cspconfig.json").AsConfig . ) | indent 2 }} + bootstrap.sh: | + #/bin/sh + /usr/local/bin/wait-for-it.sh databaseds-tango-base-{{ .Release.Name }}:10000 \ + --timeout=30 \ + --strict \ + -- json2tango -w -a -u data/cspconfig.json + rc=$? + if [ $rc -eq 0 ]; then + echo "finished normally." + exit 0 + else + if [ $rc -eq 2 ]; then + echo "finished with an update." + exit 0 + else + echo "finished with an ERROR." + exit $rc + fi + fi + +--- +# run once Job for loading Device Server config +apiVersion: batch/v1 +kind: Job +metadata: + name: midcsplmc-configurator-{{ template "csp-proto.name" . }}-{{ .Release.Name }} + namespace: {{ .Release.Namespace }} +spec: + ttlSecondsAfterFinished: 100 + template: + spec: + containers: + - name: dsconfig + image: "{{ .Values.dsconfig.image.registry }}/{{ .Values.dsconfig.image.image }}:{{ .Values.dsconfig.image.tag }}" + imagePullPolicy: {{ .Values.dsconfig.image.pullPolicy }} + command: # exit code 2 is CONFIG_APPLIED - https://github.com/MaxIV-KitsControls/lib-maxiv-dsconfig/blob/master/dsconfig/utils.py#L11 !!!! this should not be an error !!!! + - sh + - data/bootstrap.sh + env: + - name: TANGO_HOST + value: databaseds-tango-base-{{ .Release.Name }}:10000 + volumeMounts: + - name: configuration + mountPath: data + readOnly: true + volumes: + - name: configuration + configMap: + name: "csp-proto-configuration-json-{{ template "csp-proto.name" . }}-{{ .Release.Name }}" + restartPolicy: Never + +{{- $global := . }} +{{- range $deviceserver := .Values.deviceServers }} + +--- +# giving a dummy Service entry ensures that the single pod is DNS addressable +apiVersion: v1 +kind: Service +metadata: + name: midcsplmc-{{ template "csp-proto.name" $global }}-{{ $deviceserver.name }}-{{ $global.Release.Name }} + namespace: {{ $global.Release.Namespace }} + labels: + app: midcsplmc-{{ template "csp-proto.name" $global }}-{{ $deviceserver.name }}-{{ $global.Release.Name }} + chart: {{ template "csp-proto.chart" $global }} + release: {{ $global.Release.Name }} + heritage: {{ $global.Release.Service }} +spec: + clusterIP: None + ports: + - name: dummy # Actually, no port is needed. + port: 1234 + targetPort: 1234 + selector: + app: midcsplmc-{{ template "csp-proto.name" $global }}-{{ $deviceserver.name }}-{{ $global.Release.Name }} + chart: {{ template "csp-proto.chart" $global }} + release: {{ $global.Release.Name }} + +--- +# Single Pod separate statefulset per Device Server +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: midcsplmc-{{ template "csp-proto.name" $global }}-{{ $deviceserver.name }}-{{ $global.Release.Name }} + namespace: {{ $global.Release.Namespace }} + labels: + app: midcsplmc-{{ template "csp-proto.name" $global }}-{{ $deviceserver.name }}-{{ $global.Release.Name }} + chart: {{ template "csp-proto.chart" $global }} + release: {{ $global.Release.Name }} + heritage: {{ $global.Release.Service }} +spec: + selector: + matchLabels: + app: midcsplmc-{{ template "csp-proto.name" $global }}-{{ $deviceserver.name }}-{{ $global.Release.Name }} + chart: {{ template "csp-proto.chart" $global }} + release: {{ $global.Release.Name }} + serviceName: midcsplmc-{{ template "csp-proto.name" $global }}-{{ $deviceserver.name }}-{{ $global.Release.Name }} + replicas: 1 + template: + metadata: + labels: + app: midcsplmc-{{ template "csp-proto.name" $global }}-{{ $deviceserver.name }}-{{ $global.Release.Name }} + chart: {{ template "csp-proto.chart" $global }} + release: {{ $global.Release.Name }} + heritage: {{ $global.Release.Service }} + cspServer: {{$deviceserver.name}} + spec: + containers: + - name: deviceserver + image: "{{ $global.Values.csplmc.image.registry }}/{{ $global.Values.csplmc.image.image }}:{{ $global.Values.csplmc.image.tag }}" + imagePullPolicy: {{ $global.Values.csplmc.image.pullPolicy }} + command: + - sh + args: +{{ toYaml $deviceserver.args | indent 10 }} + env: + - name: TANGO_HOST + value: databaseds-tango-base-{{ $global.Release.Name }}:10000 + resources: +{{ toYaml $global.Values.resources | indent 10 }} +{{- with $global.Values.nodeSelector }} + nodeSelector: +{{ toYaml . | indent 8 }} +{{- end }} +{{- with $global.Values.affinity }} + affinity: +{{ toYaml . | indent 8 }} +{{- end }} +{{- with $global.Values.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} +{{- end }} + +{{- end }} # end of range + +{{ end }} diff --git a/csp-lmc-mid/charts/csp-proto/values.yaml b/csp-lmc-mid/charts/csp-proto/values.yaml new file mode 100644 index 0000000..0224b03 --- /dev/null +++ b/csp-lmc-mid/charts/csp-proto/values.yaml @@ -0,0 +1,79 @@ +# Default values for csp-proto. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +display: ":0" +xauthority: "~/.Xauthority" + +system: csp +subsystem: csp-lmc +telescope: SKA-mid + +csplmc: + enabled: true + image: + registry: nexus.engageska-portugal.pt/ska-docker + image: mid-csp-lmc + tag: latest + pullPolicy: IfNotPresent + +deviceServers: + - name: midcapabilitymonitor + function: csp-capability-monitoring + domain: csp-monitoring + args: + - "-c" + - "/venv/bin/python /app/csp_lmc_mid/MidCspCapabilityMonitor.py monitor" + - name: midcspmaster + function: csp-central-control + domain: csp-monitoring + args: + - "-c" + - "retry --max=20 -- tango_admin --ping-device mid_csp_cbf/sub_elt/master &&\ + retry --max=5 -- tango_admin --ping-device mid_csp/capability_monitor/search_beams &&\ + /venv/bin/python /app/csp_lmc_mid/MidCspMaster.py master" + - name: midcspsubarray01 + function: csp-subarray-observation + domain: subarray + args: + - "-c" + - "retry --max=10 -- tango_admin --ping-device mid_csp/elt/master &&\ + retry --max=10 -- tango_admin --ping-device mid_csp_cbf/sub_elt/subarray_01 &&\ + /venv/bin/python /app/csp_lmc_mid/MidCspSubarray.py subarray1" + - name: midcspsubarray02 + function: csp-subarray-observation + domain: subarray + args: + - "-c" + - "retry --max=10 -- tango_admin --ping-device mid_csp/elt/master &&\ + retry --max=10 -- tango_admin --ping-device mid_csp_cbf/sub_elt/subarray_02 &&\ + /venv/bin/python /app/csp_lmc_mid/MidCspSubarray.py subarray2" + - name: midcspsubarray03 + function: csp-subarray-observation + domain: subarray + args: + - "-c" + - "retry --max=10 -- tango_admin --ping-device mid_csp/elt/master &&\ + retry --max=10 -- tango_admin --ping-device mid_csp_cbf/sub_elt/subarray_03 &&\ + /venv/bin/python /app/csp_lmc_mid/MidCspSubarray.py subarray3" + +dsconfig: + image: + registry: nexus.engageska-portugal.pt/ska-docker + image: tango-dsconfig + tag: 1.2.5.1 + pullPolicy: IfNotPresent + +nodeSelector: {} + +affinity: {} + +tolerations: [] + +resources: + requests: + cpu: 150m # 150m = 0.15 CPU + memory: 128Mi # 128Mi = 0.12 GB mem + limits: + cpu: 250m # 250m = 0.25 CPU + memory: 256Mi # 256Mi = 0.25 GB mem diff --git a/csp-lmc-mid/charts/csp-proto/values.yaml.new b/csp-lmc-mid/charts/csp-proto/values.yaml.new new file mode 100644 index 0000000..9700530 --- /dev/null +++ b/csp-lmc-mid/charts/csp-proto/values.yaml.new @@ -0,0 +1,59 @@ +# Default values for csp-proto. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +display: ":0" +xauthority: "~/.Xauthority" + + +csplmc: + enabled: true + image: + registry: nexus.engageska-portugal.pt/ska-docker + image: mid-csp-lmc + tag: 0.6.8-452d0a0-dirty + pullPolicy: IfNotPresent + +deviceServers: + - name: midcapabilitymonitor + args: + - "-c" + - "/venv/bin/python /app/csp_lmc_mid/MidCspCapabilityMonitor.py monitor" + - name: midcspmaster + args: + - "-c" + - "retry --max=5 -- tango_admin --ping-device mid_csp/capability_monitor/search_beams &&\ + /venv/bin/python /app/csp_lmc_mid/MidCspMaster.py master" + - name: midcspsubarray01 + args: + - "-c" + - " /venv/bin/python /app/csp_lmc_mid/MidCspSubarray.py subarray1" + - name: midcspsubarray02 + args: + - "-c" + - "/venv/bin/python /app/csp_lmc_mid/MidCspSubarray.py subarray2" + - name: midcspsubarray03 + args: + - "-c" + - "/venv/bin/python /app/csp_lmc_mid/MidCspSubarray.py subarray3" + +dsconfig: + image: + registry: nexus.engageska-portugal.pt/ska-docker + image: tango-dsconfig + tag: 1.2.5.1 + pullPolicy: IfNotPresent + +nodeSelector: {} + +affinity: {} + +tolerations: [] + +resources: + requests: + cpu: 150m # 150m = 0.15 CPU + memory: 128Mi # 128Mi = 0.12 GB mem + limits: + cpu: 250m # 250m = 0.25 CPU + memory: 256Mi # 256Mi = 0.25 GB mem diff --git a/csp-lmc-mid/charts/mid-csp/Chart.lock b/csp-lmc-mid/charts/mid-csp/Chart.lock new file mode 100644 index 0000000..e6a9d22 --- /dev/null +++ b/csp-lmc-mid/charts/mid-csp/Chart.lock @@ -0,0 +1,9 @@ +dependencies: +- name: csp-lmc + repository: "file://../csp-proto" + version: 0.5.3 +- name: tango-base + repository: https://gitlab.com/ska-telescope/skampi/-/raw/master/repository + version: 0.1.1 +digest: sha256:9d9ae70d4070c7eba89e967b744e8f37fda46778dd0af3b05e49cb642ae32a36 +generated: "2020-09-04T08:16:47.853296221+02:00" diff --git a/csp-lmc-mid/charts/mid-csp/Chart.yaml b/csp-lmc-mid/charts/mid-csp/Chart.yaml new file mode 100644 index 0000000..5befbd7 --- /dev/null +++ b/csp-lmc-mid/charts/mid-csp/Chart.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +appVersion: 0.6.8 +description: A Helm chart for deploying the whole Mid_CSP prototype on Kubernetes +name: mid-csp +version: 0.1.0 +icon: https://www.skatelescope.org/wp-content/uploads/2016/07/09545_NEW_LOGO_2014.png +dependencies: +- name: tango-base + version: 0.1.1 + repository: https://gitlab.com/ska-telescope/skampi/-/raw/master/repository + condition: tango-base.enabled +- name: csp-proto + version: 0.5.3 + repository: "file://../csp-proto" + condition: csp-proto.enabled diff --git a/csp-lmc-mid/charts/mid-csp/charts/cbf-proto/Chart.yaml b/csp-lmc-mid/charts/mid-csp/charts/cbf-proto/Chart.yaml new file mode 100644 index 0000000..d86101a --- /dev/null +++ b/csp-lmc-mid/charts/mid-csp/charts/cbf-proto/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for deploying the CSP_Mid.LMC CBF prototype on Kubernetes +name: cbf-proto +version: 0.4.0 +icon: https://www.skatelescope.org/wp-content/uploads/2016/07/09545_NEW_LOGO_2014.png diff --git a/csp-lmc-mid/charts/mid-csp/charts/cbf-proto/data/midcbfconfig.json b/csp-lmc-mid/charts/mid-csp/charts/cbf-proto/data/midcbfconfig.json new file mode 100644 index 0000000..e2fcaa5 --- /dev/null +++ b/csp-lmc-mid/charts/mid-csp/charts/cbf-proto/data/midcbfconfig.json @@ -0,0 +1,1719 @@ +{ + "servers": { + "CbfMaster": { + "master": { + "CbfMaster": { + "mid_csp_cbf/sub_elt/master": { + "attribute_properties": { + "adminMode": { + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "CbfSubarray": [ + "mid_csp_cbf/sub_elt/subarray_01", + "mid_csp_cbf/sub_elt/subarray_02", + "mid_csp_cbf/sub_elt/subarray_03" + ], + "FSP": [ + "mid_csp_cbf/fsp/01", + "mid_csp_cbf/fsp/02", + "mid_csp_cbf/fsp/03", + "mid_csp_cbf/fsp/04" + ], + "MaxCapabilities": [ + "VCC:4", + "FSP:4", + "Subarray:2" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ], + "polled_attr": [ + "reportfspstate", + "1000", + "reportvccadminmode", + "1000", + "reportvcchealthstate", + "1000", + "receptortovcc", + "1000", + "reportfspCorrSubarraymembership", + "1000", + "reportfsphealthstate", + "1000", + "healthstate", + "1000", + "adminmode", + "1000", + "subarrayconfigid", + "1000", + "reportfspadminmode", + "1000", + "commandprogress", + "2000", + "reportsubarrayhealthstate", + "1000", + "reportvccstate", + "1000", + "reportsubarrayadminmode", + "1000", + "vcctoreceptor", + "3000", + "reportsubarraystate", + "3000", + "state", + "1000" + ] + } + } + } + } + }, + "CbfSubarrayMulti": { + "cbfSubarray-01": { + "CbfSubarray": { + "mid_csp_cbf/sub_elt/subarray_01": { + "attribute_properties": { + "adminMode": { + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "obsState": { + "abs_change": [ + "-1", + "1" + ] + }, + "scanID": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "FSP": [ + "mid_csp_cbf/fsp/01", + "mid_csp_cbf/fsp/02", + "mid_csp_cbf/fsp/03", + "mid_csp_cbf/fsp/04" + ], + "FspCorrSubarray": [ + "mid_csp_cbf/fspCorrSubarray/01_01", + "mid_csp_cbf/fspCorrSubarray/02_01", + "mid_csp_cbf/fspCorrSubarray/03_01", + "mid_csp_cbf/fspCorrSubarray/04_01" + ], + "FspPssSubarray": [ + "mid_csp_cbf/fspPssSubarray/01_01", + "mid_csp_cbf/fspPssSubarray/02_01", + "mid_csp_cbf/fspPssSubarray/03_01", + "mid_csp_cbf/fspPssSubarray/04_01" + ], + "SW1Address": [ + "mid_csp_cbf/sw1/01" + ], + "SW2Address": [ + "mid_csp_cbf/sw2/01" + ], + "PssConfigAddress": [ + "mid_csp_cbf/pssconfig/01" + ], + "CorrConfigAddress": [ + "mid_csp_cbf/corrconfig/01" + ], + "SubID": [ + "1" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ], + "polled_attr": [ + "healthstate", + "1000", + "fsphealthstate", + "1000", + "fspstate", + "1000", + "vccstate", + "1000", + "vcchealthstate", + "1000", + "configid", + "1000", + "fspList", + "1000", + "outputLinksDistribution", + "1000" + ] + } + } + }, + "SearchWindow": { + "mid_csp_cbf/sw1/01": {}, + "mid_csp_cbf/sw2/01": {} + }, + "CbfSubarrayPssConfig": { + "mid_csp_cbf/pssConfig/01": { + "properties": { + "FspPssSubarray": [ + "mid_csp_cbf/fspPssSubarray/01_01", + "mid_csp_cbf/fspPssSubarray/02_01", + "mid_csp_cbf/fspPssSubarray/03_01", + "mid_csp_cbf/fspPssSubarray/04_01" + ], + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ] + } + } + }, + "CbfSubarrayCorrConfig": { + "mid_csp_cbf/corrConfig/01": { + "properties": { + "FspCorrSubarray": [ + "mid_csp_cbf/fspCorrSubarray/01_01", + "mid_csp_cbf/fspCorrSubarray/02_01", + "mid_csp_cbf/fspCorrSubarray/03_01", + "mid_csp_cbf/fspCorrSubarray/04_01" + ], + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ] + } + } + }, + "SendConfig": { + "mid_csp_cbf/SendConfig/01": { + "properties": { + "SubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_01" + ] + } + } + } + }, + "cbfSubarray-02": { + "CbfSubarray": { + "mid_csp_cbf/sub_elt/subarray_02": { + "attribute_properties": { + "adminMode": { + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "obsState": { + "abs_change": [ + "-1", + "1" + ] + }, + "scanID": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "FSP": [ + "mid_csp_cbf/fsp/01", + "mid_csp_cbf/fsp/02", + "mid_csp_cbf/fsp/03", + "mid_csp_cbf/fsp/04" + ], + "FspCorrSubarray": [ + "mid_csp_cbf/fspCorrSubarray/01_02", + "mid_csp_cbf/fspCorrSubarray/02_02", + "mid_csp_cbf/fspCorrSubarray/03_02", + "mid_csp_cbf/fspCorrSubarray/04_02" + ], + "FspPssSubarray": [ + "mid_csp_cbf/fspPssSubarray/01_02", + "mid_csp_cbf/fspPssSubarray/02_02", + "mid_csp_cbf/fspPssSubarray/03_02", + "mid_csp_cbf/fspPssSubarray/04_02" + ], + "SW1Address": [ + "mid_csp_cbf/sw1/02" + ], + "SW2Address": [ + "mid_csp_cbf/sw2/02" + ], + "PssConfigAddress": [ + "mid_csp_cbf/pssconfig/02" + ], + "CorrConfigAddress": [ + "mid_csp_cbf/corrconfig/02" + ], + "SubID": [ + "2" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ], + "polled_attr": [ + "configid", + "1000", + "healthstate", + "1000", + "vcchealthstate", + "1000", + "adminmode", + "1000", + "fspstate", + "1000", + "fspList", + "1000", + "fsphealthstate", + "1000", + "vccstate", + "1000", + "outputLinksDistribution", + "1000" + ] + } + } + }, + "SearchWindow": { + "mid_csp_cbf/sw1/02": {}, + "mid_csp_cbf/sw2/02": {} + }, + "CbfSubarrayPssConfig": { + "mid_csp_cbf/pssConfig/02": { + "properties": { + "FspPssSubarray": [ + "mid_csp_cbf/fspPssSubarray/01_02", + "mid_csp_cbf/fspPssSubarray/02_02", + "mid_csp_cbf/fspPssSubarray/03_02", + "mid_csp_cbf/fspPssSubarray/04_02" + ], + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ] + } + } + }, + "CbfSubarrayCorrConfig": { + "mid_csp_cbf/corrConfig/02": { + "properties": { + "FspCorrSubarray": [ + "mid_csp_cbf/fspCorrSubarray/01_02", + "mid_csp_cbf/fspCorrSubarray/02_02", + "mid_csp_cbf/fspCorrSubarray/03_02", + "mid_csp_cbf/fspCorrSubarray/04_02" + ], + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ] + } + } + }, + "SendConfig": { + "mid_csp_cbf/SendConfig/02": { + "properties": { + "SubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_02" + ] + } + } + } + + }, + "cbfSubarray-03": { + "CbfSubarray": { + "mid_csp_cbf/sub_elt/subarray_03": { + "attribute_properties": { + "adminMode": { + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "obsState": { + "abs_change": [ + "-1", + "1" + ] + }, + "scanID": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "FSP": [ + "mid_csp_cbf/fsp/01", + "mid_csp_cbf/fsp/02", + "mid_csp_cbf/fsp/03", + "mid_csp_cbf/fsp/04" + ], + "FspCorrSubarray": [ + "mid_csp_cbf/fspCorrSubarray/01_03", + "mid_csp_cbf/fspCorrSubarray/02_03", + "mid_csp_cbf/fspCorrSubarray/03_03", + "mid_csp_cbf/fspCorrSubarray/04_03" + ], + "FspPssSubarray": [ + "mid_csp_cbf/fspPssSubarray/01_03", + "mid_csp_cbf/fspPssSubarray/02_03", + "mid_csp_cbf/fspPssSubarray/03_03", + "mid_csp_cbf/fspPssSubarray/04_03" + ], + "SW1Address": [ + "mid_csp_cbf/sw1/03" + ], + "SW2Address": [ + "mid_csp_cbf/sw2/03" + ], + "PssConfigAddress": [ + "mid_csp_cbf/pssconfig/03" + ], + "CorrConfigAddress": [ + "mid_csp_cbf/corrconfig/03" + ], + "SubID": [ + "3" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ], + "polled_attr": [ + "healthstate", + "1000", + "fsphealthstate", + "1000", + "fspstate", + "1000", + "vccstate", + "1000", + "vcchealthstate", + "1000", + "configid", + "1000", + "fspList", + "1000", + "outputLinksDistribution", + "1000" + ] + } + } + }, + "SearchWindow": { + "mid_csp_cbf/sw1/03": {}, + "mid_csp_cbf/sw2/03": {} + }, + "CbfSubarrayPssConfig": { + "mid_csp_cbf/pssConfig/03": { + "properties": { + "FspPssSubarray": [ + "mid_csp_cbf/fspPssSubarray/01_03", + "mid_csp_cbf/fspPssSubarray/02_03", + "mid_csp_cbf/fspPssSubarray/03_03", + "mid_csp_cbf/fspPssSubarray/04_03" + ], + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ] + } + } + }, + "CbfSubarrayCorrConfig": { + "mid_csp_cbf/corrConfig/03": { + "properties": { + "FspCorrSubarray": [ + "mid_csp_cbf/fspCorrSubarray/01_03", + "mid_csp_cbf/fspCorrSubarray/02_03", + "mid_csp_cbf/fspCorrSubarray/03_03", + "mid_csp_cbf/fspCorrSubarray/04_03" + ], + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ] + } + } + }, + "SendConfig": { + "mid_csp_cbf/SendConfig/03": { + "properties": { + "SubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_03" + ] + } + } + } + } + }, + "DataBaseds": { + "2": { + "DataBase": { + "sys/database/2": {} + } + } + }, + "FspMulti": { + "fsp-01": { + "Fsp": { + "mid_csp_cbf/fsp/01": { + "attribute_properties": { + "adminMode": { + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "subarrayMembership": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "CorrelationAddress": [ + "mid_csp_cbf/fsp_corr/01" + ], + "FspID": [ + "1" + ], + "PSSAddress": [ + "mid_csp_cbf/fsp_pss/01" + ], + "PSTAddress": [ + "mid_csp_cbf/fsp_pst/01" + ], + "VLBIAddress": [ + "mid_csp_cbf/fsp_vlbi/01" + ], + "FspCorrSubarray": [ + "mid_csp_cbf/fspCorrSubarray/01_01", + "mid_csp_cbf/fspCorrSubarray/01_02", + "mid_csp_cbf/fspCorrSubarray/01_03" + ], + "FspPssSubarray": [ + "mid_csp_cbf/fspPssSubarray/01_01", + "mid_csp_cbf/fspPssSubarray/01_02", + "mid_csp_cbf/fspPssSubarray/01_03" + ], + "polled_attr": [ + "adminmode", + "1000", + "healthstate", + "1000", + "state", + "1000", + "subarraymembership", + "1000" + ] + } + } + }, + "FspCorr": { + "mid_csp_cbf/fsp_corr/01": {} + }, + "FspPss": { + "mid_csp_cbf/fsp_pss/01": {} + }, + "FspPst": { + "mid_csp_cbf/fsp_pst/01": {} + }, + "FspCorrSubarray": { + "mid_csp_cbf/fspCorrSubarray/01_01": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_01" + ], + "FspID": [ + "1" + ], + "SubID": [ + "1" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + }, + "mid_csp_cbf/fspCorrSubarray/01_02": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_02" + ], + "FspID": [ + "1" + ], + "SubID": [ + "2" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + }, + "mid_csp_cbf/fspCorrSubarray/01_03": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_03" + ], + "FspID": [ + "1" + ], + "SubID": [ + "3" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + } + }, + "FspPssSubarray": { + "mid_csp_cbf/fspPssSubarray/01_01": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_01" + ], + "FspID": [ + "1" + ], + "SubID": [ + "1" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + }, + "mid_csp_cbf/fspPssSubarray/01_02": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_02" + ], + "FspID": [ + "1" + ], + "SubID": [ + "2" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + }, + "mid_csp_cbf/fspPssSubarray/01_03": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_03" + ], + "FspID": [ + "1" + ], + "SubID": [ + "3" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + } + }, + "FspVlbi": { + "mid_csp_cbf/fsp_vlbi/01": {} + } + }, + "fsp-02": { + "Fsp": { + "mid_csp_cbf/fsp/02": { + "attribute_properties": { + "adminMode": { + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "subarrayMembership": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "CorrelationAddress": [ + "mid_csp_cbf/fsp_corr/02" + ], + "FspID": [ + "2" + ], + "PSSAddress": [ + "mid_csp_cbf/fsp_pss/02" + ], + "PSTAddress": [ + "mid_csp_cbf/fsp_pst/02" + ], + "VLBIAddress": [ + "mid_csp_cbf/fsp_vlbi/02" + ], + "FspCorrSubarray": [ + "mid_csp_cbf/fspCorrSubarray/02_01", + "mid_csp_cbf/fspCorrSubarray/02_02", + "mid_csp_cbf/fspCorrSubarray/02_03" + ], + "FspPssSubarray": [ + "mid_csp_cbf/fspPssSubarray/02_01", + "mid_csp_cbf/fspPssSubarray/02_02", + "mid_csp_cbf/fspPssSubarray/02_03" + ], + "polled_attr": [ + "adminmode", + "1000", + "healthstate", + "1000", + "state", + "1000", + "subarraymembership", + "1000" + ] + } + } + }, + "FspCorr": { + "mid_csp_cbf/fsp_corr/02": {} + }, + "FspPss": { + "mid_csp_cbf/fsp_pss/02": {} + }, + "FspPst": { + "mid_csp_cbf/fsp_pst/02": {} + }, + "FspCorrSubarray": { + "mid_csp_cbf/fspCorrSubarray/02_01": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_01" + ], + "FspID": [ + "2" + ], + "SubID": [ + "1" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + }, + "mid_csp_cbf/fspCorrSubarray/02_02": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_02" + ], + "FspID": [ + "2" + ], + "SubID": [ + "2" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + }, + "mid_csp_cbf/fspCorrSubarray/02_03": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_03" + ], + "FspID": [ + "2" + ], + "SubID": [ + "3" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + } + }, + "FspPssSubarray": { + "mid_csp_cbf/fspPssSubarray/02_01": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_01" + ], + "FspID": [ + "2" + ], + "SubID": [ + "1" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + }, + "mid_csp_cbf/fspPssSubarray/02_02": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_02" + ], + "FspID": [ + "2" + ], + "SubID": [ + "2" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + }, + "mid_csp_cbf/fspPssSubarray/02_03": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_03" + ], + "FspID": [ + "2" + ], + "SubID": [ + "3" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + } + }, + "FspVlbi": { + "mid_csp_cbf/fsp_vlbi/02": {} + } + }, + "fsp-03": { + "Fsp": { + "mid_csp_cbf/fsp/03": { + "attribute_properties": { + "adminMode": { + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "subarrayMembership": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "CorrelationAddress": [ + "mid_csp_cbf/fsp_corr/03" + ], + "FspID": [ + "3" + ], + "PSSAddress": [ + "mid_csp_cbf/fsp_pss/03" + ], + "PSTAddress": [ + "mid_csp_cbf/fsp_pst/03" + ], + "VLBIAddress": [ + "mid_csp_cbf/fsp_vlbi/03" + ], + "FspCorrSubarray": [ + "mid_csp_cbf/fspCorrSubarray/03_01", + "mid_csp_cbf/fspCorrSubarray/03_02", + "mid_csp_cbf/fspCorrSubarray/03_03" + ], + "FspPssSubarray": [ + "mid_csp_cbf/fspPssSubarray/03_01", + "mid_csp_cbf/fspPssSubarray/03_02", + "mid_csp_cbf/fspPssSubarray/03_03" + ], + "polled_attr": [ + "adminmode", + "1000", + "healthstate", + "1000", + "state", + "1000", + "subarraymembership", + "1000" + ] + } + } + }, + "FspCorr": { + "mid_csp_cbf/fsp_corr/03": {} + }, + "FspPss": { + "mid_csp_cbf/fsp_pss/03": {} + }, + "FspPst": { + "mid_csp_cbf/fsp_pst/03": {} + }, + "FspCorrSubarray": { + "mid_csp_cbf/fspCorrSubarray/03_01": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_01" + ], + "FspID": [ + "3" + ], + "SubID": [ + "1" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + }, + "mid_csp_cbf/fspCorrSubarray/03_02": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_02" + ], + "FspID": [ + "3" + ], + "SubID": [ + "2" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + }, + "mid_csp_cbf/fspCorrSubarray/03_03": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_03" + ], + "FspID": [ + "3" + ], + "SubID": [ + "3" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + } + }, + "FspPssSubarray": { + "mid_csp_cbf/fspPssSubarray/03_01": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_01" + ], + "FspID": [ + "3" + ], + "SubID": [ + "1" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + }, + "mid_csp_cbf/fspPssSubarray/03_02": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_02" + ], + "FspID": [ + "3" + ], + "SubID": [ + "2" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + }, + "mid_csp_cbf/fspPssSubarray/03_03": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_03" + ], + "FspID": [ + "3" + ], + "SubID": [ + "3" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + } + }, + "FspVlbi": { + "mid_csp_cbf/fsp_vlbi/03": {} + } + }, + "fsp-04": { + "Fsp": { + "mid_csp_cbf/fsp/04": { + "attribute_properties": { + "adminMode": { + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "subarrayMembership": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "CorrelationAddress": [ + "mid_csp_cbf/fsp_corr/04" + ], + "FspID": [ + "4" + ], + "PSSAddress": [ + "mid_csp_cbf/fsp_pss/04" + ], + "PSTAddress": [ + "mid_csp_cbf/fsp_pst/04" + ], + "VLBIAddress": [ + "mid_csp_cbf/fsp_vlbi/04" + ], + "FspCorrSubarray": [ + "mid_csp_cbf/fspCorrSubarray/04_01", + "mid_csp_cbf/fspCorrSubarray/04_02", + "mid_csp_cbf/fspCorrSubarray/04_03" + ], + "FspPssSubarray": [ + "mid_csp_cbf/fspPssSubarray/04_01", + "mid_csp_cbf/fspPssSubarray/04_02", + "mid_csp_cbf/fspPssSubarray/04_03" + ], + "polled_attr": [ + "adminmode", + "1000", + "healthstate", + "1000", + "state", + "1000", + "subarraymembership", + "1000" + ] + } + } + }, + "FspCorr": { + "mid_csp_cbf/fsp_corr/04": {} + }, + "FspPss": { + "mid_csp_cbf/fsp_pss/04": {} + }, + "FspPst": { + "mid_csp_cbf/fsp_pst/04": {} + }, + "FspCorrSubarray": { + "mid_csp_cbf/fspCorrSubarray/04_01": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_01" + ], + "FspID": [ + "4" + ], + "SubID": [ + "1" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + }, + "mid_csp_cbf/fspCorrSubarray/04_02": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_02" + ], + "FspID": [ + "4" + ], + "SubID": [ + "2" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + }, + "mid_csp_cbf/fspCorrSubarray/04_03": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_03" + ], + "FspID": [ + "4" + ], + "SubID": [ + "3" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + } + }, + "FspPssSubarray": { + "mid_csp_cbf/fspPssSubarray/04_01": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_01" + ], + "FspID": [ + "4" + ], + "SubID": [ + "1" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + }, + "mid_csp_cbf/fspPssSubarray/04_02": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_02" + ], + "FspID": [ + "4" + ], + "SubID": [ + "2" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + }, + "mid_csp_cbf/fspPssSubarray/04_03": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_03" + ], + "FspID": [ + "4" + ], + "SubID": [ + "3" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + } + }, + "FspVlbi": { + "mid_csp_cbf/fsp_vlbi/04": {} + } + } + }, + "TangoAccessControl": { + "1": { + "TangoAccessControl": { + "sys/access_control/1": {} + } + } + }, + "TangoTest": { + "test": { + "TangoTest": { + "sys/tg_test/1": {} + } + } + }, + "VccMulti": { + "vcc-001": { + "Vcc": { + "mid_csp_cbf/vcc/001": { + "attribute_properties": { + "adminMode": { + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "subarrayMembership": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "Band1And2Address": [ + "mid_csp_cbf/vcc_band12/001" + ], + "Band3Address": [ + "mid_csp_cbf/vcc_band3/001" + ], + "Band4Address": [ + "mid_csp_cbf/vcc_band4/001" + ], + "Band5Address": [ + "mid_csp_cbf/vcc_band5/001" + ], + "SW1Address": [ + "mid_csp_cbf/vcc_sw1/001" + ], + "SW2Address": [ + "mid_csp_cbf/vcc_sw2/001" + ], + "VccID": [ + "1" + ], + "polled_attr": [ + "healthstate", + "1000", + "adminmode", + "1000" + ] + } + } + }, + "VccBand1And2": { + "mid_csp_cbf/vcc_band12/001": {} + }, + "VccBand3": { + "mid_csp_cbf/vcc_band3/001": {} + }, + "VccBand4": { + "mid_csp_cbf/vcc_band4/001": {} + }, + "VccBand5": { + "mid_csp_cbf/vcc_band5/001": {} + }, + "VccSearchWindow": { + "mid_csp_cbf/vcc_sw1/001": {}, + "mid_csp_cbf/vcc_sw2/001": {} + } + }, + "vcc-002": { + "Vcc": { + "mid_csp_cbf/vcc/002": { + "attribute_properties": { + "adminMode": { + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "subarrayMembership": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "Band1And2Address": [ + "mid_csp_cbf/vcc_band12/002" + ], + "Band3Address": [ + "mid_csp_cbf/vcc_band3/002" + ], + "Band4Address": [ + "mid_csp_cbf/vcc_band4/002" + ], + "Band5Address": [ + "mid_csp_cbf/vcc_band5/002" + ], + "SW1Address": [ + "mid_csp_cbf/vcc_sw1/002" + ], + "SW2Address": [ + "mid_csp_cbf/vcc_sw2/002" + ], + "VccID": [ + "2" + ], + "polled_attr": [ + "healthstate", + "1000", + "adminmode", + "1000" + ] + } + } + }, + "VccBand1And2": { + "mid_csp_cbf/vcc_band12/002": {} + }, + "VccBand3": { + "mid_csp_cbf/vcc_band3/002": {} + }, + "VccBand4": { + "mid_csp_cbf/vcc_band4/002": {} + }, + "VccBand5": { + "mid_csp_cbf/vcc_band5/002": {} + }, + "VccSearchWindow": { + "mid_csp_cbf/vcc_sw1/002": {}, + "mid_csp_cbf/vcc_sw2/002": {} + } + }, + "vcc-003": { + "Vcc": { + "mid_csp_cbf/vcc/003": { + "attribute_properties": { + "adminMode": { + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "subarrayMembership": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "Band1And2Address": [ + "mid_csp_cbf/vcc_band12/003" + ], + "Band3Address": [ + "mid_csp_cbf/vcc_band3/003" + ], + "Band4Address": [ + "mid_csp_cbf/vcc_band4/003" + ], + "Band5Address": [ + "mid_csp_cbf/vcc_band5/003" + ], + "SW1Address": [ + "mid_csp_cbf/vcc_sw1/003" + ], + "SW2Address": [ + "mid_csp_cbf/vcc_sw2/003" + ], + "VccID": [ + "3" + ], + "polled_attr": [ + "healthstate", + "1000", + "adminmode", + "1000" + ] + } + } + }, + "VccBand1And2": { + "mid_csp_cbf/vcc_band12/003": {} + }, + "VccBand3": { + "mid_csp_cbf/vcc_band3/003": {} + }, + "VccBand4": { + "mid_csp_cbf/vcc_band4/003": {} + }, + "VccBand5": { + "mid_csp_cbf/vcc_band5/003": {} + }, + "VccSearchWindow": { + "mid_csp_cbf/vcc_sw1/003": {}, + "mid_csp_cbf/vcc_sw2/003": {} + } + }, + "vcc-004": { + "Vcc": { + "mid_csp_cbf/vcc/004": { + "attribute_properties": { + "adminMode": { + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "subarrayMembership": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "Band1And2Address": [ + "mid_csp_cbf/vcc_band12/004" + ], + "Band3Address": [ + "mid_csp_cbf/vcc_band3/004" + ], + "Band4Address": [ + "mid_csp_cbf/vcc_band4/004" + ], + "Band5Address": [ + "mid_csp_cbf/vcc_band5/004" + ], + "SW1Address": [ + "mid_csp_cbf/vcc_sw1/004" + ], + "SW2Address": [ + "mid_csp_cbf/vcc_sw2/004" + ], + "VccID": [ + "4" + ], + "polled_attr": [ + "healthstate", + "1000", + "adminmode", + "1000" + ] + } + } + }, + "VccBand1And2": { + "mid_csp_cbf/vcc_band12/004": {} + }, + "VccBand3": { + "mid_csp_cbf/vcc_band3/004": {} + }, + "VccBand4": { + "mid_csp_cbf/vcc_band4/004": {} + }, + "VccBand5": { + "mid_csp_cbf/vcc_band5/004": {} + }, + "VccSearchWindow": { + "mid_csp_cbf/vcc_sw1/004": {}, + "mid_csp_cbf/vcc_sw2/004": {} + } + } + }, + "TmCspSubarrayLeafNodeTest": { + "tm": { + "TmCspSubarrayLeafNodeTest": { + "ska_mid/tm_leaf_node/csp_subarray01": { + "attribute_properties": { + "dopplerPhaseCorrection": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_01" + ], + + "polled_attr": [ + "delaymodel", + "1000", + "visdestinationaddress", + "1000", + "dopplerphasecorrection", + "1000" + ] + } + } + } + }, + "tm2": { + "TmCspSubarrayLeafNodeTest": { + "ska_mid/tm_leaf_node/csp_subarray02": { + "attribute_properties": { + "dopplerPhaseCorrection": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_02" + ], + + "polled_attr": [ + "delaymodel", + "1000", + "visdestinationaddress", + "1000", + "dopplerphasecorrection", + "1000" + ] + } + } + } + } + } + } +} diff --git a/csp-lmc-mid/charts/mid-csp/charts/cbf-proto/secrets/.gitkeep b/csp-lmc-mid/charts/mid-csp/charts/cbf-proto/secrets/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/csp-lmc-mid/charts/mid-csp/charts/cbf-proto/templates/_helpers.tpl b/csp-lmc-mid/charts/mid-csp/charts/cbf-proto/templates/_helpers.tpl new file mode 100644 index 0000000..cc68915 --- /dev/null +++ b/csp-lmc-mid/charts/mid-csp/charts/cbf-proto/templates/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "cbf-proto.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "cbf-proto.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "cbf-proto.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/csp-lmc-mid/charts/mid-csp/charts/cbf-proto/templates/midcbf.yaml b/csp-lmc-mid/charts/mid-csp/charts/cbf-proto/templates/midcbf.yaml new file mode 100644 index 0000000..1ab14e4 --- /dev/null +++ b/csp-lmc-mid/charts/mid-csp/charts/cbf-proto/templates/midcbf.yaml @@ -0,0 +1,146 @@ +{{ if .Values.midcbfmcs.enabled }} + +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: "mid-cbf-configuration-json-{{ template "cbf-proto.name" . }}-{{ .Release.Name }}" + namespace: {{ .Release.Namespace }} +data: + midcbfconfig.json: +{{ (tpl (.Files.Glob "data/midcbfconfig.json").AsConfig . ) | indent 2 }} + bootstrap.sh: | + #/bin/sh + /usr/local/bin/wait-for-it.sh databaseds-tango-base-{{ .Release.Name }}:10000 \ + --timeout=30 \ + --strict \ + -- json2tango -w -a -u data/midcbfconfig.json + rc=$? + if [ $rc -eq 0 ]; then + echo "finished normally." + exit 0 + else + if [ $rc -eq 2 ]; then + echo "finished with an update." + exit 0 + else + echo "finished with an ERROR." + exit $rc + fi + fi + +--- +# run once Job for loading Device Server config +apiVersion: batch/v1 +kind: Job +metadata: + name: mid-cbf-configurator-{{ template "cbf-proto.name" . }}-{{ .Release.Name }} + namespace: {{ .Release.Namespace }} +spec: + ttlSecondsAfterFinished: 100 + template: + spec: + containers: + - name: dsconfig + image: "{{ .Values.dsconfig.image.registry }}/{{ .Values.dsconfig.image.image }}:{{ .Values.dsconfig.image.tag }}" + imagePullPolicy: {{ .Values.dsconfig.image.pullPolicy }} + command: # exit code 2 is CONFIG_APPLIED - https://github.com/MaxIV-KitsControls/lib-maxiv-dsconfig/blob/master/dsconfig/utils.py#L11 !!!! this should not be an error !!!! + - sh + - data/bootstrap.sh + env: + - name: TANGO_HOST + value: databaseds-tango-base-{{ .Release.Name }}:10000 + volumeMounts: + - name: configuration + mountPath: data + readOnly: true + volumes: + - name: configuration + configMap: + name: "mid-cbf-configuration-json-{{ template "cbf-proto.name" . }}-{{ .Release.Name }}" + restartPolicy: Never + +{{- $global := . }} +{{- range $deviceserver := .Values.deviceServers }} + +--- +# giving a dummy Service entry ensures that the single pod is DNS addressable +apiVersion: v1 +kind: Service +metadata: + name: mid-cbf-{{ template "cbf-proto.name" $global }}-{{ $deviceserver.name }}-{{ $global.Release.Name }} + namespace: {{ $global.Release.Namespace }} + labels: + app: mid-cbf-{{ template "cbf-proto.name" $global }}-{{ $deviceserver.name }}-{{ $global.Release.Name }} + chart: {{ template "cbf-proto.chart" $global }} + release: {{ $global.Release.Name }} + heritage: {{ $global.Release.Service }} +spec: + clusterIP: None + ports: + - name: dummy # Actually, no port is needed. + port: 1234 + targetPort: 1234 + selector: + app: mid-cbf-{{ template "cbf-proto.name" $global }}-{{ $deviceserver.name }}-{{ $global.Release.Name }} + chart: {{ template "cbf-proto.chart" $global }} + release: {{ $global.Release.Name }} + +--- +# Single Pod separate statefulset per Device Server +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: mid-cbf-{{ template "cbf-proto.name" $global }}-{{ $deviceserver.name }}-{{ $global.Release.Name }} + namespace: {{ $global.Release.Namespace }} + labels: + app: mid-cbf-{{ template "cbf-proto.name" $global }}-{{ $deviceserver.name }}-{{ $global.Release.Name }} + chart: {{ template "cbf-proto.chart" $global }} + release: {{ $global.Release.Name }} + heritage: {{ $global.Release.Service }} +spec: + selector: + matchLabels: + app: mid-cbf-{{ template "cbf-proto.name" $global }}-{{ $deviceserver.name }}-{{ $global.Release.Name }} + chart: {{ template "cbf-proto.chart" $global }} + release: {{ $global.Release.Name }} + serviceName: mid-cbf-{{ template "cbf-proto.name" $global }}-{{ $deviceserver.name }}-{{ $global.Release.Name }} + replicas: 1 + template: + metadata: + labels: + app: mid-cbf-{{ template "cbf-proto.name" $global }}-{{ $deviceserver.name }}-{{ $global.Release.Name }} + chart: {{ template "cbf-proto.chart" $global }} + release: {{ $global.Release.Name }} + heritage: {{ $global.Release.Service }} + cspServer: {{$deviceserver.name}} + spec: + containers: + - name: deviceserver + image: "{{ $global.Values.midcbfmcs.image.registry }}/{{ $global.Values.midcbfmcs.image.image }}:{{ $global.Values.midcbfmcs.image.tag }}" + imagePullPolicy: {{ $global.Values.midcbfmcs.image.pullPolicy }} + command: + - sh + args: +{{ toYaml $deviceserver.args | indent 10 }} + env: + - name: TANGO_HOST + value: databaseds-tango-base-{{ $global.Release.Name }}:10000 + resources: +{{ toYaml $global.Values.resources | indent 10 }} +{{- with $global.Values.nodeSelector }} + nodeSelector: +{{ toYaml . | indent 8 }} +{{- end }} +{{- with $global.Values.affinity }} + affinity: +{{ toYaml . | indent 8 }} +{{- end }} +{{- with $global.Values.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} +{{- end }} + +{{- end }} # end of range + +{{ end }} diff --git a/csp-lmc-mid/charts/mid-csp/charts/cbf-proto/values.yaml b/csp-lmc-mid/charts/mid-csp/charts/cbf-proto/values.yaml new file mode 100644 index 0000000..15b7be2 --- /dev/null +++ b/csp-lmc-mid/charts/mid-csp/charts/cbf-proto/values.yaml @@ -0,0 +1,154 @@ +# Default values for csp-proto. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +display: ":0" +xauthority: "~/.Xauthority" + +system: csp +subsystem: cbfmcs-mid +telescope: SKA-mid + +midcbfmcs: + enabled: true + image: + registry: nexus.engageska-portugal.pt/ska-docker + image: mid-cbf-mcs + tag: 0.4.5-2e83f4c + pullPolicy: IfNotPresent + +dsconfig: + image: + registry: nexus.engageska-portugal.pt/ska-docker + image: tango-dsconfig + tag: 1.2.5.1 + pullPolicy: IfNotPresent + +deviceServers: + - name: cbfmaster + function: cbf-central-control + domain: csp-monitoring + args: + - -c + - "retry --max=10 -- tango_admin --ping-device mid_csp_cbf/vcc/001 &&\ + retry --max=10 -- tango_admin --ping-device mid_csp_cbf/vcc/002 &&\ + retry --max=10 -- tango_admin --ping-device mid_csp_cbf/vcc/003 &&\ + retry --max=10 -- tango_admin --ping-device mid_csp_cbf/vcc/004 &&\ + retry --max=10 -- tango_admin --ping-device mid_csp_cbf/fsp/01 &&\ + retry --max=10 -- tango_admin --ping-device mid_csp_cbf/fsp/02 &&\ + retry --max=10 -- tango_admin --ping-device mid_csp_cbf/fsp/03 &&\ + retry --max=10 -- tango_admin --ping-device mid_csp_cbf/fsp/04 &&\ + /venv/bin/python /app/tangods/CbfMaster/CbfMaster/CbfMaster.py master" + - name: cbfsubarray01 + function: cbf-subarray-observation + domain: subarray + args: + - -c + - "retry --max=5 -- tango_admin --ping-device mid_csp_cbf/sub_elt/master &&\ + /venv/bin/python /app/tangods/CbfSubarray/CbfSubarrayMulti/CbfSubarrayMulti.py cbfSubarray-01" + - name: cbfsubarray02 + function: cbf-subarray-observation + domain: subarray + args: + - -c + - "retry --max=5 -- tango_admin --ping-device mid_csp_cbf/sub_elt/master &&\ + /venv/bin/python /app/tangods/CbfSubarray/CbfSubarrayMulti/CbfSubarrayMulti.py cbfSubarray-02" + - name: cbfsubarray03 + function: cbf-subarray-observation + domain: subarray + args: + - -c + - "retry --max=5 -- tango_admin --ping-device mid_csp_cbf/sub_elt/master &&\ + /venv/bin/python /app/tangods/CbfSubarray/CbfSubarrayMulti/CbfSubarrayMulti.py cbfSubarray-03" + - name: vcc001 + function: coarse-channelisation + domain: sensing + args: + - -c + - "/venv/bin/python /app/tangods/Vcc/VccMulti/VccMulti.py vcc-001" + - name: vcc002 + function: coarse-channelisation + domain: sensing + args: + - -c + - "/venv/bin/python /app/tangods/Vcc/VccMulti/VccMulti.py vcc-002" + - name: vcc003 + function: coarse-channelisation + domain: sensing + args: + - -c + - "/venv/bin/python /app/tangods/Vcc/VccMulti/VccMulti.py vcc-003" + - name: vcc004 + function: coarse-channelisation + domain: sensing + args: + - -c + - "/venv/bin/python /app/tangods/Vcc/VccMulti/VccMulti.py vcc-004" + - name: fsp01 + function: fsp-processing + domain: signal-processing + args: + - -c + - "retry --max=10 -- tango_admin --ping-device mid_csp_cbf/vcc/001 &&\ + retry --max=10 -- tango_admin --ping-device mid_csp_cbf/vcc/002 &&\ + retry --max=10 -- tango_admin --ping-device mid_csp_cbf/vcc/003 &&\ + retry --max=10 -- tango_admin --ping-device mid_csp_cbf/vcc/004 &&\ + /venv/bin/python /app/tangods/Fsp/FspMulti/FspMulti.py fsp-01" + - name: fsp02 + function: fsp-processing + domain: signal-processing + args: + - -c + - "retry --max=10 -- tango_admin --ping-device mid_csp_cbf/vcc/001 &&\ + retry --max=10 -- tango_admin --ping-device mid_csp_cbf/vcc/002 &&\ + retry --max=10 -- tango_admin --ping-device mid_csp_cbf/vcc/003 &&\ + retry --max=10 -- tango_admin --ping-device mid_csp_cbf/vcc/004 &&\ + /venv/bin/python /app/tangods/Fsp/FspMulti/FspMulti.py fsp-02" + - name: fsp03 + function: fsp-processing + domain: signal-processing + args: + - -c + - "retry --max=10 -- tango_admin --ping-device mid_csp_cbf/vcc/001 &&\ + retry --max=10 -- tango_admin --ping-device mid_csp_cbf/vcc/002 &&\ + retry --max=10 -- tango_admin --ping-device mid_csp_cbf/vcc/003 &&\ + retry --max=10 -- tango_admin --ping-device mid_csp_cbf/vcc/004 &&\ + /venv/bin/python /app/tangods/Fsp/FspMulti/FspMulti.py fsp-03" + - name: fsp04 + function: fsp-processing + domain: signal-processing + args: + - -c + - "retry --max=10 -- tango_admin --ping-device mid_csp_cbf/vcc/001 &&\ + retry --max=10 -- tango_admin --ping-device mid_csp_cbf/vcc/002 &&\ + retry --max=10 -- tango_admin --ping-device mid_csp_cbf/vcc/003 &&\ + retry --max=10 -- tango_admin --ping-device mid_csp_cbf/vcc/004 &&\ + /venv/bin/python /app/tangods/Fsp/FspMulti/FspMulti.py fsp-04" + - name: tmcspsubarrayleafnodetest + function: simul-observation + domain: telstate + args: + - -c + - "retry --max=10 -- tango_admin --ping-device mid_csp_cbf/sub_elt/subarray_01 &&\ + /venv/bin/python /app/tangods/TmCspSubarrayLeafNodeTest/TmCspSubarrayLeafNodeTest.py tm" + - name: tmcspsubarrayleafnodetest2 + function: simul-observation + domain: telstate + args: + - -c + - "retry --max=10 -- tango_admin --ping-device mid_csp_cbf/sub_elt/subarray_02 &&\ + /venv/bin/python /app/tangods/TmCspSubarrayLeafNodeTest/TmCspSubarrayLeafNodeTest.py tm2" + +nodeSelector: {} + +affinity: {} + +tolerations: [] + +resources: + requests: + cpu: 100m # 100m = 0.10 CPU + memory: 128Mi # 128Mi = 0.12 GB mem + limits: + cpu: 200m # 200m = 0.20 CPU + memory: 256Mi # 256Mi = 0.25 GB mem diff --git a/csp-lmc-mid/charts/mid-csp/charts/csp-proto-0.5.3.tgz b/csp-lmc-mid/charts/mid-csp/charts/csp-proto-0.5.3.tgz new file mode 100644 index 0000000000000000000000000000000000000000..d1d4bcbed9648603e72a4e5703b208477035e334 GIT binary patch literal 10344 zcmb2|<`7{3f&ZEe+KC=P2FV`2Wc9~&VH(_68ZOFUsm>#{- zg^en{XB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OSlsy?vjmh;Nfn->*oFL}4**4!g$-B-VVdU|#7t-8H=SGkYusQG$rrP_&$$@5&A z?oHB*=k|}NsaWO_{iOTIY=fCAgd1mGY10Wm_Q$~fdiYbN>wEWv-0J*wH+6NfYnjyalLuc%blRKe=dC+#GuKzYwYqWQMU%l&6 zHcz1X^f&j9JS};A>&@5u)=yYvE_@Ow<%;CB^Jy`6%Do#u^Zol>e@aejl}uGXI@^iM zZ_}?}R$d-G_eoywr!JH`IXlV8q|jX3?vm2?9JSuxNv*rI1X9)FuJstM=iQuHw`lL) zuJ2n9KCb>ex8{*=Sy6h7R@%ZJHN}RzPItBjCQW*`r_XbtuGnkSiz~!9eoj>jUVN?g zxn!L2%J$psM|iv6{rVEU(0x^T$-jNeV(;3=Ez_S75-xY4_x7tNFBjff`1wN3UIVNA zBTJ_5c(9BAP`2v9?``6mTkrbc3-$*Hnz5aT3#D&w> zRs}j5i?Ai1V0N6eFmwTf`aqlaCV(8$rIS4 zP{H}q$oOP~M_Z3T^06beXD4hZeO&)|I(6`%V`S;l}-)=*fDKnQPEm9DAs?;t2Q8A>wFf8ctFP877qDLfS`-?s5CyKsv zo%mzNL!T(c`X0m*xzdB)w4I(=4hMTuivxke2%$+=i4hMO|M7V-FdY8$Arsi z*Gdv{clH_YZ7qJZV2-e0(*wcfE1Oi(nxu2f!n@9K=(EX)E>2!4u{C+ZN-6&6fHs+H zJk}RI4Vn~Ie!G(R_s}e!x%tYAcz#^p&zZDO(vX?M`-8c#lFe4}<+CLnmUFo1$_zi-E`_k{aYs!jpu8gvoLI0;-MY#k~Or-ZR$UtseVgy lSDm|`xlr?J@Os{dqHzzuR>%L>XJGjM|5x9NRSee{830HhW6l5o literal 0 HcmV?d00001 diff --git a/csp-lmc-mid/charts/mid-csp/charts/tango-base-0.1.1.tgz b/csp-lmc-mid/charts/mid-csp/charts/tango-base-0.1.1.tgz new file mode 100644 index 0000000000000000000000000000000000000000..6d0e8bb6e5af17fbce9a65c7bb492593f301a9ff GI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dZS`0prN-f$9T~$AC4^ZxgHzl#C4oid&QvtqI

z;Qo^zwwFe^daSzheG1dLUhm|$V$Zl|Zre1atI*46-PtVe@2k!xX=<4+4QkBI{QNS- z;Phu*Q_ZhzIe||;tzFlay7$25(0zxlx%q70mUSU&`rP2Fn^Io9{mIZTGfi~!ywzo| ze~P{{dzWl;O*p2ggS%+IaI{ZVxQXwLAVqhr(=Jb~qAsew+Ls;oZR*c8Qs<>NcAc26 z-W#YYDSOAnT6*0)+xXC%#T*(w%nCdI43)}XXcKa zHDMpQ9areyv|G}Qk3HR}~8ub7q`J|lfPN@ntDC&g>$%{d=h37oBb zwMX^!^WMVzGE?8){FH|=M%GKuq#9TDYMBP+`plAa^j})Q>FT}rmq+Zkbt1c}v|U)I z>^>J`zVdd~rk?gY3oZuczfO~Vc0T#zvQ@6aN}DBA*i^U1&zil}?(Ei8mWJkg)S1h| zl2=__{YiAc%xT@Mi#dHoD`#ArCcO2UPU+dlg}cmRzIqikt&BgKCpl&3)1av*RUO zZhe08UbO7a{|a{jHH%$)MPIy|I=`t(@89&E%Ll*Ck9hRu?{ag-)%l6RO7FhEmuX~9 zckH-zhvU^9mlr!Nt_QJot+AgY%O-S^$>y3*B!h(DdDbw7mBlA7gs`q;IkQml;KCk; ziw!OY7sRwCTrtp}JwxH}zoI={qUo!z|0>$@^{M~2qY)P*ypA*+(|V(Jd!<0~lbvEZ zd-nb0uHJwBc}<7h>yG|4t3@}~=f3y;J@cPx)0N5xT!u>~>3qm_u6#6U-C5Jv-S4kd x9ob*J_*z@Tf{)9t2Bn5NoYqNLad}61lkl7e-3R~kGcf%BZ+0!olHm;l0|3!MxpDvi literal 0 HcmV?d00001 diff --git a/csp-lmc-mid/charts/mid-csp/requirements.lock b/csp-lmc-mid/charts/mid-csp/requirements.lock new file mode 100644 index 0000000..960fbce --- /dev/null +++ b/csp-lmc-mid/charts/mid-csp/requirements.lock @@ -0,0 +1,9 @@ +dependencies: +- name: tango-base + repository: https://gitlab.com/ska-telescope/skampi/-/raw/master/repository + version: 0.1.1 +- name: csp-proto + repository: file://../csp-proto + version: 0.5.3 +digest: sha256:f1b7d43a364ae0179be5951171251ee99fac77741e03b381285b28a6cdcb6167 +generated: "2020-09-11T11:08:19.206867376+02:00" diff --git a/csp-lmc-mid/charts/mid-csp/secrets/.gitkeep b/csp-lmc-mid/charts/mid-csp/secrets/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/csp-lmc-mid/charts/mid-csp/secrets/tls.crt b/csp-lmc-mid/charts/mid-csp/secrets/tls.crt new file mode 100644 index 0000000..281f413 --- /dev/null +++ b/csp-lmc-mid/charts/mid-csp/secrets/tls.crt @@ -0,0 +1,20 @@ +-----BEGIN CERTIFICATE----- +MIIDRTCCAi2gAwIBAgIUCWlGy8z2r11G2Sc52B0zjGpytywwDQYJKoZIhvcNAQEL +BQAwMjEdMBsGA1UEAwwUdGVzdC5jc3AtcHJvdG8ubG9jYWwxETAPBgNVBAoMCE1p +bmlrdWJlMB4XDTIwMDkwNDA2NDM0OFoXDTIxMDkwNDA2NDM0OFowMjEdMBsGA1UE +AwwUdGVzdC5jc3AtcHJvdG8ubG9jYWwxETAPBgNVBAoMCE1pbmlrdWJlMIIBIjAN +BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA+y4kIIi+hU5fNdV1JTc4qCDh2VAO +lhXX5LmJAQbWWkzOWszOcqGB0g6P4CNIAgNVmFjPoPNsbxlBrKFpoI78p4y1iW4C +LOGkg4gwND1f8SNE7VJyqCiMti7SdBFF6LRNdp6WwmVKVuRdN4Tk+B+39dlTSVjx +Ykziqy7vRLwBsJlbhxIFRkFNdmzpucYTcjUfB4PM5my30ZGdqMnsZ5Mpzw/BkC+s +VRVMSKq1nmtgMYIZUTgdue/sC/SKuqH4FffiQZ6RLAABl1qXFU/A2RkjSn3VBuYh +CWXPgSvi5mxCWDqf4lGZR+yxWMD+t7AG4IuLUl+KeV8PIjvMWSKb+Fdy9wIDAQAB +o1MwUTAdBgNVHQ4EFgQUdnM99TO9Jn3Oi16QbSIqeDkQr1cwHwYDVR0jBBgwFoAU +dnM99TO9Jn3Oi16QbSIqeDkQr1cwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0B +AQsFAAOCAQEA5d3w4vrLHbto4NGfKyjORnqQyxEeI5eZe9xRBaxobdhMlFDshNjC +GTcOdcAiGU9jRn95fItJZraXMYCR+Ysf9edU+YEaVnKioWnCUflxBNa2tZ7c+sNC +zqvcRIYZIGGg1J4RYZ0i0XJsYKn+RCuhSPjR3C1nSN47PPjnk85hnUyofdGHDJ2W +p71ozY2o3lKuw9NiU9kqnW2NRW/QBZvKnGHdq2izP8ciZZJtCsz8Tz9I1AzL2qqx +G8UThABjlIVMzhoRjzQ6vI5mcP/ucJZ1nU2/sqOGI4aLVRNTlv5DsiuPmC6zHD/s +ApaI7734oQBu6SkIrJLNyNwk2cQusgX44Q== +-----END CERTIFICATE----- diff --git a/csp-lmc-mid/charts/mid-csp/secrets/tls.key b/csp-lmc-mid/charts/mid-csp/secrets/tls.key new file mode 100644 index 0000000..5747df7 --- /dev/null +++ b/csp-lmc-mid/charts/mid-csp/secrets/tls.key @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQD7LiQgiL6FTl81 +1XUlNzioIOHZUA6WFdfkuYkBBtZaTM5azM5yoYHSDo/gI0gCA1WYWM+g82xvGUGs +oWmgjvynjLWJbgIs4aSDiDA0PV/xI0TtUnKoKIy2LtJ0EUXotE12npbCZUpW5F03 +hOT4H7f12VNJWPFiTOKrLu9EvAGwmVuHEgVGQU12bOm5xhNyNR8Hg8zmbLfRkZ2o +yexnkynPD8GQL6xVFUxIqrWea2AxghlROB257+wL9Iq6ofgV9+JBnpEsAAGXWpcV +T8DZGSNKfdUG5iEJZc+BK+LmbEJYOp/iUZlH7LFYwP63sAbgi4tSX4p5Xw8iO8xZ +Ipv4V3L3AgM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TgENMgrLD +lj205wSOUZe9a5QJQ3HbsKh2qDY0nK2COMo8OW76+a5Vlk2PJLyXQGU2Ceuj+rUq +yY3+cVQfjI3dYv+5nTh4O1XRiZwVhHm/AkUlQ5n0C9KSa4Ejhpb8A7RUDAC8B8cn +p+IuCq0Nk9KtGwdvh9fH/hJ5 +-----END PRIVATE KEY----- diff --git a/csp-lmc-mid/docker/.make/Makefile.mk b/csp-lmc-mid/docker/.make/Makefile.mk index 4534f2f..323b970 100644 --- a/csp-lmc-mid/docker/.make/Makefile.mk +++ b/csp-lmc-mid/docker/.make/Makefile.mk @@ -56,14 +56,14 @@ DOCKER_FILE_PATH=Dockerfile build: pre-build docker-build post-build ## build the application image pre-build: - + cp ../.release . post-build: pre-push: post-push: -docker-build: .release +docker-build: @echo "VERSION: $(VERSION)" @echo "Building image: $(IMAGE):$(VERSION)" @echo "NAME: $(NAME)" diff --git a/csp-lmc-mid/docker/config/config_result.json b/csp-lmc-mid/docker/config/config_result.json new file mode 100644 index 0000000..19ef30b --- /dev/null +++ b/csp-lmc-mid/docker/config/config_result.json @@ -0,0 +1,2542 @@ +{ + "servers": { + "CbfMaster": { + "master": { + "CbfMaster": { + "mid_csp_cbf/sub_elt/master": { + "attribute_properties": { + "adminMode": { + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "CbfSubarray": [ + "mid_csp_cbf/sub_elt/subarray_01", + "mid_csp_cbf/sub_elt/subarray_02", + "mid_csp_cbf/sub_elt/subarray_03" + ], + "FSP": [ + "mid_csp_cbf/fsp/01", + "mid_csp_cbf/fsp/02", + "mid_csp_cbf/fsp/03", + "mid_csp_cbf/fsp/04" + ], + "MaxCapabilities": [ + "VCC:4", + "FSP:4", + "Subarray:2" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ], + "polled_attr": [ + "reportfspstate", + "1000", + "reportvccadminmode", + "1000", + "reportvcchealthstate", + "1000", + "receptortovcc", + "1000", + "reportfspCorrSubarraymembership", + "1000", + "reportfsphealthstate", + "1000", + "healthstate", + "1000", + "adminmode", + "1000", + "subarrayconfigid", + "1000", + "reportfspadminmode", + "1000", + "commandprogress", + "2000", + "reportsubarrayhealthstate", + "1000", + "reportvccstate", + "1000", + "reportsubarrayadminmode", + "1000", + "vcctoreceptor", + "3000", + "reportsubarraystate", + "3000", + "state", + "1000" + ] + } + } + } + } + }, + "CbfSubarrayMulti": { + "cbfSubarray-01": { + "CbfSubarray": { + "mid_csp_cbf/sub_elt/subarray_01": { + "attribute_properties": { + "adminMode": { + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "obsState": { + "abs_change": [ + "-1", + "1" + ] + }, + "scanID": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CorrConfigAddress": [ + "mid_csp_cbf/corrconfig/01" + ], + "FSP": [ + "mid_csp_cbf/fsp/01", + "mid_csp_cbf/fsp/02", + "mid_csp_cbf/fsp/03", + "mid_csp_cbf/fsp/04" + ], + "FspCorrSubarray": [ + "mid_csp_cbf/fspCorrSubarray/01_01", + "mid_csp_cbf/fspCorrSubarray/02_01", + "mid_csp_cbf/fspCorrSubarray/03_01", + "mid_csp_cbf/fspCorrSubarray/04_01" + ], + "FspPssSubarray": [ + "mid_csp_cbf/fspPssSubarray/01_01", + "mid_csp_cbf/fspPssSubarray/02_01", + "mid_csp_cbf/fspPssSubarray/03_01", + "mid_csp_cbf/fspPssSubarray/04_01" + ], + "PssConfigAddress": [ + "mid_csp_cbf/pssconfig/01" + ], + "SW1Address": [ + "mid_csp_cbf/sw1/01" + ], + "SW2Address": [ + "mid_csp_cbf/sw2/01" + ], + "SubID": [ + "1" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ], + "polled_attr": [ + "healthstate", + "1000", + "fsphealthstate", + "1000", + "fspstate", + "1000", + "vccstate", + "1000", + "vcchealthstate", + "1000", + "configid", + "1000", + "fspList", + "1000", + "outputLinksDistribution", + "1000" + ] + } + } + }, + "CbfSubarrayCorrConfig": { + "mid_csp_cbf/corrConfig/01": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "FspCorrSubarray": [ + "mid_csp_cbf/fspCorrSubarray/01_01", + "mid_csp_cbf/fspCorrSubarray/02_01", + "mid_csp_cbf/fspCorrSubarray/03_01", + "mid_csp_cbf/fspCorrSubarray/04_01" + ] + } + } + }, + "CbfSubarrayPssConfig": { + "mid_csp_cbf/pssConfig/01": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "FspPssSubarray": [ + "mid_csp_cbf/fspPssSubarray/01_01", + "mid_csp_cbf/fspPssSubarray/02_01", + "mid_csp_cbf/fspPssSubarray/03_01", + "mid_csp_cbf/fspPssSubarray/04_01" + ] + } + } + }, + "SearchWindow": { + "mid_csp_cbf/sw1/01": {}, + "mid_csp_cbf/sw2/01": {} + }, + "SendConfig": { + "mid_csp_cbf/SendConfig/01": { + "properties": { + "SubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_01" + ] + } + } + } + }, + "cbfSubarray-02": { + "CbfSubarray": { + "mid_csp_cbf/sub_elt/subarray_02": { + "attribute_properties": { + "adminMode": { + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "obsState": { + "abs_change": [ + "-1", + "1" + ] + }, + "scanID": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CorrConfigAddress": [ + "mid_csp_cbf/corrconfig/02" + ], + "FSP": [ + "mid_csp_cbf/fsp/01", + "mid_csp_cbf/fsp/02", + "mid_csp_cbf/fsp/03", + "mid_csp_cbf/fsp/04" + ], + "FspCorrSubarray": [ + "mid_csp_cbf/fspCorrSubarray/01_02", + "mid_csp_cbf/fspCorrSubarray/02_02", + "mid_csp_cbf/fspCorrSubarray/03_02", + "mid_csp_cbf/fspCorrSubarray/04_02" + ], + "FspPssSubarray": [ + "mid_csp_cbf/fspPssSubarray/01_02", + "mid_csp_cbf/fspPssSubarray/02_02", + "mid_csp_cbf/fspPssSubarray/03_02", + "mid_csp_cbf/fspPssSubarray/04_02" + ], + "PssConfigAddress": [ + "mid_csp_cbf/pssconfig/02" + ], + "SW1Address": [ + "mid_csp_cbf/sw1/02" + ], + "SW2Address": [ + "mid_csp_cbf/sw2/02" + ], + "SubID": [ + "2" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ], + "polled_attr": [ + "configid", + "1000", + "healthstate", + "1000", + "vcchealthstate", + "1000", + "adminmode", + "1000", + "fspstate", + "1000", + "fspList", + "1000", + "fsphealthstate", + "1000", + "vccstate", + "1000", + "outputLinksDistribution", + "1000" + ] + } + } + }, + "CbfSubarrayCorrConfig": { + "mid_csp_cbf/corrConfig/02": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "FspCorrSubarray": [ + "mid_csp_cbf/fspCorrSubarray/01_02", + "mid_csp_cbf/fspCorrSubarray/02_02", + "mid_csp_cbf/fspCorrSubarray/03_02", + "mid_csp_cbf/fspCorrSubarray/04_02" + ] + } + } + }, + "CbfSubarrayPssConfig": { + "mid_csp_cbf/pssConfig/02": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "FspPssSubarray": [ + "mid_csp_cbf/fspPssSubarray/01_02", + "mid_csp_cbf/fspPssSubarray/02_02", + "mid_csp_cbf/fspPssSubarray/03_02", + "mid_csp_cbf/fspPssSubarray/04_02" + ] + } + } + }, + "SearchWindow": { + "mid_csp_cbf/sw1/02": {}, + "mid_csp_cbf/sw2/02": {} + }, + "SendConfig": { + "mid_csp_cbf/SendConfig/02": { + "properties": { + "SubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_02" + ] + } + } + } + }, + "cbfSubarray-03": { + "CbfSubarray": { + "mid_csp_cbf/sub_elt/subarray_03": { + "attribute_properties": { + "adminMode": { + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "obsState": { + "abs_change": [ + "-1", + "1" + ] + }, + "scanID": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CorrConfigAddress": [ + "mid_csp_cbf/corrconfig/03" + ], + "FSP": [ + "mid_csp_cbf/fsp/01", + "mid_csp_cbf/fsp/02", + "mid_csp_cbf/fsp/03", + "mid_csp_cbf/fsp/04" + ], + "FspCorrSubarray": [ + "mid_csp_cbf/fspCorrSubarray/01_03", + "mid_csp_cbf/fspCorrSubarray/02_03", + "mid_csp_cbf/fspCorrSubarray/03_03", + "mid_csp_cbf/fspCorrSubarray/04_03" + ], + "FspPssSubarray": [ + "mid_csp_cbf/fspPssSubarray/01_03", + "mid_csp_cbf/fspPssSubarray/02_03", + "mid_csp_cbf/fspPssSubarray/03_03", + "mid_csp_cbf/fspPssSubarray/04_03" + ], + "PssConfigAddress": [ + "mid_csp_cbf/pssconfig/03" + ], + "SW1Address": [ + "mid_csp_cbf/sw1/03" + ], + "SW2Address": [ + "mid_csp_cbf/sw2/03" + ], + "SubID": [ + "3" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ], + "polled_attr": [ + "healthstate", + "1000", + "fsphealthstate", + "1000", + "fspstate", + "1000", + "vccstate", + "1000", + "vcchealthstate", + "1000", + "configid", + "1000", + "fspList", + "1000", + "outputLinksDistribution", + "1000" + ] + } + } + }, + "CbfSubarrayCorrConfig": { + "mid_csp_cbf/corrConfig/03": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "FspCorrSubarray": [ + "mid_csp_cbf/fspCorrSubarray/01_03", + "mid_csp_cbf/fspCorrSubarray/02_03", + "mid_csp_cbf/fspCorrSubarray/03_03", + "mid_csp_cbf/fspCorrSubarray/04_03" + ] + } + } + }, + "CbfSubarrayPssConfig": { + "mid_csp_cbf/pssConfig/03": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "FspPssSubarray": [ + "mid_csp_cbf/fspPssSubarray/01_03", + "mid_csp_cbf/fspPssSubarray/02_03", + "mid_csp_cbf/fspPssSubarray/03_03", + "mid_csp_cbf/fspPssSubarray/04_03" + ] + } + } + }, + "SearchWindow": { + "mid_csp_cbf/sw1/03": {}, + "mid_csp_cbf/sw2/03": {} + }, + "SendConfig": { + "mid_csp_cbf/SendConfig/03": { + "properties": { + "SubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_03" + ] + } + } + } + } + }, + "DataBaseds": { + "2": { + "DataBase": { + "sys/database/2": {} + } + } + }, + "FspMulti": { + "fsp-01": { + "Fsp": { + "mid_csp_cbf/fsp/01": { + "attribute_properties": { + "adminMode": { + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "subarrayMembership": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "CorrelationAddress": [ + "mid_csp_cbf/fsp_corr/01" + ], + "FspCorrSubarray": [ + "mid_csp_cbf/fspCorrSubarray/01_01", + "mid_csp_cbf/fspCorrSubarray/01_02", + "mid_csp_cbf/fspCorrSubarray/01_03" + ], + "FspID": [ + "1" + ], + "FspPssSubarray": [ + "mid_csp_cbf/fspPssSubarray/01_01", + "mid_csp_cbf/fspPssSubarray/01_02", + "mid_csp_cbf/fspPssSubarray/01_03" + ], + "PSSAddress": [ + "mid_csp_cbf/fsp_pss/01" + ], + "PSTAddress": [ + "mid_csp_cbf/fsp_pst/01" + ], + "VLBIAddress": [ + "mid_csp_cbf/fsp_vlbi/01" + ], + "polled_attr": [ + "adminmode", + "1000", + "healthstate", + "1000", + "state", + "1000", + "subarraymembership", + "1000" + ] + } + } + }, + "FspCorr": { + "mid_csp_cbf/fsp_corr/01": {} + }, + "FspCorrSubarray": { + "mid_csp_cbf/fspCorrSubarray/01_01": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_01" + ], + "FspID": [ + "1" + ], + "SubID": [ + "1" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + }, + "mid_csp_cbf/fspCorrSubarray/01_02": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_02" + ], + "FspID": [ + "1" + ], + "SubID": [ + "2" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + }, + "mid_csp_cbf/fspCorrSubarray/01_03": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_03" + ], + "FspID": [ + "1" + ], + "SubID": [ + "3" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + } + }, + "FspPss": { + "mid_csp_cbf/fsp_pss/01": {} + }, + "FspPssSubarray": { + "mid_csp_cbf/fspPssSubarray/01_01": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_01" + ], + "FspID": [ + "1" + ], + "SubID": [ + "1" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + }, + "mid_csp_cbf/fspPssSubarray/01_02": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_02" + ], + "FspID": [ + "1" + ], + "SubID": [ + "2" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + }, + "mid_csp_cbf/fspPssSubarray/01_03": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_03" + ], + "FspID": [ + "1" + ], + "SubID": [ + "3" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + } + }, + "FspPst": { + "mid_csp_cbf/fsp_pst/01": {} + }, + "FspVlbi": { + "mid_csp_cbf/fsp_vlbi/01": {} + } + }, + "fsp-02": { + "Fsp": { + "mid_csp_cbf/fsp/02": { + "attribute_properties": { + "adminMode": { + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "subarrayMembership": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "CorrelationAddress": [ + "mid_csp_cbf/fsp_corr/02" + ], + "FspCorrSubarray": [ + "mid_csp_cbf/fspCorrSubarray/02_01", + "mid_csp_cbf/fspCorrSubarray/02_02", + "mid_csp_cbf/fspCorrSubarray/02_03" + ], + "FspID": [ + "2" + ], + "FspPssSubarray": [ + "mid_csp_cbf/fspPssSubarray/02_01", + "mid_csp_cbf/fspPssSubarray/02_02", + "mid_csp_cbf/fspPssSubarray/02_03" + ], + "PSSAddress": [ + "mid_csp_cbf/fsp_pss/02" + ], + "PSTAddress": [ + "mid_csp_cbf/fsp_pst/02" + ], + "VLBIAddress": [ + "mid_csp_cbf/fsp_vlbi/02" + ], + "polled_attr": [ + "adminmode", + "1000", + "healthstate", + "1000", + "state", + "1000", + "subarraymembership", + "1000" + ] + } + } + }, + "FspCorr": { + "mid_csp_cbf/fsp_corr/02": {} + }, + "FspCorrSubarray": { + "mid_csp_cbf/fspCorrSubarray/02_01": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_01" + ], + "FspID": [ + "2" + ], + "SubID": [ + "1" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + }, + "mid_csp_cbf/fspCorrSubarray/02_02": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_02" + ], + "FspID": [ + "2" + ], + "SubID": [ + "2" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + }, + "mid_csp_cbf/fspCorrSubarray/02_03": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_03" + ], + "FspID": [ + "2" + ], + "SubID": [ + "3" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + } + }, + "FspPss": { + "mid_csp_cbf/fsp_pss/02": {} + }, + "FspPssSubarray": { + "mid_csp_cbf/fspPssSubarray/02_01": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_01" + ], + "FspID": [ + "2" + ], + "SubID": [ + "1" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + }, + "mid_csp_cbf/fspPssSubarray/02_02": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_02" + ], + "FspID": [ + "2" + ], + "SubID": [ + "2" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + }, + "mid_csp_cbf/fspPssSubarray/02_03": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_03" + ], + "FspID": [ + "2" + ], + "SubID": [ + "3" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + } + }, + "FspPst": { + "mid_csp_cbf/fsp_pst/02": {} + }, + "FspVlbi": { + "mid_csp_cbf/fsp_vlbi/02": {} + } + }, + "fsp-03": { + "Fsp": { + "mid_csp_cbf/fsp/03": { + "attribute_properties": { + "adminMode": { + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "subarrayMembership": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "CorrelationAddress": [ + "mid_csp_cbf/fsp_corr/03" + ], + "FspCorrSubarray": [ + "mid_csp_cbf/fspCorrSubarray/03_01", + "mid_csp_cbf/fspCorrSubarray/03_02", + "mid_csp_cbf/fspCorrSubarray/03_03" + ], + "FspID": [ + "3" + ], + "FspPssSubarray": [ + "mid_csp_cbf/fspPssSubarray/03_01", + "mid_csp_cbf/fspPssSubarray/03_02", + "mid_csp_cbf/fspPssSubarray/03_03" + ], + "PSSAddress": [ + "mid_csp_cbf/fsp_pss/03" + ], + "PSTAddress": [ + "mid_csp_cbf/fsp_pst/03" + ], + "VLBIAddress": [ + "mid_csp_cbf/fsp_vlbi/03" + ], + "polled_attr": [ + "adminmode", + "1000", + "healthstate", + "1000", + "state", + "1000", + "subarraymembership", + "1000" + ] + } + } + }, + "FspCorr": { + "mid_csp_cbf/fsp_corr/03": {} + }, + "FspCorrSubarray": { + "mid_csp_cbf/fspCorrSubarray/03_01": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_01" + ], + "FspID": [ + "3" + ], + "SubID": [ + "1" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + }, + "mid_csp_cbf/fspCorrSubarray/03_02": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_02" + ], + "FspID": [ + "3" + ], + "SubID": [ + "2" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + }, + "mid_csp_cbf/fspCorrSubarray/03_03": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_03" + ], + "FspID": [ + "3" + ], + "SubID": [ + "3" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + } + }, + "FspPss": { + "mid_csp_cbf/fsp_pss/03": {} + }, + "FspPssSubarray": { + "mid_csp_cbf/fspPssSubarray/03_01": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_01" + ], + "FspID": [ + "3" + ], + "SubID": [ + "1" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + }, + "mid_csp_cbf/fspPssSubarray/03_02": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_02" + ], + "FspID": [ + "3" + ], + "SubID": [ + "2" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + }, + "mid_csp_cbf/fspPssSubarray/03_03": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_03" + ], + "FspID": [ + "3" + ], + "SubID": [ + "3" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + } + }, + "FspPst": { + "mid_csp_cbf/fsp_pst/03": {} + }, + "FspVlbi": { + "mid_csp_cbf/fsp_vlbi/03": {} + } + }, + "fsp-04": { + "Fsp": { + "mid_csp_cbf/fsp/04": { + "attribute_properties": { + "adminMode": { + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "subarrayMembership": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "CorrelationAddress": [ + "mid_csp_cbf/fsp_corr/04" + ], + "FspCorrSubarray": [ + "mid_csp_cbf/fspCorrSubarray/04_01", + "mid_csp_cbf/fspCorrSubarray/04_02", + "mid_csp_cbf/fspCorrSubarray/04_03" + ], + "FspID": [ + "4" + ], + "FspPssSubarray": [ + "mid_csp_cbf/fspPssSubarray/04_01", + "mid_csp_cbf/fspPssSubarray/04_02", + "mid_csp_cbf/fspPssSubarray/04_03" + ], + "PSSAddress": [ + "mid_csp_cbf/fsp_pss/04" + ], + "PSTAddress": [ + "mid_csp_cbf/fsp_pst/04" + ], + "VLBIAddress": [ + "mid_csp_cbf/fsp_vlbi/04" + ], + "polled_attr": [ + "adminmode", + "1000", + "healthstate", + "1000", + "state", + "1000", + "subarraymembership", + "1000" + ] + } + } + }, + "FspCorr": { + "mid_csp_cbf/fsp_corr/04": {} + }, + "FspCorrSubarray": { + "mid_csp_cbf/fspCorrSubarray/04_01": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_01" + ], + "FspID": [ + "4" + ], + "SubID": [ + "1" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + }, + "mid_csp_cbf/fspCorrSubarray/04_02": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_02" + ], + "FspID": [ + "4" + ], + "SubID": [ + "2" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + }, + "mid_csp_cbf/fspCorrSubarray/04_03": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_03" + ], + "FspID": [ + "4" + ], + "SubID": [ + "3" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + } + }, + "FspPss": { + "mid_csp_cbf/fsp_pss/04": {} + }, + "FspPssSubarray": { + "mid_csp_cbf/fspPssSubarray/04_01": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_01" + ], + "FspID": [ + "4" + ], + "SubID": [ + "1" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + }, + "mid_csp_cbf/fspPssSubarray/04_02": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_02" + ], + "FspID": [ + "4" + ], + "SubID": [ + "2" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + }, + "mid_csp_cbf/fspPssSubarray/04_03": { + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_03" + ], + "FspID": [ + "4" + ], + "SubID": [ + "3" + ], + "VCC": [ + "mid_csp_cbf/vcc/001", + "mid_csp_cbf/vcc/002", + "mid_csp_cbf/vcc/003", + "mid_csp_cbf/vcc/004" + ] + } + } + }, + "FspPst": { + "mid_csp_cbf/fsp_pst/04": {} + }, + "FspVlbi": { + "mid_csp_cbf/fsp_vlbi/04": {} + } + } + }, + "MidCspCapabilityMonitor": { + "monitor": { + "CspCapabilityMonitor": { + "mid_csp/capability_monitor/timing_beams": { + "properties": { + "CapabilityDevices": [ + "mid_csp/timing_beams/04", + "mid_csp/timing_beams/03", + "mid_csp/timing_beams/01", + "mid_csp/timing_beams/02" + ], + "SkaLevel": [ + "2" + ] + } + }, + "mid_csp/capability_monitor/vcc": { + "properties": { + "CapabilityDevices": [ + "mid_csp/vcc/004", + "mid_csp/vcc/003", + "mid_csp/vcc/002", + "mid_csp/vcc/001" + ], + "SkaLevel": [ + "2" + ] + } + }, + "mid_csp/capability_monitor/vlbi_beams": { + "properties": { + "CapabilityDevices": [ + "mid_csp/vlbi_beams/03", + "mid_csp/vlbi_beams/04", + "mid_csp/vlbi_beams/02", + "mid_csp/vlbi_beams/01" + ], + "SkaLevel": [ + "2" + ] + } + } + }, + "CspSearchBeamsMonitor": { + "mid_csp/capability_monitor/search_beams": { + "properties": { + "CapabilityDevices": [ + "mid_csp/search_beams/04", + "mid_csp/search_beams/03", + "mid_csp/search_beams/01", + "mid_csp/search_beams/02" + ], + "SkaLevel": [ + "2" + ] + } + } + } + } + }, + "MidCspMaster": { + "master": { + "MidCspMasterBase": { + "mid_csp/elt/master": { + "attribute_properties": { + "adminMode": { + "__value": [ + "0" + ], + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "numOfReservedSearchBeams": { + "__root_att": [ + "mid_csp/capability_monitor/search_beams/numOfReservedIDs" + ] + }, + "numOfUnassignedSearchBeams": { + "__root_att": [ + "mid_csp/capability_monitor/search_beams/numOfUnassignedIDs" + ] + }, + "numOfUnassignedTimingBeams": { + "__root_att": [ + "mid_csp/capability_monitor/timing_beams/numOfUnassignedIDs" + ] + }, + "numOfUnassignedVlbiBeams": { + "__root_att": [ + "mid_csp/capability_monitor/vlbi_beams/numOfUnassignedIDs" + ] + }, + "reportFSPAdminMode": { + "__root_att": [ + "mid_csp_cbf/sub_elt/master/reportFSPAdminMode" + ] + }, + "reportFSPHealthState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/master/reportFSPHealthState" + ] + }, + "reportFSPState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/master/reportFSPState" + ] + }, + "reportSearchBeamAdminMode": { + "__root_att": [ + "mid_csp/capability_monitor/search_beams/capabilityAdminMode" + ] + }, + "reportSearchBeamHealthState": { + "__root_att": [ + "mid_csp/capability_monitor/search_beams/capabilityHealthState" + ] + }, + "reportSearchBeamObsState": { + "__root_att": [ + "mid_csp/capability_monitor/search_beams/capabilityObsState" + ] + }, + "reportSearchBeamState": { + "__root_att": [ + "mid_csp/capability_monitor/search_beams/capabilityState" + ] + }, + "reportTimingBeamAdminMode": { + "__root_att": [ + "mid_csp/capability_monitor/timing_beams/capabilityAdminMode" + ] + }, + "reportTimingBeamHealthState": { + "__root_att": [ + "mid_csp/capability_monitor/timing_beams/capabilityHealthState" + ] + }, + "reportTimingBeamObsState": { + "__root_att": [ + "mid_csp/capability_monitor/timing_beams/capabilityObsState" + ] + }, + "reportTimingBeamState": { + "__root_att": [ + "mid_csp/capability_monitor/timing_beams/capabilityState" + ] + }, + "reportVCCAdminMode": { + "__root_att": [ + "mid_csp_cbf/sub_elt/master/reportVCCAdminMode" + ] + }, + "reportVCCHealthState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/master/reportVCCHealthState" + ] + }, + "reportVCCState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/master/reportVCCState" + ] + }, + "reportVlbiBeamAdminMode": { + "__root_att": [ + "mid_csp/capability_monitor/vlbi_beams/capabilityAdminMode" + ] + }, + "reportVlbiBeamHealthState": { + "__root_att": [ + "mid_csp/capability_monitor/vlbi_beams/capabilityHealthState" + ] + }, + "reportVlbiBeamObsState": { + "__root_att": [ + "mid_csp/capability_monitor/vlbi_beams/capabilityObsState" + ] + }, + "reportVlbiBeamState": { + "__root_att": [ + "mid_csp/capability_monitor/vlbi_beams/capabilityState" + ] + }, + "searchBeamMembership": { + "__root_att": [ + "mid_csp/capability_monitor/search_beams/capabilityMembership" + ] + }, + "timingBeamMembership": { + "__root_att": [ + "mid_csp/capability_monitor/timing_beams/capabilityMembership" + ] + }, + "unassignedSearchBeamIDs": { + "__root_att": [ + "mid_csp/capability_monitor/search_beams/unassignedIDs" + ] + }, + "unassignedTimingBeamIDs": { + "__root_att": [ + "mid_csp/capability_monitor/timing_beams/unassignedIDs" + ] + }, + "unassignedVlbiBeamIDs": { + "__root_att": [ + "mid_csp/capability_monitor/vlbi_beams/unassignedIDs" + ] + }, + "vccMembership": { + "__root_att": [ + "mid_csp_cbf/sub_elt/master/reportVCCSubarrayMembership" + ] + }, + "vlbiBeamMembership": { + "__root_att": [ + "mid_csp/capability_monitor/vlbi_beams/capabilityMembership" + ] + } + }, + "properties": { + "CspCbf": [ + "mid_csp_cbf/sub_elt/master" + ], + "CspPss": [ + "mid_csp_pss/sub_elt/master" + ], + "CspPst": [ + "mid_csp_pst/sub_elt/master" + ], + "CspSubarrays": [ + "mid_csp/elt/subarray_01", + "mid_csp/elt/subarray_02", + "mid_csp/elt/subarray_03" + ], + "MaxCapabilities": [ + "VCC:4", + "SearchBeams:1500", + "TimingBeams:16", + "VlbiBeams:20" + ], + "SearchBeamsMonitor": [ + "mid_csp/capability_monitor/search_beams" + ], + "SkaLevel": [ + "1" + ], + "TimingBeamsMonitor": [ + "mid_csp/capability_monitor/timing_beams" + ], + "VlbiBeamsMonitor": [ + "mid_csp/capability_monitor/vlbi_beams" + ], + "polled_attr": [ + "healthstate", + "1000", + "adminmode", + "1000", + "state", + "1000", + "csppssadminmode", + "1000", + "csppstadminmode", + "1000", + "cspcbfadminmode", + "1000", + "oncommandprogress", + "1500", + "offcommandprogress", + "1500", + "offcmddurationexpected", + "1500", + "standbycommandprogress", + "1500", + "oncmddurationexpected", + "1500", + "standbycmddurationexpected", + "1500", + "oncmddurationmeasured", + "1500", + "offcmddurationmeasured", + "1500", + "standbycmddurationmeasured", + "1500", + "offcmdtimeoutexpired", + "1500", + "oncmdtimeoutexpired", + "1500", + "csppssstate", + "1000", + "standbycmdtimeoutexpired", + "1000", + "csppststate", + "1000", + "cspcbfhealthstate", + "1000", + "csppsshealthstate", + "1000", + "csppsthealthstate", + "1000", + "cspcbfadminmode", + "1000", + "oncmdfailure", + "2000", + "offcmdfailure", + "2000", + "standbycmdfailure", + "2000", + "cspcbfstate", + "1000" + ] + } + } + } + } + }, + "MidCspSubarray": { + "subarray1": { + "MidCspSubarrayBase": { + "mid_csp/elt/subarray_01": { + "attribute_properties": { + "adminMode": { + "__value": [ + "0" + ], + "abs_change": [ + "-1", + "1" + ] + }, + "assignedFspHealthState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_01/fspHealthState" + ] + }, + "assignedFspState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_01/fspState" + ] + }, + "assignedReceptors": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_01/receptors" + ] + }, + "assignedVccHealthState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_01/vccHealthState" + ] + }, + "assignedVccState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_01/vccState" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "obsState": { + "abs_change": [ + "-1", + "1" + ] + }, + "testNumber": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "CbfSubarray": [ + "mid_csp_cbf/sub_elt/subarray_01" + ], + "CspMaster": [ + "mid_csp/elt/master" + ], + "PssSubarray": [ + "mid_csp_pss/sub_elt/subarray_01" + ], + "SkaLevel": [ + "2" + ], + "SubID": [ + "1" + ], + "SubarrayProcModeCorrelation": [ + "mid_csp/elt/correlation-01" + ], + "SubarrayProcModePss": [ + "mid_csp/elt/pss-01" + ], + "SubarrayProcModePst": [ + "mid_csp/elt/pst-01" + ], + "SubarrayProcModeVlbi": [ + "mid_csp/elt/vlbi-01" + ], + "polled_attr": [ + "failureraisedflag", + "1000", + "timeoutexpiredflag", + "1000", + "scancmdprogress", + "1500", + "removeresourcescmdprogress", + "1500", + "addresourcescmdprogress", + "1500", + "endscancmdprogress", + "1500", + "gotoidlecmdprogress", + "1500" + ] + } + } + }, + "MidCspSubarrayProcModeCorrelation": { + "mid_csp/elt/correlation-01": { + "properties": { + "CapID": [ + "1" + ], + "CapType": [ + "CORRELATION" + ], + "subID": [ + "1" + ] + } + } + }, + "MidCspSubarrayProcModePss": { + "mid_csp/elt/pss-01": { + "properties": { + "CapID": [ + "1" + ], + "CapType": [ + "PSS" + ], + "subID": [ + "1" + ] + } + } + }, + "MidCspSubarrayProcModePst": { + "mid_csp/elt/pst-01": { + "properties": { + "CapID": [ + "1" + ], + "CapType": [ + "PST" + ], + "subID": [ + "1" + ] + } + } + }, + "MidCspSubarrayProcModeVlbi": { + "mid_csp/elt/vlbi-01": { + "properties": { + "CapID": [ + "1" + ], + "CapType": [ + "VLBI" + ], + "subID": [ + "1" + ] + } + } + } + }, + "subarray2": { + "MidCspSubarrayBase": { + "mid_csp/elt/subarray_02": { + "attribute_properties": { + "adminMode": { + "__value": [ + "0" + ], + "abs_change": [ + "-1", + "1" + ] + }, + "assignedFspHealthState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_02/fspHealthState" + ] + }, + "assignedFspState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_02/fspState" + ] + }, + "assignedReceptors": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_02/receptors" + ] + }, + "assignedVccHealthState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_02/vccHealthState" + ] + }, + "assignedVccState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_02/vccState" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "obsState": { + "abs_change": [ + "-1", + "1" + ] + }, + "testNumber": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "CbfSubarray": [ + "mid_csp_cbf/sub_elt/subarray_02" + ], + "CspMaster": [ + "mid_csp/elt/master" + ], + "PssSubarray": [ + "mid_csp_pss/sub_elt/subarray_02" + ], + "SkaLevel": [ + "2" + ], + "SubID": [ + "2" + ], + "SubarrayProcModeCorrelation": [ + "mid_csp/elt/correlation-02" + ], + "SubarrayProcModePss": [ + "mid_csp/elt/pss-02" + ], + "SubarrayProcModePst": [ + "mid_csp/elt/pst-02" + ], + "SubarrayProcModeVlbi": [ + "mid_csp/elt/vlbi-02" + ], + "polled_attr": [ + "failureraisedflag", + "1000", + "timeoutexpiredflag", + "1000", + "scancmdprogress", + "1500", + "removeresourcescmdprogress", + "1500", + "addresourcescmdprogress", + "1500", + "endscancmdprogress", + "1500", + "gotoidlecmdprogress", + "1500" + ] + } + } + }, + "MidCspSubarrayProcModeCorrelation": { + "mid_csp/elt/correlation-02": { + "properties": { + "CapID": [ + "1" + ], + "CapType": [ + "CORRELATION" + ], + "subID": [ + "2" + ] + } + } + }, + "MidCspSubarrayProcModePss": { + "mid_csp/elt/pss-02": { + "properties": { + "CapID": [ + "1" + ], + "CapType": [ + "PSS" + ], + "subID": [ + "2" + ] + } + } + }, + "MidCspSubarrayProcModePst": { + "mid_csp/elt/pst-02": { + "properties": { + "CapID": [ + "1" + ], + "CapType": [ + "PST" + ], + "subID": [ + "2" + ] + } + } + }, + "MidCspSubarrayProcModeVlbi": { + "mid_csp/elt/vlbi-02": { + "properties": { + "CapID": [ + "1" + ], + "CapType": [ + "VLBI" + ], + "subID": [ + "2" + ] + } + } + } + }, + "subarray3": { + "MidCspSubarrayBase": { + "mid_csp/elt/subarray_03": { + "attribute_properties": { + "adminMode": { + "__value": [ + "0" + ], + "abs_change": [ + "-1", + "1" + ] + }, + "assignedFspHealthState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_03/fspHealthState" + ] + }, + "assignedFspState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_03/fspState" + ] + }, + "assignedReceptors": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_03/receptors" + ] + }, + "assignedVccHealthState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_03/vccHealthState" + ] + }, + "assignedVccState": { + "__root_att": [ + "mid_csp_cbf/sub_elt/subarray_03/vccState" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "obsState": { + "abs_change": [ + "-1", + "1" + ] + }, + "testNumber": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "CbfSubarray": [ + "mid_csp_cbf/sub_elt/subarray_03" + ], + "CspMaster": [ + "mid_csp/elt/master" + ], + "PssSubarray": [ + "mid_csp_pss/sub_elt/subarray_03" + ], + "SkaLevel": [ + "2" + ], + "SubID": [ + "3" + ], + "SubarrayProcModeCorrelation": [ + "mid_csp/elt/correlation-03" + ], + "SubarrayProcModePss": [ + "mid_csp/elt/pss-03" + ], + "SubarrayProcModePst": [ + "mid_csp/elt/pst-03" + ], + "SubarrayProcModeVlbi": [ + "mid_csp/elt/vlbi-03" + ], + "polled_attr": [ + "failureraisedflag", + "1000", + "timeoutexpiredflag", + "1000", + "scancmdprogress", + "1500", + "removeresourcescmdprogress", + "1500", + "addresourcescmdprogress", + "1500", + "endscancmdprogress", + "1500", + "gotoidlecmdprogress", + "1500" + ] + } + } + }, + "MidCspSubarrayProcModeCorrelation": { + "mid_csp/elt/correlation-03": { + "properties": { + "CapID": [ + "1" + ], + "CapType": [ + "CORRELATION" + ], + "subID": [ + "3" + ] + } + } + }, + "MidCspSubarrayProcModePss": { + "mid_csp/elt/pss-03": { + "properties": { + "CapID": [ + "1" + ], + "CapType": [ + "PSS" + ], + "subID": [ + "3" + ] + } + } + }, + "MidCspSubarrayProcModePst": { + "mid_csp/elt/pst-03": { + "properties": { + "CapID": [ + "1" + ], + "CapType": [ + "PST" + ], + "subID": [ + "3" + ] + } + } + }, + "MidCspSubarrayProcModeVlbi": { + "mid_csp/elt/vlbi-03": { + "properties": { + "CapID": [ + "1" + ], + "CapType": [ + "VLBI" + ], + "subID": [ + "3" + ] + } + } + } + } + }, + "TangoAccessControl": { + "1": { + "TangoAccessControl": { + "sys/access_control/1": {} + } + } + }, + "TangoRestServer": { + "rest": { + "TangoRestServer": { + "sys/rest/0": {} + } + } + }, + "TangoTest": { + "test": { + "TangoTest": { + "sys/tg_test/1": {} + } + } + }, + "TmCspSubarrayLeafNodeTest": { + "tm": { + "TmCspSubarrayLeafNodeTest": { + "ska_mid/tm_leaf_node/csp_subarray01": { + "attribute_properties": { + "dopplerPhaseCorrection": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_01" + ], + "polled_attr": [ + "delaymodel", + "1000", + "visdestinationaddress", + "1000", + "dopplerphasecorrection", + "1000" + ] + } + } + } + }, + "tm2": { + "TmCspSubarrayLeafNodeTest": { + "ska_mid/tm_leaf_node/csp_subarray02": { + "attribute_properties": { + "dopplerPhaseCorrection": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "CbfMasterAddress": [ + "mid_csp_cbf/sub_elt/master" + ], + "CbfSubarrayAddress": [ + "mid_csp_cbf/sub_elt/subarray_02" + ], + "polled_attr": [ + "delaymodel", + "1000", + "visdestinationaddress", + "1000", + "dopplerphasecorrection", + "1000" + ] + } + } + } + } + }, + "VccMulti": { + "vcc-001": { + "Vcc": { + "mid_csp_cbf/vcc/001": { + "attribute_properties": { + "adminMode": { + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "subarrayMembership": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "Band1And2Address": [ + "mid_csp_cbf/vcc_band12/001" + ], + "Band3Address": [ + "mid_csp_cbf/vcc_band3/001" + ], + "Band4Address": [ + "mid_csp_cbf/vcc_band4/001" + ], + "Band5Address": [ + "mid_csp_cbf/vcc_band5/001" + ], + "SW1Address": [ + "mid_csp_cbf/vcc_sw1/001" + ], + "SW2Address": [ + "mid_csp_cbf/vcc_sw2/001" + ], + "VccID": [ + "1" + ], + "polled_attr": [ + "healthstate", + "1000", + "adminmode", + "1000" + ] + } + } + }, + "VccBand1And2": { + "mid_csp_cbf/vcc_band12/001": {} + }, + "VccBand3": { + "mid_csp_cbf/vcc_band3/001": {} + }, + "VccBand4": { + "mid_csp_cbf/vcc_band4/001": {} + }, + "VccBand5": { + "mid_csp_cbf/vcc_band5/001": {} + }, + "VccSearchWindow": { + "mid_csp_cbf/vcc_sw1/001": {}, + "mid_csp_cbf/vcc_sw2/001": {} + } + }, + "vcc-002": { + "Vcc": { + "mid_csp_cbf/vcc/002": { + "attribute_properties": { + "adminMode": { + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "subarrayMembership": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "Band1And2Address": [ + "mid_csp_cbf/vcc_band12/002" + ], + "Band3Address": [ + "mid_csp_cbf/vcc_band3/002" + ], + "Band4Address": [ + "mid_csp_cbf/vcc_band4/002" + ], + "Band5Address": [ + "mid_csp_cbf/vcc_band5/002" + ], + "SW1Address": [ + "mid_csp_cbf/vcc_sw1/002" + ], + "SW2Address": [ + "mid_csp_cbf/vcc_sw2/002" + ], + "VccID": [ + "2" + ], + "polled_attr": [ + "healthstate", + "1000", + "adminmode", + "1000" + ] + } + } + }, + "VccBand1And2": { + "mid_csp_cbf/vcc_band12/002": {} + }, + "VccBand3": { + "mid_csp_cbf/vcc_band3/002": {} + }, + "VccBand4": { + "mid_csp_cbf/vcc_band4/002": {} + }, + "VccBand5": { + "mid_csp_cbf/vcc_band5/002": {} + }, + "VccSearchWindow": { + "mid_csp_cbf/vcc_sw1/002": {}, + "mid_csp_cbf/vcc_sw2/002": {} + } + }, + "vcc-003": { + "Vcc": { + "mid_csp_cbf/vcc/003": { + "attribute_properties": { + "adminMode": { + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "subarrayMembership": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "Band1And2Address": [ + "mid_csp_cbf/vcc_band12/003" + ], + "Band3Address": [ + "mid_csp_cbf/vcc_band3/003" + ], + "Band4Address": [ + "mid_csp_cbf/vcc_band4/003" + ], + "Band5Address": [ + "mid_csp_cbf/vcc_band5/003" + ], + "SW1Address": [ + "mid_csp_cbf/vcc_sw1/003" + ], + "SW2Address": [ + "mid_csp_cbf/vcc_sw2/003" + ], + "VccID": [ + "3" + ], + "polled_attr": [ + "healthstate", + "1000", + "adminmode", + "1000" + ] + } + } + }, + "VccBand1And2": { + "mid_csp_cbf/vcc_band12/003": {} + }, + "VccBand3": { + "mid_csp_cbf/vcc_band3/003": {} + }, + "VccBand4": { + "mid_csp_cbf/vcc_band4/003": {} + }, + "VccBand5": { + "mid_csp_cbf/vcc_band5/003": {} + }, + "VccSearchWindow": { + "mid_csp_cbf/vcc_sw1/003": {}, + "mid_csp_cbf/vcc_sw2/003": {} + } + }, + "vcc-004": { + "Vcc": { + "mid_csp_cbf/vcc/004": { + "attribute_properties": { + "adminMode": { + "abs_change": [ + "-1", + "1" + ] + }, + "healthState": { + "abs_change": [ + "-1", + "1" + ] + }, + "subarrayMembership": { + "abs_change": [ + "-1", + "1" + ] + } + }, + "properties": { + "Band1And2Address": [ + "mid_csp_cbf/vcc_band12/004" + ], + "Band3Address": [ + "mid_csp_cbf/vcc_band3/004" + ], + "Band4Address": [ + "mid_csp_cbf/vcc_band4/004" + ], + "Band5Address": [ + "mid_csp_cbf/vcc_band5/004" + ], + "SW1Address": [ + "mid_csp_cbf/vcc_sw1/004" + ], + "SW2Address": [ + "mid_csp_cbf/vcc_sw2/004" + ], + "VccID": [ + "4" + ], + "polled_attr": [ + "healthstate", + "1000", + "adminmode", + "1000" + ] + } + } + }, + "VccBand1And2": { + "mid_csp_cbf/vcc_band12/004": {} + }, + "VccBand3": { + "mid_csp_cbf/vcc_band3/004": {} + }, + "VccBand4": { + "mid_csp_cbf/vcc_band4/004": {} + }, + "VccBand5": { + "mid_csp_cbf/vcc_band5/004": {} + }, + "VccSearchWindow": { + "mid_csp_cbf/vcc_sw1/004": {}, + "mid_csp_cbf/vcc_sw2/004": {} + } + } + } + } +} diff --git a/csp-lmc-mid/docker/mid-cbf-mcs.yml b/csp-lmc-mid/docker/mid-cbf-mcs.yml index 96879d8..882c714 100644 --- a/csp-lmc-mid/docker/mid-cbf-mcs.yml +++ b/csp-lmc-mid/docker/mid-cbf-mcs.yml @@ -23,9 +23,9 @@ services: - TANGO_HOST=${TANGO_HOST} command: > sh -c "wait-for-it.sh ${TANGO_HOST} --timeout=60 --strict -- - json2tango -w -a -u csplmc/config/midcbf_dsconfig.json && sleep infinity" + json2tango -w -a -u ../csplmc/charts/mid-csp/charts/cbf-proto/data/midcbfconfig.json && sleep infinity" volumes: - - .:/csplmc + - ..:/csplmc cbfmaster: image: ${DOCKER_REGISTRY_HOST}/${DOCKER_REGISTRY_USER}/mid-cbf-mcs:0.4.5-2e83f4c diff --git a/csp-lmc-mid/docker/mid-csp-lmc.yml b/csp-lmc-mid/docker/mid-csp-lmc.yml index 5b40e9c..5340c29 100644 --- a/csp-lmc-mid/docker/mid-csp-lmc.yml +++ b/csp-lmc-mid/docker/mid-csp-lmc.yml @@ -23,9 +23,9 @@ services: - TANGO_HOST=${TANGO_HOST} command: > sh -c "wait-for-it.sh ${TANGO_HOST} --timeout=60 --strict -- - json2tango -w -a -u csplmc/config/midcsplmc_dsconfig.json && sleep infinity" + json2tango -w -a -u csplmc/charts/csp-proto/data/cspconfig.json && sleep infinity" volumes: - - .:/csplmc + - ..:/csplmc midcsp_dumpdsconfig: image: nexus.engageska-portugal.pt/ska-docker/tango-dsconfig:latest diff --git a/csp-lmc-mid/requirements-tst.txt b/csp-lmc-mid/requirements-tst.txt new file mode 100644 index 0000000..67c373b --- /dev/null +++ b/csp-lmc-mid/requirements-tst.txt @@ -0,0 +1,9 @@ +pytest +pytest-bdd +pytest-cov +pytest-json-report +pytest-mock +#pytest-xdist == 1.34.0 +pycodestyle +coverage +mock diff --git a/csp-lmc-mid/requirements.txt b/csp-lmc-mid/requirements.txt new file mode 100644 index 0000000..5a67db3 --- /dev/null +++ b/csp-lmc-mid/requirements.txt @@ -0,0 +1,5 @@ +numpy == 1.17.2 +pytango >= 9.3.2 +jsonschema >= 3.2.0 +lmcbaseclasses >= 0.6.4 +csp-lmc-common >= 0.6.8 diff --git a/csp-lmc-mid/setup.cfg b/csp-lmc-mid/setup.cfg index 40bde55..d7e22e1 100644 --- a/csp-lmc-mid/setup.cfg +++ b/csp-lmc-mid/setup.cfg @@ -26,7 +26,7 @@ addopts = --forked --cov-report=term --cov-report=html --cov-report=xml - --junitxml=/build/reports/csp-lmc-mid-unit-tests.xml + --junitxml=build/reports/csp-lmc-mid-unit-tests.xml console_output_style = progress junit_family=legacy filterwarnings = diff --git a/csp-lmc-mid/setup.py b/csp-lmc-mid/setup.py index 34a15bd..14177cd 100644 --- a/csp-lmc-mid/setup.py +++ b/csp-lmc-mid/setup.py @@ -63,7 +63,6 @@ setup( 'assertpy', 'pytest-forked', 'mock', - 'mid-csp-lmc' ], extras_require={ 'dev': ['prospector[with_pyroma]', 'yapf', 'isort'] diff --git a/csp-lmc-mid/test-harness/Makefile b/csp-lmc-mid/test-harness/Makefile new file mode 100644 index 0000000..b10e569 --- /dev/null +++ b/csp-lmc-mid/test-harness/Makefile @@ -0,0 +1,31 @@ +# Use bash shell with pipefail option enabled so that the return status of a +# piped command is the value of the last (rightmost) commnand to exit with a +# non-zero status. This lets us pipe output into tee but still exit on test +# failures. +SHELL = /bin/bash +.SHELLFLAGS = -o pipefail -c + +all: test + +# wait for the device to be available before beginning the test +# A temporary volume is mounted at /build when 'make test' is executing. +# The following steps copy across useful output to this volume which can +# then be extracted to form the CI summary for the test procedure. +test: + retry --max=15 -- tango_admin --ping-device mid_csp_cbf/sub_elt/subarray_01 + retry --max=15 -- tango_admin --ping-device mid_csp_cbf/sub_elt/subarray_02 + retry --max=15 -- tango_admin --ping-device mid_csp/elt/master + retry --max=15 -- tango_admin --ping-device mid_csp/elt/subarray_01 + retry --max=15 -- tango_admin --ping-device mid_csp/elt/subarray_02 + cd /app && python3 setup.py test| tee integration-test.stdout + mkdir -p build/reports && \ + if [ -d build ]; then \ + mv /app/integration-test.stdout ./build/csp-lmc-mid-setup-test.stdout; \ + mv /app/htmlcov ./build/csp-lmc-mid_htmlcov; \ + cp /app/coverage.xml ./build/coverage-csp-lmc-mid.xml; \ + fi; + + #cd /build && coverage combine csp-lmc-mid_coverage csp-lmc-common_coverage && coverage xml + #cd /build && mv coverage.xml ./reports/code-coverage.xml + +.PHONY: all test diff --git a/csp-lmc-mid/test-harness/README.md b/csp-lmc-mid/test-harness/README.md new file mode 100644 index 0000000..a3c9a49 --- /dev/null +++ b/csp-lmc-mid/test-harness/README.md @@ -0,0 +1,3 @@ +This directory is uploaded to the container when 'make test' is executed. Files +in this directory will be found inside /build once uploaded to the container. + diff --git a/csp-lmc-mid/test-harness/requirements-tst.txt b/csp-lmc-mid/test-harness/requirements-tst.txt new file mode 100644 index 0000000..67c373b --- /dev/null +++ b/csp-lmc-mid/test-harness/requirements-tst.txt @@ -0,0 +1,9 @@ +pytest +pytest-bdd +pytest-cov +pytest-json-report +pytest-mock +#pytest-xdist == 1.34.0 +pycodestyle +coverage +mock diff --git a/csp-lmc-mid/test-harness/requirements.txt b/csp-lmc-mid/test-harness/requirements.txt new file mode 100644 index 0000000..5a67db3 --- /dev/null +++ b/csp-lmc-mid/test-harness/requirements.txt @@ -0,0 +1,5 @@ +numpy == 1.17.2 +pytango >= 9.3.2 +jsonschema >= 3.2.0 +lmcbaseclasses >= 0.6.4 +csp-lmc-common >= 0.6.8 diff --git a/csp-lmc-mid/tests/MidCspMaster_test.py b/csp-lmc-mid/tests/integration/MidCspMaster_test.py similarity index 99% rename from csp-lmc-mid/tests/MidCspMaster_test.py rename to csp-lmc-mid/tests/integration/MidCspMaster_test.py index 44925cb..51396a1 100644 --- a/csp-lmc-mid/tests/MidCspMaster_test.py +++ b/csp-lmc-mid/tests/integration/MidCspMaster_test.py @@ -34,7 +34,7 @@ sys.path.insert(0, os.path.abspath(path)) print(commons_pkg_path) #Local imports from ska.base.control_model import AdminMode -from acceptance_tests.utils import Probe, Poller +from unit.utils import Probe, Poller LOGGER = logging.getLogger(__name__) # Device test case @@ -112,7 +112,6 @@ class TestCspMaster(TestBase): Poller(4, 0.2).check(prober_admin_mode) prober_state = Probe(self.midcsp_master, "state", DevState.DISABLE, f"CSP Master not OFFLINE") Poller(4, 0.2).check(prober_state) - ''' def test_properties(self): """ Test the device property MaxCapability""" self._setup_master() @@ -120,6 +119,7 @@ class TestCspMaster(TestBase): capability_list.sort() #Oss: maxCapability returns a tuple assert self.midcsp_master.maxCapabilities == tuple(capability_list) + ''' def test_forwarded_attributes(self): """ Test the reportVCCState forwarded attribute""" diff --git a/csp-lmc-mid/tests/integration/MidCspSubarrayConfiguration_test.py b/csp-lmc-mid/tests/integration/MidCspSubarrayConfiguration_test.py deleted file mode 100644 index 069dadc..0000000 --- a/csp-lmc-mid/tests/integration/MidCspSubarrayConfiguration_test.py +++ /dev/null @@ -1,381 +0,0 @@ -"""Tests for ADR-4 and ADR-10 implementation into CSP.LMC Subarray.""" - -# Standard imports -import sys -import os -import time -import logging -import pytest -import unittest -from pytest import fail - -# Tango imports -import tango -from tango import DevState, EventType - -# Local imports -import json -from ska.base.control_model import ObsState -from utils import Poller, Probe -from assertpy import assert_that - -file_path = os.path.dirname(os.path.abspath(__file__)) -LOGGER = logging.getLogger(__name__) - -def prepare_configuration_string(filename="test_ConfigureScan_ADR4.json"): - """Create the config string for CSP-CBF""" - try: - file_to_load = filename - file_path = os.path.dirname(os.path.abspath(__file__)) - LOGGER.info(f" Reading configuration from {file_to_load}") - json_file = open(file_path + "/" + file_to_load) - configuration_string = json_file.read().replace("\n", "") - return configuration_string - except Exception as e: - LOGGER.warning(f"Unable to locate file {filename}") - - -# Device test case -@pytest.mark.usefixtures("midcsp_master", "midcsp_subarray01", "cbf_subarray01") -class TestBase(unittest.TestCase): - fixture_names = () - - @pytest.fixture(autouse=True) - def auto_injector_fixture(self, request): - names = self.fixture_names - for name in names: - setattr(self, name, request.getfixturevalue(name)) - -class TestCspSubarrayConfiguration(TestBase): - fixture_names = ("midcsp_master", "midcsp_subarray01", "cbf_subarray01") - - def __set_csp_subarray_to_on(self): - """ - Set the CSP Subarray to ON state. - """ - # read from the CSP Master the list of available receptors - unassigned_receptors = self.midcsp_master.unassignedReceptorIDs - # assign the first one to the CSP subarray to force - # the transition to ON - receptor_to_add = unassigned_receptors[0] - LOGGER.debug("Set CSP Subarray adding receptor:{}".format(receptor_to_add)) - self.midcsp_subarray01.AddReceptors([receptor_to_add, ]) - prober_cmd_in_progress = Probe(self.midcsp_subarray01, 'isCmdInProgress', False, - f"Wrong value for command in progress") - Poller(10, 0.2).check(prober_cmd_in_progress) - prober_subarray_state = Probe(self.midcsp_subarray01, 'state', DevState.ON, - f"Wrong CspSubarray state") - Poller(10, 0.2).check(prober_subarray_state) - state = self.midcsp_subarray01.State() - assert state == DevState.ON - - def _set_cspsubarray_to_idle_state(self): - obs_state = self.midcsp_subarray01.obsState - if obs_state == ObsState.READY: - self.midcsp_subarray01.GoToIdle() - prober_obs_state = Probe(self.midcsp_subarray01, 'obsState', ObsState.IDLE, f"CSP Subarray not IDLE") - Poller(7, 0.2).check(prober_obs_state) - - def _reset_subarray_to_disable_state(self): - try: - state = self.midcsp_subarray01.State() - LOGGER.debug("CSP Subarray initial State:{}".format(state)) - if state == DevState.DISABLE: - return - if state == DevState.ON: - self._set_cspsubarray_to_idle_state() - LOGGER.debug("Remove all receptors") - self.midcsp_subarray01.RemoveAllReceptors() - # wait for the transition of the CSP sub-array to OFF - prober_subarray_state = Probe(self.midcsp_subarray01, 'state', DevState.OFF, - f"Wrong CSP Subarray state") - Poller(7, 0.2).check(prober_subarray_state) - - # Set the CSP subarray to OFF issuing the Standby command - # o CSP Master - state = self.midcsp_subarray01.State() - if state == DevState.OFF: - LOGGER.debug("CSP Subarray State is OFF...going to execute Standby") - # wait until Master is ON - prober_master_state = Probe(self.midcsp_master, 'state', DevState.ON, f"Wrong CSP Master state") - Poller(7, 0.2).check(prober_master_state) - self.midcsp_master.Standby("") - prober_subarray_state = Probe(self.midcsp_subarray01, 'state', DevState.DISABLE, - f"Wrong CSP Subarray state") - Poller(5, 0.2).check(prober_subarray_state) - prober_master_state = Probe(self.midcsp_master, 'state', DevState.STANDBY, - f"Wrong CSP Master state") - Poller(7, 0.2).check(prober_master_state) - return - - except tango.DevFailed as tango_err: - LOGGER.warning(f"Unable to reset subarray to init state") - - def _setup_csp_subarray(self): - """ - Set the CSP Subarray state to ON - """ - LOGGER.info("Setup subarray") - self._reset_subarray_to_disable_state() - # switch-on the CspMaster to force CSP Subarray - # transition to OFF - LOGGER.debug("Set CSP Subarray to OFF") - self.midcsp_master.On("") - # wait for the transition of the CSP subarray to OFF - prober_master_state = Probe(self.midcsp_master, 'state', DevState.ON, f"Wrong CSP Master state") - Poller(10, 0.2).check(prober_master_state) - # wait for the transition of the CSP subarray to OFF - prober_subarray_state = Probe(self.midcsp_subarray01, 'state', DevState.OFF, f"Wrong CSP Subarray state") - Poller(10, 0.2).check(prober_subarray_state) - state = self.midcsp_subarray01.State() - assert state in [DevState.OFF], "assuming that mid_csp_subarray_01 is OFF" - self.__set_csp_subarray_to_on() - state = self.midcsp_subarray01.State() - - @pytest.mark.csp_k8s - def test_send_configure_to_cbf_and_json_stored(self): - """ - Configure the CSP Subarray with a JSon string including - the new ADR4 fields. - """ - self._setup_csp_subarray() - configuration_string = prepare_configuration_string() - state = self.midcsp_subarray01.State() - assert state == DevState.ON, "assume the CSP subarray State is ON" - # exercise the device - obs_state = self.midcsp_subarray01.obsState - LOGGER.info("CSP Subarray State before exercise :{}-{}".format(state, ObsState(obs_state).name)) - LOGGER.debug(f"sending configure:{configuration_string}") - LOGGER.info(f"Configuring CSP subarray01") - self.midcsp_subarray01.Configure(configuration_string) - # check - prober_subarray_obstate = Probe(self.midcsp_subarray01, 'obsState', ObsState.READY, - f"Wrong CSP Subarray obsState {self.midcsp_subarray01.obsState}") - Poller(5, 0.2).check(prober_subarray_obstate) - stored_json = self.midcsp_subarray01.validScanConfiguration - assert stored_json == configuration_string - json_dict = json.loads(configuration_string) - configID = json_dict["id"] - stored_id = self.midcsp_subarray01.configurationID - assert stored_id == configID - - @pytest.mark.csp_k8s - def test_configure_cspsubarray_WITH_json_missing_configId(self): - """ - Configure the CSP Subarray sending a json configuration script - without the configID entry. - """ - # setup the test - # Set the CSP Subarray to ON-IDLE state - self._setup_csp_subarray() - configuration_string = prepare_configuration_string("test_ConfigureScan_without_configID.json") - - # exercise the device - state = self.midcsp_subarray01.State() - obs_state = self.midcsp_subarray01.obsState - LOGGER.info("CSP Subarray State before exercise :{}-{}".format(state, ObsState(obs_state).name)) - LOGGER.info(f"Configuring CSP subarray01") - with pytest.raises(tango.DevFailed) as tango_err: - self.midcsp_subarray01.Configure(configuration_string) - if tango_err: - err_msg = str(tango_err.value.args[0].desc) - # TODO: aggiungere quale device fallisce - LOGGER.warning(f"Command configure failed on {self.midcsp_subarray01.dev_name()} with error: {err_msg}") - # check - obs_state = self.midcsp_subarray01.obsState - #assert obs_state == ObsState.IDLE, f"CSP Subarray obsState has wrong value ({obs_state})" - assert_that(obs_state).described_as("CSP Subarray obsState has wrong value ({obs_state}").is_equal_to(ObsState.IDLE) - - @pytest.mark.csp_k8s - def test_configure_cspsubarray_WHEN_in_wrong_state(self): - """ - Set the CSP Subarray in a wrong state and issue the - Configure command on it. - """ - # setup the test: Subarray DISABLE-IDLE - - self._setup_csp_subarray() - LOGGER.info("Force CSP Subarray to an invalid state to accept Configure") - self._reset_subarray_to_disable_state() - configuration_string = prepare_configuration_string() - init_state = self.midcsp_subarray01.State() - - # exercise the device - state = self.midcsp_subarray01.State() - obs_state = self.midcsp_subarray01.obsState - LOGGER.info("CSP Subarray State before exercise :{}-{}".format(state, ObsState(obs_state).name)) - LOGGER.info(f"Configuring CSP subarray01") - with pytest.raises(tango.DevFailed) as df: - self.midcsp_subarray01.Configure(configuration_string) - #assert_that(self.midcsp_subarray01.Configure).raises(tango.DevFailed).when_called_with(configuration_string) - if df: - err_msg = str(df.value.args[0].desc) - # TODO: aggiungere quale device fallisce - LOGGER.error(f"Command configure failed on {self.midcsp_subarray01.dev_name()} with error: {err_msg}") - # check - # Subarray final ObsState=IDLE - obs_state = self.midcsp_subarray01.obsState - end_state = self.midcsp_subarray01.State() - assert obs_state == ObsState.IDLE, f"Current ObsState should be IDLE" - assert end_state == init_state, f"Current State should be the initial one" - #assert_that(obs_state).described_by("Current ObsState should be IDLE").is_not_equal_to(ObsState.IDLE) - - @pytest.mark.csp_k8s - def test_configure_cbf_WITHOUT_outputlink_information(self): - """ - CSP Subarray sends an invalid json configuration to - CBF Subarray. - """ - # setup the test: Subarray DISABLE-IDLE - self._setup_csp_subarray() - configuration_string = prepare_configuration_string("test_ConfigureScan_without_outputlink.json") - # print the subarray stat/obsState - init_state = self.midcsp_subarray01.State() - obs_state = self.midcsp_subarray01.obsState - LOGGER.info("CSP Subarray State before exercise :{}-{}".format(init_state, ObsState(obs_state).name)) - # exercise the device - LOGGER.info(f"Configuring CSP subarray01") - self.midcsp_subarray01.Configure(configuration_string) - # check - # Subarray final ObsState IDLE - prober_subarray_flag = Probe(self.midcsp_subarray01, 'failureRaisedFlag', True, f"Failure flag is false") - Poller(7, 0.2).check(prober_subarray_flag) - obs_state = self.midcsp_subarray01.obsState - end_state = self.midcsp_subarray01.State() - assert obs_state == ObsState.IDLE, f"Current ObsState should be IDLE" - assert end_state == init_state, f"Current State should be the initial one" - - @pytest.mark.csp_k8s - def test_configure_cbf_WITH_invalid_json(self): - """ - CSP Subarray sends an invalid json configuration to - CBF Subarray. - """ - # setup the test: Subarray DISABLE-IDLE - self._setup_csp_subarray() - configuration_string = prepare_configuration_string("test_ConfigureScan_invalid_cbf_json.json") - # print the subarray stat/obsState - init_state = self.midcsp_subarray01.State() - obs_state = self.midcsp_subarray01.obsState - LOGGER.info("CSP Subarray State before exercise :{}-{}".format(init_state, ObsState(obs_state).name)) - # exercise the device - LOGGER.info(f"Configuring CSP subarray01") - self.midcsp_subarray01.Configure(configuration_string) - # check - # Subarray final ObsState IDLE - prober_subarray_flag = Probe(self.midcsp_subarray01, 'failureRaisedFlag', True, f"Failure flag is false") - Poller(7, 0.2).check(prober_subarray_flag) - obs_state = self.midcsp_subarray01.obsState - end_state = self.midcsp_subarray01.State() - assert obs_state == ObsState.IDLE, f"Current ObsState should be IDLE" - assert end_state == init_state, f"Current State should be the initial one" - @pytest.mark.csp_k8s - def test_cspsubarray_scan_WITH_invalid_string_id(self): - """ - CSP Subarray receives the Scan command with an invalid - scanId number - """ - # setup the test: Subarray DISABLE-IDLE - self._setup_csp_subarray() - configuration_string = prepare_configuration_string("test_ConfigureScan_ADR4.json") - LOGGER.info(f"Configuring CSP subarray01") - self.midcsp_subarray01.Configure(configuration_string) - prober_obs_state = Probe(self.midcsp_subarray01, 'obsState', ObsState.READY, f"CSP Subarray not configured") - Poller(7, 0.2).check(prober_obs_state) - LOGGER.info(f"Issue the Scan command sending the invalid string \"abcd\" as input") - # exercise the device - state = self.midcsp_subarray01.State() - obs_state = self.midcsp_subarray01.obsState - LOGGER.info("CSP Subarray State before exercise :{}-{}".format(state, ObsState(obs_state).name)) - with pytest.raises(tango.DevFailed) as df: - self.midcsp_subarray01.Scan("abcd") - if df: - err_msg = str(df.value.args[0].desc) - LOGGER.error(f"Command Scan failed on {self.midcsp_subarray01.dev_name()} with error: {err_msg}") - # check - obs_state = self.midcsp_subarray01.obsState - assert obs_state == ObsState.READY - - @pytest.mark.csp_k8s - def test_cspsubarray_scan_WITH_no_argument(self): - """ - CSP Subarray receives the Scan command with no - input argument - """ - # setup the test: Subarray DISABLE-IDLE - self._setup_csp_subarray() - configuration_string = prepare_configuration_string("test_ConfigureScan_ADR4.json") - LOGGER.info(f"Configuring CSP subarray01") - self.midcsp_subarray01.Configure(configuration_string) - prober_obs_state = Probe(self.midcsp_subarray01, 'obsState', ObsState.READY, f"CSP Subarray not configured") - Poller(7, 0.2).check(prober_obs_state) - LOGGER.info(f"Issue the Scan command with no input argument") - # exercise the device - state = self.midcsp_subarray01.State() - obs_state = self.midcsp_subarray01.obsState - LOGGER.info("CSP Subarray State before exercise :{}-{}".format(state, ObsState(obs_state).name)) - with pytest.raises(tango.DevFailed) as df: - self.midcsp_subarray01.Scan() - if df: - err_msg = str(df.value.args[0].desc) - LOGGER.error(f"Command configure failed on {self.midcsp_subarray01.dev_name()} with error: {err_msg}") - # check - obs_state = self.midcsp_subarray01.obsState - assert obs_state == ObsState.READY - - @pytest.mark.csp_k8s - def test_cspsubarray_scan_WITH_int_argument(self): - """ - CSP Subarray receives the Scan command with an invalid - argument data type - """ - # setup the test: Subarray DISABLE-IDLE - self._setup_csp_subarray() - configuration_string = prepare_configuration_string("test_ConfigureScan_ADR4.json") - LOGGER.info(f"Configuring CSP subarray01") - self.midcsp_subarray01.Configure(configuration_string) - prober_obs_state = Probe(self.midcsp_subarray01, 'obsState', ObsState.READY, f"CSP Subarray not configured") - Poller(7, 0.2).check(prober_obs_state) - LOGGER.info(f"Issue the Scan command sending an int as input") - # exercise the device - state = self.midcsp_subarray01.State() - obs_state = self.midcsp_subarray01.obsState - LOGGER.info("CSP Subarray State before exercise :{}-{}".format(state, ObsState(obs_state).name)) - with pytest.raises(tango.DevFailed) as df: - self.midcsp_subarray01.Scan(1) - if df: - err_msg = str(df.value.args[0].desc) - LOGGER.error(f"Command Scan failed on {self.midcsp_subarray01.dev_name()} with error: {err_msg}") - # check - obs_state = self.midcsp_subarray01.obsState - assert obs_state == ObsState.READY - - @pytest.mark.csp_k8s - def test_cspsubarray_scan_WITH_valid_scan_id(self): - """ - CSP Subarray receives the Scan command with a valid - input argument - """ - # setup the test: Subarray DISABLE-IDLE - self._setup_csp_subarray() - configuration_string = prepare_configuration_string("test_ConfigureScan_ADR4.json") - LOGGER.info(f"Configuring CSP subarray01") - self.midcsp_subarray01.Configure(configuration_string) - prober_obs_state = Probe(self.midcsp_subarray01, 'obsState', ObsState.READY, f"CSP Subarray not configured") - Poller(7, 0.2).check(prober_obs_state) - LOGGER.info(f"Issue the Scan command") - # exercise the device - state = self.midcsp_subarray01.State() - obs_state = self.midcsp_subarray01.obsState - LOGGER.info("CSP Subarray State before exercise :{}-{}".format(state, ObsState(obs_state).name)) - scan_argin = "11" - self.midcsp_subarray01.Scan([scan_argin,]) - # check - prober_obs_state = Probe(self.midcsp_subarray01, 'obsState', ObsState.SCANNING, f"CSP Subarray wrong obstate") - Poller(7, 0.2).check(prober_obs_state) - # end the scan - self.midcsp_subarray01.EndScan() - prober_obs_state = Probe(self.midcsp_subarray01, 'obsState', ObsState.READY, f"CSP Subarray wrong obstate") - Poller(7, 0.2).check(prober_obs_state) - assert int(scan_argin) == self.midcsp_subarray01.scanID - diff --git a/csp-lmc-mid/tests/integration/MidCspSubarray_test.py b/csp-lmc-mid/tests/integration/MidCspSubarray_test.py index fa9713b..df27243 100755 --- a/csp-lmc-mid/tests/integration/MidCspSubarray_test.py +++ b/csp-lmc-mid/tests/integration/MidCspSubarray_test.py @@ -24,24 +24,23 @@ import tango from tango import DevState from assertpy import assert_that -# Path -file_path = os.path.dirname(os.path.abspath(__file__)) -# insert base package directory to import global_enum -# module in commons folder -print(file_path) -data_pkg_path = os.path.abspath(os.path.join(file_path, "./tests")) -sys.path.insert(0, data_pkg_path) - -path = os.path.join(os.path.dirname(__file__), os.pardir) -sys.path.insert(0, os.path.abspath(path)) - #Local imports from ska.base.control_model import ObsState -from acceptance_tests.utils import Probe, Poller +from unit.utils import Probe, Poller LOGGER = logging.getLogger(__name__) -# Device test case -@pytest.mark.usefixtures("midcsp_master", "midcsp_subarray01", "midcsp_subarray02", "cbf_subarray01") +file_path = os.path.dirname(os.path.abspath(__file__)) + +def prepare_configuration_string(filename="test_ConfigureScan_ADR4.json"): + """Create the config string for CSP-CBF""" + try: + file_to_load = file_path + '/../test_data/' + filename + LOGGER.debug(f" Reading configuration from {file_to_load}") + json_file = open(file_to_load) + configuration_string = json_file.read().replace("\n", "") + return configuration_string + except Exception as e: + LOGGER.warning(f"Unable to locate file {filename}") # Device test case @pytest.mark.usefixtures("midcsp_master", "midcsp_subarray01", "cbf_subarray01") @@ -114,11 +113,10 @@ class TestCspSubarray(TestBase): # assign all available receptors to the subarray state = self.midcsp_subarray01.State() obs_state = self.midcsp_subarray01.obsState + LOGGER.info("CSPSubarray state:{}-{}".format(state, obs_state)) + LOGGER.info("Going to assign receptors") self.midcsp_subarray01.AddReceptors(receptor_list.tolist()) # wait for the transition to IDLE - prober_obs_state = Probe(self.midcsp_subarray01, 'obsState', ObsState.RESOURCING, - f"Wrong CSP Subarray obsState is not RESOURCING") - Poller(10, 0.2).check(prober_obs_state) prober_obs_state = Probe(self.midcsp_subarray01, 'obsState', ObsState.IDLE, f"Wrong CSP Subarray obsState is not IDLE") Poller(10, 0.2).check(prober_obs_state) @@ -132,19 +130,19 @@ class TestCspSubarray(TestBase): """ obs_state = self.midcsp_subarray01.obsState assert obs_state == ObsState.IDLE + receptors = self.midcsp_subarray01.assignedReceptors + LOGGER.info("Receptor assigned to the subarray {}".format(receptors)) try: + LOGGER.info("invoke remove all receptors") self.midcsp_subarray01.RemoveAllReceptors() except Exception as e: LOGGER.info(str(e)) # wait for the transition to EMPTY prober_obs_state = Probe(self.midcsp_subarray01, "obsState", ObsState.EMPTY, f"CSP Subarray is not EMPTY") Poller(4, 0.2).check(prober_obs_state) - # Note: here we sleep for a while to let the system update the vccMemebership attribute. This has to - # configured to push event fro the device (not with polling) - #time.sleep(0.2) - receptor_list = self.midcsp_master.unassignedReceptorIDs - #if self.midcsp_subarray01.State() == DevState.OFF: - # self.midcsp_subarray01.On() + obs_state = self.midcsp_subarray01.obsState + LOGGER.info("obs_state:{}".format(obs_state)) + LOGGER.info("EMPTY:{}".format(ObsState.EMPTY)) def _goto_idle(self): """ @@ -159,28 +157,27 @@ class TestCspSubarray(TestBase): def _configure_scan(self): self._setup_subarray() self._assign_receptors() - f = open(file_path + "/acceptance_tests/test_ConfigureScan_ADR4.json") - (result_code, msg) = self.midcsp_subarray01.Configure(f.read().replace("\n", "")) - f.close() + configuration_string = prepare_configuration_string() + (result_code, msg) = self.midcsp_subarray01.Configure(configuration_string) prober_subarray_obstate = Probe(self.midcsp_subarray01, 'obsState', ObsState.READY, f"Wrong CSP Subarray obsState {self.midcsp_subarray01.obsState}") Poller(5, 0.2).check(prober_subarray_obstate) - ''' + @pytest.mark.csp_k8s def test_AFTER_initialization(self): """ Test for State after CSP startup. The CspSubarray State at start is OFF. """ - self._setup_subarray() + self._setup_subarray_off() state = self.midcsp_subarray01.State() LOGGER.info("subarray state:{}".format(state)) prober_subarray_state = Probe(self.midcsp_subarray01, "State", DevState.OFF, f"CSP Subarray not OFF") Poller(4, 0.2).check(prober_subarray_state) prober_subarray_obsstate = Probe(self.midcsp_subarray01, "obsState", ObsState.EMPTY, f"CSP Subarray not EMPTY") Poller(4, 0.2).check(prober_subarray_obsstate) - ''' + @pytest.mark.csp_k8s def test_subarray_state_AFTER_on_command_execution(self): """ @@ -190,13 +187,13 @@ class TestCspSubarray(TestBase): self._setup_subarray_off() subarray_state = self.midcsp_subarray01.State() obs_state = self.midcsp_subarray01.obsState - #time.sleep(1) LOGGER.debug("CSPSubarray state before test:{}-{}".format(subarray_state, obs_state)) subarray_state = self.midcsp_subarray01.State() self.midcsp_subarray01.On() prober_subarray_state = Probe(self.midcsp_subarray01, "State", DevState.ON, f"CSP Subarray not OFF") Poller(4, 0.2).check(prober_subarray_state) + @pytest.mark.csp_k8s def test_add_receptors_WITH_invalid_id(self): """ Test the assignment of a number of invalid receptor IDs to @@ -231,6 +228,7 @@ class TestCspSubarray(TestBase): # a 0-dimensional array or a 0-length list. Therefore, the result is True. assert not receptors.any(), f"CSP Subarray is not empty" + @pytest.mark.csp_k8s def test_add_receptors_WITH_valid_id(self): """ Test the assignment of valid receptors to a CspSubarray @@ -252,6 +250,7 @@ class TestCspSubarray(TestBase): receptors = self.midcsp_subarray01.assignedReceptors assert set(receptor_list) == set(receptors) + @pytest.mark.csp_k8s def test_add_receptors_ALREADY_belonging_to_subarray(self): """ Test the assignment of already assigned receptors to a CspSubarray @@ -273,6 +272,7 @@ class TestCspSubarray(TestBase): # check the array read first and the array read last are equal assert np.array_equal(receptors, assigned_receptors) + @pytest.mark.csp_k8s def test_subarray_state_AFTER_receptors_assignment(self): """ Test the CspSubarray State after receptors assignment. @@ -290,6 +290,7 @@ class TestCspSubarray(TestBase): f"Wrong CSP Subarray obsState") Poller(10, 0.2).check(prober_obs_state) + @pytest.mark.csp_k8s def test_partial_remove_of_receptors_FROM_the_subarray(self): """ Test the partial deallocation of receptors from a @@ -318,6 +319,7 @@ class TestCspSubarray(TestBase): final_number_of_receptors = len(assigned_receptors) assert (init_number_of_receptors - final_number_of_receptors) == 1 + @pytest.mark.csp_k8s def test_remove_all_receptors_FROM_subarray(self): """ Test the complete deallocation of receptors from a @@ -342,6 +344,7 @@ class TestCspSubarray(TestBase): # check the array is empty (any() in this case returns False) assert not assigned_receptors.any() + @pytest.mark.csp_k8s def test_configure_WHEN_subarray_is_in_wrong_state(self): """ Test that the Configure() command fails if the Subarray @@ -351,17 +354,16 @@ class TestCspSubarray(TestBase): obs_state = self.midcsp_subarray01.obsState state = self.midcsp_subarray01.State() LOGGER.info("CSP Subarray State before exercise :{}-{}".format(state, ObsState(obs_state).name)) - filename = os.path.join(data_pkg_path, "test_ConfigureScan_basic.json") - f = open(file_path + "/test_ConfigureScan_basic.json") - LOGGER.info(f"Configuring CSP subarray01") + configuration_string = prepare_configuration_string("test_ConfigureScan_basic.json") with pytest.raises(tango.DevFailed) as df: - self.midcsp_subarray01.Configure(f.read().replace("\n", "")) + (result_code, msg) = self.midcsp_subarray01.Configure(configuration_string) if df: err_msg = str(df.value.args[0].desc) LOGGER.error(err_msg) obs_state = self.midcsp_subarray01.obsState assert obs_state == ObsState.EMPTY, f"CSP Subarray obsState is not EMPTY" + @pytest.mark.csp_k8s def test_configure_WHITH_wrong_configuration(self): """ Test that the Configure() command fails if the Subarray @@ -372,13 +374,14 @@ class TestCspSubarray(TestBase): obs_state = self.midcsp_subarray01.obsState state = self.midcsp_subarray01.State() LOGGER.info("CSP Subarray State before exercise :{}-{}".format(state, ObsState(obs_state).name)) - f = open(file_path + "/acceptance_tests/test_ConfigureScan_without_configID.json") + configuration_string = prepare_configuration_string("test_ConfigureScan_without_configID.json") LOGGER.info(f"Configuring CSP subarray01") - self.midcsp_subarray01.Configure(f.read().replace("\n", "")) + self.midcsp_subarray01.Configure(configuration_string) # check obs_state = self.midcsp_subarray01.obsState assert_that(obs_state).described_as("CSP Subarray obsState has wrong value ({obs_state}").is_equal_to(ObsState.FAULT) + @pytest.mark.csp_k8s def test_send_configure_to_cbf_and_json_stored(self): """ Configure the CSP Subarray with a JSon string including @@ -391,9 +394,8 @@ class TestCspSubarray(TestBase): LOGGER.info("CSP Subarray State before exercise :{}-{}".format(state, ObsState(obs_state).name)) # exercise the device LOGGER.info(f"Configuring CSP subarray01") - f = open(file_path + "/acceptance_tests/test_ConfigureScan_ADR4.json") - (result_code, msg) = self.midcsp_subarray01.Configure(f.read().replace("\n", "")) - f.close() + configuration_string = prepare_configuration_string() + (result_code, msg) = self.midcsp_subarray01.Configure(configuration_string) # check prober_subarray_obstate = Probe(self.midcsp_subarray01, 'obsState', ObsState.READY, f"Wrong CSP Subarray obsState {self.midcsp_subarray01.obsState}") @@ -404,36 +406,7 @@ class TestCspSubarray(TestBase): #stored_id = self.midcsp_subarray01.configurationID #assert stored_id == configID - def test_reconfiguration(self): - """ - Configure the CSP Subarray with a JSon string including - the new ADR4 fields. - """ - self._setup_subarray() - self._assign_receptors() - state = self.midcsp_subarray01.State() - obs_state = self.midcsp_subarray01.obsState - LOGGER.info("CSP Subarray State before exercise :{}-{}".format(state, ObsState(obs_state).name)) - # exercise the device - LOGGER.info(f"Configuring CSP subarray01") - f = open(file_path + "/acceptance_tests/test_ConfigureScan_ADR4.json") - (result_code, msg) = self.midcsp_subarray01.Configure(f.read().replace("\n", "")) - f.close() - # check - prober_subarray_obstate = Probe(self.midcsp_subarray01, 'obsState', ObsState.READY, - f"Wrong CSP Subarray obsState {self.midcsp_subarray01.obsState}") - Poller(5, 0.2).check(prober_subarray_obstate) - obs_state = self.midcsp_subarray01.obsState - state = self.midcsp_subarray01.State() - LOGGER.info("CSP Subarray State before exercise :{}-{}".format(state, ObsState(obs_state).name)) - f = open(file_path + "/acceptance_tests/test_ConfigureScan_basic.json") - (result_code, msg) = self.midcsp_subarray01.Configure(f.read().replace("\n", "")) - f.close() - # check - prober_subarray_obstate = Probe(self.midcsp_subarray01, 'obsState', ObsState.READY, - f"Wrong CSP Subarray obsState {self.midcsp_subarray01.obsState}") - Poller(5, 0.2).check(prober_subarray_obstate) - + @pytest.mark.csp_k8s def test_start_end_scan(self): """ Test that a subarray is able to process the @@ -456,6 +429,7 @@ class TestCspSubarray(TestBase): f"Wrong CSP Subarray obsState") Poller(10, 0.2).check(prober_obs_state) + @pytest.mark.csp_k8s def test_abort_scan(self): """ Test that a subarray is able to process the @@ -477,17 +451,18 @@ class TestCspSubarray(TestBase): f"Wrong CSP Subarray obsState") Poller(10, 0.2).check(prober_obs_state) + @pytest.mark.csp_k8s def test_invoke_configure_command_AFTER_gotoidle(self): self._configure_scan() self.midcsp_subarray01.GoToIdle() LOGGER.info(f"Configuring CSP subarray01") - f = open(file_path + "/acceptance_tests/test_ConfigureScan_ADR4.json") - (result_code, msg) = self.midcsp_subarray01.Configure(f.read().replace("\n", "")) - f.close() + configuration_string = prepare_configuration_string() + (result_code, msg) = self.midcsp_subarray01.Configure(configuration_string) prober_obs_state = Probe(self.midcsp_subarray01, "obsState", ObsState.READY, f"CSP Subarray not READY") Poller(4, 0.2).check(prober_obs_state) + @pytest.mark.csp_k8s def test_obsreset_cbf_AFTER_invalid_configuration(self): """ CSP Subarray sends an invalid json configuration to @@ -496,14 +471,13 @@ class TestCspSubarray(TestBase): # setup the test: Subarray DISABLE-IDLE self._setup_subarray() self._assign_receptors() - f = open(file_path + "/acceptance_tests/test_ConfigureScan_invalid_cbf_json.json") - # print the subarray stat/obsState init_state = self.midcsp_subarray01.State() obs_state = self.midcsp_subarray01.obsState LOGGER.info("CSP Subarray State before exercise :{}-{}".format(init_state, ObsState(obs_state).name)) # exercise the device LOGGER.info(f"Configuring CSP subarray01") - self.midcsp_subarray01.Configure(f.read().replace("\n", "")) + configuration_string = prepare_configuration_string("test_ConfigureScan_invalid_cbf_json.json") + self.midcsp_subarray01.Configure(configuration_string) # check # Subarray final ObsState IDLE prober_subarray_flag = Probe(self.midcsp_subarray01, 'failureRaisedFlag', True, f"Failure flag is false") @@ -515,6 +489,7 @@ class TestCspSubarray(TestBase): prober_obs_state = Probe(self.midcsp_subarray01, "obsState", ObsState.IDLE, f"CSP Subarray not IDLE") Poller(4, 0.2).check(prober_obs_state) + @pytest.mark.csp_k8s def test_send_abort_WHILE_in_configuring(self): """ Configure the CSP Subarray with a JSon string including @@ -527,9 +502,8 @@ class TestCspSubarray(TestBase): LOGGER.info("CSP Subarray State before exercise :{}-{}".format(state, ObsState(obs_state).name)) # exercise the device LOGGER.info(f"Configuring CSP subarray01") - f = open(file_path + "/acceptance_tests/test_ConfigureScan_ADR4.json") - (result_code, msg) = self.midcsp_subarray01.Configure(f.read().replace("\n", "")) - f.close() + configuration_string = prepare_configuration_string() + (result_code, msg) = self.midcsp_subarray01.Configure(configuration_string) #time.sleep(0.1) self.midcsp_subarray01.Abort() # check @@ -539,30 +513,13 @@ class TestCspSubarray(TestBase): obs_state = self.midcsp_subarray01.obsState assert obs_state == ObsState.ABORTED - def test_restart_AFTER_abort_with_subarray_idle(self): - """ - CSP Subarray invoke a RESTART after fault with - subarray with allocated resources. - """ - # setup the test: Subarray DISABLE-IDLE - self._setup_subarray() - self._assign_receptors() - self.midcsp_subarray01.Abort() - prober_obs_state = Probe(self.midcsp_subarray01, "obsState", ObsState.ABORTED, f"CSP Subarray not EMPTY") - Poller(4, 0.2).check(prober_obs_state) - self.midcsp_subarray01.Restart() - prober_obs_state = Probe(self.midcsp_subarray01, "obsState", ObsState.EMPTY, f"CSP Subarray not EMPTY") - Poller(4, 0.2).check(prober_obs_state) - assigned_receptors = self.midcsp_subarray01.assignedReceptors - LOGGER.info("assigned_receptors:".format(assigned_receptors)) - def test_restart_AFTER_abort_with_subarray_ready(self): self._setup_subarray() self._assign_receptors() # configure the system with invalid json to send it in FAULT - f = open(file_path + "/acceptance_tests/test_ConfigureScan_ADR4.json") + configuration_string = prepare_configuration_string() LOGGER.info(f"Configuring CSP subarray01") - self.midcsp_subarray01.Configure(f.read().replace("\n", "")) + (result_code, msg) = self.midcsp_subarray01.Configure(configuration_string) prober_obs_state = Probe(self.midcsp_subarray01, "obsState", ObsState.READY, f"CSP Subarray not READY") Poller(4, 0.2).check(prober_obs_state) self.midcsp_subarray01.Abort() @@ -581,8 +538,9 @@ class TestCspSubarray(TestBase): self._setup_subarray() self._assign_receptors() # configure the system with invalid json to send it in FAULT - f = open(file_path + "/acceptance_tests/test_ConfigureScan_without_configID.json") - self.midcsp_subarray01.Configure(f.read().replace("\n", "")) + configuration_string = prepare_configuration_string("test_ConfigureScan_without_configID.json") + LOGGER.info(f"Configuring CSP subarray01") + (result_code, msg) = self.midcsp_subarray01.Configure(configuration_string) prober_obs_state = Probe(self.midcsp_subarray01, 'obsState',ObsState.FAULT, f"Failure flag is false") Poller(7, 0.2).check(prober_obs_state) obs_state = self.midcsp_subarray01.obsState diff --git a/csp-lmc-mid/tests/integration/test_ConfigureScan_basic.json b/csp-lmc-mid/tests/integration/test_ConfigureScan_basic.json index f9baaf5..51f2dd6 100644 --- a/csp-lmc-mid/tests/integration/test_ConfigureScan_basic.json +++ b/csp-lmc-mid/tests/integration/test_ConfigureScan_basic.json @@ -1,68 +1,63 @@ { "id": "sbi-mvp01-20200325-00001-science_A", - "scanID": 1, - "frequencyBand": "5a", - "band5Tuning": [5.85, 7.25], - "frequencyBandOffsetStream1": 0, - "frequencyBandOffsetStream2": 0, - "dopplerPhaseCorrSubscriptionPoint": "ska_mid/tm_leaf_node/csp_subarray_01/dopplerPhaseCorrection", + "frequencyBand": "1", "delayModelSubscriptionPoint": "ska_mid/tm_leaf_node/csp_subarray_01/delayModel", - "visDestinationAddressSubscriptionPoint": "ska_mid/tm_leaf_node/csp_subarray_01/visDestinationAddress", - "rfiFlaggingMask": {}, - "searchWindow": [ - { - "searchWindowID": 1, - "searchWindowTuning": 6000000000, - "tdcEnable": true, - "tdcNumBits": 8, - "tdcPeriodBeforeEpoch": 5, - "tdcPeriodAfterEpoch": 25, - "tdcDestinationAddress": [ - { - "tdcDestinationAddress": ["foo", "bar", "8080"] - }, - { - "receptorID": 1, - "tdcDestinationAddress": ["fizz", "buzz", "80"] - } - ] - }, - { - "searchWindowID": 2, - "searchWindowTuning": 7000000000, - "tdcEnable": false - } - ], + "fsp": [ { "fspID": 1, "functionMode": "CORR", "frequencySliceID": 1, - "corrBandwidth": 1, - "zoomWindowTuning": 4700000, + "corrBandwidth": 0, "integrationTime": 140, + "fspChannelOffset": 0, "channelAveragingMap": [ - [1, 8], - [745, 0], - [1489, 0], - [2233, 0], - [2977, 0], - [3721, 0], - [4465, 0], - [5209, 0], - [5953, 0], - [6697, 0], - [7441, 0], - [8185, 0], - [8929, 0], - [9673, 0], - [10417, 0], - [11161, 0], - [11905, 0], - [12649, 0], - [13393, 0], - [14137, 0] - ] - } + [0, 1], + [744, 1], + [1488, 1], + [2232, 1], + [2976, 1], + [3720, 1], + [4464, 1], + [5208, 1], + [5952, 1], + [6696, 1], + [7440, 1], + [8184, 1], + [8928, 1], + [9672, 1], + [10416, 1], + [11160, 1], + [11904, 1], + [12648, 1], + [13392, 1], + [14136, 1] + ], + "outputLinkMap": [ + [0, 4], + [744, 8], + [1480, 12], + [2234, 16], + [2978, 20], + [3722, 24], + [4466, 28], + [5208, 32], + [5952, 36], + [6696, 40], + [7440, 44], + [8184, 48], + [8928, 52], + [9672, 56], + [10416, 60], + [11160, 64], + [11904, 68], + [12648, 72], + [13392, 76], + [14136, 80] + ], + "outputHost": [[0, "192.168.0.1"], [8184, "192.168.0.2"]], + "outputMac": [[0, "06-00-00-00-00-01"]], + "outputPort": [[0, 9000, 1], [8184, 9000, 1]] + } ] } diff --git a/csp-lmc-mid/tests/integration/utils.py b/csp-lmc-mid/tests/integration/utils.py index 68564b3..b437ebd 100644 --- a/csp-lmc-mid/tests/integration/utils.py +++ b/csp-lmc-mid/tests/integration/utils.py @@ -33,7 +33,7 @@ class Probe: """ device_attr = self.proxy.read_attribute(self.attr_name) self.current_state = device_attr.value - LOGGER.debug("attr_name: {} current_state:{}".format(self.attr_name, self.current_state)) + #LOGGER.debug("attr_name: {} current_state:{}".format(self.attr_name, self.current_state)) def is_satisfied(self): """ diff --git a/csp-lmc-mid/tests/test_data/configScan_sub1.json b/csp-lmc-mid/tests/test_data/configScan_sub1.json new file mode 100644 index 0000000..45f56b4 --- /dev/null +++ b/csp-lmc-mid/tests/test_data/configScan_sub1.json @@ -0,0 +1,63 @@ +{ + "id": "sbi-mvp01-20200325-00001-science_A", + "frequencyBand": "1", + "delayModelSubscriptionPoint": "ska_mid/tm_leaf_node/csp_subarray01/delayModel", + + "fsp": [ + { + "fspID": 1, + "functionMode": "CORR", + "frequencySliceID": 1, + "corrBandwidth": 0, + "integrationTime": 140, + "fspChannelOffset": 0, + "channelAveragingMap": [ + [0, 1], + [744, 1], + [1488, 1], + [2232, 1], + [2976, 1], + [3720, 1], + [4464, 1], + [5208, 1], + [5952, 1], + [6696, 1], + [7440, 1], + [8184, 1], + [8928, 1], + [9672, 1], + [10416, 1], + [11160, 1], + [11904, 1], + [12648, 1], + [13392, 1], + [14136, 1] + ], + "outputLinkMap": [ + [0, 4], + [744, 8], + [1480, 12], + [2234, 16], + [2978, 20], + [3722, 24], + [4466, 28], + [5208, 32], + [5952, 36], + [6696, 40], + [7440, 44], + [8184, 48], + [8928, 52], + [9672, 56], + [10416, 60], + [11160, 64], + [11904, 68], + [12648, 72], + [13392, 76], + [14136, 80] + ], + "outputHost": [[0, "192.168.0.1"], [8184, "192.168.0.2"]], + "outputMac": [[0, "06-00-00-00-00-01"]], + "outputPort": [[0, 9000, 1], [8184, 9000, 1]] + } + ] +} diff --git a/csp-lmc-mid/tests/test_data/configScan_sub2.json b/csp-lmc-mid/tests/test_data/configScan_sub2.json new file mode 100644 index 0000000..be27a2a --- /dev/null +++ b/csp-lmc-mid/tests/test_data/configScan_sub2.json @@ -0,0 +1,63 @@ +{ + "id": "sbi-mvp01-20200325-00001-science_A", + "frequencyBand": "2", + "delayModelSubscriptionPoint": "ska_mid/tm_leaf_node/csp_subarray01/delayModel", + + "fsp": [ + { + "fspID": 1, + "functionMode": "CORR", + "frequencySliceID": 1, + "corrBandwidth": 0, + "integrationTime": 140, + "fspChannelOffset": 0, + "channelAveragingMap": [ + [0, 1], + [744, 1], + [1488, 1], + [2232, 1], + [2976, 1], + [3720, 1], + [4464, 1], + [5208, 1], + [5952, 1], + [6696, 1], + [7440, 1], + [8184, 1], + [8928, 1], + [9672, 1], + [10416, 1], + [11160, 1], + [11904, 1], + [12648, 1], + [13392, 1], + [14136, 1] + ], + "outputLinkMap": [ + [0, 4], + [744, 8], + [1480, 12], + [2234, 16], + [2978, 20], + [3722, 24], + [4466, 28], + [5208, 32], + [5952, 36], + [6696, 40], + [7440, 44], + [8184, 48], + [8928, 52], + [9672, 56], + [10416, 60], + [11160, 64], + [11904, 68], + [12648, 72], + [13392, 76], + [14136, 80] + ], + "outputHost": [[0, "192.168.0.3"], [8184, "192.168.0.4"]], + "outputMac": [[0, "06-00-00-00-00-01"]], + "outputPort": [[0, 9000, 1], [8184, 9000, 1]] + } + ] +} diff --git a/csp-lmc-mid/tests/test_data/test_ConfigureScan_ADR4.json b/csp-lmc-mid/tests/test_data/test_ConfigureScan_ADR4.json new file mode 100644 index 0000000..f3c12a6 --- /dev/null +++ b/csp-lmc-mid/tests/test_data/test_ConfigureScan_ADR4.json @@ -0,0 +1,77 @@ +{ + "id": "sbi-mvp01-20200325-00002-science_A", + "frequencyBand": "1", + "delayModelSubscriptionPoint": "ska_mid/tm_leaf_node/csp_subarray01/delayModel", + + "fsp": [ + { + "fspID": 1, + "functionMode": "CORR", + "frequencySliceID": 1, + "corrBandwidth": 0, + "integrationTime": 140, + "fspChannelOffset": 0, + "channelAveragingMap": [ + [0, 1], + [744, 1], + [1488, 1], + [2232, 1], + [2976, 1], + [3720, 1], + [4464, 1], + [5208, 1], + [5952, 1], + [6696, 1], + [7440, 1], + [8184, 1], + [8928, 1], + [9672, 1], + [10416, 1], + [11160, 1], + [11904, 1], + [12648, 1], + [13392, 1], + [14136, 1] + ], + "outputLinkMap": [ + [0, 4], + [744, 8], + [1480, 12], + [2234, 16], + [2978, 20], + [3722, 24], + [4466, 28], + [5208, 32], + [5952, 36], + [6696, 40], + [7440, 44], + [8184, 48], + [8928, 52], + [9672, 56], + [10416, 60], + [11160, 64], + [11904, 68], + [12648, 72], + [13392, 76], + [14136, 80] + ], + "outputHost": [[0, "192.168.0.1"], [8184, "192.168.0.2"]], + "outputMac": [[0, "06-00-00-00-00-01"]], + "outputPort": [[0, 9000, 1], [8184, 9000, 1]] + }, + { + "fspID":2, + "functionMode":"CORR", + "frequencySliceID":2, + "integrationTime":1400, + "corrBandwidth":1, + "channelAveragingMap":[[0,2],[744,0]], + "fspChannelOffset":744, + "outputLinkMap":[[0,4],[200,5]], + "zoomWindowTuning":650000, + "outputHost": [[0, "192.168.0.1"], [8184, "192.168.0.2"]], + "outputMac": [[0, "06-00-00-00-00-01"]], + "outputPort": [[0, 9000, 1], [8184, 9000, 1]] + } + ] +} diff --git a/csp-lmc-mid/tests/test_data/test_ConfigureScan_basic.json b/csp-lmc-mid/tests/test_data/test_ConfigureScan_basic.json new file mode 100644 index 0000000..45f56b4 --- /dev/null +++ b/csp-lmc-mid/tests/test_data/test_ConfigureScan_basic.json @@ -0,0 +1,63 @@ +{ + "id": "sbi-mvp01-20200325-00001-science_A", + "frequencyBand": "1", + "delayModelSubscriptionPoint": "ska_mid/tm_leaf_node/csp_subarray01/delayModel", + + "fsp": [ + { + "fspID": 1, + "functionMode": "CORR", + "frequencySliceID": 1, + "corrBandwidth": 0, + "integrationTime": 140, + "fspChannelOffset": 0, + "channelAveragingMap": [ + [0, 1], + [744, 1], + [1488, 1], + [2232, 1], + [2976, 1], + [3720, 1], + [4464, 1], + [5208, 1], + [5952, 1], + [6696, 1], + [7440, 1], + [8184, 1], + [8928, 1], + [9672, 1], + [10416, 1], + [11160, 1], + [11904, 1], + [12648, 1], + [13392, 1], + [14136, 1] + ], + "outputLinkMap": [ + [0, 4], + [744, 8], + [1480, 12], + [2234, 16], + [2978, 20], + [3722, 24], + [4466, 28], + [5208, 32], + [5952, 36], + [6696, 40], + [7440, 44], + [8184, 48], + [8928, 52], + [9672, 56], + [10416, 60], + [11160, 64], + [11904, 68], + [12648, 72], + [13392, 76], + [14136, 80] + ], + "outputHost": [[0, "192.168.0.1"], [8184, "192.168.0.2"]], + "outputMac": [[0, "06-00-00-00-00-01"]], + "outputPort": [[0, 9000, 1], [8184, 9000, 1]] + } + ] +} diff --git a/csp-lmc-mid/tests/test_data/test_ConfigureScan_invalid_cbf_json.json b/csp-lmc-mid/tests/test_data/test_ConfigureScan_invalid_cbf_json.json new file mode 100644 index 0000000..9a68e25 --- /dev/null +++ b/csp-lmc-mid/tests/test_data/test_ConfigureScan_invalid_cbf_json.json @@ -0,0 +1,63 @@ +{ + "id": "sbi-mvp01-20200325-00001-science_A", + "frequencyBand": "6", + "delayModelSubscriptionPoint": "ska_mid/tm_leaf_node/csp_subarray01/delayModel", + + "fsp": [ + { + "fspID": 1, + "functionMode": "CORR", + "frequencySliceID": 1, + "corrBandwidth": 0, + "integrationTime": 140, + "fspChannelOffset": 0, + "channelAveragingMap": [ + [0, 1], + [744, 1], + [1488, 1], + [2232, 1], + [2976, 1], + [3720, 1], + [4464, 1], + [5208, 1], + [5952, 1], + [6696, 1], + [7440, 1], + [8184, 1], + [8928, 1], + [9672, 1], + [10416, 1], + [11160, 1], + [11904, 1], + [12648, 1], + [13392, 1], + [14136, 1] + ], + "outputLinkMap": [ + [0, 4], + [744, 8], + [1480, 12], + [2234, 16], + [2978, 20], + [3722, 24], + [4466, 28], + [5208, 32], + [5952, 36], + [6696, 40], + [7440, 44], + [8184, 48], + [8928, 52], + [9672, 56], + [10416, 60], + [11160, 64], + [11904, 68], + [12648, 72], + [13392, 76], + [14136, 80] + ], + "outputHost": [[0, "192.168.0.1"], [8184, "192.168.0.2"]], + "outputMac": [[0, "06-00-00-00-00-01"]], + "outputPort": [[0, 9000, 1], [8184, 9000, 1]] + } + ] +} diff --git a/csp-lmc-mid/tests/test_data/test_ConfigureScan_without_configID.json b/csp-lmc-mid/tests/test_data/test_ConfigureScan_without_configID.json new file mode 100644 index 0000000..c3a9ce2 --- /dev/null +++ b/csp-lmc-mid/tests/test_data/test_ConfigureScan_without_configID.json @@ -0,0 +1,62 @@ +{ + "frequencyBand": "1", + "delayModelSubscriptionPoint": "ska_mid/tm_leaf_node/csp_subarray01/delayModel", + + "fsp": [ + { + "fspID": 1, + "functionMode": "CORR", + "frequencySliceID": 1, + "corrBandwidth": 0, + "integrationTime": 140, + "fspChannelOffset": 0, + "channelAveragingMap": [ + [0, 1], + [744, 1], + [1488, 1], + [2232, 1], + [2976, 1], + [3720, 1], + [4464, 1], + [5208, 1], + [5952, 1], + [6696, 1], + [7440, 1], + [8184, 1], + [8928, 1], + [9672, 1], + [10416, 1], + [11160, 1], + [11904, 1], + [12648, 1], + [13392, 1], + [14136, 1] + ], + "outputLinkMap": [ + [0, 4], + [744, 8], + [1480, 12], + [2234, 16], + [2978, 20], + [3722, 24], + [4466, 28], + [5208, 32], + [5952, 36], + [6696, 40], + [7440, 44], + [8184, 48], + [8928, 52], + [9672, 56], + [10416, 60], + [11160, 64], + [11904, 68], + [12648, 72], + [13392, 76], + [14136, 80] + ], + "outputHost": [[0, "192.168.0.1"], [8184, "192.168.0.2"]], + "outputMac": [[0, "06-00-00-00-00-01"]], + "outputPort": [[0, 9000, 1], [8184, 9000, 1]] + } + ] +} diff --git a/csp-lmc-mid/tests/test_data/test_ConfigureScan_without_outputlink.json b/csp-lmc-mid/tests/test_data/test_ConfigureScan_without_outputlink.json new file mode 100644 index 0000000..61a121b --- /dev/null +++ b/csp-lmc-mid/tests/test_data/test_ConfigureScan_without_outputlink.json @@ -0,0 +1,41 @@ +{ + "id": "sbi-mvp01-20200325-00001-science_A", + "frequencyBand": "1", + "delayModelSubscriptionPoint": "ska_mid/tm_leaf_node/csp_subarray01/delayModel", + + "fsp": [ + { + "fspID": 1, + "functionMode": "CORR", + "frequencySliceID": 1, + "corrBandwidth": 0, + "integrationTime": 140, + "fspChannelOffset": 0, + "channelAveragingMap": [ + [0, 1], + [744, 1], + [1488, 1], + [2232, 1], + [2976, 1], + [3720, 1], + [4464, 1], + [5208, 1], + [5952, 1], + [6696, 1], + [7440, 1], + [8184, 1], + [8928, 1], + [9672, 1], + [10416, 1], + [11160, 1], + [11904, 1], + [12648, 1], + [13392, 1], + [14136, 1] + ], + "outputHost": [[0, "192.168.0.1"], [8184, "192.168.0.2"]], + "outputMac": [[0, "06-00-00-00-00-01"]], + "outputPort": [[0, 9000, 1], [8184, 9000, 1]] + } + ] +} diff --git a/csp-lmc-mid/tests/unit/midcspsubarray_unit_test.py b/csp-lmc-mid/tests/unit/midcspsubarray_unit_test.py index db56b1d..b920637 100644 --- a/csp-lmc-mid/tests/unit/midcspsubarray_unit_test.py +++ b/csp-lmc-mid/tests/unit/midcspsubarray_unit_test.py @@ -1097,7 +1097,7 @@ def raise_exception(command_name): def load_json_file(file_name): print(file_path) print(os.path.dirname(__file__)) - path= os.path.join(os.path.dirname(__file__), '../acceptance_tests' , file_name) + path= os.path.join(os.path.dirname(__file__), '../test_data' , file_name) with open(path, 'r') as f: configuration_string = f.read().replace("\n", "") return configuration_string diff --git a/csp-lmc-mid/tests/unit/utils.py b/csp-lmc-mid/tests/unit/utils.py index 6d90a73..c65e226 100644 --- a/csp-lmc-mid/tests/unit/utils.py +++ b/csp-lmc-mid/tests/unit/utils.py @@ -33,7 +33,7 @@ class Probe: """ device_attr = self.proxy.read_attribute(self.attr_name) self.current_state = device_attr.value - LOGGER.info("attr_name: {} current_state:{}".format(self.attr_name, self.current_state)) + #LOGGER.info("attr_name: {} current_state:{}".format(self.attr_name, self.current_state)) def is_satisfied(self): """ diff --git a/csp-lmc-mid/tools/adr8_cbf_plot.py b/csp-lmc-mid/tools/adr8_cbf_plot.py new file mode 100644 index 0000000..b130349 --- /dev/null +++ b/csp-lmc-mid/tools/adr8_cbf_plot.py @@ -0,0 +1,138 @@ +from threading import Thread +import tango +import time +import collections +import matplotlib.pyplot as plt +import matplotlib.animation as animation +from matplotlib.widgets import Button +#import struct +from tango import EventType + + +class attributePlot: + def __init__(self, plotLength = 100, device='mid_csp/elt/subarray_01'): + self.plotMaxLength = plotLength + self.data = collections.deque([0] * plotLength, maxlen=plotLength) + self.cbf_data = collections.deque([0] * plotLength, maxlen=plotLength) + self.test_number = 0 + self.previous_test_num = 0 + self.plotTimer = 0 + self.previousTimer = 0 + self.proxy = 0 + self.proxy_cbf = 0 + self.device = device + self.obs_state = 0 + self.cbf_obs_state = 0 + self.anim = None + try: + self.proxy = tango.DeviceProxy("mid_csp/elt/subarray_01") + self.cbf_proxy = tango.DeviceProxy("mid_csp_cbf/sub_elt/subarray_01") + self.proxy.testNumber = 0 + print('Connected to device {}'.format(device)) + except: + print("Failed to connect to device {}".format(device) ) + + def readAttributeStart(self): + if self.proxy: + self.proxy.subscribe_event("obsState", tango.EventType.CHANGE_EVENT, + self.attributes_change_evt_cb, + stateless=False) + self.proxy.subscribe_event("testNumber", tango.EventType.CHANGE_EVENT, + self.attributes_change_evt_cb, + stateless=False) + if self.cbf_proxy: + self.cbf_proxy.subscribe_event("obsState", tango.EventType.CHANGE_EVENT, + self.attributes_change_evt_cb, + stateless=False) + + def getAttributeData(self, frame, lines, cbf_lines, lineValueText, lineLabel, timeText): + currentTimer = time.perf_counter() + self.plotTimer = int((currentTimer - self.previousTimer) * 1000) # the first reading will be erroneous + self.previousTimer = currentTimer + #timeText.set_text('Plot Interval = ' + str(self.plotTimer) + 'ms') + self.data.append(self.obs_state) # we get the latest data point and append it to our array + self.cbf_data.append(self.cbf_obs_state) + lines.set_data(range(self.plotMaxLength), self.data) + cbf_lines.set_data(range(self.plotMaxLength), self.cbf_data) + #lineValueText.set_text('[' + lineLabel + '] = ' + str(self.obs_state)) + if self.test_number != self.previous_test_num: + lineValueText.set_text('[Test number] = ' + str(self.test_number)) + + def attributes_change_evt_cb(self, evt): + dev_name = evt.device.dev_name() + if not evt.err: + try: + if evt.attr_value.name.lower() == "obsstate": + if 'cbf' in dev_name: + self.cbf_obs_state = evt.attr_value.value + self.cbf_data.append(self.cbf_obs_state) + self.cbf_data.append(self.cbf_obs_state) + self.data.append(self.obs_state) + self.data.append(self.obs_state) + else : + self.obs_state = evt.attr_value.value + # we get the latest data point and append it to our array + self.data.append(self.obs_state) + self.data.append(self.obs_state) + self.cbf_data.append(self.cbf_obs_state) + self.cbf_data.append(self.cbf_obs_state) + if evt.attr_value.name.lower() == "testnumber": + self.previous_test_num = self.test_number + self.test_number = evt.attr_value.value + #print("Received event on {}/{}: {}".format(dev_name, + # str(evt.attr_value.name), + # str(evt.attr_value.value))) + except tango.DevFailed as df: + self.logger.error(str(df.args[0].desc)) + except Exception as except_occurred: + self.logger.error(str(except_occurred)) + else: + for item in evt.errors: + if item.reason == "API_EventTimeout": + print("API_EventTimeout") + def on_press(self, event): + if event.key == 'x': + self.anim.event_source.stop() + if event.key == 'z': + self.anim.event_source.start() + if event.key == 'escape': + exit() + +def main(): + maxPlotLength = 200 + s = attributePlot(maxPlotLength, 'mid_csp/elt/subarray_01') # initializes all required variables + s.readAttributeStart() # starts background thread + + # plotting starts below + pltInterval = 300 # Period at which the plot animation updates [ms] + xmin = 0 + xmax = maxPlotLength + ymin = -1 + ymax = 12 + fig = plt.figure("MID CSP Subarray ADR-8 transitions") + fig.set_size_inches(18.5, 8.5) + ax = plt.axes(xlim=(xmin, xmax), ylim=(ymin, ymax )) + plt.grid() + ax.set_title('obsState real-time graph') + ax.set_xlabel("time") + ax.set_ylabel("obsState") + plt.yticks(range(11), ('EMPTY', 'RESOURCING', 'IDLE', 'CONFIGURING', 'READY', 'SCANNING', 'ABORTING', 'ABORTED', 'RESETTING', 'FAULT', 'RESTARTING')) + + lineLabel = 'CSP obsState' + cbflineLabel = 'CBF obsState' + timeText = ax.text(0.50, 0.95, '', transform=ax.transAxes) + lines = ax.plot([], [], label=lineLabel)[0] + lineValueText = ax.text(0.50, 0.90, '', transform=ax.transAxes) + cbf_lines = ax.plot([], [], 'r-', label=cbflineLabel)[0] + fig.canvas.mpl_connect('key_press_event', s.on_press) + #s.anim = animation.FuncAnimation(fig, s.getAttributeData, fargs=(lines, lineValueText, lineLabel, timeText), interval=pltInterval) # fargs has to be a tuple + s.anim = animation.FuncAnimation(fig, s.getAttributeData, fargs=(lines, cbf_lines, lineValueText, lineLabel, ''), interval=pltInterval) # fargs has to be a tuple + plt.legend(loc="upper left") + plt.show() + exit() + + + +if __name__ == '__main__': + main() + diff --git a/csp-lmc-mid/tools/adr8_plot.py b/csp-lmc-mid/tools/adr8_plot.py new file mode 100644 index 0000000..06eed2f --- /dev/null +++ b/csp-lmc-mid/tools/adr8_plot.py @@ -0,0 +1,119 @@ +from threading import Thread +import tango +import time +import collections +import matplotlib.pyplot as plt +import matplotlib.animation as animation +from matplotlib.widgets import Button +#import struct +from tango import EventType + + +class attributePlot: + def __init__(self, plotLength = 100, device='mid_csp/elt/subarray_01'): + self.plotMaxLength = plotLength + self.data = collections.deque([0] * plotLength, maxlen=plotLength) + self.test_number = 0 + self.previous_test_num = 0 + self.plotTimer = 0 + self.previousTimer = 0 + self.proxy = 0 + self.device = device + self.anim = None + try: + self.proxy = tango.DeviceProxy("mid_csp/elt/subarray_01") + self.proxy.testNumber = 0 + print('Connected to device {}'.format(device)) + except: + print("Failed to connect to device {}".format(device) ) + + def readAttributeStart(self): + if self.proxy: + self.proxy.subscribe_event("obsState", tango.EventType.CHANGE_EVENT, + self.attributes_change_evt_cb, + stateless=False) + self.proxy.subscribe_event("testNumber", tango.EventType.CHANGE_EVENT, + self.attributes_change_evt_cb, + stateless=False) + + def getAttributeData(self, frame, lines, lineValueText, lineLabel, timeText): + currentTimer = time.perf_counter() + self.plotTimer = int((currentTimer - self.previousTimer) * 1000) # the first reading will be erroneous + self.previousTimer = currentTimer + #timeText.set_text('Plot Interval = ' + str(self.plotTimer) + 'ms') + self.data.append(self.obs_state) # we get the latest data point and append it to our array + #plt.annotate(test_label, # this is the text + # (x, 5), # this is the point to label + # textcoords="offset points", # how to position the text + # xytext=(0,10), # distance from text to points (x,y) + # ha='center') + lines.set_data(range(self.plotMaxLength), self.data) + #lineValueText.set_text('[' + lineLabel + '] = ' + str(self.obs_state)) + if self.test_number != self.previous_test_num: + lineValueText.set_text('[Test number] = ' + str(self.test_number)) + def attributes_change_evt_cb(self, evt): + dev_name = evt.device.dev_name() + if not evt.err: + try: + if evt.attr_value.name.lower() == "obsstate": + self.obs_state = evt.attr_value.value + self.data.append(self.obs_state) # we get the latest data point and append it to our array + self.data.append(self.obs_state) # we get the latest data point and append it to our array + if evt.attr_value.name.lower() == "testnumber": + self.previous_test_num = self.test_number + self.test_number = evt.attr_value.value + #print("Received event on {}/{}: {}".format(dev_name, + # str(evt.attr_value.name), + # str(evt.attr_value.value))) + except tango.DevFailed as df: + self.logger.error(str(df.args[0].desc)) + except Exception as except_occurred: + self.logger.error(str(except_occurred)) + else: + for item in evt.errors: + if item.reason == "API_EventTimeout": + print("API_EventTimeout") + def on_press(self, event): + if event.key == 'x': + self.anim.event_source.stop() + if event.key == 'z': + self.anim.event_source.start() + if event.key == 'escape': + exit() + +def main(): + maxPlotLength = 200 + s = attributePlot(maxPlotLength, 'mid_csp/elt/subarray_01') # initializes all required variables + s.readAttributeStart() # starts background thread + + # plotting starts below + pltInterval = 100 # Period at which the plot animation updates [ms] + xmin = 0 + xmax = maxPlotLength + ymin = -1 + ymax = 12 + fig = plt.figure("MID CSP Subarray ADR-8 transitions") + fig.set_size_inches(18.5, 8.5) + ax = plt.axes(xlim=(xmin, xmax), ylim=(ymin, ymax )) + plt.grid() + ax.set_title('obsState real-time graph') + ax.set_xlabel("time") + ax.set_ylabel("obsState") + plt.yticks(range(11), ('EMPTY', 'RESOURCING', 'IDLE', 'CONFIGURING', 'READY', 'SCANNING', 'ABORTING', 'ABORTED', 'RESETTING', 'FAULT', 'RESTARTING')) + + lineLabel = 'obsState' + timeText = ax.text(0.50, 0.95, '', transform=ax.transAxes) + lines = ax.plot([], [], label=lineLabel)[0] + lineValueText = ax.text(0.50, 0.90, '', transform=ax.transAxes) + fig.canvas.mpl_connect('key_press_event', s.on_press) + #s.anim = animation.FuncAnimation(fig, s.getAttributeData, fargs=(lines, lineValueText, lineLabel, timeText), interval=pltInterval) # fargs has to be a tuple + s.anim = animation.FuncAnimation(fig, s.getAttributeData, fargs=(lines, lineValueText, lineLabel, ''), interval=pltInterval) # fargs has to be a tuple + plt.legend(loc="upper left") + plt.show() + exit() + + + +if __name__ == '__main__': + main() + -- GitLab From 35576f0283a62fe08c602ea6147f9725797bc645 Mon Sep 17 00:00:00 2001 From: toor Date: Thu, 17 Sep 2020 08:58:13 +0200 Subject: [PATCH 12/43] CT-147: try to fix problem in running test pipeline --- csp-lmc-mid/.gitlab-ci.yml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/csp-lmc-mid/.gitlab-ci.yml b/csp-lmc-mid/.gitlab-ci.yml index 28cfc4a..9772346 100644 --- a/csp-lmc-mid/.gitlab-ci.yml +++ b/csp-lmc-mid/.gitlab-ci.yml @@ -103,21 +103,13 @@ integration:csp-lmc-mid: tags: - auto-k8sv2 extends: .test - image: nexus.engageska-portugal.pt/ska-docker/ska-python-buildenv:latest + image: nexus.engageska-portugal.pt/ska-docker/deploy:0.4.1 script: - - curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.18.2/bin/linux/amd64/kubectl - - chmod +x ./kubectl - - sudo mv ./kubectl /usr/local/bin/kubectl - - curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - - chmod 700 get_helm.sh - - ./get_helm.sh - - kubectl get pod --all-namespaces - - kubectl get namespaces - cd $BUILD_PATH - - export KUBE_NAMESPACE="ci-$CI_COMMIT_SHORT_SHA" - make k8s_test + environment: + name: test after_script: - - export KUBE_NAMESPACE="ci-$CI_COMMIT_SHORT_SHA" - cd $BUILD_PATH - pwd - make delete -- GitLab From c949b9fffd0538d92545f182e57d0cf6b0b03af1 Mon Sep 17 00:00:00 2001 From: Matteo Di Carlo Date: Thu, 17 Sep 2020 07:23:27 +0000 Subject: [PATCH 13/43] update tango-base --- csp-lmc-mid/charts/mid-csp/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csp-lmc-mid/charts/mid-csp/Chart.yaml b/csp-lmc-mid/charts/mid-csp/Chart.yaml index 5befbd7..12a2909 100644 --- a/csp-lmc-mid/charts/mid-csp/Chart.yaml +++ b/csp-lmc-mid/charts/mid-csp/Chart.yaml @@ -6,7 +6,7 @@ version: 0.1.0 icon: https://www.skatelescope.org/wp-content/uploads/2016/07/09545_NEW_LOGO_2014.png dependencies: - name: tango-base - version: 0.1.1 + version: 0.1.2 repository: https://gitlab.com/ska-telescope/skampi/-/raw/master/repository condition: tango-base.enabled - name: csp-proto -- GitLab From 31b8542431c4113de75dca4618cf82c0ed6ddf60 Mon Sep 17 00:00:00 2001 From: toor Date: Thu, 17 Sep 2020 10:03:44 +0200 Subject: [PATCH 14/43] CT-147: updated import in unit tests --- .../tests/unit/midcspsubarray_unit_test.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/csp-lmc-mid/tests/unit/midcspsubarray_unit_test.py b/csp-lmc-mid/tests/unit/midcspsubarray_unit_test.py index b920637..8fb9c1a 100644 --- a/csp-lmc-mid/tests/unit/midcspsubarray_unit_test.py +++ b/csp-lmc-mid/tests/unit/midcspsubarray_unit_test.py @@ -15,7 +15,7 @@ from tango import DevState, DevFailed, DeviceProxy import csp_lmc_common import csp_lmc_mid from utils import Probe, Poller -from csp_lmc_common.CspSubarray import CspSubarray +from csp_lmc_common import CspSubarray from csp_lmc_mid.MidCspSubarrayBase import MidCspSubarrayBase file_path = os.path.dirname(os.path.abspath(__file__)) @@ -549,7 +549,7 @@ def test_midcspsubarray_obsstate_AFTER_cbfsubarray_fault_during_configuration(): #cbf_subarray_device_proxy_mock.Configure.side_effect = return_failed with mock.patch('csp_lmc_mid.MidCspSubarrayBase.MidCspSubarrayBase.AddReceptorsCommand.do') as mock_do,\ mock.patch('csp_lmc_mid.MidCspSubarrayBase.MidCspSubarrayBase.OnCommand.do') as mock_on_do,\ - mock.patch('csp_lmc_common.CspSubarray.CspSubarray._get_expected_delay') as mock_delay_expected,\ + mock.patch('csp_lmc_common.CspSubarray._get_expected_delay') as mock_delay_expected,\ mock.patch('csp_lmc_mid.MidCspSubarrayBase.MidCspSubarrayBase.__len__') as mock_len: mock_len.return_value = len(receptor_list) mock_do.return_value = (ResultCode.OK, "AddReceptors OK") @@ -597,7 +597,7 @@ def test_midcspsubarray_obsstate_AFTER_abort_request_during_configuration(): cbf_subarray_device_proxy_mock.Abort.side_effect = return_ok with mock.patch('csp_lmc_mid.MidCspSubarrayBase.MidCspSubarrayBase.AddReceptorsCommand.do') as mock_do,\ mock.patch('csp_lmc_mid.MidCspSubarrayBase.MidCspSubarrayBase.OnCommand.do') as mock_on_do,\ - mock.patch('csp_lmc_common.CspSubarray.CspSubarray._get_expected_delay') as mock_delay_expected,\ + mock.patch('csp_lmc_common.CspSubarray._get_expected_delay') as mock_delay_expected,\ mock.patch('csp_lmc_mid.MidCspSubarrayBase.MidCspSubarrayBase.__len__') as mock_len: mock_len.return_value = len(receptor_list) mock_do.return_value = (ResultCode.OK, "AddReceptors OK") @@ -645,7 +645,7 @@ def test_midcspsubarray_obsstate_WHEN_cbfsubarray_is_in_fault_during_abort_reque #cbf_subarray_device_proxy_mock.Abort.side_effect = return_failed with mock.patch('csp_lmc_mid.MidCspSubarrayBase.MidCspSubarrayBase.AddReceptorsCommand.do') as mock_do,\ mock.patch('csp_lmc_mid.MidCspSubarrayBase.MidCspSubarrayBase.OnCommand.do') as mock_on_do,\ - mock.patch('csp_lmc_common.CspSubarray.CspSubarray._get_expected_delay') as mock_delay_expected,\ + mock.patch('csp_lmc_common.CspSubarray._get_expected_delay') as mock_delay_expected,\ mock.patch('csp_lmc_mid.MidCspSubarrayBase.MidCspSubarrayBase.__len__') as mock_len: mock_len.return_value = len(receptor_list) mock_do.return_value = (ResultCode.OK, "AddReceptors OK") @@ -700,7 +700,7 @@ def test_midcspsubarray_obsstate_WHEN_abort_invoked_in_resetting(): #cbf_subarray_device_proxy_mock.Abort.side_effect = return_failed with mock.patch('csp_lmc_mid.MidCspSubarrayBase.MidCspSubarrayBase.AddReceptorsCommand.do') as mock_do,\ mock.patch('csp_lmc_mid.MidCspSubarrayBase.MidCspSubarrayBase.OnCommand.do') as mock_on_do,\ - mock.patch('csp_lmc_common.CspSubarray.CspSubarray._get_expected_delay') as mock_delay_expected,\ + mock.patch('csp_lmc_common.CspSubarray._get_expected_delay') as mock_delay_expected,\ mock.patch('csp_lmc_mid.MidCspSubarrayBase.MidCspSubarrayBase.__len__') as mock_len: mock_len.return_value = len(receptor_list) mock_do.return_value = (ResultCode.OK, "AddReceptors OK") @@ -751,7 +751,7 @@ def test_midcspsubarray_obsstate_WHEN_restart_invoked_after_cspsubarray_aborted( proxies_to_mock=proxies_to_mock) as tango_context: with mock.patch('csp_lmc_mid.MidCspSubarrayBase.MidCspSubarrayBase.AddReceptorsCommand.do') as mock_do,\ mock.patch('csp_lmc_mid.MidCspSubarrayBase.MidCspSubarrayBase.OnCommand.do') as mock_on_do,\ - mock.patch('csp_lmc_common.CspSubarray.CspSubarray._get_expected_delay') as mock_delay_expected,\ + mock.patch('csp_lmc_common.CspSubarray._get_expected_delay') as mock_delay_expected,\ mock.patch('csp_lmc_mid.MidCspSubarrayBase.MidCspSubarrayBase.__len__') as mock_len: mock_len.return_value = len(receptor_list) mock_do.return_value = (ResultCode.OK, "AddReceptors OK") @@ -829,7 +829,7 @@ def test_midcspsubarray_obsstate_WHEN_cbfsubarray_abort_returns_failed(): cbf_subarray_device_proxy_mock.Abort.side_effect = return_failed with mock.patch('csp_lmc_mid.MidCspSubarrayBase.MidCspSubarrayBase.AddReceptorsCommand.do') as mock_do,\ mock.patch('csp_lmc_mid.MidCspSubarrayBase.MidCspSubarrayBase.OnCommand.do') as mock_on_do,\ - mock.patch('csp_lmc_common.CspSubarray.CspSubarray._get_expected_delay') as mock_delay_expected,\ + mock.patch('csp_lmc_common.CspSubarray._get_expected_delay') as mock_delay_expected,\ mock.patch('csp_lmc_mid.MidCspSubarrayBase.MidCspSubarrayBase.__len__') as mock_len: mock_len.return_value = len(receptor_list) mock_do.return_value = (ResultCode.OK, "AddReceptors OK") @@ -875,7 +875,7 @@ def test_midcspsubarray_obsstate_WHEN_timeout_in_abort_request_during_configurin proxies_to_mock=proxies_to_mock) as tango_context: with mock.patch('csp_lmc_mid.MidCspSubarrayBase.MidCspSubarrayBase.AddReceptorsCommand.do') as mock_do,\ mock.patch('csp_lmc_mid.MidCspSubarrayBase.MidCspSubarrayBase.OnCommand.do') as mock_on_do,\ - mock.patch('csp_lmc_common.CspSubarray.CspSubarray._get_expected_delay') as mock_delay_expected,\ + mock.patch('csp_lmc_common.CspSubarray._get_expected_delay') as mock_delay_expected,\ mock.patch('csp_lmc_mid.MidCspSubarrayBase.MidCspSubarrayBase.__len__') as mock_len: mock_len.return_value = len(receptor_list) mock_do.return_value = (ResultCode.OK, "AddReceptors OK") -- GitLab From 9616977ac4c7206b5ab28660d801026ee552c738 Mon Sep 17 00:00:00 2001 From: toor Date: Thu, 17 Sep 2020 10:22:32 +0200 Subject: [PATCH 15/43] CT-147: modified k8s.mk file to delete the charts repo --- csp-lmc-mid/.make/k8s.mk | 7 +++++++ .../charts/mid-csp/charts/csp-proto-0.5.3.tgz | Bin 10344 -> 0 bytes .../charts/mid-csp/charts/tango-base-0.1.1.tgz | Bin 8849 -> 0 bytes csp-lmc-mid/charts/mid-csp/requirements.lock | 9 --------- csp-lmc-mid/docker/.make/Makefile.mk | 5 ++++- csp-lmc-mid/docker/Dockerfile | 10 ---------- 6 files changed, 11 insertions(+), 20 deletions(-) delete mode 100644 csp-lmc-mid/charts/mid-csp/charts/csp-proto-0.5.3.tgz delete mode 100644 csp-lmc-mid/charts/mid-csp/charts/tango-base-0.1.1.tgz delete mode 100644 csp-lmc-mid/charts/mid-csp/requirements.lock delete mode 100644 csp-lmc-mid/docker/Dockerfile diff --git a/csp-lmc-mid/.make/k8s.mk b/csp-lmc-mid/.make/k8s.mk index 15673e2..52d4501 100644 --- a/csp-lmc-mid/.make/k8s.mk +++ b/csp-lmc-mid/.make/k8s.mk @@ -30,6 +30,13 @@ deploy: namespace mkcerts depends ## deploy the helm chart delete: ## delete the helm chart release @helm uninstall $(HELM_RELEASE) --namespace $(KUBE_NAMESPACE) + # if charts deployed locally, remove the repo charts files + # created in charts/mid-csp/charts directory + @if [ "a"$(CI_JOB_ID) == "a" ]; then \ + find ./charts -type f -name "tango*" -delete; \ + find ./charts -type f -name "csp-proto*" -delete; \ + find ./charts -type f -name "requirements.lock" -delete; \ + fi install: namespace mkcerts ## install the helm chart @helm install $(HELM_RELEASE) charts/$(HELM_CHART)/ \ diff --git a/csp-lmc-mid/charts/mid-csp/charts/csp-proto-0.5.3.tgz b/csp-lmc-mid/charts/mid-csp/charts/csp-proto-0.5.3.tgz deleted file mode 100644 index d1d4bcbed9648603e72a4e5703b208477035e334..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10344 zcmb2|<`7{3f&ZEe+KC=P2FV`2Wc9~&VH(_68ZOFUsm>#{- zg^en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zr9OSlsy?vjmh;Nfn->*oFL}4**4!g$-B-VVdU|#7t-8H=SGkYusQG$rrP_&$$@5&A z?oHB*=k|}NsaWO_{iOTIY=fCAgd1mGY10Wm_Q$~fdiYbN>wEWv-0J*wH+6NfYnjyalLuc%blRKe=dC+#GuKzYwYqWQMU%l&6 zHcz1X^f&j9JS};A>&@5u)=yYvE_@Ow<%;CB^Jy`6%Do#u^Zol>e@aejl}uGXI@^iM zZ_}?}R$d-G_eoywr!JH`IXlV8q|jX3?vm2?9JSuxNv*rI1X9)FuJstM=iQuHw`lL) zuJ2n9KCb>ex8{*=Sy6h7R@%ZJHN}RzPItBjCQW*`r_XbtuGnkSiz~!9eoj>jUVN?g zxn!L2%J$psM|iv6{rVEU(0x^T$-jNeV(;3=Ez_S75-xY4_x7tNFBjff`1wN3UIVNA zBTJ_5c(9BAP`2v9?``6mTkrbc3-$*Hnz5aT3#D&w> zRs}j5i?Ai1V0N6eFmwTf`aqlaCV(8$rIS4 zP{H}q$oOP~M_Z3T^06beXD4hZeO&)|I(6`%V`S;l}-)=*fDKnQPEm9DAs?;t2Q8A>wFf8ctFP877qDLfS`-?s5CyKsv zo%mzNL!T(c`X0m*xzdB)w4I(=4hMTuivxke2%$+=i4hMO|M7V-FdY8$Arsi z*Gdv{clH_YZ7qJZV2-e0(*wcfE1Oi(nxu2f!n@9K=(EX)E>2!4u{C+ZN-6&6fHs+H zJk}RI4Vn~Ie!G(R_s}e!x%tYAcz#^p&zZDO(vX?M`-8c#lFe4}<+CLnmUFo1$_zi-E`_k{aYs!jpu8gvoLI0;-MY#k~Or-ZR$UtseVgy lSDm|`xlr?J@Os{dqHzzuR>%L>XJGjM|5x9NRSee{830HhW6l5o diff --git a/csp-lmc-mid/charts/mid-csp/charts/tango-base-0.1.1.tgz b/csp-lmc-mid/charts/mid-csp/charts/tango-base-0.1.1.tgz deleted file mode 100644 index 6d0e8bb6e5af17fbce9a65c7bb492593f301a9ff..0000000000000000000000000000000000000000 GIT binary patch literal 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m0Ct!dZS`0prN-f$9T~$AC4^ZxgHzl#C4oid&QvtqI

z;Qo^zwwFe^daSzheG1dLUhm|$V$Zl|Zre1atI*46-PtVe@2k!xX=<4+4QkBI{QNS- z;Phu*Q_ZhzIe||;tzFlay7$25(0zxlx%q70mUSU&`rP2Fn^Io9{mIZTGfi~!ywzo| ze~P{{dzWl;O*p2ggS%+IaI{ZVxQXwLAVqhr(=Jb~qAsew+Ls;oZR*c8Qs<>NcAc26 z-W#YYDSOAnT6*0)+xXC%#T*(w%nCdI43)}XXcKa zHDMpQ9areyv|G}Qk3HR}~8ub7q`J|lfPN@ntDC&g>$%{d=h37oBb zwMX^!^WMVzGE?8){FH|=M%GKuq#9TDYMBP+`plAa^j})Q>FT}rmq+Zkbt1c}v|U)I z>^>J`zVdd~rk?gY3oZuczfO~Vc0T#zvQ@6aN}DBA*i^U1&zil}?(Ei8mWJkg)S1h| zl2=__{YiAc%xT@Mi#dHoD`#ArCcO2UPU+dlg}cmRzIqikt&BgKCpl&3)1av*RUO zZhe08UbO7a{|a{jHH%$)MPIy|I=`t(@89&E%Ll*Ck9hRu?{ag-)%l6RO7FhEmuX~9 zckH-zhvU^9mlr!Nt_QJot+AgY%O-S^$>y3*B!h(DdDbw7mBlA7gs`q;IkQml;KCk; ziw!OY7sRwCTrtp}JwxH}zoI={qUo!z|0>$@^{M~2qY)P*ypA*+(|V(Jd!<0~lbvEZ zd-nb0uHJwBc}<7h>yG|4t3@}~=f3y;J@cPx)0N5xT!u>~>3qm_u6#6U-C5Jv-S4kd x9ob*J_*z@Tf{)9t2Bn5NoYqNLad}61lkl7e-3R~kGcf%BZ+0!olHm;l0|3!MxpDvi diff --git a/csp-lmc-mid/charts/mid-csp/requirements.lock b/csp-lmc-mid/charts/mid-csp/requirements.lock deleted file mode 100644 index 960fbce..0000000 --- a/csp-lmc-mid/charts/mid-csp/requirements.lock +++ /dev/null @@ -1,9 +0,0 @@ -dependencies: -- name: tango-base - repository: https://gitlab.com/ska-telescope/skampi/-/raw/master/repository - version: 0.1.1 -- name: csp-proto - repository: file://../csp-proto - version: 0.5.3 -digest: sha256:f1b7d43a364ae0179be5951171251ee99fac77741e03b381285b28a6cdcb6167 -generated: "2020-09-11T11:08:19.206867376+02:00" diff --git a/csp-lmc-mid/docker/.make/Makefile.mk b/csp-lmc-mid/docker/.make/Makefile.mk index 323b970..2925ad0 100644 --- a/csp-lmc-mid/docker/.make/Makefile.mk +++ b/csp-lmc-mid/docker/.make/Makefile.mk @@ -20,7 +20,7 @@ else NAME=$(PROJECT) endif -RELEASE_SUPPORT := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))/.make-release-support +RELEASE_SUPPORT := $(shell cp ../.release . ;dirname $(abspath $(lastword $(MAKEFILE_LIST))))/.make-release-support ifeq ($(strip $(DOCKER_REGISTRY_HOST)),) DOCKER_REGISTRY_HOST = nexus.engageska-portugal.pt @@ -57,7 +57,10 @@ build: pre-build docker-build post-build ## build the application image pre-build: cp ../.release . + cp ../Dockerfile . post-build: + rm .release + rm Dockerfile pre-push: diff --git a/csp-lmc-mid/docker/Dockerfile b/csp-lmc-mid/docker/Dockerfile deleted file mode 100644 index 2456a5e..0000000 --- a/csp-lmc-mid/docker/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -FROM nexus.engageska-portugal.pt/ska-docker/ska-python-buildenv:9.3.2 AS buildenv -FROM nexus.engageska-portugal.pt/ska-docker/ska-python-runtime:9.3.2 AS runtime - -# create ipython profile to so that itango doesn't fail if ipython hasn't run yet -RUN ipython profile create - -ENV PATH=/home/tango/.local/bin:$PATH -RUN python3 -m pip install . --extra-index-url https://nexus.engageska-portugal.pt/repository/pypi/simple - -CMD ["/venv/bin/python","/app/csp_lmc_mid/MidCspMaster.py"] -- GitLab From 8ee60c9819827dc4b5898079af85788d160d5b81 Mon Sep 17 00:00:00 2001 From: toor Date: Thu, 17 Sep 2020 10:43:44 +0200 Subject: [PATCH 16/43] CT-147: tag the image with only the base version. Changed the tag in csp-proto chart values.yaml --- csp-lmc-mid/.make/release.mk | 5 +++++ csp-lmc-mid/charts/csp-proto/values.yaml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/csp-lmc-mid/.make/release.mk b/csp-lmc-mid/.make/release.mk index 1abb8f1..66dbc7b 100644 --- a/csp-lmc-mid/.make/release.mk +++ b/csp-lmc-mid/.make/release.mk @@ -33,6 +33,7 @@ IMAGE=$(DOCKER_REGISTRY_HOST)/$(DOCKER_REGISTRY_USER)/$(NAME) VERSION=$(shell . $(RELEASE_SUPPORT) ; getVersion) TAG=$(shell . $(RELEASE_SUPPORT); getTag) +BASE_RELEASE=$(shell . $(RELEASE_SUPPORT) ;getRelease) SHELL=/bin/bash @@ -59,8 +60,12 @@ docker-build: .release if [ $$DOCKER_MAJOR -eq 1 ] && [ $$DOCKER_MINOR -lt 10 ] ; then \ echo docker tag -f $(IMAGE):$(VERSION) $(IMAGE):latest ;\ docker tag -f $(IMAGE):$(VERSION) $(IMAGE):latest ;\ + echo docker tag $(IMAGE):$(VERSION) $(IMAGE):$(BASE_RELEASE) ;\ + docker tag $(IMAGE):$(VERSION) $(IMAGE):$(BASE_RELEASE) ;\ else \ echo docker tag $(IMAGE):$(VERSION) $(IMAGE):latest ;\ + echo docker tag $(IMAGE):$(VERSION) $(IMAGE):$(BASE_RELEASE) ;\ + docker tag $(IMAGE):$(VERSION) $(IMAGE):$(BASE_RELEASE) ;\ docker tag $(IMAGE):$(VERSION) $(IMAGE):latest ; \ fi diff --git a/csp-lmc-mid/charts/csp-proto/values.yaml b/csp-lmc-mid/charts/csp-proto/values.yaml index 0224b03..26ce0e0 100644 --- a/csp-lmc-mid/charts/csp-proto/values.yaml +++ b/csp-lmc-mid/charts/csp-proto/values.yaml @@ -14,7 +14,7 @@ csplmc: image: registry: nexus.engageska-portugal.pt/ska-docker image: mid-csp-lmc - tag: latest + tag: 0.6.9 pullPolicy: IfNotPresent deviceServers: -- GitLab From a0580917c02fc929fc8f4b4725b75f01325dce93 Mon Sep 17 00:00:00 2001 From: toor Date: Thu, 17 Sep 2020 11:09:37 +0200 Subject: [PATCH 17/43] CT-147: commit the mid-csp image before testing. Imaged tagged with base version (x.y.z) and pushed always --- .gitlab-ci.yml | 2 +- csp-lmc-mid/.gitlab-ci.yml | 4 ---- csp-lmc-mid/.make/release.mk | 4 ++-- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bebdd60..d6e5125 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -42,9 +42,9 @@ stages: - publish_common - build - linting + - publish - test - pages - - publish - release .install_pip: &install_pip |- diff --git a/csp-lmc-mid/.gitlab-ci.yml b/csp-lmc-mid/.gitlab-ci.yml index 9772346..2deb066 100644 --- a/csp-lmc-mid/.gitlab-ci.yml +++ b/csp-lmc-mid/.gitlab-ci.yml @@ -196,9 +196,5 @@ release csp-lmc-mid image: script: - cd $BUILD_PATH - make push - when: manual - only: - refs: - - master variables: BUILD_PATH: csp-lmc-mid diff --git a/csp-lmc-mid/.make/release.mk b/csp-lmc-mid/.make/release.mk index 66dbc7b..87043fc 100644 --- a/csp-lmc-mid/.make/release.mk +++ b/csp-lmc-mid/.make/release.mk @@ -80,8 +80,8 @@ release: check-status check-release build push push: pre-push do-push post-push ## push the image to the Docker registry do-push: -# docker push $(IMAGE):$(VERSION) - docker push $(IMAGE):latest + docker push $(IMAGE):$(BASE_RELEASE) +# docker push $(IMAGE):latest snapshot: build push -- GitLab From 6a99175d4b21854596ea1be57194e94145597470 Mon Sep 17 00:00:00 2001 From: toor Date: Thu, 17 Sep 2020 11:27:08 +0200 Subject: [PATCH 18/43] CT-147: fx releasing of the mid-csp image before testing. --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d6e5125..d1ed969 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -42,10 +42,10 @@ stages: - publish_common - build - linting - - publish + - release - test + - publish - pages - - release .install_pip: &install_pip |- apt-get -y update && apt-get install -yq curl python3-distutils -- GitLab From 5888bc7ef2ea441cf39a956418dc1039d85d773b Mon Sep 17 00:00:00 2001 From: toor Date: Thu, 17 Sep 2020 11:45:00 +0200 Subject: [PATCH 19/43] CT-147: use tango-builder docker image to push the new image on nexus. --- csp-lmc-mid/.gitlab-ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/csp-lmc-mid/.gitlab-ci.yml b/csp-lmc-mid/.gitlab-ci.yml index 2deb066..1a8db3d 100644 --- a/csp-lmc-mid/.gitlab-ci.yml +++ b/csp-lmc-mid/.gitlab-ci.yml @@ -188,9 +188,12 @@ publish:csp-lmc-mid: # Release csp-lmc-mid image on nexus # release csp-lmc-mid image: + stage: release + image: nexus.engageska-portugal.pt/ska-docker/tango-builder:latest + before_script: + - docker login -u $DOCKER_REGISTRY_USERNAME -p $DOCKER_REGISTRY_PASSWORD $DOCKER_REGISTRY_HOST tags: - docker-executor - stage: release dependencies: - build:csp-lmc-mid_image script: -- GitLab From 82b777993bd67f733f6c7ccd962a116463a7cf22 Mon Sep 17 00:00:00 2001 From: toor Date: Thu, 17 Sep 2020 12:16:20 +0200 Subject: [PATCH 20/43] CT-147: fix pages stage failure in pipeline execution --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d1ed969..6f11488 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -69,7 +69,7 @@ pages: stage: pages variables: COMMON_PATH: csp-lmc-common/ - MIDCSP_PATH: csp-lmc-mid/docker + MIDCSP_PATH: csp-lmc-mid/ script: - pwd - python3 -m pip install junitparser -- GitLab From b3f6c38a26a595c66b64a71606c3d9f07f413413 Mon Sep 17 00:00:00 2001 From: toor Date: Thu, 17 Sep 2020 14:55:45 +0200 Subject: [PATCH 21/43] CT-147: try to fix issue with pages stage (not working, yet) --- .gitlab-ci.yml | 3 +-- csp-lmc-mid/.gitlab-ci.yml | 15 +++++++++++++++ csp-lmc-mid/setup.cfg | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6f11488..d2ca940 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -80,9 +80,8 @@ pages: # path to all files is relative to the repository # that has been cloned during the build - cp -R $COMMON_PATH/build/ public - - ls -l public - cp -R $MIDCSP_PATH/build/* public - - ls -lR + - ls -lR public - junitparser merge public/reports/csp-lmc-common-unit-tests.xml public/reports/csp-lmc-mid-unit-tests.xml public/reports/unit-tests.xml - ls -lR - junitparser merge public/reports/csp-lmc-common-linting.xml public/reports/csp-lmc-mid-linting.xml public/reports/linting.xml diff --git a/csp-lmc-mid/.gitlab-ci.yml b/csp-lmc-mid/.gitlab-ci.yml index 1a8db3d..d3d5889 100644 --- a/csp-lmc-mid/.gitlab-ci.yml +++ b/csp-lmc-mid/.gitlab-ci.yml @@ -107,6 +107,7 @@ integration:csp-lmc-mid: script: - cd $BUILD_PATH - make k8s_test + - ls -lR environment: name: test after_script: @@ -184,6 +185,20 @@ publish:csp-lmc-mid: variables: BUILD_PATH: csp-lmc-mid +publish:helm-chart: + stage: publish + tags: + - docker-executor + dependencies: + - integration:csp-lmc-mid + script: + - cd $BUILD_PATH + - make package + variables: + BUILD_PATH: csp-lmc-mid + artifacts: + paths: + - ./$BUILD_PATH/build/ # # Release csp-lmc-mid image on nexus # diff --git a/csp-lmc-mid/setup.cfg b/csp-lmc-mid/setup.cfg index d7e22e1..3708eaa 100644 --- a/csp-lmc-mid/setup.cfg +++ b/csp-lmc-mid/setup.cfg @@ -26,7 +26,7 @@ addopts = --forked --cov-report=term --cov-report=html --cov-report=xml - --junitxml=build/reports/csp-lmc-mid-unit-tests.xml + --junitxml=csp-lmc-mid-unit-tests.xml console_output_style = progress junit_family=legacy filterwarnings = -- GitLab From 631c06c0cfbfc756ac113f14ae7351fe8e12afd8 Mon Sep 17 00:00:00 2001 From: Matteo Di Carlo Date: Thu, 17 Sep 2020 13:33:09 +0000 Subject: [PATCH 22/43] change runner --- csp-lmc-mid/.gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csp-lmc-mid/.gitlab-ci.yml b/csp-lmc-mid/.gitlab-ci.yml index 9772346..259acc0 100644 --- a/csp-lmc-mid/.gitlab-ci.yml +++ b/csp-lmc-mid/.gitlab-ci.yml @@ -101,7 +101,7 @@ build:csp-lmc-mid_image: integration:csp-lmc-mid: tags: - - auto-k8sv2 + - docker-executor extends: .test image: nexus.engageska-portugal.pt/ska-docker/deploy:0.4.1 script: -- GitLab From f02db72efb0d0943c4e7f25e7109b4667cb77c0e Mon Sep 17 00:00:00 2001 From: Matteo Di Carlo Date: Thu, 17 Sep 2020 13:47:46 +0000 Subject: [PATCH 23/43] 4DEBUG test first --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d2ca940..52c4d13 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -36,6 +36,7 @@ cache: # pages: move the metrics files to the right folder # release release the images for csp-lmc-low and mid (only manual) stages: + - test - build_common - linting_common - test_common @@ -43,7 +44,6 @@ stages: - build - linting - release - - test - publish - pages -- GitLab From 474bcbb591335f7145dccc7c5a6f9807e6d5383d Mon Sep 17 00:00:00 2001 From: Matteo Di Carlo Date: Thu, 17 Sep 2020 13:52:22 +0000 Subject: [PATCH 24/43] 4DEBUG keep namespace --- csp-lmc-mid/.gitlab-ci.yml | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/csp-lmc-mid/.gitlab-ci.yml b/csp-lmc-mid/.gitlab-ci.yml index d866e22..2ae659e 100644 --- a/csp-lmc-mid/.gitlab-ci.yml +++ b/csp-lmc-mid/.gitlab-ci.yml @@ -107,14 +107,9 @@ integration:csp-lmc-mid: script: - cd $BUILD_PATH - make k8s_test - - ls -lR environment: name: test - after_script: - - cd $BUILD_PATH - - pwd - - make delete - - make delete_namespace + # linting stage # @@ -185,34 +180,21 @@ publish:csp-lmc-mid: variables: BUILD_PATH: csp-lmc-mid -publish:helm-chart: - stage: publish - tags: - - docker-executor - dependencies: - - integration:csp-lmc-mid - script: - - cd $BUILD_PATH - - make package - variables: - BUILD_PATH: csp-lmc-mid - artifacts: - paths: - - ./$BUILD_PATH/build/ # # Release csp-lmc-mid image on nexus # release csp-lmc-mid image: - stage: release - image: nexus.engageska-portugal.pt/ska-docker/tango-builder:latest - before_script: - - docker login -u $DOCKER_REGISTRY_USERNAME -p $DOCKER_REGISTRY_PASSWORD $DOCKER_REGISTRY_HOST tags: - docker-executor + stage: release dependencies: - build:csp-lmc-mid_image script: - cd $BUILD_PATH - make push + when: manual + only: + refs: + - master variables: BUILD_PATH: csp-lmc-mid -- GitLab From 2564427bc614de11823291346326a10e103d1f6f Mon Sep 17 00:00:00 2001 From: Matteo Di Carlo Date: Thu, 17 Sep 2020 14:02:12 +0000 Subject: [PATCH 25/43] timeout to 300s --- csp-lmc-mid/.gitlab-ci.yml | 6 +++++- csp-lmc-mid/.make/k8s.mk | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/csp-lmc-mid/.gitlab-ci.yml b/csp-lmc-mid/.gitlab-ci.yml index 2ae659e..259acc0 100644 --- a/csp-lmc-mid/.gitlab-ci.yml +++ b/csp-lmc-mid/.gitlab-ci.yml @@ -109,7 +109,11 @@ integration:csp-lmc-mid: - make k8s_test environment: name: test - + after_script: + - cd $BUILD_PATH + - pwd + - make delete + - make delete_namespace # linting stage # diff --git a/csp-lmc-mid/.make/k8s.mk b/csp-lmc-mid/.make/k8s.mk index 52d4501..182fc29 100644 --- a/csp-lmc-mid/.make/k8s.mk +++ b/csp-lmc-mid/.make/k8s.mk @@ -175,7 +175,7 @@ wait: @echo "Waiting for device servers to be ready" @date @kubectl -n $(KUBE_NAMESPACE) get pods -l cspServer - @kubectl -n $(KUBE_NAMESPACE) wait --for=condition=ready --timeout=120s -l cspServer pods + @kubectl -n $(KUBE_NAMESPACE) wait --for=condition=ready --timeout=300s -l cspServer pods @date # -- GitLab From 11c734171e917618c82d9e1493889e6df1ce3064 Mon Sep 17 00:00:00 2001 From: Matteo Di Carlo Date: Thu, 17 Sep 2020 14:08:40 +0000 Subject: [PATCH 26/43] wait for job --- csp-lmc-mid/.make/k8s.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/csp-lmc-mid/.make/k8s.mk b/csp-lmc-mid/.make/k8s.mk index 182fc29..c762df8 100644 --- a/csp-lmc-mid/.make/k8s.mk +++ b/csp-lmc-mid/.make/k8s.mk @@ -175,6 +175,7 @@ wait: @echo "Waiting for device servers to be ready" @date @kubectl -n $(KUBE_NAMESPACE) get pods -l cspServer + @jobs=$$(kubectl get job --output=jsonpath={.items..metadata.name} -n $(KUBE_NAMESPACE)); kubectl wait job --for=condition=complete --timeout=300s $$jobs -n $(KUBE_NAMESPACE) @kubectl -n $(KUBE_NAMESPACE) wait --for=condition=ready --timeout=300s -l cspServer pods @date -- GitLab From 1e7832e8803fca9814f060de8e9b0a804ef8a80f Mon Sep 17 00:00:00 2001 From: Matteo Di Carlo Date: Thu, 17 Sep 2020 14:11:54 +0000 Subject: [PATCH 27/43] change default KUBE_NAMESPACE --- csp-lmc-mid/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csp-lmc-mid/Makefile b/csp-lmc-mid/Makefile index 7ba51c4..c72abd7 100644 --- a/csp-lmc-mid/Makefile +++ b/csp-lmc-mid/Makefile @@ -16,7 +16,7 @@ DSCONFIG_JSON_FILE ?= csp-lmc-mid/charts/csp-lmc-mid/data/configuration.json # KUBE_NAMESPACE defines the Kubernetes Namespace that will be deployed to # using Helm. If this does not already exist it will be created -KUBE_NAMESPACE ?= integration +KUBE_NAMESPACE ?= csp-proto # HELM_RELEASE is the release that all Kubernetes resources will be labelled # with -- GitLab From 61d6c8d064286f3ecdaefca1d173d7e39ea49bf0 Mon Sep 17 00:00:00 2001 From: Matteo Di Carlo Date: Thu, 17 Sep 2020 14:21:13 +0000 Subject: [PATCH 28/43] restore stage order --- .gitlab-ci.yml | 2 +- csp-lmc-mid/.gitlab-ci.yml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 52c4d13..d2ca940 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -36,7 +36,6 @@ cache: # pages: move the metrics files to the right folder # release release the images for csp-lmc-low and mid (only manual) stages: - - test - build_common - linting_common - test_common @@ -44,6 +43,7 @@ stages: - build - linting - release + - test - publish - pages diff --git a/csp-lmc-mid/.gitlab-ci.yml b/csp-lmc-mid/.gitlab-ci.yml index 259acc0..8f9f31b 100644 --- a/csp-lmc-mid/.gitlab-ci.yml +++ b/csp-lmc-mid/.gitlab-ci.yml @@ -105,11 +105,13 @@ integration:csp-lmc-mid: extends: .test image: nexus.engageska-portugal.pt/ska-docker/deploy:0.4.1 script: + - export KUBE_NAMESPACE="csp-proto-$CI_COMMIT_SHORT_SHA" - cd $BUILD_PATH - make k8s_test environment: name: test after_script: + - export KUBE_NAMESPACE="csp-proto-$CI_COMMIT_SHORT_SHA" - cd $BUILD_PATH - pwd - make delete -- GitLab From 2d95b0dcb85a84ecf7a9b34340c42a71a8a70afd Mon Sep 17 00:00:00 2001 From: toor Date: Thu, 17 Sep 2020 16:39:11 +0200 Subject: [PATCH 29/43] CT-147: Still problem with pages. Removed a test on abort. --- csp-lmc-mid/.gitlab-ci.yml | 1 + csp-lmc-mid/setup.cfg | 2 +- csp-lmc-mid/tests/unit/midcspsubarray_unit_test.py | 3 +-- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/csp-lmc-mid/.gitlab-ci.yml b/csp-lmc-mid/.gitlab-ci.yml index 8f9f31b..75bd46f 100644 --- a/csp-lmc-mid/.gitlab-ci.yml +++ b/csp-lmc-mid/.gitlab-ci.yml @@ -113,6 +113,7 @@ integration:csp-lmc-mid: after_script: - export KUBE_NAMESPACE="csp-proto-$CI_COMMIT_SHORT_SHA" - cd $BUILD_PATH + - ls -lR - pwd - make delete - make delete_namespace diff --git a/csp-lmc-mid/setup.cfg b/csp-lmc-mid/setup.cfg index 3708eaa..8e3da13 100644 --- a/csp-lmc-mid/setup.cfg +++ b/csp-lmc-mid/setup.cfg @@ -26,7 +26,7 @@ addopts = --forked --cov-report=term --cov-report=html --cov-report=xml - --junitxml=csp-lmc-mid-unit-tests.xml + --junitxml=build/csp-lmc-mid-unit-tests.xml console_output_style = progress junit_family=legacy filterwarnings = diff --git a/csp-lmc-mid/tests/unit/midcspsubarray_unit_test.py b/csp-lmc-mid/tests/unit/midcspsubarray_unit_test.py index 8fb9c1a..5867030 100644 --- a/csp-lmc-mid/tests/unit/midcspsubarray_unit_test.py +++ b/csp-lmc-mid/tests/unit/midcspsubarray_unit_test.py @@ -843,7 +843,6 @@ def test_midcspsubarray_obsstate_WHEN_cbfsubarray_abort_returns_failed(): event_subscription_map[cbf_subarray_state_attr](dummy_event) tango_context.device.Abort() assert tango_context.device.obsState == ObsState.FAULT -''' def test_midcspsubarray_obsstate_WHEN_timeout_in_abort_request_during_configuring(): """ @@ -893,7 +892,7 @@ def test_midcspsubarray_obsstate_WHEN_timeout_in_abort_request_during_configurin prober_obs_state = Probe(tango_context.device, 'timeoutExpiredFlag', True, f"Wrong CspSubarray state") Poller(10, 0.1).check(prober_obs_state) assert tango_context.device.obsState == ObsState.FAULT -''' + def test_midcspsubarray_obsstate_AFTER_configure_WITH_cbf_returning_FAULT(): """ Test the behavior of the MidCspSubarray when the command Configure -- GitLab From 37165d0d86f3d2ebb1c1e49020d35eaf5faef9c4 Mon Sep 17 00:00:00 2001 From: toor Date: Thu, 17 Sep 2020 16:58:54 +0200 Subject: [PATCH 30/43] CT-147: still fixing pages stage in pipeline. --- csp-lmc-mid/setup.cfg | 2 +- csp-lmc-mid/test-harness/Makefile | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/csp-lmc-mid/setup.cfg b/csp-lmc-mid/setup.cfg index 8e3da13..d7e22e1 100644 --- a/csp-lmc-mid/setup.cfg +++ b/csp-lmc-mid/setup.cfg @@ -26,7 +26,7 @@ addopts = --forked --cov-report=term --cov-report=html --cov-report=xml - --junitxml=build/csp-lmc-mid-unit-tests.xml + --junitxml=build/reports/csp-lmc-mid-unit-tests.xml console_output_style = progress junit_family=legacy filterwarnings = diff --git a/csp-lmc-mid/test-harness/Makefile b/csp-lmc-mid/test-harness/Makefile index b10e569..60db74e 100644 --- a/csp-lmc-mid/test-harness/Makefile +++ b/csp-lmc-mid/test-harness/Makefile @@ -23,6 +23,7 @@ test: mv /app/integration-test.stdout ./build/csp-lmc-mid-setup-test.stdout; \ mv /app/htmlcov ./build/csp-lmc-mid_htmlcov; \ cp /app/coverage.xml ./build/coverage-csp-lmc-mid.xml; \ + cp /app/build/reports/csp-lmc-mid-unit-tests.xml ./build/reports; \ fi; #cd /build && coverage combine csp-lmc-mid_coverage csp-lmc-common_coverage && coverage xml -- GitLab From a4faa6f1817ec023b0462bdaba40b04d18228a80 Mon Sep 17 00:00:00 2001 From: toor Date: Fri, 18 Sep 2020 10:28:27 +0200 Subject: [PATCH 31/43] CT-147: add publihing of the csp-proto chart. --- csp-lmc-mid/.gitlab-ci.yml | 15 +++++++++++---- csp-lmc-mid/.make/k8s.mk | 5 +++++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/csp-lmc-mid/.gitlab-ci.yml b/csp-lmc-mid/.gitlab-ci.yml index 75bd46f..36c4969 100644 --- a/csp-lmc-mid/.gitlab-ci.yml +++ b/csp-lmc-mid/.gitlab-ci.yml @@ -187,6 +187,17 @@ publish:csp-lmc-mid: variables: BUILD_PATH: csp-lmc-mid +publish_chart: + variables: + CHARTS_TO_PUBLISH: csp-proto + stage: publish + tags: + - docker-executor + image: nexus.engageska-portugal.pt/ska-docker/deploy:0.4.1 + script: + - curl -s https://gitlab.com/ska-telescope/stupid/raw/master/scripts/publish-charts.sh | bash + - cd charts/ && make package + # # Release csp-lmc-mid image on nexus # @@ -199,9 +210,5 @@ release csp-lmc-mid image: script: - cd $BUILD_PATH - make push - when: manual - only: - refs: - - master variables: BUILD_PATH: csp-lmc-mid diff --git a/csp-lmc-mid/.make/k8s.mk b/csp-lmc-mid/.make/k8s.mk index c762df8..6b98f3f 100644 --- a/csp-lmc-mid/.make/k8s.mk +++ b/csp-lmc-mid/.make/k8s.mk @@ -127,6 +127,11 @@ localip: ## set local Minikube IP in /etc/hosts file for Ingress $(INGRESS_HOST echo "/etc/hosts is now: " `grep $(INGRESS_HOST) /etc/hosts` mkcerts: ## Make dummy certificates for $(INGRESS_HOST) and Ingress + @if [ ! -d charts/$(HELM_CHART)/secrets ]; then \ + mkdir -p charts/$(HELM_CHART)/secrets; \ + else \ + echo "Creating secrets directory in $(HELM_CHART)"; \ + fi @if [ ! -f charts/$(HELM_CHART)/secrets/tls.key ]; then \ openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 \ -keyout charts/$(HELM_CHART)/secrets/tls.key \ -- GitLab From 1c9b3b95e0fef4e8efc99ad8c3a76e652e516c81 Mon Sep 17 00:00:00 2001 From: Matteo Di Carlo Date: Fri, 18 Sep 2020 08:30:51 +0000 Subject: [PATCH 32/43] fix kube namespace --- csp-lmc-mid/.gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/csp-lmc-mid/.gitlab-ci.yml b/csp-lmc-mid/.gitlab-ci.yml index 36c4969..360342f 100644 --- a/csp-lmc-mid/.gitlab-ci.yml +++ b/csp-lmc-mid/.gitlab-ci.yml @@ -105,13 +105,13 @@ integration:csp-lmc-mid: extends: .test image: nexus.engageska-portugal.pt/ska-docker/deploy:0.4.1 script: - - export KUBE_NAMESPACE="csp-proto-$CI_COMMIT_SHORT_SHA" + - export KUBE_NAMESPACE="ci-csp-proto-$CI_COMMIT_SHORT_SHA" - cd $BUILD_PATH - make k8s_test environment: name: test after_script: - - export KUBE_NAMESPACE="csp-proto-$CI_COMMIT_SHORT_SHA" + - export KUBE_NAMESPACE="ci-csp-proto-$CI_COMMIT_SHORT_SHA" - cd $BUILD_PATH - ls -lR - pwd -- GitLab From 8954556532ee1bcb81cf0b4824bc43e5fc843829 Mon Sep 17 00:00:00 2001 From: toor Date: Fri, 18 Sep 2020 11:24:39 +0200 Subject: [PATCH 33/43] CT-147: push the image during the pipeline build stage. Tag the image with the SHA git when on dev branch. --- csp-lmc-mid/.gitlab-ci.yml | 7 ++++++- csp-lmc-mid/.make/release.mk | 8 +++++++- csp-lmc-mid/charts/csp-proto/values.yaml | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/csp-lmc-mid/.gitlab-ci.yml b/csp-lmc-mid/.gitlab-ci.yml index 360342f..c95bc10 100644 --- a/csp-lmc-mid/.gitlab-ci.yml +++ b/csp-lmc-mid/.gitlab-ci.yml @@ -39,7 +39,7 @@ build:csp-lmc-mid_pkg: only: [master] # -# Build csp-lmc-mid image +# Build and push csp-lmc-mid image # build:csp-lmc-mid_image: image: nexus.engageska-portugal.pt/ska-docker/tango-builder:latest @@ -51,6 +51,7 @@ build:csp-lmc-mid_image: script: - cd $BUILD_PATH - make build + - make push variables: BUILD_PATH: csp-lmc-mid @@ -210,5 +211,9 @@ release csp-lmc-mid image: script: - cd $BUILD_PATH - make push + when: manual + only: + refs: + - master variables: BUILD_PATH: csp-lmc-mid diff --git a/csp-lmc-mid/.make/release.mk b/csp-lmc-mid/.make/release.mk index 87043fc..6f76d9b 100644 --- a/csp-lmc-mid/.make/release.mk +++ b/csp-lmc-mid/.make/release.mk @@ -80,7 +80,13 @@ release: check-status check-release build push push: pre-push do-push post-push ## push the image to the Docker registry do-push: - docker push $(IMAGE):$(BASE_RELEASE) + @BRANCH_NAME=`git rev-parse --abbrev-ref HEAD`; \ + echo "--- $$BRANCH_NAME"; \ + if [ $$BRANCH_NAME == "master" ]; then \ + docker push $(IMAGE):$(BASE_RELEASE); \ + else \ + docker push $(IMAGE):$(VERSION); \ + fi # docker push $(IMAGE):latest snapshot: build push diff --git a/csp-lmc-mid/charts/csp-proto/values.yaml b/csp-lmc-mid/charts/csp-proto/values.yaml index 26ce0e0..8fb48f8 100644 --- a/csp-lmc-mid/charts/csp-proto/values.yaml +++ b/csp-lmc-mid/charts/csp-proto/values.yaml @@ -14,7 +14,7 @@ csplmc: image: registry: nexus.engageska-portugal.pt/ska-docker image: mid-csp-lmc - tag: 0.6.9 + tag: 0.6.9-1c9b3b9 pullPolicy: IfNotPresent deviceServers: -- GitLab From 552a5bae8ea0d38e29ed6c2d3649791eb4840ac2 Mon Sep 17 00:00:00 2001 From: toor Date: Fri, 18 Sep 2020 15:33:31 +0200 Subject: [PATCH 34/43] CT-147: tag the image with suffix '-dev' if built from a git branch diffrent from master. --- csp-lmc-mid/.make/release.mk | 6 ++++-- csp-lmc-mid/charts/csp-proto/values.yaml | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/csp-lmc-mid/.make/release.mk b/csp-lmc-mid/.make/release.mk index 6f76d9b..f4a37d7 100644 --- a/csp-lmc-mid/.make/release.mk +++ b/csp-lmc-mid/.make/release.mk @@ -81,11 +81,13 @@ push: pre-push do-push post-push ## push the image to the Docker registry do-push: @BRANCH_NAME=`git rev-parse --abbrev-ref HEAD`; \ - echo "--- $$BRANCH_NAME"; \ + echo "Git branch: $$BRANCH_NAME"; \ if [ $$BRANCH_NAME == "master" ]; then \ + echo "Image tag: $(IMAGE):$(VERSION) $(IMAGE):$(BASE_RELEASE)" ;\ docker push $(IMAGE):$(BASE_RELEASE); \ else \ - docker push $(IMAGE):$(VERSION); \ + echo "Image tag: $(IMAGE):$(VERSION) $(IMAGE):$(BASE_RELEASE)-dev" ;\ + docker tag $(IMAGE):$(VERSION) $(IMAGE):$(BASE_RELEASE)-dev ;\ fi # docker push $(IMAGE):latest diff --git a/csp-lmc-mid/charts/csp-proto/values.yaml b/csp-lmc-mid/charts/csp-proto/values.yaml index 8fb48f8..47b4fd9 100644 --- a/csp-lmc-mid/charts/csp-proto/values.yaml +++ b/csp-lmc-mid/charts/csp-proto/values.yaml @@ -14,7 +14,7 @@ csplmc: image: registry: nexus.engageska-portugal.pt/ska-docker image: mid-csp-lmc - tag: 0.6.9-1c9b3b9 + tag: 0.6.9-dev pullPolicy: IfNotPresent deviceServers: -- GitLab From baed07bcd1c50c3c9a7a721cec8bd74d9e0e71f8 Mon Sep 17 00:00:00 2001 From: toor Date: Fri, 18 Sep 2020 16:05:03 +0200 Subject: [PATCH 35/43] CT-147: use CI_COMMIT_REF_NAME variable to get the branch name when the pipeline is running. --- csp-lmc-mid/.make/release.mk | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/csp-lmc-mid/.make/release.mk b/csp-lmc-mid/.make/release.mk index f4a37d7..0480639 100644 --- a/csp-lmc-mid/.make/release.mk +++ b/csp-lmc-mid/.make/release.mk @@ -13,6 +13,11 @@ # See the License for the specific language governing permissions and # limitations under the License. # +ifneq ($(CI_JOB_ID),) +BRANCH_NAME := $(CI_BUILD_REF_NAME) +else +BRANCH_NAME=$(shell git rev-parse --abbrev-ref HEAD) +endif ifeq ($(strip $(PROJECT)),) NAME=$(shell basename $(CURDIR)) else @@ -80,14 +85,13 @@ release: check-status check-release build push push: pre-push do-push post-push ## push the image to the Docker registry do-push: - @BRANCH_NAME=`git rev-parse --abbrev-ref HEAD`; \ - echo "Git branch: $$BRANCH_NAME"; \ - if [ $$BRANCH_NAME == "master" ]; then \ + @echo "Git branch: $(BRANCH_NAME)"; \ + if [ $(BRANCH_NAME) == "master" ]; then \ echo "Image tag: $(IMAGE):$(VERSION) $(IMAGE):$(BASE_RELEASE)" ;\ - docker push $(IMAGE):$(BASE_RELEASE); \ + docker tag $(IMAGE):$(VERSION) $(IMAGE):$(BASE_RELEASE)-dev ;\ else \ echo "Image tag: $(IMAGE):$(VERSION) $(IMAGE):$(BASE_RELEASE)-dev" ;\ - docker tag $(IMAGE):$(VERSION) $(IMAGE):$(BASE_RELEASE)-dev ;\ + docker push $(IMAGE):$(BASE_RELEASE); \ fi # docker push $(IMAGE):latest -- GitLab From 4ce49501aafc6da5d2a4a600a40541a5f34fd7b4 Mon Sep 17 00:00:00 2001 From: toor Date: Fri, 18 Sep 2020 16:49:22 +0200 Subject: [PATCH 36/43] CT-147: push the image on nexus after the build job. --- csp-lmc-mid/.make/release.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/csp-lmc-mid/.make/release.mk b/csp-lmc-mid/.make/release.mk index 0480639..3ae995e 100644 --- a/csp-lmc-mid/.make/release.mk +++ b/csp-lmc-mid/.make/release.mk @@ -89,6 +89,7 @@ do-push: if [ $(BRANCH_NAME) == "master" ]; then \ echo "Image tag: $(IMAGE):$(VERSION) $(IMAGE):$(BASE_RELEASE)" ;\ docker tag $(IMAGE):$(VERSION) $(IMAGE):$(BASE_RELEASE)-dev ;\ + docker push $(IMAGE):$(IMAGE):$(BASE_RELEASE)-dev ;\ else \ echo "Image tag: $(IMAGE):$(VERSION) $(IMAGE):$(BASE_RELEASE)-dev" ;\ docker push $(IMAGE):$(BASE_RELEASE); \ -- GitLab From cd67c2c05f5e1db0acdccd954e75e2248ba6dfd5 Mon Sep 17 00:00:00 2001 From: toor Date: Fri, 18 Sep 2020 17:28:22 +0200 Subject: [PATCH 37/43] CT-147: try to fix a (persistent!) typo in image push procedure. --- csp-lmc-mid/.make/release.mk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/csp-lmc-mid/.make/release.mk b/csp-lmc-mid/.make/release.mk index 3ae995e..cdc58a1 100644 --- a/csp-lmc-mid/.make/release.mk +++ b/csp-lmc-mid/.make/release.mk @@ -88,13 +88,13 @@ do-push: @echo "Git branch: $(BRANCH_NAME)"; \ if [ $(BRANCH_NAME) == "master" ]; then \ echo "Image tag: $(IMAGE):$(VERSION) $(IMAGE):$(BASE_RELEASE)" ;\ - docker tag $(IMAGE):$(VERSION) $(IMAGE):$(BASE_RELEASE)-dev ;\ - docker push $(IMAGE):$(IMAGE):$(BASE_RELEASE)-dev ;\ + docker tag $(IMAGE):$(VERSION) $(IMAGE):$(BASE_RELEASE);\ + docker push $(IMAGE):$(BASE_RELEASE); \ else \ echo "Image tag: $(IMAGE):$(VERSION) $(IMAGE):$(BASE_RELEASE)-dev" ;\ - docker push $(IMAGE):$(BASE_RELEASE); \ + docker tag $(IMAGE):$(VERSION) $(IMAGE):$(BASE_RELEASE)-dev ;\ + docker push $(IMAGE):$(BASE_RELEASE)-dev ;\ fi -# docker push $(IMAGE):latest snapshot: build push -- GitLab From a2375d761a99faad1b098a7fee4c8e8fde0aa957 Mon Sep 17 00:00:00 2001 From: toor Date: Fri, 18 Sep 2020 18:54:22 +0200 Subject: [PATCH 38/43] CT-147: fix path to search for helm charts folder. --- csp-lmc-mid/.gitlab-ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/csp-lmc-mid/.gitlab-ci.yml b/csp-lmc-mid/.gitlab-ci.yml index c95bc10..be3bf4a 100644 --- a/csp-lmc-mid/.gitlab-ci.yml +++ b/csp-lmc-mid/.gitlab-ci.yml @@ -196,8 +196,12 @@ publish_chart: - docker-executor image: nexus.engageska-portugal.pt/ska-docker/deploy:0.4.1 script: + - cd $BUILD_PATH - curl -s https://gitlab.com/ska-telescope/stupid/raw/master/scripts/publish-charts.sh | bash + - ls - cd charts/ && make package + variables: + BUILD_PATH: csp-lmc-mid # # Release csp-lmc-mid image on nexus -- GitLab From d4d5864f578d14c06f77642a4856b4c7e0dafee3 Mon Sep 17 00:00:00 2001 From: toor Date: Fri, 18 Sep 2020 20:24:58 +0200 Subject: [PATCH 39/43] CT-147: publish chart to work out --- .gitlab-ci.yml | 1 + csp-lmc-mid/.gitlab-ci.yml | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d2ca940..e5dcc47 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -36,6 +36,7 @@ cache: # pages: move the metrics files to the right folder # release release the images for csp-lmc-low and mid (only manual) stages: + - publish_chart - build_common - linting_common - test_common diff --git a/csp-lmc-mid/.gitlab-ci.yml b/csp-lmc-mid/.gitlab-ci.yml index be3bf4a..0c2cfcf 100644 --- a/csp-lmc-mid/.gitlab-ci.yml +++ b/csp-lmc-mid/.gitlab-ci.yml @@ -191,15 +191,13 @@ publish:csp-lmc-mid: publish_chart: variables: CHARTS_TO_PUBLISH: csp-proto - stage: publish + stage: publish_chart tags: - docker-executor image: nexus.engageska-portugal.pt/ska-docker/deploy:0.4.1 script: - cd $BUILD_PATH - curl -s https://gitlab.com/ska-telescope/stupid/raw/master/scripts/publish-charts.sh | bash - - ls - - cd charts/ && make package variables: BUILD_PATH: csp-lmc-mid -- GitLab From 74cd05e6788d6fd2f8f0786249dfc2e432b43b05 Mon Sep 17 00:00:00 2001 From: toor Date: Fri, 18 Sep 2020 20:48:00 +0200 Subject: [PATCH 40/43] CT-147: first step to fix csp-proto publishing, --- .gitlab-ci.yml | 1 - csp-lmc-mid/.gitlab-ci.yml | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e5dcc47..d2ca940 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -36,7 +36,6 @@ cache: # pages: move the metrics files to the right folder # release release the images for csp-lmc-low and mid (only manual) stages: - - publish_chart - build_common - linting_common - test_common diff --git a/csp-lmc-mid/.gitlab-ci.yml b/csp-lmc-mid/.gitlab-ci.yml index 0c2cfcf..11e12e8 100644 --- a/csp-lmc-mid/.gitlab-ci.yml +++ b/csp-lmc-mid/.gitlab-ci.yml @@ -191,10 +191,10 @@ publish:csp-lmc-mid: publish_chart: variables: CHARTS_TO_PUBLISH: csp-proto - stage: publish_chart + stage: publish tags: - docker-executor - image: nexus.engageska-portugal.pt/ska-docker/deploy:0.4.1 + image: nexus.engageska-portugal.pt/ska-docker/deploy:0.4.2 script: - cd $BUILD_PATH - curl -s https://gitlab.com/ska-telescope/stupid/raw/master/scripts/publish-charts.sh | bash -- GitLab From 2914e6ed2cbdbeb74e1f36792b6bfe23dc8c7ab0 Mon Sep 17 00:00:00 2001 From: toor Date: Mon, 21 Sep 2020 11:15:59 +0200 Subject: [PATCH 41/43] CT-147: updated project README.md file. Modified the k8s makefile to fix problem in describe and logs targets. Updated mid-csp helm chart to include values.yaml an template file. --- README.md | 204 ++++++++++++++++-- csp-lmc-mid/.make/k8s.mk | 11 +- csp-lmc-mid/charts/mid-csp/Chart.yaml | 4 +- .../charts/mid-csp/templates/_helpers.tpl | 62 ++++++ csp-lmc-mid/charts/mid-csp/values.yaml | 11 + 5 files changed, 266 insertions(+), 26 deletions(-) create mode 100644 csp-lmc-mid/charts/mid-csp/templates/_helpers.tpl create mode 100644 csp-lmc-mid/charts/mid-csp/values.yaml diff --git a/README.md b/README.md index a0984ee..68d5d11 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,8 @@ CPS.LMC project * [Repository](#repository) * [CSP.LMC Common Package](#csp-lmc-common) * [Create the CSP.LMC Common Software python package](#python-package) -* [CSP_Mid LMC](#mid-csp-mid-lmc) - * [Running tests](#running-tests) +* [CSP_Mid LMC](#CSP_Mid.LMC) + * [CSP_Mid LMC Deployment in Kubernetes](#Mid-CSP.LMC-Kubernetes-Deployment-via-Helm-Charts) * [CSP_Low LMC](#csp-low-lmc) * [Run in containers](#how-to-run-in-docker-containers) * [Known bugs](#known-bugs) @@ -39,8 +39,10 @@ the same organization: * project source: contains the specific project TANGO Device Class files * pogo: contains the POGO files of the TANGO Device Classes of the project -* docker: containes the `docker`, `docker-compose` and `dsconfig` configuration files as well as the Makefile to generate the docker image and run the tests. * tests: contains the test +* charts: stored the HEML charts to deploy the Mid CSP.LMC system under kubernets environment. +* docker: containes the `docker`, `docker-compose` and `dsconfig` configuration files as well as +the Makefile to generate the docker image and run the tests. To get a local copy of the repository: @@ -52,18 +54,192 @@ git clone https://gitlab.com/ska-telescope/csp-lmc.git * A TANGO development environment properly configured, as described in [SKA developer portal](https://developer.skatelescope.org/en/latest/tools/tango-devenv-setup.html) * [SKA Base classes](https://gitlab.com/ska-telescope/lmc-base-classes) -* -## CSP_Mid.LMC +* access to a K8s/minikube cluster. + +# CSP_Mid.LMC The TANGO devices of the CSP_Mid.LMC prototype run in a containerised environment. Currently only a limitated number of CSP_Mid.LMC and CBF_Mid.LMC devices are run in Docker containers: * the MidCspMaster and MID CbfMaster * the MidCspCapabilityMonitor devices -* two instances of the CSP_Mid and CBF_Mid subarrays +* three instances of the CSP_Mid and CBF_Mid subarrays * four instances of the Very Coarse Channelizer (VCC) devices * four instance of the Frequency Slice Processor (FPS) devices * two instances of the TM TelState Simulator devices +* one instance of the TANGO database + +## Containerised Mid CSP.LMC in Kubernetes + +The Mid CSP.LMC containerised TANGO servers are managed via Kubernetes. +The system is setup so that each k8s Pod has only one Docker container that in turn +runs only one Tango Device Server application.
+Mid CSP.LMC TANGO Servers rely on two different Docker images: `mid-csplmc` and `mid-cbf-mcs`.
+The first one runs the CSP.LMC TANGO devices and the sencond those of the Mid CBF.LMC prototype. + +### Mid CSP.LMC Kubernetes Deployment via Helm Charts + +The deployment of the system is handled by the Helm tool, via the Helm Charts, a set of YAML files describing +how the Kubernetes resources are related.
+The Mid CSP.LMC Helm Charts are stored in the `charts` directory, organized in two sub-folders:
+ +* csp-proto with the Helm chart to deploy only the CSP.LMC devices (MidCspCapabilityMonitor, MidcSpMaster nad MidCspSubarray) +* mid-csp with the Helm chart to deploy the whole Mid CSP.LMC system, including the TANGO Database and the Mid CSF.LMC devices. +In particular, the `mid-csp` chart depends on the CSP.LMC, CBF.LMC and Tango DB charts and these dependecies are + dynamically linked specifying the `dependencies` field in the Chart.yaml.
+ +The `Makefile` in the csp-lmc-mid root directory provides the targets to deploy the system, stop the running services and run +the tests locally, on a k8s/minikube machine. + +To deploy the whole Mid CSP.LMC system run: + +``` bash + make deploy +``` +that installs the mid-csp helm chart specifying `test` as relase name and assigns it to the `csp-proto` namespace. + +Running the command: +```bash +helm list -n csp-proto +``` +an output like the one below is shown: +``` +NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION +test csp-proto 1 2020-09-21 10:07:19.308839059 +0200 CEST deployed mid-csp-0.1.0 0.6.8 +``` + +To list all the pods and service in the csp-proto namespace, issue the command: + +```bash +kubectl get all -n csp-proto +``` + +that provides the following output lines: + +``` +NAME READY STATUS RESTARTS AGE +pod/databaseds-tango-base-test-0 1/1 Running 0 2m48s +pod/mid-cbf-cbf-proto-cbfmaster-test-0 1/1 Running 0 2m50s +pod/mid-cbf-cbf-proto-cbfsubarray01-test-0 1/1 Running 1 2m50s +pod/mid-cbf-cbf-proto-cbfsubarray02-test-0 1/1 Running 1 2m48s +pod/mid-cbf-cbf-proto-cbfsubarray03-test-0 1/1 Running 1 2m48s +pod/mid-cbf-cbf-proto-fsp01-test-0 1/1 Running 0 2m49s +pod/mid-cbf-cbf-proto-fsp02-test-0 1/1 Running 0 2m49s +pod/mid-cbf-cbf-proto-fsp03-test-0 1/1 Running 0 2m50s +pod/mid-cbf-cbf-proto-fsp04-test-0 1/1 Running 0 2m50s +pod/mid-cbf-cbf-proto-tmcspsubarrayleafnodetest-test-0 1/1 Running 0 2m49s +pod/mid-cbf-cbf-proto-tmcspsubarrayleafnodetest2-test-0 1/1 Running 0 2m48s +pod/mid-cbf-cbf-proto-vcc001-test-0 1/1 Running 3 2m47s +pod/mid-cbf-cbf-proto-vcc002-test-0 1/1 Running 3 2m50s +pod/mid-cbf-cbf-proto-vcc003-test-0 1/1 Running 3 2m50s +pod/mid-cbf-cbf-proto-vcc004-test-0 1/1 Running 3 2m49s +pod/mid-cbf-configurator-cbf-proto-test-m6j2p 0/1 Error 0 2m50s +pod/mid-cbf-configurator-cbf-proto-test-qm8xg 0/1 Completed 0 2m15s +pod/midcsplmc-configurator-csp-proto-test-d7hmp 0/1 Completed 0 2m15s +pod/midcsplmc-configurator-csp-proto-test-qnks4 0/1 Error 0 2m50s +pod/midcsplmc-csp-proto-midcapabilitymonitor-test-0 1/1 Running 3 2m48s +pod/midcsplmc-csp-proto-midcspmaster-test-0 1/1 Running 0 2m50s +pod/midcsplmc-csp-proto-midcspsubarray01-test-0 1/1 Running 1 2m50s +pod/midcsplmc-csp-proto-midcspsubarray02-test-0 1/1 Running 1 2m50s +pod/midcsplmc-csp-proto-midcspsubarray03-test-0 1/1 Running 1 2m50s +pod/tango-base-tangodb-0 + + +NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE +service/databaseds-tango-base-test NodePort 10.103.37.75 10000:31664/TCP 2m50s +service/mid-cbf-cbf-proto-cbfmaster-test ClusterIP None 1234/TCP 2m50s +service/mid-cbf-cbf-proto-cbfsubarray01-test ClusterIP None 1234/TCP 2m50s +service/mid-cbf-cbf-proto-cbfsubarray02-test ClusterIP None 1234/TCP 2m50s +service/mid-cbf-cbf-proto-cbfsubarray03-test ClusterIP None 1234/TCP 2m50s +service/mid-cbf-cbf-proto-fsp01-test ClusterIP None 1234/TCP 2m50s +service/mid-cbf-cbf-proto-fsp02-test ClusterIP None 1234/TCP 2m50s +service/mid-cbf-cbf-proto-fsp03-test ClusterIP None 1234/TCP 2m50s +service/mid-cbf-cbf-proto-fsp04-test ClusterIP None 1234/TCP 2m50s +service/mid-cbf-cbf-proto-tmcspsubarrayleafnodetest-test ClusterIP None 1234/TCP 2m50s +service/mid-cbf-cbf-proto-tmcspsubarrayleafnodetest2-test ClusterIP None 1234/TCP 2m50s +service/mid-cbf-cbf-proto-vcc001-test ClusterIP None 1234/TCP 2m50s +service/mid-cbf-cbf-proto-vcc002-test ClusterIP None 1234/TCP 2m50s +service/mid-cbf-cbf-proto-vcc003-test ClusterIP None 1234/TCP 2m50s +service/mid-cbf-cbf-proto-vcc004-test ClusterIP None 1234/TCP 2m50s +service/midcsplmc-csp-proto-midcapabilitymonitor-test ClusterIP None 1234/TCP 2m50s +service/midcsplmc-csp-proto-midcspmaster-test ClusterIP None 1234/TCP 2m50s +service/midcsplmc-csp-proto-midcspsubarray01-test ClusterIP None 1234/TCP 2m50s +service/midcsplmc-csp-proto-midcspsubarray02-test ClusterIP None 1234/TCP 2m50s +service/midcsplmc-csp-proto-midcspsubarray03-test ClusterIP None 1234/TCP 2m50s +service/tango-base-tangodb NodePort 10.102.174.225 3306:30633/TCP 2m50s + +NAME READY AGE +statefulset.apps/databaseds-tango-base-test 1/1 2m50s +statefulset.apps/mid-cbf-cbf-proto-cbfmaster-test 1/1 2m50s +statefulset.apps/mid-cbf-cbf-proto-cbfsubarray01-test 1/1 2m50s +statefulset.apps/mid-cbf-cbf-proto-cbfsubarray02-test 1/1 2m50s +statefulset.apps/mid-cbf-cbf-proto-cbfsubarray03-test 1/1 2m50s +statefulset.apps/mid-cbf-cbf-proto-fsp01-test 1/1 2m50s +statefulset.apps/mid-cbf-cbf-proto-fsp02-test 1/1 2m50s +statefulset.apps/mid-cbf-cbf-proto-fsp03-test 1/1 2m50s +statefulset.apps/mid-cbf-cbf-proto-fsp04-test 1/1 2m50s +statefulset.apps/mid-cbf-cbf-proto-tmcspsubarrayleafnodetest-test 1/1 2m50s +statefulset.apps/mid-cbf-cbf-proto-tmcspsubarrayleafnodetest2-test 1/1 2m50s +statefulset.apps/mid-cbf-cbf-proto-vcc001-test 1/1 2m50s +statefulset.apps/mid-cbf-cbf-proto-vcc002-test 1/1 2m50s +statefulset.apps/mid-cbf-cbf-proto-vcc003-test 1/1 2m50s +statefulset.apps/mid-cbf-cbf-proto-vcc004-test 1/1 2m50s +statefulset.apps/midcsplmc-csp-proto-midcapabilitymonitor-test 1/1 2m50s +statefulset.apps/midcsplmc-csp-proto-midcspmaster-test 1/1 2m50s +statefulset.apps/midcsplmc-csp-proto-midcspsubarray01-test 1/1 2m50s +statefulset.apps/midcsplmc-csp-proto-midcspsubarray02-test 1/1 2m50s +statefulset.apps/midcsplmc-csp-proto-midcspsubarray03-test 1/1 2m50s +statefulset.apps/tango-base-tangodb 1/1 2m50s + +NAME COMPLETIONS DURATION AGE +job.batch/mid-cbf-configurator-cbf-proto-test 1/1 61s 2m50s +job.batch/midcsplmc-configurator-csp-proto-test 1/1 59s 2m50s +``` +The helm release can be deleted and the application stopped using the command: +```bash +make delete +``` +that unistalls the `mid-csp` chart and delete the `test` release in the `csp-proto` namespace. + +Other Makefile targets, such as `describe` and `logs`, provide some useful information when the system has been properly deployed. + +## Run integration tests on a local k8s/minikube cluster + +The project includes a set of tests for the `MidCspMaster` and `MidCspSubarray` TANGO Devices +that can be found in the project `tests` folder.
+To run the tests on the local k8s cluster, issue the command + +

make k8s_test
+from the root project directory.
+ +This command first deploys the system and then executes the integration tests. + +After tests end, run the command: + +
make delete
+ +to uninstall the HELM charts of the `test` release. + +## Gitlab continuos integration tests + +Continuos integration tests in Gitlab rely on the `.gitlab-ci.yml` configuration file that provides al the scripts to build, test and deploy the application.
+This file has been updated to run test in K8s environment and any reference to the use of `docker-compose` as containers manager, has been removed
. +A new job has been added in the pipline `publish` stage to release the the `csp-proto` helm chart in the SKA Helm charts repositoryhostes under `nexus`. + +## Docker-compose support + +Support to `docker-compose` has not been completely removed even if all the main operations are +performed in kubernetes environment.
+Use of `docker-compose` has been maintened only to simplify the development on machines that +are not capable to run minikube in a virtual machine.
+The docker folder of the project contains all the files required to run the system via the +docker-compose tool. +From the docker folder of the project, one can still: + • build the image running
 make build 
+ • start the system dockers with docker-compose executing + make up + • run the test on the local machine calling: + make test The Docker containers running the CBF_Mid devices are instantiated pulling the `mid-cbf-mcs:test` project image from the [Nexus repository](https://nexus.engageska-portugal.pt).
The CSP_Mid.LMC project provides a [Makefile](Makefile) to start the system containers and the tests.
@@ -79,9 +255,6 @@ instances, that is, to run the whole `CSP_Mid.LMC` prototype.>br\> In this way, it's possible to execute some preliminary integration tests, as for example the assignment/release of receptors to a `CSP_Mid Subarray` and its configuration to execute a scan in Imaging mode.
The `CSP_Mid.LMC` and `Mid-CBF.LMC TANGO` Devices are registered with the same TANGO DB, and its configuration is performed via the `dsconfig` TANGO Device provided by the [dsconfig project](https://gitlab.com/MaxIV-KitsControls/lib-maxiv-dsconfig).
-This device use a JSON file to configure the TANGO DB.
-The `CSP_Mid.LMC` and `Mid-CBF.LMC` projects provide its own JSON file: -[midcsplmc\_dsconfig.json](csp-lmc/csp-lmc-mid/csp-lmc-mid/docker/config/midcsplmc_dsconfig.json) and [midcbf\_dsconfig.json](sp-lmc/csp-lmc-mid/csp-lmc-mid/docker/config/midcbf_dsconfig.json) To run the `CSP_Mid.LMC` prototype inside Docker containers,issue the command: @@ -99,11 +272,11 @@ mid-csp-lmc-cbf_dsconfig: the dsconfig container to configure CBF.LMC devi mid-csp-lmc-cbf_dsconfig: the dsconfig container to configure CSP.LMC devices in the TANGO DB mid-csp-lmc-midcspmaster: the CspMaster TANGO device mid-csp-lmc-midcapabilitymonitor: the monitor devices of the CSP_Mid.LMC Capabilities -mid-csp-lmc-midcspsubarray[01-02]: two instances of the CspSubarray TANGO device +mid-csp-lmc-midcspsubarray[01-023: two instances of the CspSubarray TANGO device mid-csp-lmc-rsyslog-csplmc: the rsyslog container for the CSP.LMC devices mid-csp-lmc-rsyslog-cbf : the rsyslog container for the CBF.LMC devices mid-csp-lmc-cbfmaster: the CbfMaster TANGO device -mid-csp-lmc-cbfsubarray[01-02]: two instances of the CbfSubarray TANGO device +mid-csp-lmc-cbfsubarray[01-03]: two instances of the CbfSubarray TANGO device mid-csp-lmc-vcc[001-004]: four instances of the Mid-CBF VCC TANGO device mid-csp-lmc-fsp[01-04]: four instances of the Mid-CBF FSP TANGO device mid-csp-lmc-tmcspsubarrayleafnodetest/2: two instances of the TelState TANGO Device @@ -121,15 +294,6 @@ This means that the TANGO DB running in the container is available on port 10000 Running `jive` on the local host, the `CSP.LMC` and `Mid-CBF.LMC` TANGO Devices registered with the TANGO DB (running in a docker container) can be visualized and explored. -## Running tests - -The project includes a set of tests for the `MidCspMaster` and `MidCspSubarray` TANGO Devices that can be found in the project `tests` folder.
-To run the test on the local host issue the command - -
make test
-from the `docker` project directory.
-The test are run in docker containers providing the proper environment setup and isolation. - ## Known bugs diff --git a/csp-lmc-mid/.make/k8s.mk b/csp-lmc-mid/.make/k8s.mk index 6b98f3f..f3ce058 100644 --- a/csp-lmc-mid/.make/k8s.mk +++ b/csp-lmc-mid/.make/k8s.mk @@ -53,11 +53,14 @@ show: mkcerts ## show the helm chart --set ingress.hostname=$(INGRESS_HOST) chart_lint: ## lint check the helm chart - @helm lint charts/$(HELM_CHART)/ \ + @for i in `ls charts/`; \ + do echo " char dir$${i}"; \ + helm lint charts/$${i}/ \ --namespace $(KUBE_NAMESPACE) \ --set ingress.hostname=$(INGRESS_HOST) \ --set xauthority="$(XAUTHORITYx)" \ - --set display="$(DISPLAY)" \ + --set display="$(DISPLAY)";\ + done helm_delete: ## delete the helm chart release (with Tiller) @helm delete $(HELM_RELEASE) --purge \ @@ -83,7 +86,7 @@ delete_traefik: ## delete the helm chart for traefik. @param: EXTERNAL_IP rm -rf $$TMP describe: ## describe Pods executed from Helm chart - @for i in `kubectl -n $(KUBE_NAMESPACE) get pods -l app.kubernetes.io/instance=$(HELM_RELEASE) -o=name`; \ + @for i in `kubectl -n $(KUBE_NAMESPACE) get pods -l release=$(HELM_RELEASE) -o=name`; \ do echo "---------------------------------------------------"; \ echo "Describe for $${i}"; \ echo kubectl -n $(KUBE_NAMESPACE) describe $${i}; \ @@ -94,7 +97,7 @@ describe: ## describe Pods executed from Helm chart done logs: ## show Helm chart POD logs - @for i in `kubectl -n $(KUBE_NAMESPACE) get pods -l app.kubernetes.io/instance=$(HELM_RELEASE) -o=name`; \ + @for i in `kubectl -n $(KUBE_NAMESPACE) get pods -l release=$(HELM_RELEASE) -o=name`; \ do \ echo "---------------------------------------------------"; \ echo "Logs for $${i}"; \ diff --git a/csp-lmc-mid/charts/mid-csp/Chart.yaml b/csp-lmc-mid/charts/mid-csp/Chart.yaml index 12a2909..af3fb1f 100644 --- a/csp-lmc-mid/charts/mid-csp/Chart.yaml +++ b/csp-lmc-mid/charts/mid-csp/Chart.yaml @@ -1,5 +1,5 @@ -apiVersion: v1 -appVersion: 0.6.8 +apiVersion: v2 +appVersion: 0.6.9 description: A Helm chart for deploying the whole Mid_CSP prototype on Kubernetes name: mid-csp version: 0.1.0 diff --git a/csp-lmc-mid/charts/mid-csp/templates/_helpers.tpl b/csp-lmc-mid/charts/mid-csp/templates/_helpers.tpl new file mode 100644 index 0000000..bd04ea7 --- /dev/null +++ b/csp-lmc-mid/charts/mid-csp/templates/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "mid-csp.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "mid-csp.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "mid-csp.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "mid-csp.labels" -}} +helm.sh/chart: {{ include "mid-csp.chart" . }} +{{ include "mid-csp.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "mid-csp.selectorLabels" -}} +app.kubernetes.io/name: {{ include "mid-csp.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "mid-csp.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "mid-csp.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/csp-lmc-mid/charts/mid-csp/values.yaml b/csp-lmc-mid/charts/mid-csp/values.yaml new file mode 100644 index 0000000..5048f33 --- /dev/null +++ b/csp-lmc-mid/charts/mid-csp/values.yaml @@ -0,0 +1,11 @@ +# Default values for mid-csp. +csp-proto: + csplmc: + enabled: true +cbf-proto: + midcbfmcs: + enabled: true +tango-base: + tangodb: + enabled: true + use_pv: false -- GitLab From 470de3d20adba77ea43be14d39fd4055e55a598f Mon Sep 17 00:00:00 2001 From: toor Date: Mon, 21 Sep 2020 12:15:26 +0200 Subject: [PATCH 42/43] CT-147: changes in csp-proto chart versioning. Use image version for appVersion field. Use SemVer2 for chart version diffrent from image relase number. --- csp-lmc-mid/charts/csp-proto/Chart.yaml | 4 ++-- csp-lmc-mid/charts/mid-csp/Chart.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/csp-lmc-mid/charts/csp-proto/Chart.yaml b/csp-lmc-mid/charts/csp-proto/Chart.yaml index f022adf..8060134 100644 --- a/csp-lmc-mid/charts/csp-proto/Chart.yaml +++ b/csp-lmc-mid/charts/csp-proto/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 -appVersion: "1.0" +appVersion: "0.6.9" description: A Helm chart for deploying the Mid_CSP.LMC devices on Kubernetes name: csp-proto -version: 0.5.3 +version: 0.1.1 icon: https://www.skatelescope.org/wp-content/uploads/2016/07/09545_NEW_LOGO_2014.png diff --git a/csp-lmc-mid/charts/mid-csp/Chart.yaml b/csp-lmc-mid/charts/mid-csp/Chart.yaml index af3fb1f..4091172 100644 --- a/csp-lmc-mid/charts/mid-csp/Chart.yaml +++ b/csp-lmc-mid/charts/mid-csp/Chart.yaml @@ -10,6 +10,6 @@ dependencies: repository: https://gitlab.com/ska-telescope/skampi/-/raw/master/repository condition: tango-base.enabled - name: csp-proto - version: 0.5.3 + version: 0.1.1 repository: "file://../csp-proto" condition: csp-proto.enabled -- GitLab From 911e81277aac5ad4f62fd640d253522274147538 Mon Sep 17 00:00:00 2001 From: toor Date: Mon, 21 Sep 2020 13:00:58 +0200 Subject: [PATCH 43/43] CT-147: README.md update. --- README.md | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 68d5d11..558cb8e 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ CPS.LMC project * [CSP.LMC Common Package](#csp-lmc-common) * [Create the CSP.LMC Common Software python package](#python-package) * [CSP_Mid LMC](#CSP_Mid.LMC) - * [CSP_Mid LMC Deployment in Kubernetes](#Mid-CSP.LMC-Kubernetes-Deployment-via-Helm-Charts) + * [CSP_Mid LMC Deployment in Kubernetes](#mid-CSP.LMC-Kubernetes-Deployment-via-Helm-Charts) * [CSP_Low LMC](#csp-low-lmc) * [Run in containers](#how-to-run-in-docker-containers) * [Known bugs](#known-bugs) @@ -207,23 +207,27 @@ Other Makefile targets, such as `describe` and `logs`, provide some useful infor The project includes a set of tests for the `MidCspMaster` and `MidCspSubarray` TANGO Devices that can be found in the project `tests` folder.
-To run the tests on the local k8s cluster, issue the command +To run the tests on the local k8s cluster, issue the command: -
make k8s_test
+```bash +make k8s_test +``` from the root project directory.
This command first deploys the system and then executes the integration tests. After tests end, run the command: -
make delete
- +```bash +make delete +``` to uninstall the HELM charts of the `test` release. ## Gitlab continuos integration tests Continuos integration tests in Gitlab rely on the `.gitlab-ci.yml` configuration file that provides al the scripts to build, test and deploy the application.
-This file has been updated to run test in K8s environment and any reference to the use of `docker-compose` as containers manager, has been removed
. +This file has been updated to run test in K8s environment and any reference to the use of `docker-compose` as containers manager, +has been removed.
A new job has been added in the pipline `publish` stage to release the the `csp-proto` helm chart in the SKA Helm charts repositoryhostes under `nexus`. ## Docker-compose support @@ -232,14 +236,12 @@ Support to `docker-compose` has not been completely removed even if all the main performed in kubernetes environment.
Use of `docker-compose` has been maintened only to simplify the development on machines that are not capable to run minikube in a virtual machine.
-The docker folder of the project contains all the files required to run the system via the +The `docker` folder of the project contains all the files required to run the system via the docker-compose tool. From the docker folder of the project, one can still: - • build the image running
 make build 
- • start the system dockers with docker-compose executing - make up - • run the test on the local machine calling: - make test + • build the image running `make build` + • start the system dockers with docker-compose executing `make up` + • run the test on the local machine calling `make test` The Docker containers running the CBF_Mid devices are instantiated pulling the `mid-cbf-mcs:test` project image from the [Nexus repository](https://nexus.engageska-portugal.pt).
The CSP_Mid.LMC project provides a [Makefile](Makefile) to start the system containers and the tests.
@@ -251,10 +253,10 @@ The containerised environment relies on three YAML configuration files: Each file includes the stages to run the the `CSP_Mid.LMC TANGO DB`, the `CSP_Mid.LMC` devices and `Mid-CBF.LMC` TANGO Devices inside separate docker containers.
These YAML files are used by `docker-compose` to run both the CSP_Mid.LMC and CBF.LMC TANGO device -instances, that is, to run the whole `CSP_Mid.LMC` prototype.>br\> +instances, that is, to run the whole `CSP_Mid.LMC` prototype.
In this way, it's possible to execute some preliminary integration tests, as for example the assignment/release of receptors to a `CSP_Mid Subarray` and its configuration to execute a scan in Imaging mode.
The `CSP_Mid.LMC` and `Mid-CBF.LMC TANGO` Devices are registered with the same TANGO DB, and its -configuration is performed via the `dsconfig` TANGO Device provided by the [dsconfig project](https://gitlab.com/MaxIV-KitsControls/lib-maxiv-dsconfig).
+configuration is performed via the `dsconfig` TANGO Device provided by the [dsconfig project](https://gitlab.com/MaxIV-KitsControls/lib-maxiv-dsconfig).
To run the `CSP_Mid.LMC` prototype inside Docker containers,issue the command: -- GitLab