diff options
author | amine ezziati <aymane.ezziati@gmail.com> | 2020-07-24 09:08:42 +0200 |
---|---|---|
committer | mrichomme <morgan.richomme@orange.com> | 2020-11-06 17:35:33 +0100 |
commit | 18642f67fcd7268a914fb6632f0f755336e8ba24 (patch) | |
tree | f4d3bd61d3e8158ebf8bd337cdc07a46c6172eb6 /src/onaptests/configuration/basic_clamp_settings.py | |
parent | 31dc9d07a9bd5c98304ae7d58e995321d3e1507f (diff) |
Add CLAMP E2E tests
Issue-ID: TEST-240
Signed-off-by: amine ezziati <mohamedamine.ezziati@orange.com>
Change-Id: Ib612f1670aca10d9ac9f15fadb9cab58a7d8e5a8
Signed-off-by: mrichomme <morgan.richomme@orange.com>
Diffstat (limited to 'src/onaptests/configuration/basic_clamp_settings.py')
-rw-r--r-- | src/onaptests/configuration/basic_clamp_settings.py | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/onaptests/configuration/basic_clamp_settings.py b/src/onaptests/configuration/basic_clamp_settings.py new file mode 100644 index 0000000..1781c54 --- /dev/null +++ b/src/onaptests/configuration/basic_clamp_settings.py @@ -0,0 +1,52 @@ +import sys +from yaml import load + +from pathlib import Path + +from .settings import * # pylint: disable=W0614 + +""" Specific Basic clamp settings.""" +CLEANUP_FLAG = False +CLAMP_DISTRIBUTION_TIMER = 10 +VENDOR_NAME = "basiclamp_vendor" + +VSP_NAME = "basiclamp_vsp" + +OPERATIONAL_POLICIES = [ + { + "name": "MinMax", + "policy_type": "onap.policies.controlloop.guard.common.MinMax", + "policy_version": "1.0.0", + "config_function": "add_minmax_config", #func + "configuration": { + "min": 1, + "max": 10 + } + }, + { + "name": "FrequencyLimiter", + "policy_type": "onap.policies.controlloop.guard.common.FrequencyLimiter", + "policy_version": "1.0.0", + "config_function": "add_frequency_limiter", #func + "configuration": {} + } +] + +CERT = (Path.cwd() / 'cert.pem', Path.cwd() / 'cert.key') +# SERVICE_NAME = "ubuntu18agent" + +# if a yaml file is define, retrieve info from this yaml files +# if not declare the parameters in the settings +SERVICE_YAML_TEMPLATE = (sys.path[-1] + "/onaptests/templates/vnf-services/" + + "ubuntu18agent-service.yaml") +CONFIGURATION_PATH = sys.path[-1] + "/onaptests/configuration/" + +try: + # Try to retrieve the SERVICE NAME from the yaml file + with open(SERVICE_YAML_TEMPLATE, "r") as yaml_template: + yaml_config_file = load(yaml_template) + SERVICE_NAME = next(iter(yaml_config_file.keys())) + VF_NAME = SERVICE_NAME +except ValueError: + SERVICE_NAME = "" # Fill me + VF_NAME = "" # Fill me |