aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--.gitmodules3
-rw-r--r--README.md5
-rw-r--r--requirements.txt5
-rw-r--r--run_basic_clamp.py1
-rw-r--r--run_basic_onboard.py20
-rw-r--r--setup.cfg5
-rw-r--r--src/onaptests/configuration/basic_clamp_settings.py14
-rw-r--r--src/onaptests/configuration/basic_cnf_yaml_settings.py4
-rw-r--r--src/onaptests/configuration/basic_network_nomulticloud_settings.py4
-rw-r--r--src/onaptests/configuration/basic_onboard_settings.py68
-rw-r--r--src/onaptests/configuration/basic_vm_macro_settings.py60
-rw-r--r--src/onaptests/configuration/basic_vm_multicloud_yaml_settings.py (renamed from src/onaptests/configuration/ubuntu16_multicloud_yaml_settings.py)6
-rw-r--r--src/onaptests/configuration/basic_vm_settings.py (renamed from src/onaptests/configuration/ubuntu16_nomulticloud_settings.py)6
-rw-r--r--src/onaptests/configuration/cba_enrichment_settings.py11
-rw-r--r--src/onaptests/configuration/pnf_macro_settings.py45
-rw-r--r--src/onaptests/configuration/settings.py8
-rw-r--r--src/onaptests/configuration/tca-microservice.yaml2
m---------src/onaptests/masspnfsimulator0
-rw-r--r--src/onaptests/scenario/basic_clamp.py47
-rw-r--r--src/onaptests/scenario/basic_cnf.py32
-rw-r--r--src/onaptests/scenario/basic_network.py20
-rw-r--r--src/onaptests/scenario/basic_onboard.py46
-rw-r--r--src/onaptests/scenario/basic_vm.py29
-rw-r--r--src/onaptests/scenario/basic_vm_macro.py125
-rw-r--r--src/onaptests/scenario/cds_blueprint_enrichment.py46
-rw-r--r--src/onaptests/scenario/clearwater_ims.py8
-rw-r--r--src/onaptests/scenario/pnf_macro.py129
-rw-r--r--src/onaptests/steps/base.py102
-rw-r--r--src/onaptests/steps/cloud/cloud_region_create.py52
-rw-r--r--src/onaptests/steps/cloud/complex_create.py13
-rw-r--r--src/onaptests/steps/cloud/customer_create.py7
-rw-r--r--src/onaptests/steps/cloud/k8s_connectivity_info_create.py14
-rw-r--r--src/onaptests/steps/cloud/register_cloud.py116
-rw-r--r--src/onaptests/steps/instantiate/k8s_profile_create.py6
-rw-r--r--src/onaptests/steps/instantiate/msb_k8s.py46
-rw-r--r--src/onaptests/steps/instantiate/service_ala_carte.py36
-rw-r--r--src/onaptests/steps/instantiate/service_macro.py228
-rw-r--r--src/onaptests/steps/instantiate/vf_module_ala_carte.py35
-rw-r--r--src/onaptests/steps/instantiate/vl_ala_carte.py18
-rw-r--r--src/onaptests/steps/instantiate/vnf_ala_carte.py31
-rw-r--r--src/onaptests/steps/loop/clamp.py32
-rw-r--r--src/onaptests/steps/loop/instantiate_loop.py6
-rw-r--r--src/onaptests/steps/onboard/cds.py191
-rw-r--r--src/onaptests/steps/onboard/msb_k8s.py79
-rw-r--r--src/onaptests/steps/onboard/pnf.py115
-rw-r--r--src/onaptests/steps/onboard/service.py120
-rw-r--r--src/onaptests/steps/onboard/vf.py11
-rw-r--r--src/onaptests/steps/reports_collection.py6
-rw-r--r--src/onaptests/steps/simulator/pnf/__init__.py0
-rw-r--r--src/onaptests/steps/simulator/pnf/pnf_config.yaml16
-rw-r--r--src/onaptests/steps/simulator/pnf/pnf_instantiate.py30
-rw-r--r--src/onaptests/steps/simulator/pnf/pnf_register.py38
-rw-r--r--src/onaptests/steps/simulator/pnf/utils.py157
-rw-r--r--src/onaptests/steps/simulator/pnf_simulator_cnf/__init__.py1
-rw-r--r--src/onaptests/steps/simulator/pnf_simulator_cnf/pnf_register.py144
-rw-r--r--src/onaptests/steps/wrapper/__init__.py0
-rw-r--r--src/onaptests/steps/wrapper/helm_charts.py93
-rw-r--r--src/onaptests/steps/wrapper/start.py64
-rwxr-xr-xsrc/onaptests/templates/artifacts/PNF_DEMO.zipbin0 -> 26230 bytes
-rw-r--r--src/onaptests/templates/artifacts/basic_vm_cba.zipbin0 -> 8642 bytes
-rw-r--r--src/onaptests/templates/artifacts/dd.json3649
-rwxr-xr-xsrc/onaptests/templates/artifacts/pnf-simulator.tar.gzbin0 -> 1233 bytes
-rwxr-xr-xsrc/onaptests/templates/artifacts/profile.tar.gzbin0 -> 207 bytes
-rw-r--r--src/onaptests/templates/heat-files/ubuntu16/ubuntu16.zipbin1641 -> 0 bytes
-rw-r--r--src/onaptests/templates/heat-files/ubuntu18/base_ubuntu18.env19
-rw-r--r--src/onaptests/templates/heat-files/ubuntu18/base_ubuntu18.yaml153
-rw-r--r--src/onaptests/templates/heat-files/ubuntu18/ubuntu18agent.zipbin2496 -> 2722 bytes
-rw-r--r--src/onaptests/templates/heat-files/ubuntu20/ubuntu20agent.zipbin0 -> 2719 bytes
-rwxr-xr-xsrc/onaptests/templates/helm_charts/README.md31
-rw-r--r--src/onaptests/templates/reporting/reporting.html.j22
-rw-r--r--src/onaptests/templates/vnf-services/basic_clamp-service.yaml (renamed from src/onaptests/templates/vnf-services/ubuntu18agent-service.yaml)6
-rw-r--r--src/onaptests/templates/vnf-services/basic_onboard-service.yaml.j239
-rw-r--r--src/onaptests/templates/vnf-services/basic_vm-service.yaml (renamed from src/onaptests/templates/vnf-services/ubuntu16test-service.yaml)28
-rw-r--r--src/onaptests/templates/vnf-services/basic_vm_macro-service.yaml54
-rw-r--r--src/onaptests/templates/vnf-services/pnf-service.yaml18
-rw-r--r--src/onaptests/utils/exceptions.py67
-rw-r--r--src/onaptests/utils/simulators.py13
-rw-r--r--tests/data/service_macro_template_pnfs.yaml4
-rw-r--r--tests/data/service_macro_template_vnfs.yaml6
-rw-r--r--tests/test_service_macro_instantiation.py42
-rw-r--r--tests/test_store_state.py186
82 files changed, 6411 insertions, 463 deletions
diff --git a/.gitignore b/.gitignore
index c3fd147..69cc86e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -31,3 +31,4 @@ csit/
benchmark/
.tox/
**/__pycache__/
+*.pyc
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..cb1c115
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "src/onaptests/masspnfsimulator"]
+ path = src/onaptests/masspnfsimulator
+ url = ../../integration/simulators/masspnf-simulator
diff --git a/README.md b/README.md
index dc833e0..367b08f 100644
--- a/README.md
+++ b/README.md
@@ -14,7 +14,6 @@ adapted to your environment.
In addition you must define your service in directory templates/vnf-services
and create zip file for heat template templates/heat_files.
-See ubuntu16test as example
### Prepare your environment and run tests
@@ -52,7 +51,7 @@ See ubuntu16test as example
- Export the setting file in a environment variable
```shell
- export ONAP_PYTHON_SDK_SETTINGS=onaptests.configuration.ubuntu16_multicloud_yaml_settings
+ export ONAP_PYTHON_SDK_SETTINGS=onaptests.configuration.basic_vm_multicloud_yaml_settings
```
Note each "use case" may have its own settings corresponding to the test
@@ -64,7 +63,7 @@ environment and configuration.
ssh user@onap.pod4.opnfv.fr -D 1080
```
-- Once the different input datas are updated in run\_\*.py files and
+- Once the different input datas are updated in run_\*.py files and
that the templates files for your service are defined, start to run
the different steps:
```shell
diff --git a/requirements.txt b/requirements.txt
index 4342c56..945b8ff 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,4 +1,7 @@
xtesting
openstacksdk
-onapsdk>=7.1.0
+onapsdk==7.4.0
jinja2
+kubernetes
+docker
+avionix==0.4.4 \ No newline at end of file
diff --git a/run_basic_clamp.py b/run_basic_clamp.py
index 06c3dda..514b91f 100644
--- a/run_basic_clamp.py
+++ b/run_basic_clamp.py
@@ -14,3 +14,4 @@ if __name__ == "__main__":
basic_clamp = ClampStep(
cleanup=settings.CLEANUP_FLAG)
basic_clamp.execute()
+ basic_clamp.reports_collection.generate_report()
diff --git a/run_basic_onboard.py b/run_basic_onboard.py
new file mode 100644
index 0000000..835c661
--- /dev/null
+++ b/run_basic_onboard.py
@@ -0,0 +1,20 @@
+import logging.config
+import onaptests.utils.exceptions as onap_test_exceptions
+from onapsdk.configuration import settings
+from onaptests.steps.onboard.service import YamlTemplateServiceOnboardStep
+
+
+
+if __name__ == "__main__":
+ # logging configuration for onapsdk, it is not requested for onaptests
+ # Correction requested in onapsdk to avoid having this duplicate code
+ logging.config.dictConfig(settings.LOG_CONFIG)
+ logger = logging.getLogger("Basic Onboard")
+
+ basic_vm_onboard = YamlTemplateServiceOnboardStep(
+ cleanup=settings.CLEANUP_FLAG)
+ try:
+ basic_vm_onboard.execute()
+ except onap_test_exceptions.TestConfigurationException:
+ logger.error("Basic Onboard configuration error")
+ basic_vm_onboard.reports_collection.generate_report()
diff --git a/setup.cfg b/setup.cfg
index d5e2fc7..a2a0d45 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -45,6 +45,11 @@ testpaths = tests
[entry_points]
xtesting.testcase =
basic_vm = onaptests.scenario.basic_vm:BasicVm
+ basic_vm_macro = onaptests.scenario.basic_vm_macro:BasicVmMacro
basic_network = onaptests.scenario.basic_network:BasicNetwork
basic_cnf = onaptests.scenario.basic_cnf:BasicCnf
+ basic_cds = onaptests.scenario.cds_blueprint_enrichment:CDSBlueprintEnrichment
clearwater_ims = onaptests.scenario.clearwater_ims:ClearwaterIms
+ basic_onboard = onaptests.scenario.basic_onboard:BasicOnboard
+ pnf_macro = onaptests.scenario.pnf_macro:PnfMacro
+ basic_clamp = onaptests.scenario.basic_clamp:BasicClamp
diff --git a/src/onaptests/configuration/basic_clamp_settings.py b/src/onaptests/configuration/basic_clamp_settings.py
index 1781c54..1c6ad61 100644
--- a/src/onaptests/configuration/basic_clamp_settings.py
+++ b/src/onaptests/configuration/basic_clamp_settings.py
@@ -1,13 +1,18 @@
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
+
+# pylint: disable=bad-whitespace
+# The ONAP part
+SERVICE_DETAILS=("Onboarding, enriching a model with TCA." +
+ "Design a loop with Clamp and deploy it in Policy and DCAE")
+SERVICE_COMPONENTS="SDC, CLAMP, POLICY, DCAE, DMAAP"
+
VENDOR_NAME = "basiclamp_vendor"
VSP_NAME = "basiclamp_vsp"
@@ -32,13 +37,10 @@ OPERATIONAL_POLICIES = [
}
]
-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")
+ "basic_clamp-service.yaml")
CONFIGURATION_PATH = sys.path[-1] + "/onaptests/configuration/"
try:
diff --git a/src/onaptests/configuration/basic_cnf_yaml_settings.py b/src/onaptests/configuration/basic_cnf_yaml_settings.py
index fefb76b..b68b7df 100644
--- a/src/onaptests/configuration/basic_cnf_yaml_settings.py
+++ b/src/onaptests/configuration/basic_cnf_yaml_settings.py
@@ -40,8 +40,8 @@ K8S_PROFILE_K8S_VERSION = "1.0"
K8S_PROFILE_ARTIFACT_PATH = (sys.path[-1] +
"/onaptests/templates/artifacts/k8sprof.tar.gz")
# Relative path to config file to set k8s connectivity information
-K8S_KUBECONFIG_FILE = (sys.path[-1] +
- "/onaptests/templates/artifacts/config")
+K8S_CONFIG = (sys.path[-1] +
+ "/onaptests/templates/artifacts/config")
VENDOR_NAME = "basicnf_vendor"
diff --git a/src/onaptests/configuration/basic_network_nomulticloud_settings.py b/src/onaptests/configuration/basic_network_nomulticloud_settings.py
index fd7c561..cc22601 100644
--- a/src/onaptests/configuration/basic_network_nomulticloud_settings.py
+++ b/src/onaptests/configuration/basic_network_nomulticloud_settings.py
@@ -6,11 +6,11 @@ from yaml import load
import onaptests.utils.exceptions as onap_test_exceptions
from .settings import * # pylint: disable=W0614
-""" Specific ubuntu16 without multicloud."""
+""" Specific Basic Network without multicloud."""
# pylint: disable=bad-whitespace
# The ONAP part
-SERVICE_DETAILS="Onboarding, distribution and instanitation of asic Network using à la carte"
+SERVICE_DETAILS="Onboarding, distribution and instantiation of Basic Network using à la carte"
SERVICE_COMPONENTS="SDC, DMAAP, AAI, SO, SDNC"
USE_MULTICLOUD = False
# Set ONLY_INSTANTIATE to true to run an instantiation without repeating
diff --git a/src/onaptests/configuration/basic_onboard_settings.py b/src/onaptests/configuration/basic_onboard_settings.py
new file mode 100644
index 0000000..db7680d
--- /dev/null
+++ b/src/onaptests/configuration/basic_onboard_settings.py
@@ -0,0 +1,68 @@
+
+import sys
+import random
+import string
+from yaml import load
+from jinja2 import Environment, PackageLoader
+import onaptests.utils.exceptions as onap_test_exceptions
+from .settings import * # pylint: disable=W0614
+
+""" Creation of service to onboard"""
+
+# We need to create a service file with a random service name,
+# to be sure that we force onboarding
+def generate_service_config_yaml_file():
+ """ generate the service file with a random service name
+ from a jinja template"""
+
+ env = Environment(
+ loader=PackageLoader('onaptests', 'templates/vnf-services'),
+ )
+ template = env.get_template('basic_onboard-service.yaml.j2')
+
+ # get a random string to randomize the vnf name
+ # Random string with the combination of lower and upper case
+ letters = string.ascii_letters
+ result_str = ''.join(random.choice(letters) for i in range(6))
+ service_name = 'basic_onboard_' + result_str
+
+ rendered_template = template.render(service_name=service_name)
+
+ file_name = (sys.path[-1] + "/onaptests/templates/vnf-services/" +
+ "basic-onboard-service.yaml")
+
+ with open(file_name, 'w+') as file_to_write:
+ file_to_write.write(rendered_template)
+
+"""Basic onboard service to only onboard a service in SDC"""
+
+# pylint: disable=bad-whitespace
+# The ONAP part
+SERVICE_DETAILS="Onboarding of an Ubuntu VM"
+SERVICE_COMPONENTS="SDC"
+
+#USE_MULTICLOUD = False
+# Set ONLY_INSTANTIATE to true to run an instantiation without repeating
+# onboarding and related AAI configuration (Cloud config)
+#ONLY_INSTANTIATE= False
+
+# if a yaml file is define, retrieve info from this yaml files
+# if not declare the parameters in the settings
+generate_service_config_yaml_file()
+SERVICE_YAML_TEMPLATE = (sys.path[-1] + "/onaptests/templates/vnf-services/" +
+ "basic-onboard-service.yaml")
+
+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()))
+except (FileNotFoundError, ValueError):
+ raise onap_test_exceptions.TestConfigurationException
+
+#CLEANUP_FLAG = True
+#CLEANUP_ACTIVITY_TIMER = 10 # nb of seconds before cleanup in case cleanup option is set
+VENDOR_NAME = "basic_onboard_vendor"
+
+VF_NAME = "basic_onboard_vf"
+VSP_NAME = "basic_onboard_vsp"
diff --git a/src/onaptests/configuration/basic_vm_macro_settings.py b/src/onaptests/configuration/basic_vm_macro_settings.py
new file mode 100644
index 0000000..7bce5db
--- /dev/null
+++ b/src/onaptests/configuration/basic_vm_macro_settings.py
@@ -0,0 +1,60 @@
+import os
+import openstack
+from pathlib import Path
+
+from yaml import load
+
+import onaptests.utils.exceptions as onap_test_exceptions
+from .settings import * # pylint: disable=W0614
+
+
+CLEANUP_FLAG = True
+
+CDS_DD_FILE = Path(Path(__file__).parent.parent, "templates/artifacts/dd.json")
+CDS_CBA_UNENRICHED = Path(Path(__file__).parent.parent, "templates/artifacts/basic_vm_cba.zip")
+CDS_CBA_ENRICHED = "/tmp/BASIC_VM_enriched.zip"
+
+ONLY_INSTANTIATE = False
+USE_MULTICLOUD = True
+
+VENDOR_NAME = "basicvm_macro_vendor"
+
+CLOUD_REGION_CLOUD_OWNER = "basicvm-macro-cloud-owner"
+CLOUD_REGION_TYPE = "openstack"
+CLOUD_REGION_VERSION = "pike"
+CLOUD_OWNER_DEFINED_TYPE = "N/A"
+
+AVAILABILITY_ZONE_NAME = "basicvm-macro-availability-zone"
+AVAILABILITY_ZONE_TYPE = "nova"
+COMPLEX_PHYSICAL_LOCATION_ID = "lannion"
+COMPLEX_DATA_CENTER_CODE = "1234-5"
+
+GLOBAL_CUSTOMER_ID = "basicvm-customer"
+
+TEST_CLOUD = os.getenv('OS_TEST_CLOUD')
+cloud = openstack.connect(cloud=TEST_CLOUD)
+VIM_USERNAME = cloud.config.auth.get('username','Fill me')
+VIM_PASSWORD = cloud.config.auth.get('password','Fill me')
+VIM_SERVICE_URL = cloud.config.auth.get('auth_url','Fill me')
+TENANT_ID = cloud.config.auth.get('project_id','Fill me')
+TENANT_NAME = cloud.config.auth.get('project_name','Fill me')
+CLOUD_REGION_ID = cloud.config.auth.get('region_name','RegionOne')
+CLOUD_DOMAIN = cloud.config.auth.get('project_domain_name','Default')
+
+OWNING_ENTITY = "basicvm-oe"
+PROJECT = "basicvm-project"
+LINE_OF_BUSINESS = "basicvm-lob"
+PLATFORM = "basicvm-platform"
+CLOUD_DOMAIN = "Default"
+SERVICE_YAML_TEMPLATE = Path(Path(__file__).parent.parent, "templates/vnf-services/" +
+ "basic_vm_macro-service.yaml")
+
+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()))
+except (FileNotFoundError, ValueError):
+ raise onap_test_exceptions.TestConfigurationException
+
+SERVICE_INSTANCE_NAME = "basic_vm_macro_service_instance"
diff --git a/src/onaptests/configuration/ubuntu16_multicloud_yaml_settings.py b/src/onaptests/configuration/basic_vm_multicloud_yaml_settings.py
index 5036ed8..437bd13 100644
--- a/src/onaptests/configuration/ubuntu16_multicloud_yaml_settings.py
+++ b/src/onaptests/configuration/basic_vm_multicloud_yaml_settings.py
@@ -1,7 +1,7 @@
import sys
from .settings import * # pylint: disable=W0614
-""" Specific ubuntu16 with multicloud and yaml config scenario."""
+""" Specific Basic VM with multicloud and yaml config scenario."""
SERVICE_DETAILS = ("Onboarding, distribution and instantiation of a VM" +
"using à la carte and Multicloud module")
SERVICE_COMPONENTS="SDC, DMAAP, AAI, SO, SDNC, Multicloud"
@@ -11,7 +11,7 @@ USE_MULTICLOUD = True
# onboarding and related AAI configuration (Cloud config)
ONLY_INSTANTIATE= False
VENDOR_NAME = "sdktests_vendor"
-SERVICE_NAME = "ubuntu16test" # must be the same as in YAML
+SERVICE_NAME = "basicvmtest" # must be the same as in YAML
CLOUD_REGION_CLOUD_OWNER = "sdktestsOwner" # must not contain _
CLOUD_REGION_ID = "RegionOne" # should be valid, as otherwise MultiCloud fails
@@ -40,4 +40,4 @@ PLATFORM = "sdktests_platform"
SERVICE_INSTANCE_NAME = "sdktests_service_instance_name"
-SERVICE_YAML_TEMPLATE = sys.path[-1] + "/onaptests/templates/vnf-services/ubuntu16test-service.yaml"
+SERVICE_YAML_TEMPLATE = sys.path[-1] + "/onaptests/templates/vnf-services/basic_vm-service.yaml"
diff --git a/src/onaptests/configuration/ubuntu16_nomulticloud_settings.py b/src/onaptests/configuration/basic_vm_settings.py
index 24686af..a62e0b1 100644
--- a/src/onaptests/configuration/ubuntu16_nomulticloud_settings.py
+++ b/src/onaptests/configuration/basic_vm_settings.py
@@ -6,7 +6,7 @@ from yaml import load
import onaptests.utils.exceptions as onap_test_exceptions
from .settings import * # pylint: disable=W0614
-""" Specific ubuntu16 without multicloud."""
+""" Specific basic_vm without multicloud."""
# pylint: disable=bad-whitespace
# The ONAP part
@@ -21,7 +21,7 @@ ONLY_INSTANTIATE= False
# 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/" +
- "ubuntu16test-service.yaml")
+ "basic_vm-service.yaml")
try:
# Try to retrieve the SERVICE NAME from the yaml file
@@ -55,7 +55,7 @@ PROJECT = "basicvm-project"
LINE_OF_BUSINESS = "basicvm-lob"
PLATFORM = "basicvm-platform"
-SERVICE_INSTANCE_NAME = "basicvm_ubuntu16_service_instance"
+SERVICE_INSTANCE_NAME = "basic_vm_service_instance"
# The cloud Part
# Assuming a cloud.yaml is available, use the openstack client
diff --git a/src/onaptests/configuration/cba_enrichment_settings.py b/src/onaptests/configuration/cba_enrichment_settings.py
new file mode 100644
index 0000000..0770d8d
--- /dev/null
+++ b/src/onaptests/configuration/cba_enrichment_settings.py
@@ -0,0 +1,11 @@
+from pathlib import Path
+
+from .settings import * # pylint: disable=W0614
+
+SERVICE_NAME = "CDS blueprint enrichment"
+
+CLEANUP_FLAG = True
+
+CDS_DD_FILE = Path(Path(__file__).parent.parent, "templates/artifacts/dd.json")
+CDS_CBA_UNENRICHED = Path(Path(__file__).parent.parent, "templates/artifacts/PNF_DEMO.zip")
+CDS_CBA_ENRICHED = "/tmp/PNF_DEMO_enriched.zip"
diff --git a/src/onaptests/configuration/pnf_macro_settings.py b/src/onaptests/configuration/pnf_macro_settings.py
new file mode 100644
index 0000000..e05b6c9
--- /dev/null
+++ b/src/onaptests/configuration/pnf_macro_settings.py
@@ -0,0 +1,45 @@
+from pathlib import Path
+from uuid import uuid4
+
+from .settings import * # pylint: disable=W0614
+
+ONLY_INSTANTIATE = False
+CLEANUP_FLAG = True
+
+VENDOR_NAME = "pnf_macro_vendor"
+SERVICE_NAME = "test_pnf_macro"
+SERVICE_INSTANCE_NAME = "TestPNFMacroInstantiation"
+SERVICE_YAML_TEMPLATE = Path(Path(__file__).parent.parent,
+ "templates/vnf-services/pnf-service.yaml")
+
+CDS_DD_FILE = Path(Path(__file__).parent.parent,
+ "templates/artifacts/dd.json")
+CDS_CBA_UNENRICHED = Path(Path(__file__).parent.parent,
+ "templates/artifacts/PNF_DEMO.zip")
+CDS_CBA_ENRICHED = "/tmp/PNF_DEMO_enriched.zip"
+
+CLOUD_REGION_CLOUD_OWNER = "basicnf-owner" # must not contain _
+CLOUD_REGION_ID = "k8sregion"
+CLOUD_REGION_TYPE = "k8s"
+CLOUD_REGION_VERSION = "1.0"
+CLOUD_OWNER_DEFINED_TYPE = "N/A"
+COMPLEX_PHYSICAL_LOCATION_ID = "sdktests"
+GLOBAL_CUSTOMER_ID = "pnf_macrocustomer"
+OWNING_ENTITY = "pnf_macro_owning_entity"
+PROJECT = "pnf_macro_project"
+LINE_OF_BUSINESS = "pnf_macro_line_of_business"
+PLATFORM = "pnf_macro_platform"
+
+INSTANTIATION_TIMEOUT = 600
+
+PNF_DEFINITION_ATRIFACT_FILE_PATH = Path(Path(__file__).parent.parent,
+ "templates/artifacts/pnf-simulator.tar.gz")
+PNF_RB_NAME = f"pnf-cnf-rb-{str(uuid4())}"
+PNF_RB_VERSION = "v1"
+PNF_PROFILE_ARTIFACT_FILE_PATH = Path(Path(__file__).parent.parent,
+ "templates/artifacts/profile.tar.gz")
+PNF_PROFILE_NAME = f"pnf-cnf-profile-{str(uuid4())}"
+K8S_VERSION = "1.0"
+K8S_CONFIG = str(Path(Path(__file__).parent.parent, "templates/artifacts/config"))
+
+SERVICE_INSTANCE_NAME = "TestPNFMacroInstantiation"
diff --git a/src/onaptests/configuration/settings.py b/src/onaptests/configuration/settings.py
index d181b04..491e5e0 100644
--- a/src/onaptests/configuration/settings.py
+++ b/src/onaptests/configuration/settings.py
@@ -37,7 +37,13 @@ LOG_CONFIG = {
"handlers": ["console", "file"]
}
}
+CLEANUP_FLAG = False
REPORTING_FILE_PATH = "/tmp/reporting.html"
K8S_REGION_TYPE = "k8s"
-# SOCK_HTTP = "socks5h://127.0.0.1:8080"
+TILLER_HOST = "localhost"
+K8S_CONFIG = None # None means it will use default config (~/.kube/config)
+K8S_NAMESPACE = "onap" # Kubernetes namespace
+#SOCK_HTTP = "socks5h://127.0.0.1:8091"
+
+ORCHESTRATION_REQUEST_TIMEOUT = 60.0 * 15 # 15 minutes in seconds
diff --git a/src/onaptests/configuration/tca-microservice.yaml b/src/onaptests/configuration/tca-microservice.yaml
index e7d967a..0f13c53 100644
--- a/src/onaptests/configuration/tca-microservice.yaml
+++ b/src/onaptests/configuration/tca-microservice.yaml
@@ -19,7 +19,7 @@
tosca_definitions_version: cloudify_dsl_1_3
imports:
- https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml
- - plugin:k8splugin?version=3.4.2
+ - plugin:k8splugin?version=>=3.4.3,<4.0.0
- plugin:clamppolicyplugin?version=1.1.0
inputs:
service_name:
diff --git a/src/onaptests/masspnfsimulator b/src/onaptests/masspnfsimulator
new file mode 160000
+Subproject 1bc17f351d6d7afad961dfbbfca2f277fe73c5b
diff --git a/src/onaptests/scenario/basic_clamp.py b/src/onaptests/scenario/basic_clamp.py
new file mode 100644
index 0000000..d3a9ba1
--- /dev/null
+++ b/src/onaptests/scenario/basic_clamp.py
@@ -0,0 +1,47 @@
+"""Basic Clamp test case."""
+import logging
+import time
+from xtesting.core import testcase
+from onapsdk.configuration import settings
+from onapsdk.exceptions import SDKException, APIError
+from onaptests.steps.loop.clamp import ClampStep
+from onaptests.utils.exceptions import OnapTestException
+class BasicClamp(testcase.TestCase):
+ """Onboard, update a model with a loop, design the loop and deploy it."""
+ __logger = logging.getLogger(__name__)
+ def __init__(self, **kwargs):
+ """Init Basic Clamp, onboard a VM, design and deploy a loop with CLAMP."""
+ if "case_name" not in kwargs:
+ kwargs["case_name"] = 'basic_clamp'
+ super(BasicClamp, self).__init__(**kwargs)
+ self.__logger.debug("Basic CLAMP init started")
+ self.test = ClampStep(
+ cleanup=settings.CLEANUP_FLAG)
+ self.start_time = None
+ self.stop_time = None
+ self.result = 0
+ def run(self):
+ """Run Basic CLAMP onap test."""
+ self.start_time = time.time()
+ self.__logger.debug("start time")
+ try:
+ self.test.execute()
+ self.__logger.info("VNF basic_clamp successfully created")
+ # The cleanup is part of the test, not only a teardown action
+ if settings.CLEANUP_FLAG:
+ self.__logger.info("VNF basic_clamp cleanup called")
+ time.sleep(settings.CLEANUP_ACTIVITY_TIMER)
+ self.test.cleanup()
+ self.result = 100
+ else:
+ self.__logger.info("No cleanup requested. Test completed.")
+ self.result = 100
+ except (OnapTestException, SDKException, APIError) as exc:
+ self.result = 0
+ self.__logger.error(exc.error_message)
+ finally:
+ self.stop_time = time.time()
+ def clean(self):
+ """Clean Additional resources if needed."""
+ self.__logger.info("Generate Test report")
+ self.test.reports_collection.generate_report()
diff --git a/src/onaptests/scenario/basic_cnf.py b/src/onaptests/scenario/basic_cnf.py
index 30c3c3b..4d98398 100644
--- a/src/onaptests/scenario/basic_cnf.py
+++ b/src/onaptests/scenario/basic_cnf.py
@@ -5,8 +5,10 @@ import time
from xtesting.core import testcase
from onapsdk.configuration import settings
-import onaptests.utils.exceptions as onap_test_exceptions
+from onapsdk.exceptions import SDKException
+
from onaptests.steps.instantiate.vf_module_ala_carte import YamlTemplateVfModuleAlaCarteInstantiateStep
+from onaptests.utils.exceptions import OnapTestException
class BasicCnf(testcase.TestCase):
"""Onboard then instantiate a simple CNF with ONAP."""
@@ -41,33 +43,9 @@ class BasicCnf(testcase.TestCase):
else:
self.__logger.info("No cleanup requested. Test completed.")
self.result = 100
- except onap_test_exceptions.TestConfigurationException:
- self.result = 0
- self.__logger.error("Basic CNF configuration error")
- except onap_test_exceptions.ServiceInstantiateException:
- self.result = 0
- self.__logger.error("Basic CNF service instantiation error")
- except onap_test_exceptions.ServiceCleanupException:
- self.result = 0
- self.__logger.error("Basic CNF service instance cleanup error")
- except onap_test_exceptions.VnfInstantiateException:
- self.result = 0
- self.__logger.error("Basic CNF Vnf instantiation error")
- except onap_test_exceptions.VnfCleanupException:
- self.result = 0
- self.__logger.error("Basic CNF Vnf instance cleanup error")
- except onap_test_exceptions.ProfileInformationException:
- self.__logger.error("Missing k8s profile information")
- self.result = 0
- except onap_test_exceptions.ProfileCleanupException:
- self.__logger.error("K8s profile deletion failed")
- self.result = 0
- except onap_test_exceptions.VfModuleInstantiateException:
- self.result = 0
- self.__logger.error("Basic CNF Module instantiation error")
- except onap_test_exceptions.VfModuleCleanupException:
- self.__logger.error("Basic CNF Module cleanup failed.")
+ except (OnapTestException, SDKException) as exc:
self.result = 0
+ self.__logger.error(exc.error_message)
finally:
self.stop_time = time.time()
diff --git a/src/onaptests/scenario/basic_network.py b/src/onaptests/scenario/basic_network.py
index de465d3..1b7bd14 100644
--- a/src/onaptests/scenario/basic_network.py
+++ b/src/onaptests/scenario/basic_network.py
@@ -5,9 +5,10 @@ import time
from xtesting.core import testcase
from onapsdk.configuration import settings
+from onapsdk.exceptions import SDKException
-import onaptests.utils.exceptions as onap_test_exceptions
from onaptests.steps.instantiate.vl_ala_carte import YamlTemplateVlAlaCarteInstantiateStep
+from onaptests.utils.exceptions import OnapTestException
class BasicNetwork(testcase.TestCase):
"""Onboard then instantiate a simple Network with ONAP."""
@@ -40,24 +41,15 @@ class BasicNetwork(testcase.TestCase):
time.sleep(settings.CLEANUP_ACTIVITY_TIMER)
try:
self.test.cleanup()
- except ValueError as error:
- self.__logger.info("service deleted as expected {0}".format(error))
+ except SDKException as error:
+ self.__logger.info("service deletion error {0}".format(error))
self.result = 100
else:
self.__logger.info("No cleanup requested. Test completed.")
self.result = 100
- except onap_test_exceptions.ServiceInstantiateException:
- self.__logger.error("Basic network service instantiation failed.")
- self.result = 0
- except onap_test_exceptions.ServiceInstantiateException:
- self.__logger.error("Basic network service cleanup failed.")
- self.result = 0
- except onap_test_exceptions.NetworkInstantiateException:
- self.__logger.error("Basic network VL instantiation failed.")
- self.result = 0
- except onap_test_exceptions.NetworkCleanupException:
- self.__logger.error("Basic network VL cleanup failed.")
+ except (OnapTestException, SDKException) as exc:
self.result = 0
+ self.__logger.error(exc.error_message)
finally:
self.stop_time = time.time()
diff --git a/src/onaptests/scenario/basic_onboard.py b/src/onaptests/scenario/basic_onboard.py
new file mode 100644
index 0000000..6277f9d
--- /dev/null
+++ b/src/onaptests/scenario/basic_onboard.py
@@ -0,0 +1,46 @@
+#!/usr/bin/env python
+"""Basic Onboard test case."""
+import logging
+import time
+from xtesting.core import testcase
+from onapsdk.configuration import settings
+from onapsdk.exceptions import SDKException
+from onaptests.steps.onboard.service import YamlTemplateServiceOnboardStep
+from onaptests.utils.exceptions import OnapTestException
+
+class BasicOnboard(testcase.TestCase):
+ """Onboard a simple VM with ONAP."""
+
+ __logger = logging.getLogger(__name__)
+
+ def __init__(self, **kwargs):
+ """Init BasicOnboard."""
+ # import basic_onboard_settings needed
+ if "case_name" not in kwargs:
+ kwargs["case_name"] = 'basic_onboard'
+ super(BasicOnboard, self).__init__(**kwargs)
+ self.__logger.debug("BasicOnboard init started")
+ self.test = YamlTemplateServiceOnboardStep(
+ cleanup=settings.CLEANUP_FLAG)
+ self.start_time = None
+ self.stop_time = None
+ self.result = 0
+
+ def run(self):
+ """Run basic_onboard and onboard a simple service"""
+ self.start_time = time.time()
+ self.__logger.debug("start time")
+ try:
+ self.test.execute()
+ self.__logger.info("VNF basic_vm successfully onboarded")
+ self.result = 100
+ except (OnapTestException, SDKException) as exc:
+ self.result = 0
+ self.__logger.error(exc.error_message)
+ finally:
+ self.stop_time = time.time()
+
+ def clean(self):
+ """Clean Additional resources if needed."""
+ self.__logger.info("Generate Test report")
+ self.test.reports_collection.generate_report()
diff --git a/src/onaptests/scenario/basic_vm.py b/src/onaptests/scenario/basic_vm.py
index 35cedbc..b758088 100644
--- a/src/onaptests/scenario/basic_vm.py
+++ b/src/onaptests/scenario/basic_vm.py
@@ -5,8 +5,10 @@ import time
from xtesting.core import testcase
from onapsdk.configuration import settings
-import onaptests.utils.exceptions as onap_test_exceptions
+from onapsdk.exceptions import SDKException
+
from onaptests.steps.instantiate.vf_module_ala_carte import YamlTemplateVfModuleAlaCarteInstantiateStep
+from onaptests.utils.exceptions import OnapTestException
class BasicVm(testcase.TestCase):
"""Onboard then instantiate a simple VM with ONAP."""
@@ -15,7 +17,6 @@ class BasicVm(testcase.TestCase):
def __init__(self, **kwargs):
"""Init BasicVM."""
- # import ubuntu16_nomulticloud_settings needed
if "case_name" not in kwargs:
kwargs["case_name"] = 'basic_vm'
super(BasicVm, self).__init__(**kwargs)
@@ -27,7 +28,7 @@ class BasicVm(testcase.TestCase):
self.result = 0
def run(self):
- """Run onap_tests with ubuntu16 VM."""
+ """Run Basic VM onap test."""
self.start_time = time.time()
self.__logger.debug("start time")
try:
@@ -42,27 +43,9 @@ class BasicVm(testcase.TestCase):
else:
self.__logger.info("No cleanup requested. Test completed.")
self.result = 100
- except onap_test_exceptions.TestConfigurationException:
- self.result = 0
- self.__logger.error("Basic VM configuration error")
- except onap_test_exceptions.ServiceInstantiateException:
- self.result = 0
- self.__logger.error("Basic VM instantiation error")
- except onap_test_exceptions.ServiceCleanupException:
- self.result = 0
- self.__logger.error("Basic VM instance cleanup error")
- except onap_test_exceptions.VnfInstantiateException:
- self.result = 0
- self.__logger.error("Basic VM Vnf instantiation error")
- except onap_test_exceptions.VnfCleanupException:
- self.result = 0
- self.__logger.error("Basic VM Vnf instance cleanup error")
- except onap_test_exceptions.VfModuleInstantiateException:
- self.result = 0
- self.__logger.error("Basic VM Module instantiation error")
- except onap_test_exceptions.VfModuleCleanupException:
- self.__logger.error("Basic VM Module cleanup failed.")
+ except (OnapTestException, SDKException) as exc:
self.result = 0
+ self.__logger.error(exc.error_message)
finally:
self.stop_time = time.time()
diff --git a/src/onaptests/scenario/basic_vm_macro.py b/src/onaptests/scenario/basic_vm_macro.py
new file mode 100644
index 0000000..c90d48b
--- /dev/null
+++ b/src/onaptests/scenario/basic_vm_macro.py
@@ -0,0 +1,125 @@
+"""Instantiate basic vm using SO macro flow."""
+import logging
+import time
+from yaml import load
+
+from onapsdk.configuration import settings
+from onapsdk.exceptions import SDKException
+from xtesting.core import testcase
+
+from onaptests.steps.base import YamlTemplateBaseStep
+from onaptests.steps.onboard.cds import CbaPublishStep
+from onaptests.utils.exceptions import OnapTestException
+from onaptests.steps.instantiate.service_macro import YamlTemplateServiceMacroInstantiateStep
+
+
+class BasicVmMacroStep(YamlTemplateBaseStep):
+
+ def __init__(self, cleanup=False):
+ """Initialize step.
+
+ Substeps:
+ - CbaPublishStep
+ - YamlTemplateServiceAlaCarteInstantiateStep.
+ """
+ super().__init__(cleanup=cleanup)
+ self._yaml_template: dict = None
+ self.add_step(CbaPublishStep(
+ cleanup=settings.CLEANUP_FLAG
+ ))
+ self.add_step(YamlTemplateServiceMacroInstantiateStep(
+ cleanup=settings.CLEANUP_FLAG
+ ))
+
+ @property
+ def description(self) -> str:
+ """Step description.
+
+ Used for reports
+
+ Returns:
+ str: Step description
+
+ """
+ return "Basic VM macro scenario step"
+
+ @property
+ def component(self) -> str:
+ """Component name.
+
+ Name of component which step is related with.
+ Most is the name of ONAP component.
+
+ Returns:
+ str: Component name
+
+ """
+ return "PythonSDK-tests"
+
+ @property
+ def yaml_template(self) -> dict:
+ """YAML template abstract property.
+
+ Every YAML template step need to implement that property.
+
+ Returns:
+ dict: YAML template
+
+ """
+ if not self._yaml_template:
+ with open(settings.SERVICE_YAML_TEMPLATE, "r") as yaml_template:
+ self._yaml_template: dict = load(yaml_template)
+ return self._yaml_template
+
+ @property
+ def service_name(self) -> dict:
+ """Service name.
+
+ Get from YAML template.
+
+ Returns:
+ str: Service name
+
+ """
+ return next(iter(self.yaml_template.keys()))
+
+ @property
+ def service_instance_name(self) -> str:
+ """Service instance name.
+
+ Returns:
+ str: Service instance name
+
+ """
+ return settings.SERVICE_INSTANCE_NAME
+
+
+class BasicVmMacro(testcase.TestCase):
+ """Instantiate a basic vm macro."""
+
+ __logger = logging.getLogger(__name__)
+
+ def __init__(self, **kwargs):
+ """Init Basic Macro use case."""
+ if "case_name" not in kwargs:
+ kwargs["case_name"] = 'basic_vm_macro'
+ super().__init__(**kwargs)
+ self.__logger.debug("Basic VM macro init started")
+ self.test = BasicVmMacroStep(cleanup=settings.CLEANUP_FLAG)
+
+ def run(self):
+ """Run basic vm macro test."""
+ self.start_time = time.time()
+ try:
+ self.test.execute()
+ self.test.cleanup()
+ self.result = 100
+ except (OnapTestException, SDKException) as exc:
+ self.result = 0
+ self.__logger.error(exc.error_message)
+ finally:
+ self.stop_time = time.time()
+
+ def clean(self):
+ """Generate report."""
+ self.test.reports_collection.generate_report()
diff --git a/src/onaptests/scenario/cds_blueprint_enrichment.py b/src/onaptests/scenario/cds_blueprint_enrichment.py
new file mode 100644
index 0000000..c1df63e
--- /dev/null
+++ b/src/onaptests/scenario/cds_blueprint_enrichment.py
@@ -0,0 +1,46 @@
+#!/usr/bin/env python
+"""Simple CDS blueprint erichment test scenario."""
+
+import logging
+import time
+
+from onapsdk.configuration import settings
+from onapsdk.exceptions import SDKException
+from xtesting.core import testcase
+
+from onaptests.steps.onboard.cds import CbaEnrichStep
+from onaptests.utils.exceptions import OnapTestException
+
+
+class CDSBlueprintEnrichment(testcase.TestCase):
+ """Enrich simple blueprint using CDS blueprintprocessor."""
+
+ __logger = logging.getLogger(__name__)
+
+ def __init__(self, **kwargs):
+ """Init CDS blueprint enrichment use case."""
+ if "case_name" not in kwargs:
+ kwargs["case_name"] = 'basic_cds'
+ super(CDSBlueprintEnrichment, self).__init__(**kwargs)
+ self.__logger.debug("CDS blueprint enrichment initialization")
+ self.test = CbaEnrichStep(
+ cleanup=settings.CLEANUP_FLAG)
+ self.start_time = None
+ self.stop_time = None
+ self.result = 0
+
+ def run(self):
+ self.__logger.debug("CDS blueprint enrichment run")
+ self.start_time = time.time()
+ try:
+ self.test.execute()
+ self.result = 100
+ except (OnapTestException, SDKException) as exc:
+ self.result = 0
+ self.__logger.error(exc.error_message)
+ self.stop_time = time.time()
+
+ def clean(self):
+ """Clean Additional resources if needed."""
+ self.__logger.info("Generate Test report")
+ self.test.reports_collection.generate_report()
diff --git a/src/onaptests/scenario/clearwater_ims.py b/src/onaptests/scenario/clearwater_ims.py
index 0177e02..2a035bb 100644
--- a/src/onaptests/scenario/clearwater_ims.py
+++ b/src/onaptests/scenario/clearwater_ims.py
@@ -5,7 +5,10 @@ import time
from xtesting.core import testcase
from onapsdk.configuration import settings
+from onapsdk.exceptions import SDKException
+
from onaptests.steps.instantiate.vf_module_ala_carte import YamlTemplateVfModuleAlaCarteInstantiateStep
+from onaptests.utils.exceptions import OnapTestException
class ClearwaterIms(testcase.TestCase):
"""Onboard then instantiate a clearwater vIMS with ONAP."""
@@ -42,9 +45,10 @@ class ClearwaterIms(testcase.TestCase):
self.__logger.info("No cleanup requested. Test completed.")
self.result = 100
self.stop_time = time.time()
- except:
- self.__logger.error("Clearwater IMS test case failed.")
+ except (OnapTestException, SDKException) as exc:
self.result = 0
+ self.__logger.error(exc.error_message)
+ finally:
self.stop_time = time.time()
def clean(self):
diff --git a/src/onaptests/scenario/pnf_macro.py b/src/onaptests/scenario/pnf_macro.py
new file mode 100644
index 0000000..fef8b83
--- /dev/null
+++ b/src/onaptests/scenario/pnf_macro.py
@@ -0,0 +1,129 @@
+"""Instantiate service with PNF using SO macro flow."""
+import logging
+import time
+from yaml import load
+
+from xtesting.core import testcase
+from onapsdk.configuration import settings
+from onapsdk.exceptions import SDKException
+
+from onaptests.steps.base import YamlTemplateBaseStep
+from onaptests.steps.onboard.cds import CbaEnrichStep
+from onaptests.steps.simulator.pnf_simulator_cnf.pnf_register import PnfSimulatorCnfRegisterStep
+from onaptests.steps.instantiate.service_macro import YamlTemplateServiceMacroInstantiateStep
+from onaptests.utils.exceptions import OnapTestException
+
+
+class PnfMacroScenarioStep(YamlTemplateBaseStep):
+ """Step created to run scenarion and generate report."""
+
+ def __init__(self, cleanup=False):
+ """Initialize step.
+
+ Substeps:
+ - YamlTemplateServiceAlaCarteInstantiateStep.
+ """
+ super().__init__(cleanup=cleanup)
+ self._yaml_template: dict = None
+ self.add_step(PnfSimulatorCnfRegisterStep(
+ cleanup=settings.CLEANUP_FLAG
+ ))
+ self.add_step(CbaEnrichStep(
+ cleanup=settings.CLEANUP_FLAG
+ ))
+ self.add_step(YamlTemplateServiceMacroInstantiateStep(
+ cleanup=settings.CLEANUP_FLAG
+ ))
+
+ @property
+ def description(self) -> str:
+ """Step description.
+
+ Used for reports
+
+ Returns:
+ str: Step description
+
+ """
+ return "PNF macro scenario step"
+
+ @property
+ def component(self) -> str:
+ """Component name.
+
+ Name of component which step is related with.
+ Most is the name of ONAP component.
+
+ Returns:
+ str: Component name
+
+ """
+ return "PythonSDK-tests"
+
+ @property
+ def yaml_template(self) -> dict:
+ """YAML template abstract property.
+
+ Every YAML template step need to implement that property.
+
+ Returns:
+ dict: YAML template
+
+ """
+ if not self._yaml_template:
+ with open(settings.SERVICE_YAML_TEMPLATE, "r") as yaml_template:
+ self._yaml_template: dict = load(yaml_template)
+ return self._yaml_template
+
+ @property
+ def service_name(self) -> dict:
+ """Service name.
+
+ Get from YAML template.
+
+ Returns:
+ str: Service name
+
+ """
+ return next(iter(self.yaml_template.keys()))
+
+ @property
+ def service_instance_name(self) -> str:
+ """Service instance name.
+
+ Returns:
+ str: Service instance name
+
+ """
+ return settings.SERVICE_INSTANCE_NAME
+
+
+class PnfMacro(testcase.TestCase):
+ """Run PNF simulator and onboard then instantiate a service with PNF."""
+
+ __logger = logging.getLogger(__name__)
+
+ def __init__(self, **kwargs):
+ """Init Basic Network use case."""
+ if "case_name" not in kwargs:
+ kwargs["case_name"] = 'pnf_macro'
+ super().__init__(**kwargs)
+ self.__logger.debug("PnfMacro init started")
+ self.test = PnfMacroScenarioStep(cleanup=settings.CLEANUP_FLAG)
+
+ def run(self):
+ """Run PNF macro test."""
+ self.start_time = time.time()
+ try:
+ self.test.execute()
+ self.test.cleanup()
+ self.result = 100
+ except (OnapTestException, SDKException) as exc:
+ self.result = 0
+ self.__logger.error(exc.error_message)
+ finally:
+ self.stop_time = time.time()
+
+ def clean(self):
+ """Generate report."""
+ self.test.reports_collection.generate_report()
diff --git a/src/onaptests/steps/base.py b/src/onaptests/steps/base.py
index 8d70405..6d43fbc 100644
--- a/src/onaptests/steps/base.py
+++ b/src/onaptests/steps/base.py
@@ -1,13 +1,17 @@
+import functools
+import itertools
import logging
import logging.config
import time
from abc import ABC, abstractmethod
-from typing import List
-from onapsdk.configuration import settings
+from typing import Iterator, List, Optional
from onapsdk.aai.business import Customer
+from onapsdk.configuration import settings
+from onapsdk.exceptions import SDKException, SettingsError
-from .reports_collection import Report, ReportsCollection, ReportStepStatus
+from onaptests.steps.reports_collection import Report, ReportsCollection, ReportStepStatus
+from onaptests.utils.exceptions import OnapTestException, SubstepExecutionException
class BaseStep(ABC):
@@ -26,10 +30,9 @@ class BaseStep(ABC):
# Setup Proxy if SOCK_HTTP is defined in settings
try:
cls.set_proxy(settings.SOCK_HTTP)
- except AttributeError:
+ except SettingsError:
pass
-
def __init__(self, cleanup: bool = False) -> None:
"""Step initialization.
@@ -41,6 +44,10 @@ class BaseStep(ABC):
self._cleanup: bool = cleanup
self._parent: "BaseStep" = None
self._reports_collection: ReportsCollection = None
+ self._start_execution_time: float = None
+ self._start_cleanup_time: float = None
+ self._execution_report: ReportStepStatus = None
+ self._cleanup_report: ReportStepStatus = None
def add_step(self, step: "BaseStep") -> None:
"""Add substep.
@@ -87,9 +94,42 @@ class BaseStep(ABC):
return self.parent.reports_collection
if not self._reports_collection:
self._reports_collection = ReportsCollection()
+ for step_report in itertools.chain(self.execution_reports, self.cleanup_reports):
+ self._reports_collection.put(step_report)
return self._reports_collection
@property
+ def execution_reports(self) -> Iterator[ReportsCollection]:
+ """Execution reports generator.
+
+ Steps tree postorder traversal
+
+ Yields:
+ Iterator[ReportsCollection]: Step execution report
+
+ """
+ for step in self._steps:
+ yield from step.execution_reports
+ if self._execution_report:
+ yield self._execution_report
+
+ @property
+ def cleanup_reports(self) -> Iterator[ReportsCollection]:
+ """Cleanup reports generator.
+
+ Steps tree preorder traversal
+
+ Yields:
+ Iterator[ReportsCollection]: Step cleanup report
+
+ """
+ if self._cleanup:
+ if self._cleanup_report:
+ yield self._cleanup_report
+ for step in self._steps:
+ yield from step.cleanup_reports
+
+ @property
def name(self) -> str:
"""Step name."""
return self.__class__.__name__
@@ -120,35 +160,56 @@ class BaseStep(ABC):
"""
@classmethod
- def store_state(cls, fun):
+ def store_state(cls, fun=None, *, cleanup=False):
+ if fun is None:
+ return functools.partial(cls.store_state, cleanup=cleanup)
+ @functools.wraps(fun)
def wrapper(self, *args, **kwargs):
try:
- start_time: float = time.time()
+ if cleanup:
+ self._start_cleanup_time = time.time()
+ execution_status: Optional[ReportStepStatus] = None
ret = fun(self, *args, **kwargs)
- execution_status: ReportStepStatus = ReportStepStatus.PASS
+ execution_status = ReportStepStatus.PASS
return ret
- except Exception:
- execution_status: ReportStepStatus = ReportStepStatus.FAIL
+ except SubstepExecutionException:
+ execution_status = ReportStepStatus.PASS if cleanup else ReportStepStatus.NOT_EXECUTED
+ raise
+ except (OnapTestException, SDKException):
+ execution_status = ReportStepStatus.FAIL
raise
finally:
- self.reports_collection.put(
- Report(
- step_description=f"[{self.component}] {self.name}: {self.description}",
+ if cleanup:
+ self._cleanup_report = Report(
+ step_description=f"[{self.component}] {self.name} cleanup: {self.description}",
step_execution_status=execution_status,
- step_execution_duration=time.time() - start_time
+ step_execution_duration=time.time() - self._start_cleanup_time
+ )
+ else:
+ if not self._start_execution_time:
+ self._logger.error("No execution start time saved for %s step. Fix it by call `super.execute()` "
+ "in step class `execute()` method definition", self.name)
+ self._start_execution_time = time.time()
+ self._execution_report = Report(
+ step_description=f"[{self.component}] {self.name}: {self.description}",
+ step_execution_status=execution_status if execution_status else ReportStepStatus.FAIL,
+ step_execution_duration=time.time() - self._start_execution_time
)
- )
return wrapper
def execute(self) -> None:
- """Step's action.
+ """Step's action execution.
Run all substeps action before it's own action.
- Override this method and remember to call `super().action()` before.
+ Override this method and remember to call `super().execute()` before.
"""
for step in self._steps:
- step.execute()
+ try:
+ step.execute()
+ except (OnapTestException, SDKException) as substep_err:
+ raise SubstepExecutionException from substep_err
+ self._start_execution_time = time.time()
def cleanup(self) -> None:
"""Step's cleanup.
@@ -158,7 +219,10 @@ class BaseStep(ABC):
"""
if self._cleanup:
for step in self._steps:
- step.cleanup()
+ try:
+ step.cleanup()
+ except (OnapTestException, SDKException) as substep_err:
+ raise SubstepExecutionException from substep_err
@classmethod
def set_proxy(cls, sock_http):
diff --git a/src/onaptests/steps/cloud/cloud_region_create.py b/src/onaptests/steps/cloud/cloud_region_create.py
new file mode 100644
index 0000000..21c846f
--- /dev/null
+++ b/src/onaptests/steps/cloud/cloud_region_create.py
@@ -0,0 +1,52 @@
+"""A&AI cloud region creation module."""
+from onapsdk.aai.cloud_infrastructure import CloudRegion
+from onapsdk.configuration import settings
+from onapsdk.exceptions import ResourceNotFound
+
+from ..base import BaseStep
+
+
+class CloudRegionCreateStep(BaseStep):
+ """Cloud region creation step."""
+
+ @property
+ def description(self) -> str:
+ """Step description."""
+ return "Create cloud region."
+
+ @property
+ def component(self) -> str:
+ """Component name."""
+ return "AAI"
+
+ @BaseStep.store_state
+ def execute(self):
+ """Create cloud region.
+
+ Use settings values:
+ - CLOUD_REGION_CLOUD_OWNER,
+ - CLOUD_REGION_ID,
+ - CLOUD_REGION_TYPE,
+ - CLOUD_REGION_VERSION,
+ - CLOUD_OWNER_DEFINED_TYPE,
+ - COMPLEX_PHYSICAL_LOCATION_ID.
+
+ """
+ super().execute()
+ self._logger.info("*Check if cloud region exists *")
+ try:
+ CloudRegion.get_by_id(
+ cloud_owner=settings.CLOUD_REGION_CLOUD_OWNER,
+ cloud_region_id=settings.CLOUD_REGION_ID,
+ )
+ except ResourceNotFound:
+ CloudRegion.create(
+ cloud_owner=settings.CLOUD_REGION_CLOUD_OWNER,
+ cloud_region_id=settings.CLOUD_REGION_ID,
+ orchestration_disabled=False,
+ in_maint=False,
+ cloud_type=settings.CLOUD_REGION_TYPE,
+ cloud_region_version=settings.CLOUD_REGION_VERSION,
+ owner_defined_type=settings.CLOUD_OWNER_DEFINED_TYPE,
+ complex_name=settings.COMPLEX_PHYSICAL_LOCATION_ID
+ )
diff --git a/src/onaptests/steps/cloud/complex_create.py b/src/onaptests/steps/cloud/complex_create.py
index 1bb7e51..60565f4 100644
--- a/src/onaptests/steps/cloud/complex_create.py
+++ b/src/onaptests/steps/cloud/complex_create.py
@@ -1,5 +1,6 @@
from onapsdk.aai.cloud_infrastructure import Complex
from onapsdk.configuration import settings
+from onapsdk.exceptions import APIError
from ..base import BaseStep
@@ -27,8 +28,10 @@ class ComplexCreateStep(BaseStep):
"""
super().execute()
- Complex.create(
- physical_location_id=settings.COMPLEX_PHYSICAL_LOCATION_ID,
- data_center_code=settings.COMPLEX_DATA_CENTER_CODE,
- name=settings.COMPLEX_PHYSICAL_LOCATION_ID
- )
+ try:
+ Complex.create(
+ physical_location_id=settings.COMPLEX_PHYSICAL_LOCATION_ID,
+ data_center_code=settings.COMPLEX_DATA_CENTER_CODE,
+ name=settings.COMPLEX_PHYSICAL_LOCATION_ID)
+ except APIError:
+ self._logger.warn("Try to update the complex failed.")
diff --git a/src/onaptests/steps/cloud/customer_create.py b/src/onaptests/steps/cloud/customer_create.py
index b99fdb1..1cc0879 100644
--- a/src/onaptests/steps/cloud/customer_create.py
+++ b/src/onaptests/steps/cloud/customer_create.py
@@ -1,5 +1,6 @@
from onapsdk.aai.business import Customer
from onapsdk.configuration import settings
+from onapsdk.exceptions import APIError
from ..base import BaseStep
@@ -24,4 +25,8 @@ class CustomerCreateStep(BaseStep):
Use settings values:
- GLOBAL_CUSTOMER_ID.
"""
- Customer.create(settings.GLOBAL_CUSTOMER_ID, settings.GLOBAL_CUSTOMER_ID, "INFRA")
+ super().execute()
+ try:
+ Customer.create(settings.GLOBAL_CUSTOMER_ID, settings.GLOBAL_CUSTOMER_ID, "INFRA")
+ except APIError:
+ self._logger.warn("Try to update the Customer failed.")
diff --git a/src/onaptests/steps/cloud/k8s_connectivity_info_create.py b/src/onaptests/steps/cloud/k8s_connectivity_info_create.py
index 279ae0d..6d0faf6 100644
--- a/src/onaptests/steps/cloud/k8s_connectivity_info_create.py
+++ b/src/onaptests/steps/cloud/k8s_connectivity_info_create.py
@@ -1,4 +1,6 @@
+"""Connectivity info creation module."""
from onapsdk.configuration import settings
+from onapsdk.exceptions import APIError
from onapsdk.msb.k8s import ConnectivityInfo
from ..base import BaseStep
@@ -18,27 +20,27 @@ class K8SConnectivityInfoStep(BaseStep):
@BaseStep.store_state
def execute(self):
- """Creation k8s connectivity information
+ """Creation k8s connectivity information.
Use settings values:
- CLOUD_REGION_ID,
- CLOUD_REGION_CLOUD_OWNER,
- - K8S_KUBECONFIG_FILE.
+ - K8S_CONFIG.
"""
super().execute()
######## Create Connectivity Info #########################################
try:
self._logger.info("Check if k8s connectivity information exists")
ConnectivityInfo.get_connectivity_info_by_region_id(settings.CLOUD_REGION_ID)
- except ValueError:
+ except APIError:
self._logger.info("Create the k8s connectivity information")
ConnectivityInfo.create(settings.CLOUD_REGION_ID,
settings.CLOUD_REGION_CLOUD_OWNER,
- open(settings.K8S_KUBECONFIG_FILE, 'rb').read())
+ open(settings.K8S_CONFIG, 'rb').read())
+ @BaseStep.store_state(cleanup=True)
def cleanup(self) -> None:
- """Cleanup K8S Connectivity information.
- """
+ """Cleanup K8S Connectivity information."""
self._logger.info("Clean the k8s connectivity information")
super().cleanup()
connectinfo = ConnectivityInfo.get_connectivity_info_by_region_id(settings.CLOUD_REGION_ID)
diff --git a/src/onaptests/steps/cloud/register_cloud.py b/src/onaptests/steps/cloud/register_cloud.py
index 341fc1c..3065461 100644
--- a/src/onaptests/steps/cloud/register_cloud.py
+++ b/src/onaptests/steps/cloud/register_cloud.py
@@ -1,15 +1,27 @@
+"""A&AI cloud region registstation module."""
import time
from uuid import uuid4
from onapsdk.aai.cloud_infrastructure import CloudRegion
from onapsdk.configuration import settings
+from onapsdk.exceptions import ResourceNotFound
from ..base import BaseStep
+from onaptests.steps.cloud.cloud_region_create import CloudRegionCreateStep
class RegisterCloudRegionStep(BaseStep):
"""Cloud region registration step."""
+ def __init__(self, cleanup: bool) -> None:
+ """Initialize step.
+
+ Substeps:
+ - CloudRegionCreateStep.
+ """
+ super().__init__(cleanup=cleanup)
+ self.add_step(CloudRegionCreateStep(cleanup=cleanup))
+
@property
def description(self) -> str:
"""Step description."""
@@ -22,80 +34,70 @@ class RegisterCloudRegionStep(BaseStep):
@BaseStep.store_state
def execute(self):
- """Register cloud region
+ """Register cloud region.
Use settings values:
- CLOUD_REGION_CLOUD_OWNER,
- CLOUD_REGION_ID,
- CLOUD_DOMAIN,
- - CLOUD_REGION_VERSION,
- - CLOUD_OWNER_DEFINED_TYPE,
- - COMPLEX_PHYSICAL_LOCATION_ID,
- VIM_USERNAME,
- VIM_PASSWORD,
- VIM_SERVICE_URL,
- TENANT_NAME.
"""
super().execute()
- self._logger.info("*Check if cloud region exists *")
- try:
- cloud_region: CloudRegion = CloudRegion.get_by_id(
- cloud_owner=settings.CLOUD_REGION_CLOUD_OWNER,
- cloud_region_id=settings.CLOUD_REGION_ID,
- )
- except ValueError:
- self._logger.info("*Create the cloud region *")
- cloud_region: CloudRegion = CloudRegion.create(
- cloud_owner=settings.CLOUD_REGION_CLOUD_OWNER,
- cloud_region_id=settings.CLOUD_REGION_ID,
- orchestration_disabled=False,
- in_maint=False,
- cloud_type=settings.CLOUD_REGION_TYPE,
- cloud_region_version=settings.CLOUD_REGION_VERSION,
- owner_defined_type=settings.CLOUD_OWNER_DEFINED_TYPE,
- complex_name=settings.COMPLEX_PHYSICAL_LOCATION_ID
- )
- cloud_region.add_esr_system_info(
- esr_system_info_id=str(uuid4()),
- user_name=settings.VIM_USERNAME,
- password=settings.VIM_PASSWORD,
- system_type="VIM",
- service_url=settings.VIM_SERVICE_URL,
- ssl_insecure=False,
- system_status="active",
- cloud_domain=settings.CLOUD_DOMAIN,
- default_tenant=settings.TENANT_NAME
- )
- if settings.USE_MULTICLOUD:
- self._logger.info("*Multicloud registration *")
- cloud_region.register_to_multicloud()
- time.sleep(20)
- nb_try = 0
- nb_try_max = 3
- while nb_try < nb_try_max:
+ cloud_region: CloudRegion = CloudRegion.get_by_id(
+ cloud_owner=settings.CLOUD_REGION_CLOUD_OWNER,
+ cloud_region_id=settings.CLOUD_REGION_ID)
+ cloud_region.add_esr_system_info(
+ esr_system_info_id=str(uuid4()),
+ user_name=settings.VIM_USERNAME,
+ password=settings.VIM_PASSWORD,
+ system_type="VIM",
+ service_url=settings.VIM_SERVICE_URL,
+ ssl_insecure=False,
+ system_status="active",
+ cloud_domain=settings.CLOUD_DOMAIN,
+ default_tenant=settings.TENANT_NAME
+ )
+ if settings.USE_MULTICLOUD:
+ self._logger.info("*Multicloud registration *")
+ cloud_region.register_to_multicloud()
+ time.sleep(20)
+ nb_try = 0
+ nb_try_max = 3
+ while nb_try < nb_try_max:
+ try:
if not cloud_region.tenants:
+ self._logger.debug("No tenats available, check one more time")
time.sleep(20)
else:
break
- nb_try += 1
+ except ResourceNotFound:
+ self._logger.debug("No tenats available, check one more time")
+ time.sleep(20)
+ nb_try += 1
- # Retrieve the tenant, created by multicloud registration
- # if it does not exist, create it
- try:
- cloud_region.get_tenant(settings.TENANT_ID)
- except ValueError:
- self._logger.warning("Impossible to retrieve the Specificed Tenant")
- self._logger.debug("If no multicloud selected, add the tenant")
+ # Retrieve the tenant, created by multicloud registration
+ # if it does not exist, create it
+ try:
+ cloud_region.get_tenant(settings.TENANT_ID)
+ except ResourceNotFound:
+ self._logger.warning("Impossible to retrieve the Specificed Tenant")
+ self._logger.debug("If no multicloud selected, add the tenant, reraise otherwise")
+ if not settings.USE_MULTICLOUD:
cloud_region.add_tenant(
tenant_id=settings.TENANT_ID,
tenant_name=settings.TENANT_NAME)
+ else:
+ raise
- # be sure that an availability zone has been created
- # if not, create it
- try:
- cloud_region.get_availability_zone_by_name(
- settings.AVAILABILITY_ZONE_NAME)
- except ValueError:
- cloud_region.add_availability_zone(
- settings.AVAILABILITY_ZONE_NAME,
- settings.AVAILABILITY_ZONE_TYPE)
+ # be sure that an availability zone has been created
+ # if not, create it
+ try:
+ cloud_region.get_availability_zone_by_name(
+ settings.AVAILABILITY_ZONE_NAME)
+ except ResourceNotFound:
+ cloud_region.add_availability_zone(
+ settings.AVAILABILITY_ZONE_NAME,
+ settings.AVAILABILITY_ZONE_TYPE)
diff --git a/src/onaptests/steps/instantiate/k8s_profile_create.py b/src/onaptests/steps/instantiate/k8s_profile_create.py
index a875f11..d555d46 100644
--- a/src/onaptests/steps/instantiate/k8s_profile_create.py
+++ b/src/onaptests/steps/instantiate/k8s_profile_create.py
@@ -4,6 +4,7 @@ from yaml import load
from onapsdk.aai.business import Customer, ServiceInstance, ServiceSubscription
from onapsdk.configuration import settings
+from onapsdk.exceptions import APIError, ResourceNotFound
from onapsdk.msb.k8s import Definition
from onapsdk.so.instantiation import VnfParameter
@@ -142,7 +143,7 @@ class K8SProfileStep(BaseStep):
######## Check profile for Definition ###################################
try:
rbdef.get_profile_by_name(k8s_profile_name)
- except ValueError:
+ except ResourceNotFound:
######## Create profile for Definition ###################################
profile = rbdef.create_profile(k8s_profile_name,
k8s_profile_namespace,
@@ -150,6 +151,7 @@ class K8SProfileStep(BaseStep):
####### Upload artifact for created profile ##############################
profile.upload_artifact(open(settings.K8S_PROFILE_ARTIFACT_PATH, 'rb').read())
+ @BaseStep.store_state(cleanup=True)
def cleanup(self) -> None:
"""Cleanup K8S profiles.
"""
@@ -174,7 +176,7 @@ class K8SProfileStep(BaseStep):
try:
profile = rbdef.get_profile_by_name(k8s_profile_name)
profile.delete()
- except ValueError:
+ except APIError:
self._logger.error("K8s profile deletion %s failed", k8s_profile_name)
raise onap_test_exceptions.ProfileCleanupException
super().cleanup()
diff --git a/src/onaptests/steps/instantiate/msb_k8s.py b/src/onaptests/steps/instantiate/msb_k8s.py
new file mode 100644
index 0000000..e6186f5
--- /dev/null
+++ b/src/onaptests/steps/instantiate/msb_k8s.py
@@ -0,0 +1,46 @@
+"""MSB k8s instantiation module."""
+from onapsdk.configuration import settings
+from onapsdk.msb.k8s import Instance
+
+from onaptests.steps.base import BaseStep
+from onaptests.steps.onboard.msb_k8s import CreateProfileStep
+
+
+class CreateInstanceStep(BaseStep):
+ """Create MSB k8s instance step."""
+
+ def __init__(self, cleanup: bool = False) -> None:
+ """Initialize step.
+
+ Substeps:
+ - CreateProfileStep.
+ """
+ super().__init__(cleanup=cleanup)
+ self.add_step(CreateProfileStep(cleanup=cleanup))
+ self.instance: Instance = None
+
+ @property
+ def description(self) -> str:
+ """Step description."""
+ return "Create K8S instance."
+
+ @property
+ def component(self) -> str:
+ """Component name."""
+ return "K8S plugin"
+
+ @BaseStep.store_state
+ def execute(self) -> None:
+ """Create instance using MSB K8S plugin."""
+ super().execute()
+ self.instance = Instance.create(cloud_region_id=settings.CLOUD_REGION_ID,
+ profile_name=settings.PNF_PROFILE_NAME,
+ rb_name=settings.PNF_RB_NAME,
+ rb_version=settings.PNF_RB_VERSION)
+
+ @BaseStep.store_state(cleanup=True)
+ def cleanup(self) -> None:
+ """Delete instance."""
+ if self.instance:
+ self.instance.delete()
+ return super().cleanup()
diff --git a/src/onaptests/steps/instantiate/service_ala_carte.py b/src/onaptests/steps/instantiate/service_ala_carte.py
index d5e5096..858db2d 100644
--- a/src/onaptests/steps/instantiate/service_ala_carte.py
+++ b/src/onaptests/steps/instantiate/service_ala_carte.py
@@ -6,6 +6,7 @@ from onapsdk.aai.cloud_infrastructure import CloudRegion, Tenant
from onapsdk.aai.business import Customer, ServiceInstance, ServiceSubscription
from onapsdk.aai.business.owning_entity import OwningEntity as AaiOwningEntity
from onapsdk.configuration import settings
+from onapsdk.exceptions import ResourceNotFound
from onapsdk.sdc.service import Service
from onapsdk.so.instantiation import ServiceInstantiation
from onapsdk.vid import Project
@@ -66,7 +67,7 @@ class ServiceAlaCarteInstantiateStep(BaseStep):
try:
owning_entity = AaiOwningEntity.get_by_owning_entity_name(
settings.OWNING_ENTITY)
- except ValueError:
+ except ResourceNotFound:
self._logger.info("Owning entity not found, create it")
owning_entity = AaiOwningEntity.create(settings.OWNING_ENTITY)
vid_project = Project.create(settings.PROJECT)
@@ -80,8 +81,14 @@ class ServiceAlaCarteInstantiateStep(BaseStep):
vid_project,
service_instance_name=settings.SERVICE_INSTANCE_NAME
)
- while not service_instantiation.finished:
- time.sleep(10)
+ try:
+ service_instantiation.wait_for_finish(settings.ORCHESTRATION_REQUEST_TIMEOUT)
+ except TimeoutError:
+ self._logger.error("Service instantiation %s timed out", self.service_instance_name)
+ raise onap_test_exceptions.ServiceInstantiateException
+ if service_instantiation.failed:
+ self._logger.error("Service instantiation %s failed", self.service_instance_name)
+ raise onap_test_exceptions.ServiceInstantiateException
class YamlTemplateServiceAlaCarteInstantiateStep(YamlTemplateBaseStep):
@@ -187,7 +194,7 @@ class YamlTemplateServiceAlaCarteInstantiateStep(YamlTemplateBaseStep):
try:
owning_entity = AaiOwningEntity.get_by_owning_entity_name(
settings.OWNING_ENTITY)
- except ValueError:
+ except ResourceNotFound:
self._logger.info("Owning entity not found, create it")
owning_entity = AaiOwningEntity.create(settings.OWNING_ENTITY)
vid_project = Project.create(settings.PROJECT)
@@ -224,15 +231,19 @@ class YamlTemplateServiceAlaCarteInstantiateStep(YamlTemplateBaseStep):
vid_project,
service_instance_name=self.service_instance_name
)
- while not service_instantiation.finished:
- time.sleep(10)
+ try:
+ service_instantiation.wait_for_finish(settings.ORCHESTRATION_REQUEST_TIMEOUT)
+ except TimeoutError:
+ self._logger.error("Service instantiation %s timed out", self.service_instance_name)
+ raise onap_test_exceptions.ServiceCleanupException
if service_instantiation.failed:
+ self._logger.error("Service instantiation %s failed", self.service_instance_name)
raise onap_test_exceptions.ServiceInstantiateException
else:
service_subscription: ServiceSubscription = customer.get_service_subscription_by_service_type(self.service_name)
self._service_instance: ServiceInstance = service_subscription.get_service_instance_by_name(self.service_instance_name)
-
+ @YamlTemplateBaseStep.store_state(cleanup=True)
def cleanup(self) -> None:
"""Cleanup Service.
@@ -241,12 +252,11 @@ class YamlTemplateServiceAlaCarteInstantiateStep(YamlTemplateBaseStep):
"""
service_deletion = self._service_instance.delete()
- nb_try = 0
- nb_try_max = 30
- while not service_deletion.finished and nb_try < nb_try_max:
- self._logger.info("Wait for Service deletion")
- nb_try += 1
- time.sleep(15)
+ try:
+ service_deletion.wait_for_finish(settings.ORCHESTRATION_REQUEST_TIMEOUT)
+ except TimeoutError:
+ self._logger.error("Service deletion %s timed out", self._service_instance_name)
+ raise onap_test_exceptions.ServiceCleanupException
if service_deletion.finished:
self._logger.info("Service %s deleted", self._service_instance_name)
else:
diff --git a/src/onaptests/steps/instantiate/service_macro.py b/src/onaptests/steps/instantiate/service_macro.py
new file mode 100644
index 0000000..1264dd8
--- /dev/null
+++ b/src/onaptests/steps/instantiate/service_macro.py
@@ -0,0 +1,228 @@
+
+import time
+from typing import List
+from uuid import uuid4
+from onapsdk.aai.business.service import ServiceInstance
+from yaml import load
+
+from onapsdk.aai.business.customer import Customer, ServiceSubscription
+from onapsdk.aai.business.owning_entity import OwningEntity
+from onapsdk.aai.cloud_infrastructure.cloud_region import CloudRegion
+from onapsdk.aai.cloud_infrastructure.tenant import Tenant
+from onapsdk.configuration import settings
+from onapsdk.exceptions import ResourceNotFound
+from onapsdk.sdc.service import Service
+from onapsdk.so.instantiation import InstantiationParameter, ServiceInstantiation, VfmoduleParameters, VnfParameters
+from onapsdk.vid import LineOfBusiness, Platform, Project
+from onaptests.steps.cloud.customer_service_subscription_create import CustomerServiceSubscriptionCreateStep
+
+import onaptests.utils.exceptions as onap_test_exceptions
+from onaptests.steps.base import YamlTemplateBaseStep
+from onaptests.steps.onboard.service import YamlTemplateServiceOnboardStep
+from onaptests.steps.cloud.connect_service_subscription_to_cloud_region import ConnectServiceSubToCloudRegionStep
+
+
+class YamlTemplateServiceMacroInstantiateStep(YamlTemplateBaseStep):
+ """Instantiate service a'la carte using YAML template."""
+
+ def __init__(self, cleanup=False):
+ """Initialize step.
+
+ Substeps:
+ - YamlTemplateServiceOnboardStep,
+ - ConnectServiceSubToCloudRegionStep,
+ - CustomerServiceSubscriptionCreateStep.
+ """
+ super().__init__(cleanup=cleanup)
+ self._yaml_template: dict = None
+ self._service_instance_name: str = None
+ self._service_instance: str = None
+ if not settings.ONLY_INSTANTIATE:
+ self.add_step(YamlTemplateServiceOnboardStep(cleanup))
+
+ if any(
+ filter(lambda x: x in self.yaml_template[self.service_name].keys(),
+ ["vnfs", "networks"])):
+ # can additionally contain "pnfs", no difference
+ self.add_step(ConnectServiceSubToCloudRegionStep(cleanup))
+ else: # only pnfs
+ self.add_step(CustomerServiceSubscriptionCreateStep(cleanup))
+
+
+ @property
+ def description(self) -> str:
+ """Step description."""
+ return "Instantiate service described in YAML using SO macro method."
+
+ @property
+ def component(self) -> str:
+ """Component name."""
+ return "SO"
+
+ @property
+ def yaml_template(self) -> dict:
+ """Step YAML template.
+
+ Load from file if it's a root step, get from parent otherwise.
+
+ Returns:
+ dict: Step YAML template
+
+ """
+ if self.is_root:
+ if not self._yaml_template:
+ with open(settings.SERVICE_YAML_TEMPLATE, "r") as yaml_template:
+ self._yaml_template: dict = load(yaml_template)
+ return self._yaml_template
+ return self.parent.yaml_template
+
+ @property
+ def service_name(self) -> str:
+ """Service name.
+
+ Get from YAML template if it's a root step, get from parent otherwise.
+
+ Returns:
+ str: Service name
+
+ """
+ if self.is_root:
+ return next(iter(self.yaml_template.keys()))
+ return self.parent.service_name
+
+ @property
+ def service_instance_name(self) -> str:
+ """Service instance name.
+
+ Generate using `service_name` and `uuid4()` function if it's a root step,
+ get from parent otherwise.
+
+ Returns:
+ str: Service instance name
+
+ """
+ if self.is_root:
+ if not self._service_instance_name:
+ self._service_instance_name: str = f"{self.service_name}-{str(uuid4())}"
+ return self._service_instance_name
+ return self.parent.service_instance_name
+
+ @YamlTemplateBaseStep.store_state
+ def execute(self):
+ """Instantiate service.
+
+ Use settings values:
+ - GLOBAL_CUSTOMER_ID,
+ - CLOUD_REGION_CLOUD_OWNER,
+ - CLOUD_REGION_ID,
+ - TENANT_ID,
+ - OWNING_ENTITY,
+ - PROJECT.
+
+ Raises:
+ Exception: Service instantiation failed
+
+ """
+ super().execute()
+ service = Service(self.service_name)
+ customer: Customer = Customer.get_by_global_customer_id(settings.GLOBAL_CUSTOMER_ID)
+ if any(
+ filter(lambda x: x in self.yaml_template[self.service_name].keys(),
+ ["vnfs", "networks"])):
+ cloud_region: CloudRegion = CloudRegion.get_by_id(
+ cloud_owner=settings.CLOUD_REGION_CLOUD_OWNER,
+ cloud_region_id=settings.CLOUD_REGION_ID,
+ )
+ tenant: Tenant = cloud_region.get_tenant(settings.TENANT_ID)
+ else:
+ cloud_region, tenant = None, None # Only PNF is going to be instantiated so
+ # neither cloud_region nor tenant are needed
+ try:
+ owning_entity = OwningEntity.get_by_owning_entity_name(
+ settings.OWNING_ENTITY)
+ except ResourceNotFound:
+ self._logger.info("Owning entity not found, create it")
+ owning_entity = OwningEntity.create(settings.OWNING_ENTITY)
+ vid_project: Project = Project(settings.PROJECT)
+ line_of_business: LineOfBusiness = LineOfBusiness(settings.LINE_OF_BUSINESS)
+ platform: Platform = Platform(settings.PLATFORM)
+
+ # Before instantiating, be sure that the service has been distributed
+ self._logger.info("******** Check Service Distribution *******")
+ distribution_completed = False
+ nb_try = 0
+ nb_try_max = 10
+ while distribution_completed is False and nb_try < nb_try_max:
+ distribution_completed = service.distributed
+ if distribution_completed is True:
+ self._logger.info(
+ "Service Distribution for %s is sucessfully finished",
+ service.name)
+ break
+ self._logger.info(
+ "Service Distribution for %s ongoing, Wait for 60 s",
+ service.name)
+ time.sleep(60)
+ nb_try += 1
+
+ if distribution_completed is False:
+ self._logger.error(
+ "Service Distribution for %s failed !!",service.name)
+ raise onap_test_exceptions.ServiceDistributionException
+
+ vnf_params_list: List[VnfParameters] = []
+ for vnf_data in self.yaml_template[self.service_name].get("vnfs", []):
+ vnf_params_list.append(VnfParameters(
+ vnf_data["vnf_name"],
+ [InstantiationParameter(name=parameter["name"], value=parameter["value"]) for parameter in vnf_data.get("vnf_parameters", [])],
+ [VfmoduleParameters(vf_module_data["vf_module_name"],
+ [InstantiationParameter(name=parameter["name"], value=parameter["value"]) for parameter in vf_module_data.get("parameters", [])]) \
+ for vf_module_data in vnf_data.get("vf_module_parameters", [])]
+ ))
+
+ service_instantiation = ServiceInstantiation.instantiate_macro(
+ service,
+ customer=customer,
+ owning_entity=owning_entity,
+ project=vid_project,
+ line_of_business=line_of_business,
+ platform=platform,
+ cloud_region=cloud_region,
+ tenant=tenant,
+ service_instance_name=self.service_instance_name,
+ vnf_parameters=vnf_params_list,
+ enable_multicloud=settings.USE_MULTICLOUD
+ )
+ try:
+ service_instantiation.wait_for_finish(timeout=settings.ORCHESTRATION_REQUEST_TIMEOUT)
+ except TimeoutError:
+ self._logger.error("Service instantiation %s timed out", self.service_instance_name)
+ raise onap_test_exceptions.ServiceInstantiateException
+ if service_instantiation.failed:
+ self._logger.error("Service instantiation %s failed", self.service_instance_name)
+ raise onap_test_exceptions.ServiceInstantiateException
+ else:
+ service_subscription: ServiceSubscription = customer.get_service_subscription_by_service_type(self.service_name)
+ self._service_instance: ServiceInstance = service_subscription.get_service_instance_by_name(self.service_instance_name)
+
+ @YamlTemplateBaseStep.store_state(cleanup=True)
+ def cleanup(self) -> None:
+ """Cleanup Service.
+
+ Raises:
+ Exception: Service cleaning failed
+
+ """
+ if self._service_instance:
+ service_deletion = self._service_instance.delete()
+ try:
+ service_deletion.wait_for_finish(timeout=settings.ORCHESTRATION_REQUEST_TIMEOUT)
+ except TimeoutError:
+ self._logger.error("Service deletion %s timed out", self._service_instance_name)
+ raise onap_test_exceptions.ServiceCleanupException
+ if service_deletion.finished:
+ self._logger.info("Service %s deleted", self._service_instance_name)
+ else:
+ self._logger.error("Service deletion %s failed", self._service_instance_name)
+ raise onap_test_exceptions.ServiceCleanupException
+ super().cleanup()
diff --git a/src/onaptests/steps/instantiate/vf_module_ala_carte.py b/src/onaptests/steps/instantiate/vf_module_ala_carte.py
index 115966a..ee20bc6 100644
--- a/src/onaptests/steps/instantiate/vf_module_ala_carte.py
+++ b/src/onaptests/steps/instantiate/vf_module_ala_carte.py
@@ -1,4 +1,3 @@
-import time
from typing import Iterable
from uuid import uuid4
from yaml import load
@@ -143,12 +142,16 @@ class YamlTemplateVfModuleAlaCarteInstantiateStep(YamlTemplateBaseStep):
tenant,
self._service_instance_name,
vnf_parameters=self.get_vnf_parameters(vnf_instance.vnf.name))
- while not vf_module_instantiation.finished:
- time.sleep(10)
- if vf_module_instantiation.failed:
- raise onap_test_exceptions.VfModuleInstantiateException
-
-
+ try:
+ vf_module_instantiation.wait_for_finish(settings.ORCHESTRATION_REQUEST_TIMEOUT)
+ if vf_module_instantiation.failed:
+ self._logger.error("VfModule instantiation %s failed", vf_module.name)
+ raise onap_test_exceptions.VfModuleInstantiateException
+ except TimeoutError:
+ self._logger.error("VfModule instantiation %s timed out", vf_module.name)
+ raise onap_test_exceptions.VfModuleInstantiateException
+
+ @YamlTemplateBaseStep.store_state(cleanup=True)
def cleanup(self) -> None:
"""Cleanup Vf module.
@@ -164,16 +167,14 @@ class YamlTemplateVfModuleAlaCarteInstantiateStep(YamlTemplateBaseStep):
self._logger.info("Delete VF Module %s",
vf_module.name)
vf_module_deletion = vf_module.delete()
- nb_try = 0
- nb_try_max = 30
-
- while not vf_module_deletion.finished and nb_try < nb_try_max:
- self._logger.info("Wait for vf module deletion")
- nb_try += 1
- time.sleep(20)
- if vf_module_deletion.finished:
+
+ try:
+ vf_module_deletion.wait_for_finish(settings.ORCHESTRATION_REQUEST_TIMEOUT)
+ if vf_module_deletion.failed:
+ self._logger.error("VfModule deletion %s failed", vf_module.name)
+ raise onap_test_exceptions.VfModuleCleanupException
self._logger.info("VfModule %s deleted", vf_module.name)
- else:
- self._logger.error("VfModule deletion %s failed", vf_module.name)
+ except TimeoutError:
+ self._logger.error("VfModule deletion %s timed out", vf_module.name)
raise onap_test_exceptions.VfModuleCleanupException
super().cleanup()
diff --git a/src/onaptests/steps/instantiate/vl_ala_carte.py b/src/onaptests/steps/instantiate/vl_ala_carte.py
index f2815a4..fd040aa 100644
--- a/src/onaptests/steps/instantiate/vl_ala_carte.py
+++ b/src/onaptests/steps/instantiate/vl_ala_carte.py
@@ -1,4 +1,3 @@
-import time
import re
from typing import Iterable
from uuid import uuid4
@@ -141,11 +140,16 @@ class YamlTemplateVlAlaCarteInstantiateStep(YamlTemplateBaseStep):
platform,
network_instance_name=f"{self.service_instance_name}_net_{idx}",
subnets=self.get_subnets(network.name))
- while not net_instantiation.finished:
- time.sleep(10)
- if net_instantiation.failed:
+ try:
+ net_instantiation.wait_for_finish(settings.ORCHESTRATION_REQUEST_TIMEOUT)
+ if net_instantiation.failed:
+ self._logger.error("VL instantiation %s failed", net_instantiation.name)
+ raise onap_test_exceptions.NetworkInstantiateException
+ except TimeoutError:
+ self._logger.error("VL instantiation %s timed out", net_instantiation.name)
raise onap_test_exceptions.NetworkInstantiateException
+ @YamlTemplateBaseStep.store_state(cleanup=True)
def cleanup(self) -> None:
"""Cleanup VL.
@@ -157,7 +161,11 @@ class YamlTemplateVlAlaCarteInstantiateStep(YamlTemplateBaseStep):
self._logger.info("Start network deletion %s",net_instance.name)
net_deletion = net_instance.delete()
try:
- net_deletion.wait_for_finish()
+ net_deletion.wait_for_finish(settings.ORCHESTRATION_REQUEST_TIMEOUT)
+ if net_deletion.failed:
+ self._logger.error("VL deletion %s failed", net_instance.name)
+ raise onap_test_exceptions.NetworkCleanupException
except TimeoutError:
+ self._logger.error("VL deletion %s timed out", net_instance.name)
raise onap_test_exceptions.NetworkCleanupException
super().cleanup()
diff --git a/src/onaptests/steps/instantiate/vnf_ala_carte.py b/src/onaptests/steps/instantiate/vnf_ala_carte.py
index 6b9c4a4..9dc062a 100644
--- a/src/onaptests/steps/instantiate/vnf_ala_carte.py
+++ b/src/onaptests/steps/instantiate/vnf_ala_carte.py
@@ -1,4 +1,3 @@
-import time
from uuid import uuid4
from yaml import load
@@ -118,11 +117,16 @@ class YamlTemplateVnfAlaCarteInstantiateStep(YamlTemplateBaseStep):
cloud_region,
tenant,
f"{self.service_instance_name}_vnf_{idx}")
- while not vnf_instantiation.finished:
- time.sleep(10)
- if vnf_instantiation.failed:
+ try:
+ vnf_instantiation.wait_for_finish(settings.ORCHESTRATION_REQUEST_TIMEOUT)
+ if vnf_instantiation.failed:
+ self._logger.error("VNF instantiation %s failed", vnf.name)
+ raise onap_test_exceptions.VnfInstantiateException
+ except TimeoutError:
+ self._logger.error("VNF instantiation %s timed out", vnf.name)
raise onap_test_exceptions.VnfInstantiateException
+ @YamlTemplateBaseStep.store_state(cleanup=True)
def cleanup(self) -> None:
"""Cleanup VNF.
@@ -132,16 +136,13 @@ class YamlTemplateVnfAlaCarteInstantiateStep(YamlTemplateBaseStep):
"""
for vnf_instance in self._service_instance.vnf_instances:
vnf_deletion = vnf_instance.delete()
- nb_try = 0
- nb_try_max = 30
-
- while not vnf_deletion.finished and nb_try < nb_try_max:
- self._logger.info("Wait for vnf deletion")
- nb_try += 1
- time.sleep(15)
- if vnf_deletion.finished:
- self._logger.info("VNF %s deleted", vnf_instance.name)
- else:
- self._logger.error("VNF deletion %s failed", vnf_instance.name)
+
+ try:
+ vnf_deletion.wait_for_finish(settings.ORCHESTRATION_REQUEST_TIMEOUT)
+ if vnf_deletion.failed:
+ self._logger.error("VNF deletion %s failed", vnf_instance.name)
+ raise onap_test_exceptions.VnfCleanupException
+ except TimeoutError:
+ self._logger.error("VNF deletion %s timed out", vnf_instance.name)
raise onap_test_exceptions.VnfCleanupException
super().cleanup()
diff --git a/src/onaptests/steps/loop/clamp.py b/src/onaptests/steps/loop/clamp.py
index 3a5c1ad..e781bd2 100644
--- a/src/onaptests/steps/loop/clamp.py
+++ b/src/onaptests/steps/loop/clamp.py
@@ -12,6 +12,7 @@ import time
from onapsdk.clamp.clamp_element import Clamp
from onapsdk.sdc.service import Service
+import onaptests.utils.exceptions as onap_test_exceptions
from onapsdk.configuration import settings
from onaptests.steps.onboard.clamp import OnboardClampStep
from onaptests.steps.loop.instantiate_loop import InstantiateLoop
@@ -28,7 +29,7 @@ class ClampStep(YamlTemplateBaseStep):
super().__init__(cleanup=cleanup)
self._yaml_template: dict = None
self.add_step(OnboardClampStep(cleanup=cleanup))
- Clamp(cert=settings.CERT)
+ Clamp()
self.loop_instance = None
@property
@@ -94,8 +95,7 @@ class ClampStep(YamlTemplateBaseStep):
"""Instantite a closed loopin CLAMP."""
loop = InstantiateLoop(template=loop_template,
loop_name=loop_name,
- operational_policies=operational_policies,
- cert=settings.CERT)
+ operational_policies=operational_policies)
return loop.instantiate_loop()
def loop_counter(self, action: str) -> None:
@@ -108,6 +108,31 @@ class ClampStep(YamlTemplateBaseStep):
@YamlTemplateBaseStep.store_state
def execute(self):
super().execute() # TODO work only the 1st time, not if already onboarded
+
+ # Before instantiating, be sure that the service has been distributed
+ service = Service(self.service_name)
+ self._logger.info("******** Check Service Distribution *******")
+ distribution_completed = False
+ nb_try = 0
+ nb_try_max = 10
+ while distribution_completed is False and nb_try < nb_try_max:
+ distribution_completed = service.distributed
+ if distribution_completed is True:
+ self._logger.info(
+ "Service Distribution for %s is sucessfully finished",
+ service.name)
+ break
+ self._logger.info(
+ "Service Distribution for %s ongoing, Wait for 60 s",
+ service.name)
+ time.sleep(60)
+ nb_try += 1
+
+ if distribution_completed is False:
+ self._logger.error(
+ "Service Distribution for %s failed !!",service.name)
+ raise onap_test_exceptions.ServiceDistributionException
+
# time to wait for template load in CLAMP
self._logger.info("Wait a little bit to give a chance to the distribution")
time.sleep(settings.CLAMP_DISTRIBUTION_TIMER)
@@ -122,6 +147,7 @@ class ClampStep(YamlTemplateBaseStep):
loop_name=loop_name,
operational_policies=operational_policies)
+ @YamlTemplateBaseStep.store_state(cleanup=True)
def cleanup(self) -> None:
"""Cleanup Service.
diff --git a/src/onaptests/steps/loop/instantiate_loop.py b/src/onaptests/steps/loop/instantiate_loop.py
index bd34a04..b6f4ffa 100644
--- a/src/onaptests/steps/loop/instantiate_loop.py
+++ b/src/onaptests/steps/loop/instantiate_loop.py
@@ -11,11 +11,10 @@ from onapsdk.configuration import settings
class InstantiateLoop():
"""class instantiating a closed loop in clamp."""
- def __init__(self, template: str, loop_name: str, operational_policies: list, cert: tuple):
+ def __init__(self, template: str, loop_name: str, operational_policies: list):
self.template=template
self.loop_name=loop_name
self.operational_policies=operational_policies
- self.cert=cert
self._logger: logging.Logger = logging.getLogger("")
logging.config.dictConfig(settings.LOG_CONFIG)
@@ -71,8 +70,7 @@ class InstantiateLoop():
"""Instantiate the control loop."""
loop = LoopInstance(template=self.template,
name=self.loop_name,
- details={},
- cert=self.cert)
+ details={})
details = loop.create()
if details:
self._logger.info("Loop instance %s successfully created !!", self.loop_name)
diff --git a/src/onaptests/steps/onboard/cds.py b/src/onaptests/steps/onboard/cds.py
new file mode 100644
index 0000000..f137adb
--- /dev/null
+++ b/src/onaptests/steps/onboard/cds.py
@@ -0,0 +1,191 @@
+# http://www.apache.org/licenses/LICENSE-2.0
+"""CDS onboard module."""
+
+from abc import ABC
+from pathlib import Path
+from typing import Optional
+
+from kubernetes import client, config
+from onapsdk.cds import Blueprint, DataDictionarySet
+from onapsdk.cds.blueprint_processor import Blueprintprocessor
+from onapsdk.configuration import settings
+
+from ..base import BaseStep
+
+
+class CDSBaseStep(BaseStep, ABC):
+ """Abstract CDS base step."""
+
+ @property
+ def component(self) -> str:
+ """Component name."""
+ return "CDS"
+
+
+class ExposeCDSBlueprintprocessorNodePortStep(CDSBaseStep):
+ """Expose CDS blueprintsprocessor port."""
+
+ def __init__(self, cleanup: bool) -> None:
+ """Initialize step."""
+ super().__init__(cleanup=cleanup)
+ self.service_name: str = "cds-blueprints-processor-http"
+ self.client: Optional[client.CoreV1Api] = None
+
+ @property
+ def description(self) -> str:
+ """Step description."""
+ return "Expose CDS blueprintsprocessor NodePort."
+
+ @BaseStep.store_state
+ def execute(self) -> None:
+ """Expose CDS blueprintprocessor port using kubernetes client.
+
+ Use settings values:
+ - K8S_CONFIG,
+ - K8S_NAMESPACE.
+
+ """
+ super().execute()
+ config.load_kube_config(settings.K8S_CONFIG)
+ self.k8s_client = client.CoreV1Api()
+ self.k8s_client.patch_namespaced_service(
+ self.service_name,
+ settings.K8S_NAMESPACE,
+ {"spec": {"ports": [{"port": 8080, "nodePort": 30449}], "type": "NodePort"}}
+ )
+
+ def cleanup(self) -> None:
+ """Step cleanup.
+
+ Restore CDS blueprintprocessor service.
+
+ """
+ self.k8s_client.patch_namespaced_service(
+ self.service_name,
+ settings.K8S_NAMESPACE,
+ [
+ {
+ "op": "remove",
+ "path": "/spec/ports/0/nodePort"
+ },
+ {
+ "op": "replace",
+ "path": "/spec/type",
+ "value": "ClusterIP"
+ }
+ ]
+ )
+ return super().cleanup()
+
+
+class BootstrapBlueprintprocessor(CDSBaseStep):
+ """Bootstrap blueprintsprocessor."""
+
+ def __init__(self, cleanup: bool = False) -> None:
+ """Initialize step.
+
+ Substeps:
+ - ExposeCDSBlueprintprocessorNodePortStep.
+ """
+ super().__init__(cleanup=cleanup)
+ self.add_step(ExposeCDSBlueprintprocessorNodePortStep(cleanup=cleanup))
+
+ @property
+ def description(self) -> str:
+ """Step description."""
+ return "Bootstrap CDS blueprintprocessor"
+
+ @BaseStep.store_state
+ def execute(self) -> None:
+ """Bootsrap CDS blueprintprocessor."""
+ super().execute()
+ Blueprintprocessor.bootstrap()
+
+
+class DataDictionaryUploadStep(CDSBaseStep):
+ """Upload data dictionaries to CDS step."""
+
+ def __init__(self, cleanup: bool = False) -> None:
+ """Initialize data dictionary upload step."""
+ super().__init__(cleanup=cleanup)
+ self.add_step(BootstrapBlueprintprocessor(cleanup=cleanup))
+
+ @property
+ def description(self) -> str:
+ """Step description."""
+ return "Upload data dictionaries to CDS."
+
+ @BaseStep.store_state
+ def execute(self) -> None:
+ """Upload data dictionary to CDS.
+
+ Use settings values:
+ - CDS_DD_FILE.
+
+ """
+ super().execute()
+ dd_set: DataDictionarySet = DataDictionarySet.load_from_file(settings.CDS_DD_FILE)
+ dd_set.upload()
+
+
+class CbaEnrichStep(CDSBaseStep):
+ """Enrich CBA file step."""
+
+ def __init__(self, cleanup=False) -> None:
+ """Initialize CBA enrichment step."""
+ super().__init__(cleanup=cleanup)
+ self.add_step(DataDictionaryUploadStep(cleanup=cleanup))
+
+ @property
+ def description(self) -> str:
+ """Step description."""
+ return "Enrich CBA file."
+
+ @BaseStep.store_state
+ def execute(self) -> None:
+ """Enrich CBA file.
+
+ Use settings values:
+ - CDS_DD_FILE.
+
+ """
+ super().execute()
+ blueprint: Blueprint = Blueprint.load_from_file(settings.CDS_CBA_UNENRICHED)
+ enriched: Blueprint = blueprint.enrich()
+ enriched.save(settings.CDS_CBA_ENRICHED)
+
+ @BaseStep.store_state(cleanup=True)
+ def cleanup(self) -> None:
+ """Cleanup enrichment step.
+
+ Delete enriched CBA file.
+
+ """
+ super().cleanup()
+ Path(settings.CDS_CBA_ENRICHED).unlink()
+
+
+class CbaPublishStep(CDSBaseStep):
+ """Publish CBA file step."""
+
+ def __init__(self, cleanup=False) -> None:
+ """Initialize CBA publish step."""
+ super().__init__(cleanup=cleanup)
+ self.add_step(CbaEnrichStep(cleanup=cleanup))
+
+ @property
+ def description(self) -> str:
+ """Step description."""
+ return "Publish CBA file."
+
+ @BaseStep.store_state
+ def execute(self) -> None:
+ """Enrich CBA file.
+
+ Use settings values:
+ - CDS_DD_FILE.
+
+ """
+ super().execute()
+ blueprint: Blueprint = Blueprint.load_from_file(settings.CDS_CBA_ENRICHED)
+ blueprint.publish()
diff --git a/src/onaptests/steps/onboard/msb_k8s.py b/src/onaptests/steps/onboard/msb_k8s.py
new file mode 100644
index 0000000..cad471b
--- /dev/null
+++ b/src/onaptests/steps/onboard/msb_k8s.py
@@ -0,0 +1,79 @@
+"""MSB k8s plugin module."""
+from onapsdk.configuration import settings
+from onapsdk.msb.k8s import Definition, Profile
+
+from onaptests.steps.base import BaseStep
+from onaptests.steps.cloud.cloud_region_create import CloudRegionCreateStep
+from onaptests.steps.cloud.k8s_connectivity_info_create import K8SConnectivityInfoStep
+
+
+class CreateDefinitionStep(BaseStep):
+ """Create definition step initialization."""
+
+ def __init__(self, cleanup: bool = False) -> None:
+ """Initialize step.
+
+ Substeps:
+ - CloudRegionCreateStep,
+ - K8SConnectivityInfoStep.
+ """
+ super().__init__(cleanup=cleanup)
+ self.add_step(CloudRegionCreateStep(cleanup=cleanup))
+ self.add_step(K8SConnectivityInfoStep(cleanup=cleanup))
+ self.definition: Definition = None
+
+ @property
+ def description(self) -> str:
+ """Step description."""
+ return "Create K8S definition."
+
+ @property
+ def component(self) -> str:
+ """Component name."""
+ return "K8S plugin"
+
+ @BaseStep.store_state
+ def execute(self) -> None:
+ """Create definition."""
+ super().execute()
+ with open(settings.PNF_DEFINITION_ATRIFACT_FILE_PATH, "rb") as definition_file:
+ self.definition = Definition.create(rb_name=settings.PNF_RB_NAME,
+ rb_version=settings.PNF_RB_VERSION)
+ self.definition.upload_artifact(definition_file.read())
+
+
+class CreateProfileStep(BaseStep):
+ """Create profile step."""
+
+ def __init__(self, cleanup: bool = False) -> None:
+ """Initialize step.
+
+ Substeps:
+ - CreateDefinitionStep.
+ """
+ super().__init__(cleanup=cleanup)
+ self.add_step(CreateDefinitionStep(cleanup=cleanup))
+ self.profile: Profile = None
+
+ @property
+ def description(self) -> str:
+ """Step description."""
+ return "Create K8S profile."
+
+ @property
+ def component(self) -> str:
+ """Component name."""
+ return "K8S plugin"
+
+ @BaseStep.store_state
+ def execute(self) -> None:
+ """Create profile."""
+ super().execute()
+ definition: Definition = Definition.get_definition_by_name_version(\
+ rb_name=settings.PNF_RB_NAME,
+ rb_version=settings.PNF_RB_VERSION)
+ with open(settings.PNF_PROFILE_ARTIFACT_FILE_PATH, "rb") as profile_file:
+ self.profile = definition.create_profile(profile_name=settings.PNF_PROFILE_NAME,
+ namespace=settings.K8S_NAMESPACE,
+ kubernetes_version=settings.K8S_VERSION)
+ self.profile.upload_artifact(profile_file.read())
diff --git a/src/onaptests/steps/onboard/pnf.py b/src/onaptests/steps/onboard/pnf.py
new file mode 100644
index 0000000..547e0c0
--- /dev/null
+++ b/src/onaptests/steps/onboard/pnf.py
@@ -0,0 +1,115 @@
+"""PNF onboarding step module."""
+
+from onapsdk.configuration import settings
+from onapsdk.sdc.pnf import Pnf
+from onapsdk.sdc.vendor import Vendor
+from ..base import BaseStep, YamlTemplateBaseStep
+from .vendor import VendorOnboardStep
+
+
+class PnfOnboardStep(BaseStep):
+ """PNF onboard step."""
+
+ def __init__(self, cleanup: bool = False) -> None:
+ """Step initialization.
+
+ Substeps:
+ - VendorOnboardStep.
+
+ Args:
+ cleanup(bool, optional): Determines if cleanup action should be called.
+
+ """
+ super().__init__(cleanup=cleanup)
+ self.add_step(VendorOnboardStep(cleanup=cleanup))
+
+ @property
+ def description(self) -> str:
+ """Step description."""
+ return "Onboard pnf in SDC."
+
+ @property
+ def component(self) -> str:
+ """Component name."""
+ return "SDC"
+
+ @BaseStep.store_state
+ def execute(self) -> None:
+ """Onboard PNF in SDC.
+
+ Use settings values:
+ - VENDOR_NAME,
+ - PNF_NAME,
+ - PNF_ARTIFACT_TYPE,
+ - PNF_ARTIFACT_NAME,
+ - PNF_ARTIFACT_LABEL,
+ - PNF_ARTIFACT_FILE_PATH
+
+ """
+ super().execute()
+ vendor: Vendor = Vendor(name=settings.VENDOR_NAME)
+ pnf: Pnf = Pnf(name=settings.PNF_NAME, vendor=vendor)
+ pnf.create()
+ pnf.add_deployment_artifact(
+ artifact_type=settings.PNF_ARTIFACT_TYPE,
+ artifact_name=settings.PNF_ARTIFACT_NAME,
+ artifact_label=settings.PNF_ARTIFACT_LABEL,
+ artifact=settings.PNF_ARTIFACT_FILE_PATH
+ )
+ pnf.onboard()
+
+
+class YamlTemplatePnfOnboardStep(YamlTemplateBaseStep):
+ """PNF onboard using YAML template step."""
+
+ def __init__(self, cleanup: bool = False) -> None:
+ """Step initialization.
+
+ Substeps:
+ - VendorOnboardStep.
+
+ Args:
+ cleanup(bool, optional): Determines if cleanup action should be called.
+
+ """
+ super().__init__(cleanup=cleanup)
+ self.add_step(VendorOnboardStep(cleanup=cleanup))
+
+ @property
+ def description(self) -> str:
+ """Step description."""
+ return "Onboard pnf using YAML template in SDC."
+
+ @property
+ def component(self) -> str:
+ """Component name."""
+ return "SDC"
+
+ @property
+ def yaml_template(self) -> dict:
+ """YAML template.
+
+ Get YAML template from parent using it's name.
+
+ Returns:
+ dict: YAML template
+
+ """
+ return self.parent.yaml_template[self.parent.service_name]
+
+ @YamlTemplateBaseStep.store_state
+ def execute(self):
+ """Onboard PNFs from YAML template."""
+ super().execute()
+ if "pnfs" in self.yaml_template:
+ vendor: Vendor = Vendor(name=settings.VENDOR_NAME)
+ for pnf in self.yaml_template["pnfs"]:
+ pnf_obj: Pnf = Pnf(name=pnf["pnf_name"], vendor=vendor)
+ pnf_obj.create()
+ pnf_obj.add_deployment_artifact(
+ artifact_type=pnf["pnf_artifact_type"],
+ artifact_name=pnf["pnf_artifact_name"],
+ artifact_label=pnf["pnf_artifact_label"],
+ artifact=pnf["pnf_artifact_file_path"]
+ )
+ pnf_obj.onboard()
diff --git a/src/onaptests/steps/onboard/service.py b/src/onaptests/steps/onboard/service.py
index 3c8b183..6300a43 100644
--- a/src/onaptests/steps/onboard/service.py
+++ b/src/onaptests/steps/onboard/service.py
@@ -1,11 +1,18 @@
+import time
+from typing import Any, Dict
from yaml import load
from onapsdk.configuration import settings
-from onapsdk.sdc.service import Service
+from onapsdk.exceptions import APIError, ResourceNotFound
+from onapsdk.sdc.component import Component
+from onapsdk.sdc.pnf import Pnf
+from onapsdk.sdc.properties import ComponentProperty
+from onapsdk.sdc.service import Service, ServiceInstantiationType
from onapsdk.sdc.vf import Vf
from onapsdk.sdc.vl import Vl
from ..base import BaseStep, YamlTemplateBaseStep
+from .pnf import PnfOnboardStep, YamlTemplatePnfOnboardStep
from .vf import VfOnboardStep, YamlTemplateVfOnboardStep
@@ -19,7 +26,10 @@ class ServiceOnboardStep(BaseStep):
- VfOnboardStep.
"""
super().__init__(cleanup=cleanup)
- self.add_step(VfOnboardStep(cleanup=cleanup))
+ if settings.VF_NAME != "":
+ self.add_step(VfOnboardStep(cleanup=cleanup))
+ if settings.PNF_NAME != "":
+ self.add_step(PnfOnboardStep(cleanup=cleanup))
@property
def description(self) -> str:
@@ -38,11 +48,13 @@ class ServiceOnboardStep(BaseStep):
Use settings values:
- VL_NAME,
- VF_NAME,
- - SERVICE_NAME.
+ - PNF_NAME,
+ - SERVICE_NAME,
+ - SERVICE_INSTANTIATION_TYPE.
"""
super().execute()
- service: Service = Service(name=settings.SERVICE_NAME)
+ service: Service = Service(name=settings.SERVICE_NAME, instantiation_type=settings.SERVICE_INSTANTIATION_TYPE)
service.create()
if settings.VL_NAME != "":
vl: Vl = Vl(name=settings.VL_NAME)
@@ -50,8 +62,16 @@ class ServiceOnboardStep(BaseStep):
if settings.VF_NAME != "":
vf: Vf = Vf(name=settings.VF_NAME)
service.add_resource(vf)
- service.checkin()
- service.onboard()
+ if settings.PNF_NAME != "":
+ pnf: Pnf = Pnf(name=settings.PNF_NAME)
+ service.add_resource(pnf)
+ # If the service is already distributed, do not try to checkin/onboard (replay of tests)
+ # checkin is done if needed
+ # If service is replayed, no need to try to re-onboard the model
+ if not service.distributed:
+ time.sleep(30)
+ service.checkin()
+ service.onboard()
class YamlTemplateServiceOnboardStep(YamlTemplateBaseStep):
@@ -65,7 +85,10 @@ class YamlTemplateServiceOnboardStep(YamlTemplateBaseStep):
"""
super().__init__(cleanup=cleanup)
self._yaml_template: dict = None
- self.add_step(YamlTemplateVfOnboardStep(cleanup=cleanup))
+ if "vnfs" in self.yaml_template[self.service_name]:
+ self.add_step(YamlTemplateVfOnboardStep(cleanup=cleanup))
+ if "pnfs" in self.yaml_template[self.service_name]:
+ self.add_step(YamlTemplatePnfOnboardStep(cleanup=cleanup))
@property
def description(self) -> str:
@@ -106,15 +129,43 @@ class YamlTemplateServiceOnboardStep(YamlTemplateBaseStep):
"""
if self.is_root:
return next(iter(self.yaml_template.keys()))
- else:
- return self.parent.service_name
+ return self.parent.service_name
@YamlTemplateBaseStep.store_state
def execute(self):
"""Onboard service."""
super().execute()
- service: Service = Service(name=settings.SERVICE_NAME)
+ if "instantiation_type" in self.yaml_template[self.service_name]:
+ instantiation_type: ServiceInstantiationType = ServiceInstantiationType(
+ self.yaml_template[self.service_name]["instantiation_type"])
+ else:
+ instantiation_type: ServiceInstantiationType = ServiceInstantiationType.A_LA_CARTE
+ service: Service = Service(name=self.service_name, instantiation_type=instantiation_type)
service.create()
+ self.declare_resources(service)
+ self.assign_properties(service)
+ # If the service is already distributed, do not try to checkin/onboard (replay of tests)
+ # checkin is done if needed
+ # If service is replayed, no need to try to re-onboard the model
+ if not service.distributed:
+ try:
+ service.checkin()
+ except (APIError, ResourceNotFound):
+ # Retry as checkin may be a bit long
+ # Temp workaround to avoid internal race in SDC
+ time.sleep(5)
+ service.checkin()
+ service.onboard()
+
+ def declare_resources(self, service: Service) -> None:
+ """Declare resources.
+
+ Resources defined in YAML template are declared.
+
+ Args:
+ service (Service): Service object
+
+ """
if "networks" in self.yaml_template[self.service_name]:
for net in self.yaml_template[self.service_name]["networks"]:
vl: Vl = Vl(name=net['vl_name'])
@@ -123,5 +174,50 @@ class YamlTemplateServiceOnboardStep(YamlTemplateBaseStep):
for vnf in self.yaml_template[self.service_name]["vnfs"]:
vf: Vf = Vf(name=vnf["vnf_name"])
service.add_resource(vf)
- service.checkin()
- service.onboard()
+ if "pnfs" in self.yaml_template[self.service_name]:
+ for pnf in self.yaml_template[self.service_name]["pnfs"]:
+ pnf_obj: Pnf = Pnf(name=pnf["pnf_name"])
+ service.add_resource(pnf_obj)
+
+ def assign_properties(self, service: Service) -> None:
+ """Assign components properties.
+
+ For each component set properties and it's value if are declared
+ in YAML template.
+
+ Args:
+ service (Service): Service object
+
+ """
+ if "networks" in self.yaml_template[self.service_name]:
+ for net in self.yaml_template[self.service_name]["networks"]:
+ if "properties" in net:
+ vl: Vl = Vl(name=net['vl_name'])
+ vl_component: Component = service.get_component(vl)
+ self.assign_properties_to_component(vl_component, net["properties"])
+ if "vnfs" in self.yaml_template[self.service_name]:
+ for vnf in self.yaml_template[self.service_name]["vnfs"]:
+ if "properties" in vnf:
+ vf: Vf = Vf(name=vnf["vnf_name"])
+ vf_component: Component = service.get_component(vf)
+ self.assign_properties_to_component(vf_component, vnf["properties"])
+ if "pnfs" in self.yaml_template[self.service_name]:
+ for pnf in self.yaml_template[self.service_name]["pnfs"]:
+ if "properties" in pnf:
+ pnf_obj: Pnf = Pnf(name=pnf["pnf_name"])
+ pnf_component: Component = service.get_component(pnf_obj)
+ self.assign_properties_to_component(pnf_component, pnf["properties"])
+
+ def assign_properties_to_component(self,
+ component: Component,
+ component_properties: Dict[str, Any]) -> None:
+ """Assign properties to component.
+
+ Args:
+ component (Component): Component to which properites are going to be assigned
+ component_properties (Dict[str, Any]): Properties dictionary
+
+ """
+ for property_name, property_value in component_properties.items():
+ prop: ComponentProperty = component.get_property(property_name)
+ prop.value = property_value
diff --git a/src/onaptests/steps/onboard/vf.py b/src/onaptests/steps/onboard/vf.py
index 817b412..5f5fc4d 100644
--- a/src/onaptests/steps/onboard/vf.py
+++ b/src/onaptests/steps/onboard/vf.py
@@ -85,4 +85,15 @@ class YamlTemplateVfOnboardStep(YamlTemplateBaseStep):
for vnf in self.yaml_template["vnfs"]:
vsp: Vsp = Vsp(name=f"{vnf['vnf_name']}_VSP")
vf: Vf = Vf(name=vnf['vnf_name'], vsp=vsp)
+ if all([x in vnf for x in ["vnf_artifact_type",
+ "vnf_artifact_name",
+ "vnf_artifact_label",
+ "vnf_artifact_file_path"]]):
+ vf.create()
+ vf.add_deployment_artifact(
+ artifact_type=vnf["vnf_artifact_type"],
+ artifact_name=vnf["vnf_artifact_name"],
+ artifact_label=vnf["vnf_artifact_label"],
+ artifact=vnf["vnf_artifact_file_path"]
+ )
vf.onboard()
diff --git a/src/onaptests/steps/reports_collection.py b/src/onaptests/steps/reports_collection.py
index e1eae51..52a0fec 100644
--- a/src/onaptests/steps/reports_collection.py
+++ b/src/onaptests/steps/reports_collection.py
@@ -4,12 +4,14 @@ from enum import Enum
from typing import List
from jinja2 import Environment, FileSystemLoader, select_autoescape
from onapsdk.configuration import settings
+from onapsdk.exceptions import SettingsError
class ReportStepStatus(Enum):
"""Enum which stores steps execution statuses."""
PASS = "PASS"
FAIL = "FAIL"
+ NOT_EXECUTED = "NOT EXECUTED"
@dataclass
@@ -63,12 +65,12 @@ class ReportsCollection:
usecase = settings.SERVICE_NAME
try:
details = settings.SERVICE_DETAILS
- except (KeyError, NameError):
+ except (KeyError, AttributeError, SettingsError):
details = ""
try:
components = settings.SERVICE_COMPONENTS
- except (KeyError, NameError):
+ except (KeyError, AttributeError, SettingsError):
components = ""
jinja_env = Environment(
diff --git a/src/onaptests/steps/simulator/pnf/__init__.py b/src/onaptests/steps/simulator/pnf/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/onaptests/steps/simulator/pnf/__init__.py
diff --git a/src/onaptests/steps/simulator/pnf/pnf_config.yaml b/src/onaptests/steps/simulator/pnf/pnf_config.yaml
new file mode 100644
index 0000000..13b0289
--- /dev/null
+++ b/src/onaptests/steps/simulator/pnf/pnf_config.yaml
@@ -0,0 +1,16 @@
+setup:
+ count: 1
+ vesprotocol: http # use `https` for the real VES
+ vesip: 172.17.0.1 # use 172.17.0.1 to communicate with localhost
+ vesport: 10000
+ vesresource: eventListener
+ vesversion: v7
+ ipstart: 10.11.0.16
+ user: ""
+ password: ""
+ ipfileserver: 127.0.0.1
+ typefileserver: sftp
+data:
+ commonEventHeaderParams:
+ sourceName: pyint-000
+ reportingEntityName: pyint-000
diff --git a/src/onaptests/steps/simulator/pnf/pnf_instantiate.py b/src/onaptests/steps/simulator/pnf/pnf_instantiate.py
new file mode 100644
index 0000000..d9d2620
--- /dev/null
+++ b/src/onaptests/steps/simulator/pnf/pnf_instantiate.py
@@ -0,0 +1,30 @@
+"""Base step that runs a PNF simulator."""
+from onaptests.steps.simulator.pnf import utils
+from onaptests.steps.base import BaseStep
+
+class PNFInstanceStep(BaseStep):
+ """Run PNF simulator containers."""
+
+ @property
+ def description(self) -> str:
+ """Step description."""
+ return "Run PNF simulator containers."
+
+ @property
+ def component(self) -> str:
+ """Component name."""
+ return "Environment"
+
+ @BaseStep.store_state
+ def execute(self) -> None:
+ """Run PNF simulator containers."""
+ super().execute()
+ utils.build_image()
+ utils.bootstrap_simulator()
+ utils.run_container()
+
+ def cleanup(self) -> None:
+ """Remove containers and images."""
+ utils.stop_container()
+ utils.remove_simulator()
+ utils.remove_image()
diff --git a/src/onaptests/steps/simulator/pnf/pnf_register.py b/src/onaptests/steps/simulator/pnf/pnf_register.py
new file mode 100644
index 0000000..8d5467a
--- /dev/null
+++ b/src/onaptests/steps/simulator/pnf/pnf_register.py
@@ -0,0 +1,38 @@
+"""Base step that runs a PNF simulator."""
+from onaptests.steps.simulator.pnf import utils
+from onaptests.steps.base import BaseStep
+from onaptests.steps.simulator.pnf.pnf_instantiate import PNFInstanceStep
+
+class PNFRegisterStep(BaseStep):
+ """Run PNF simulator containers."""
+
+ def __init__(self, cleanup=True):
+ """Initialize step.
+
+ Substeps:
+ - PNFInstanceStep
+
+ """
+ super().__init__(cleanup=cleanup)
+ self.add_step(PNFInstanceStep(cleanup=cleanup))
+
+ @property
+ def description(self) -> str:
+ """Step description."""
+ return "Register PNF with VES."
+
+ @property
+ def component(self) -> str:
+ """Component name."""
+ return "Environment"
+
+ @BaseStep.store_state
+ def execute(self) -> None:
+ """Register with VES."""
+ super().execute()
+ utils.register()
+
+ @BaseStep.store_state
+ def cleanup(self) -> None:
+ """Substeps cleanup - no unregister."""
+ super().cleanup()
diff --git a/src/onaptests/steps/simulator/pnf/utils.py b/src/onaptests/steps/simulator/pnf/utils.py
new file mode 100644
index 0000000..efac46e
--- /dev/null
+++ b/src/onaptests/steps/simulator/pnf/utils.py
@@ -0,0 +1,157 @@
+"""Utility functions that invoke operations of simulator script."""
+import os
+import sys
+import time
+import urllib.parse
+import yaml
+from ipaddress import ip_address
+from typing import Dict, Optional
+from decorator import decorator
+import docker
+
+from onapsdk.configuration import settings
+from onaptests.masspnfsimulator.MassPnfSim import (
+ MassPnfSim, get_parser
+)
+
+def get_config() -> Dict:
+ """Read a config YAML file."""
+ config = None
+ dir_path = os.path.dirname(os.path.realpath(__file__))
+ with open(f"{dir_path}/pnf_config.yaml", "r") as ymlfile:
+ config = yaml.load(ymlfile)
+ return config
+
+def get_default_args() -> None:
+ """Prepare default arguments for required operations.
+
+ Returns:
+ args (argparse.Namespace): default arguments.
+
+ """
+ parser = get_parser()
+ args = parser.parse_args('')
+ return args
+
+def switch_workdir(back_pwd: str = None) -> Optional[str]:
+ """Switch work directory temporarily for PNF simulator operations.
+
+ When `back_pwd` path is provided, it means go back tp the repository
+ you came from.
+
+ Arguments:
+ back_pwd: path to go back to.
+
+ Returns:
+ old_pwd (str): previous path.
+
+ """
+ sim_file_path = sys.modules[MassPnfSim.__module__].__file__
+ sim_dir_path = os.path.dirname(sim_file_path)
+
+ old_pwd = os.getcwd()
+
+ if not back_pwd:
+ curr_pwd = sim_dir_path
+ else:
+ curr_pwd = back_pwd
+
+ os.chdir(curr_pwd)
+ return old_pwd
+
+@decorator
+def chdir(func, *args, **kwargs):
+ """Switches to and from the simulator workspace."""
+ old_pwd = switch_workdir()
+ ret = func(*args, **kwargs)
+ switch_workdir(old_pwd)
+ return ret
+
+@chdir
+def build_image() -> None:
+ """Build simulator image."""
+ build = getattr(MassPnfSim(), "build")
+ args = get_default_args()
+ build(args)
+
+@chdir
+def remove_image() -> None:
+ """Remove simulator image(s)."""
+ client = docker.from_env()
+ sim_image_name = "nexus3.onap.org:10003/onap/masspnf-simulator"
+ images = client.images.list(sim_image_name)
+ for obj in images:
+ client.images.remove(obj.id, force=True)
+
+@chdir
+def bootstrap_simulator() -> None:
+ """Setup simulator(s) repo, data and configs."""
+ args = get_default_args()
+ config = get_config()
+
+ # collect settings that will be placed in the simulator directory
+ vesprotocol = config["setup"].get('vesprotocol', "http")
+ ves_url = urllib.parse.urlparse(settings.VES_URL)
+ vesip = ves_url.hostname
+ vesport = ves_url.port
+ vesresource = config["setup"].get('vesresource', "")
+ vesversion = config["setup"].get('vesversion', "")
+
+ urlves = f"{vesprotocol}://{vesip}:{vesport}/{vesresource}/{vesversion}"
+
+ # assign to simulator's arguments
+ args.count = config["setup"].get('count', 1)
+ args.urlves = urlves
+ args.ipstart = ip_address(config["setup"].get('ipstart', ''))
+ args.ipfileserver = config["setup"].get('ipfileserver', '')
+ args.typefileserver = config["setup"].get('typefileserver', '')
+ args.user = config["setup"].get('user', '')
+ args.password = config["setup"].get('password', '')
+
+ # bootstrap with assigned arguments
+ bootstrap = getattr(MassPnfSim(), "bootstrap")
+ bootstrap(args)
+
+@chdir
+def run_container() -> None:
+ """Run simulator container(s)."""
+ start = getattr(MassPnfSim(), "start")
+ args = get_default_args()
+ start(args)
+
+@chdir
+def register() -> None:
+ """Send an event to VES.
+
+ Use time.sleep(seconds) if registering with VES right after run_container().
+ Containers take a few seconds to run properly. Normally 5 seconds should be
+ enough.
+
+ """
+ time.sleep(5)
+ config = get_config()
+ trigger = getattr(MassPnfSim(), "trigger")
+ args = get_default_args()
+
+ args.user = config['setup'].get('user', '')
+ args.password = config['setup'].get('password', '')
+
+ custom_data = config['data']
+ if custom_data:
+ args.data = custom_data
+
+ trigger(args)
+
+@chdir
+def stop_container() -> None:
+ """Stop simulator container(s)."""
+ stop = getattr(MassPnfSim(), "stop")
+ args = get_default_args()
+ stop(args)
+
+@chdir
+def remove_simulator() -> None:
+ """Remove simulator container(s)."""
+ clean = getattr(MassPnfSim(), "clean")
+ args = get_default_args()
+ clean(args)
diff --git a/src/onaptests/steps/simulator/pnf_simulator_cnf/__init__.py b/src/onaptests/steps/simulator/pnf_simulator_cnf/__init__.py
new file mode 100644
index 0000000..477f7ae
--- /dev/null
+++ b/src/onaptests/steps/simulator/pnf_simulator_cnf/__init__.py
@@ -0,0 +1 @@
+"""PNF simulator CNF package."""
diff --git a/src/onaptests/steps/simulator/pnf_simulator_cnf/pnf_register.py b/src/onaptests/steps/simulator/pnf_simulator_cnf/pnf_register.py
new file mode 100644
index 0000000..a73f668
--- /dev/null
+++ b/src/onaptests/steps/simulator/pnf_simulator_cnf/pnf_register.py
@@ -0,0 +1,144 @@
+# http://www.apache.org/licenses/LICENSE-2.0
+"""PNF simulator registration module."""
+
+import time
+from typing import Tuple
+
+import requests
+from kubernetes import client, config, watch
+from onapsdk.configuration import settings
+
+from onaptests.steps.base import BaseStep
+from onaptests.steps.instantiate.msb_k8s import CreateInstanceStep
+from onaptests.utils.exceptions import EnvironmentPreparationException
+
+
+class PnfSimulatorCnfRegisterStep(BaseStep):
+ """PNF simulator registration step."""
+
+ def __init__(self, cleanup: bool = False) -> None:
+ """Initialize step.
+
+ Substeps:
+ - CreateInstanceStep.
+ """
+ super().__init__(cleanup=cleanup)
+ self.add_step(CreateInstanceStep(cleanup=cleanup))
+
+ @property
+ def description(self) -> str:
+ """Step description."""
+ return "Register PNF simulator with VES."
+
+ @property
+ def component(self) -> str:
+ """Component name."""
+ return "Environment"
+
+ @staticmethod
+ def is_pnf_pod_running(timeout_seconds=120) -> bool:
+ """Check if PNF simulator pod is running.
+
+ Args:
+ timeout_seconds (int, optional): Timeout. Defaults to 120.
+
+ Returns:
+ bool: True if PNF simulator pod is running, False otherwise
+
+ """
+ config.load_kube_config(settings.K8S_CONFIG)
+ k8s_client: "CoreV1API" = client.CoreV1Api()
+ k8s_watch: "Watch" = watch.Watch()
+ for event in k8s_watch.stream(k8s_client.list_namespaced_pod,
+ namespace=settings.K8S_NAMESPACE,
+ timeout_seconds=timeout_seconds):
+ if event["object"].metadata.name == "pnf-simulator":
+ if not event["object"].status.phase in ["Pending", "Running"]:
+ # Invalid pod state
+ return False
+ return event["object"].status.phase == "Running"
+ return False
+
+ @staticmethod
+ def get_ves_ip_and_port() -> Tuple[str, str]:
+ """Static method to get VES ip address and port.
+
+ Raises:
+ EnvironmentPreparationException: VES pod is not running
+
+ Returns:
+ Tuple[str, str]: VES IP and port
+
+ """
+ config.load_kube_config(settings.K8S_CONFIG)
+ k8s_client: "CoreV1API" = client.CoreV1Api()
+ for service in k8s_client.list_namespaced_service(namespace=settings.K8S_NAMESPACE).items:
+ if service.metadata.name == "xdcae-ves-collector":
+ return service.spec.cluster_ip, service.spec.ports[0].port
+ raise EnvironmentPreparationException("Couldn't get VES ip and port")
+
+ @BaseStep.store_state
+ def execute(self) -> None:
+ """Send PNF registration event."""
+ super().execute()
+ if not self.is_pnf_pod_running():
+ EnvironmentPreparationException("PNF simulator is not running")
+ time.sleep(30.0) # Let's still wait for PNF simulator to make sure it's initialized
+ ves_ip, ves_port = self.get_ves_ip_and_port()
+ response = requests.post(
+ "http://portal.api.simpledemo.onap.org:30999/simulator/event",
+ json={
+ "vesServerUrl": f"https://{ves_ip}:{ves_port}/eventListener/v7",
+ "event": {
+ "event": {
+ "commonEventHeader": {
+ "domain": "pnfRegistration",
+ "eventId": "ORAN_SIM_400600927_2020-04-02T17:20:22.2Z",
+ "eventName": "pnfRegistration",
+ "eventType": "EventType5G",
+ "sequence": 0,
+ "priority": "Low",
+ "reportingEntityId": "",
+ "reportingEntityName": "ORAN_SIM_400600927",
+ "sourceId": "",
+ "sourceName": settings.SERVICE_INSTANCE_NAME,
+ "startEpochMicrosec": 94262132085746,
+ "lastEpochMicrosec": 94262132085746,
+ "nfNamingCode": "sdn controller",
+ "nfVendorName": "sdn",
+ "timeZoneOffset": "+00:00",
+ "version": "4.0.1",
+ "vesEventListenerVersion": "7.0.1"
+ },
+ "pnfRegistrationFields": {
+ "pnfRegistrationFieldsVersion": "2.0",
+ "lastServiceDate": "2019-08-16",
+ "macAddress": "D7:64:C8:CC:E9:32",
+ "manufactureDate": "2019-08-16",
+ "modelNumber": "Simulated Device",
+ "oamV4IpAddress": "172.30.1.6",
+ "oamV6IpAddress": "0:0:0:0:0:ffff:a0a:011",
+ "serialNumber": "Simulated Device",
+ "softwareVersion": "2.3.5",
+ "unitFamily": "Simulated Device",
+ "unitType": "ntsim_oran",
+ "vendorName": "Melacon",
+ "additionalFields": {
+ "oamPort": "830",
+ "protocol": "SSH",
+ "username": "netconf",
+ "password": "netconf",
+ "reconnectOnChangedSchema": "false",
+ "sleep-factor": "1.5",
+ "tcpOnly": "false",
+ "connectionTimeout": "20000",
+ "maxConnectionAttempts": "100",
+ "betweenAttemptsTimeout": "2000",
+ "keepaliveDelay": "120"
+ }
+ }
+ }
+ }
+ }
+ )
+ response.raise_for_status()
diff --git a/src/onaptests/steps/wrapper/__init__.py b/src/onaptests/steps/wrapper/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/onaptests/steps/wrapper/__init__.py
diff --git a/src/onaptests/steps/wrapper/helm_charts.py b/src/onaptests/steps/wrapper/helm_charts.py
new file mode 100644
index 0000000..4482683
--- /dev/null
+++ b/src/onaptests/steps/wrapper/helm_charts.py
@@ -0,0 +1,93 @@
+"""Basic container commands to Docker."""
+import yaml
+from avionix import ChartBuilder, ChartDependency, ChartInfo
+from avionix.errors import HelmError
+from onaptests.steps.base import BaseStep
+from onaptests.utils.simulators import get_local_dir
+from onaptests.utils.exceptions import (
+ EnvironmentPreparationException,
+ EnvironmentCleanupException)
+
+
+
+class HelmChartStep(BaseStep):
+ """Basic operations on a docker container."""
+
+ def __init__(self,
+ cleanup: bool = False,
+ chart_info_file: str = None) -> None:
+ """Setup Helm chart details.
+
+ Arguments:
+ cleanup (bool): cleanup after execution. Defaults to False.
+ chart_info_file (str): description file of a chart. Default to None.
+ """
+ chart_info = None
+ dependencies = []
+
+ super().__init__(cleanup=cleanup)
+
+ chart_info_path = get_local_dir() / chart_info_file
+
+ try:
+ with open(chart_info_path, 'r') as stream:
+ chart_info = yaml.safe_load(stream)
+ except IOError as err:
+ msg = f"{chart_info_file} not found."
+ raise EnvironmentPreparationException(msg) from err
+
+
+ try:
+ for dependency in chart_info["dependencies"]:
+ dep = ChartDependency(
+ name=dependency["name"],
+ version=dependency["version"],
+ repository=dependency["repository"],
+ local_repo_name=dependency["local_repo_name"],
+ values=dependency["values"])
+ dependencies.append(dep)
+
+ self.builder = ChartBuilder(
+ chart_info=ChartInfo(
+ api_version=chart_info["api_version"],
+ name=chart_info["chart_name"],
+ version=chart_info["version"], # SemVer 2 version
+ app_version=chart_info["app_version"],
+ dependencies=dependencies
+ ),
+ kubernetes_objects=[],
+ keep_chart=False
+ )
+ except KeyError as err:
+ msg = f"{chart_info_file} does not contain required keys."
+ raise EnvironmentPreparationException(msg) from err
+
+ @property
+ def description(self) -> str:
+ """Step description."""
+ return "Execute Helm charts."
+
+ @property
+ def component(self) -> str:
+ """Component name."""
+ return "Environment"
+
+ @BaseStep.store_state
+ def execute(self) -> None:
+ """Install helm release."""
+ super().execute()
+ try:
+ self.builder.install_chart({"dependency-update": None})
+ except HelmError as err:
+ msg = "Error during helm release installation."
+ raise EnvironmentPreparationException(msg) from err
+
+
+ def cleanup(self) -> None:
+ """Uninstall helm release."""
+ try:
+ self.builder.uninstall_chart()
+ except HelmError as err:
+ msg = "Error during helm release deletion."
+ raise EnvironmentCleanupException(msg) from err
+ super().cleanup()
diff --git a/src/onaptests/steps/wrapper/start.py b/src/onaptests/steps/wrapper/start.py
new file mode 100644
index 0000000..18ba5df
--- /dev/null
+++ b/src/onaptests/steps/wrapper/start.py
@@ -0,0 +1,64 @@
+"""Start simulators via simulators' API."""
+from typing import Union, Optional, Dict
+import requests
+from onaptests.steps.base import BaseStep
+from onaptests.utils.exceptions import TestConfigurationException
+
+class SimulatorStartStep(BaseStep):
+ """Basic operations on a docker container."""
+
+ def __init__(self, # pylint: disable=R0913
+ cleanup: bool = False,
+ https: bool = False,
+ host: str = None,
+ port: Union[int, str] = None,
+ endpoint: Optional[str] = "",
+ method: str = "GET",
+ data: Dict = None) -> None:
+ """Prepare request data and details.
+
+ Arguments:
+ cleanup (bool):
+ determines if cleanup action should be called.
+ Defaults to False.
+ https (bool): use https or http. Defaults to False.
+ host (str): IP or hostname. Defaults to None.
+ port (Union[int, str]): port number. Defaults to None.
+ endpoint (str):
+ additional endpoint if applicable.
+ Defautls to "".
+ method (str):
+ GET or POST strings, case insensitive.
+ Defaults tp GET.
+ data (Dict):
+ parameters, that request's post() or get() takes, besides url.
+ For example, {"json": {}, ...}. Defaults to None.
+ """
+ if not host and not port:
+ raise TestConfigurationException("Provide host and/or port.")
+
+ super().__init__(cleanup=cleanup)
+
+ default_port = "443" if https else "80"
+ protocol = "https" if https else "http"
+ endpoint = endpoint[1:] if endpoint.startswith("/") else endpoint
+
+ self.method = method
+ self.data = data if data else {}
+ self.url = f"{protocol}://{host}:{port or default_port}/{endpoint}"
+
+ @property
+ def description(self) -> str:
+ """Step description."""
+ return "Send commands to the simulator application."
+
+ @property
+ def component(self) -> str:
+ """Component name."""
+ return "Environment"
+
+ @BaseStep.store_state
+ def execute(self) -> None:
+ """Send a start command to the simulator application."""
+ super().execute()
+ requests.request(self.method.upper(), self.url, **self.data)
diff --git a/src/onaptests/templates/artifacts/PNF_DEMO.zip b/src/onaptests/templates/artifacts/PNF_DEMO.zip
new file mode 100755
index 0000000..6d5f1fc
--- /dev/null
+++ b/src/onaptests/templates/artifacts/PNF_DEMO.zip
Binary files differ
diff --git a/src/onaptests/templates/artifacts/basic_vm_cba.zip b/src/onaptests/templates/artifacts/basic_vm_cba.zip
new file mode 100644
index 0000000..fd50499
--- /dev/null
+++ b/src/onaptests/templates/artifacts/basic_vm_cba.zip
Binary files differ
diff --git a/src/onaptests/templates/artifacts/dd.json b/src/onaptests/templates/artifacts/dd.json
new file mode 100644
index 0000000..81446d0
--- /dev/null
+++ b/src/onaptests/templates/artifacts/dd.json
@@ -0,0 +1,3649 @@
+[
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vpg_int_pktgen_private_ip_0",
+ "property": {
+ "description": "vpg_int_pktgen_private_ip_0",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "vpg_int_pktgen_private_ip_0": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vpg_int_pktgen_private_ip_0",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "vpg_int_pktgen_private_ip_0",
+ "updated-by": "Singal, Kapil <ks220y@att.com>"
+ },
+ "description": "vpg_int_pktgen_private_ip_0",
+ "entry_schema": "string",
+ "name": "vpg_int_pktgen_private_ip_0",
+ "tags": "vpg_int_pktgen_private_ip_0",
+ "updatedBy": "Singal, Kapil <ks220y@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "active-streams",
+ "property": {
+ "description": "active-streams",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ }
+ },
+ "tags": "active-streams",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "active-streams",
+ "entry_schema": "string",
+ "name": "active-streams",
+ "tags": "active-streams",
+ "updatedBy": "Singal, Kapil <ks220y@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vpg_int_private1_ip_0",
+ "property": {
+ "description": "vpg_int_private1_ip_0",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "vpg_int_private1_ip_0": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vpg_int_private1_ip_0",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "vpg_int_private1_ip_0",
+ "updated-by": "Singal, Kapil <ks220y@att.com>"
+ },
+ "description": "vpg_int_private1_ip_0",
+ "entry_schema": "string",
+ "name": "vpg_int_private1_ip_0",
+ "tags": "vpg_int_private1_ip_0",
+ "updatedBy": "Singal, Kapil <ks220y@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "put-active-streams",
+ "property": {
+ "description": "put-active-streams",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "active-streams": "active-streams",
+ "vpg_onap_private_ip_0": "vpg_onap_private_ip_0"
+ },
+ "key-dependencies": [
+ "vpg_onap_private_ip_0",
+ "active-streams"
+ ],
+ "output-key-mapping": {},
+ "path": "/param/0/value",
+ "payload": "{\"streams\": {\"active-streams\": $active-streams}}",
+ "type": "JSON",
+ "url-path": "$vpg_onap_private_ip_0:8183/restconf/config/stream-count:stream-count/streams",
+ "verb": "PUT"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "put-active-streams",
+ "updated-by": "Singal, Kapil <ks220y@att.com>"
+ },
+ "description": "put-active-streams",
+ "entry_schema": "string",
+ "name": "put-active-streams",
+ "tags": "put-active-streams",
+ "updatedBy": "Singal, Kapil <ks220y@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vpg_onap_private_ip_0",
+ "property": {
+ "description": "vpg_onap_private_ip_0",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "vpg_onap_private_ip_0": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vpg_onap_private_ip_0",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "vpg_onap_private_ip_0",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "vpg_onap_private_ip_0",
+ "entry_schema": "string",
+ "name": "vpg_onap_private_ip_0",
+ "tags": "vpg_onap_private_ip_0",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "create-md-sal-vnf-param",
+ "property": {
+ "description": "create-md-sal-vnf-param",
+ "type": "string"
+ },
+ "sources": {
+ "aai-data": {
+ "properties": {
+ "input-key-mapping": {
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "vnf-id"
+ ],
+ "output-key-mapping": {},
+ "path": "",
+ "payload": "{\"nm-profile-name\":\"$vf-module-id\"}",
+ "type": "JSON",
+ "url-path": "/aai/v14/network/generic-vnfs/generic-vnf/$vnf-id/nm-profile-name",
+ "verb": "PATCH"
+ },
+ "type": "source-rest"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vf-module-id": "vf-module-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "vf-module-id",
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {},
+ "path": "",
+ "payload": "{\n\"GENERIC-RESOURCE-API:param\": [\n{\n\"GENERIC-RESOURCE-API:name\": \"vdns_vf_module_id\",\n\"GENERIC-RESOURCE-API:value\": \"$vf-module-id\"\n}\n]\n}",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vdns_vf_module_id",
+ "verb": "PUT"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "create-md-sal-vnf-param",
+ "updated-by": "Yuriy Malakov"
+ },
+ "description": "create-md-sal-vnf-param",
+ "entry_schema": "string",
+ "name": "create-md-sal-vnf-param",
+ "tags": "create-md-sal-vnf-param",
+ "updatedBy": "Singal, Kapil <ks220y@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vf-module-name",
+ "property": {
+ "description": "vf-module-name",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ }
+ },
+ "tags": "vf-module-name",
+ "updated-by": "Singal, Kapil <ks220y@att.com>"
+ },
+ "description": "vf-module-name",
+ "entry_schema": "string",
+ "name": "vf-module-name",
+ "tags": "vf-module-name",
+ "updatedBy": "Singal, Kapil <ks220y@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vpg_onap_private_ip_0",
+ "property": {
+ "description": "vpg_onap_private_ip_0",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "vpg_onap_private_ip_0": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vpg_onap_private_ip_0",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "vpg_onap_private_ip_0",
+ "updated-by": "Singal, Kapil <ks220y@att.com>"
+ },
+ "description": "vpg_onap_private_ip_0",
+ "entry_schema": "string",
+ "name": "vpg_onap_private_ip_0",
+ "tags": "vpg_onap_private_ip_0",
+ "updatedBy": "Singal, Kapil <ks220y@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vdns_name_0",
+ "property": {
+ "description": "vdns_name_0",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "vdns_name_0": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vdns_name_0",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "vdns_name_0",
+ "updated-by": "Singal, Kapil <ks220y@att.com>"
+ },
+ "description": "vdns_name_0",
+ "entry_schema": "string",
+ "name": "vdns_name_0",
+ "tags": "vdns_name_0",
+ "updatedBy": "Singal, Kapil <ks220y@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vfw_name_0",
+ "property": {
+ "description": "vfw_name_0",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "vfw_name_0": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vfw_name_0",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "vfw_name_0",
+ "updated-by": "Singal, Kapil <ks220y@att.com>"
+ },
+ "description": "vfw_name_0",
+ "entry_schema": "string",
+ "name": "vfw_name_0",
+ "tags": "vfw_name_0",
+ "updatedBy": "Singal, Kapil <ks220y@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vlb_int_private_ip_0",
+ "property": {
+ "description": "vlb_int_private_ip_0",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "vlb_int_private_ip_0": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vlb_int_private_ip_0",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "vlb_int_private_ip_0",
+ "updated-by": "Singal, Kapil <ks220y@att.com>"
+ },
+ "description": "vlb_int_private_ip_0",
+ "entry_schema": "string",
+ "name": "vlb_int_private_ip_0",
+ "tags": "vlb_int_private_ip_0",
+ "updatedBy": "Singal, Kapil <ks220y@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "dcae_collector_ip",
+ "property": {
+ "description": "dcae_collector_ip",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "dcae_collector_ip": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/dcae_collector_ip",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "dcae_collector_ip",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "dcae_collector_ip",
+ "entry_schema": "string",
+ "name": "dcae_collector_ip",
+ "tags": "dcae_collector_ip",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vfw_int_private2_ip_0",
+ "property": {
+ "description": "vfw_int_private2_ip_0",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "vfw_int_private2_ip_0": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vfw_int_private2_ip_0",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "vfw_int_private2_ip_0",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "vfw_int_private2_ip_0",
+ "entry_schema": "string",
+ "name": "vfw_int_private2_ip_0",
+ "tags": "vfw_int_private2_ip_0",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vfw_onap_private_ip_0",
+ "property": {
+ "description": "vfw_onap_private_ip_0",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "vfw_onap_private_ip_0": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vfw_onap_private_ip_0",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "vfw_onap_private_ip_0",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "vfw_onap_private_ip_0",
+ "entry_schema": "string",
+ "name": "vfw_onap_private_ip_0",
+ "tags": "vfw_onap_private_ip_0",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vfw_int_private1_ip_0",
+ "property": {
+ "description": "vfw_int_private1_ip_0",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "vfw_int_private1_ip_0": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vfw_int_private1_ip_0",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "vfw_int_private1_ip_0",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "vfw_int_private1_ip_0",
+ "entry_schema": "string",
+ "name": "vfw_int_private1_ip_0",
+ "tags": "vfw_int_private1_ip_0",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vfw_int_private2_floating_ip",
+ "property": {
+ "description": "vfw_int_private2_floating_ip",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "vfw_int_private2_floating_ip": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vfw_int_private2_floating_ip",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "vfw_int_private2_floating_ip",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "vfw_int_private2_floating_ip",
+ "entry_schema": "string",
+ "name": "vfw_int_private2_floating_ip",
+ "tags": "vfw_int_private2_floating_ip",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vsn_int_private2_ip_0",
+ "property": {
+ "description": "vsn_int_private2_ip_0",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "vsn_int_private2_ip_0": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vsn_int_private2_ip_0",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "vsn_int_private2_ip_0",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "vsn_int_private2_ip_0",
+ "entry_schema": "string",
+ "name": "vsn_int_private2_ip_0",
+ "tags": "vsn_int_private2_ip_0",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vsn_onap_private_ip_0",
+ "property": {
+ "description": "vsn_onap_private_ip_0",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "vsn_onap_private_ip_0": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vsn_onap_private_ip_0",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "vsn_onap_private_ip_0",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "vsn_onap_private_ip_0",
+ "entry_schema": "string",
+ "name": "vsn_onap_private_ip_0",
+ "tags": "vsn_onap_private_ip_0",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "dcae_collector_port",
+ "property": {
+ "description": "dcae_collector_port",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "dcae_collector_port": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/dcae_collector_port",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "dcae_collector_port",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "dcae_collector_port",
+ "entry_schema": "string",
+ "name": "dcae_collector_port",
+ "tags": "dcae_collector_port",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "demo_artifacts_version",
+ "property": {
+ "description": "demo_artifacts_version",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "demo_artifacts_version": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/demo_artifacts_version",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "demo_artifacts_version",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "demo_artifacts_version",
+ "entry_schema": "string",
+ "name": "demo_artifacts_version",
+ "tags": "demo_artifacts_version",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "install_script_version",
+ "property": {
+ "description": "install_script_version",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "install_script_version": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/install_script_version",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "install_script_version",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "install_script_version",
+ "entry_schema": "string",
+ "name": "install_script_version",
+ "tags": "install_script_version",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "int_pktgen_private_net_id",
+ "property": {
+ "description": "int_pktgen_private_net_id",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "int_pktgen_private_net_id": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/int_pktgen_private_net_id",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "int_pktgen_private_net_id",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "int_pktgen_private_net_id",
+ "entry_schema": "string",
+ "name": "int_pktgen_private_net_id",
+ "tags": "int_pktgen_private_net_id",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "int_pktgen_private_subnet_id",
+ "property": {
+ "description": "int_pktgen_private_subnet_id",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "int_pktgen_private_subnet_id": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/int_pktgen_private_subnet_id",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "int_pktgen_private_subnet_id",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "int_pktgen_private_subnet_id",
+ "entry_schema": "string",
+ "name": "int_pktgen_private_subnet_id",
+ "tags": "int_pktgen_private_subnet_id",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "int_private_net_id",
+ "property": {
+ "description": "int_private_net_id",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "int_private_net_id": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/int_private_net_id",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "int_private_net_id",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "int_private_net_id",
+ "entry_schema": "string",
+ "name": "int_private_net_id",
+ "tags": "int_private_net_id",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "int_private_subnet_id",
+ "property": {
+ "description": "int_private_subnet_id",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "int_private_subnet_id": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/int_private_subnet_id",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "int_private_subnet_id",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "int_private_subnet_id",
+ "entry_schema": "string",
+ "name": "int_private_subnet_id",
+ "tags": "int_private_subnet_id",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "keypair",
+ "property": {
+ "description": "keypair",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "keypair": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/keypair",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "keypair",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "keypair",
+ "entry_schema": "string",
+ "name": "keypair",
+ "tags": "keypair",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "nb_api_version",
+ "property": {
+ "description": "nb_api_version",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "nb_api_version": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/nb_api_version",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "nb_api_version",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "nb_api_version",
+ "entry_schema": "string",
+ "name": "nb_api_version",
+ "tags": "nb_api_version",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "nexus_artifact_repo",
+ "property": {
+ "description": "nexus_artifact_repo",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "nexus_artifact_repo": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/nexus_artifact_repo",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "nexus_artifact_repo",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "nexus_artifact_repo",
+ "entry_schema": "string",
+ "name": "nexus_artifact_repo",
+ "tags": "nexus_artifact_repo",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "onap_private_net_id",
+ "property": {
+ "description": "onap_private_net_id",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "onap_private_net_id": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/onap_private_net_id",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "onap_private_net_id",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "onap_private_net_id",
+ "entry_schema": "string",
+ "name": "onap_private_net_id",
+ "tags": "onap_private_net_id",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "onap_private_subnet_id",
+ "property": {
+ "description": "onap_private_subnet_id",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "onap_private_subnet_id": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/onap_private_subnet_id",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "onap_private_subnet_id",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "onap_private_subnet_id",
+ "entry_schema": "string",
+ "name": "onap_private_subnet_id",
+ "tags": "onap_private_subnet_id",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "pub_key",
+ "property": {
+ "description": "pub_key",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "pub_key": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/pub_key",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "pub_key",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "pub_key",
+ "entry_schema": "string",
+ "name": "pub_key",
+ "tags": "pub_key",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "public_net_id",
+ "property": {
+ "description": "public_net_id",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "public_net_id": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/public_net_id",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "public_net_id",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "public_net_id",
+ "entry_schema": "string",
+ "name": "public_net_id",
+ "tags": "public_net_id",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "sec_group",
+ "property": {
+ "description": "sec_group",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "sec_group": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/sec_group",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "sec_group",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "sec_group",
+ "entry_schema": "string",
+ "name": "sec_group",
+ "tags": "sec_group",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vdns_flavor_name",
+ "property": {
+ "description": "vdns_flavor_name",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "vdns_flavor_name": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vdns_flavor_name",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "vdns_flavor_name",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "vdns_flavor_name",
+ "entry_schema": "string",
+ "name": "vdns_flavor_name",
+ "tags": "vdns_flavor_name",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "flavor_name",
+ "property": {
+ "description": "flavor_name",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "flavor_name": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/flavor_name",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "flavor_name",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "flavor_name",
+ "entry_schema": "string",
+ "name": "flavor_name",
+ "tags": "flavor_name",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vdns_image_name",
+ "property": {
+ "description": "vdns_image_name",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "vdns_image_name": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vdns_image_name",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "vdns_image_name",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "vdns_image_name",
+ "entry_schema": "string",
+ "name": "vdns_image_name",
+ "tags": "vdns_image_name",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vf_module_id",
+ "property": {
+ "description": "vf_module_id",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ }
+ },
+ "tags": "vf_module_id",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "vf_module_id",
+ "entry_schema": "string",
+ "name": "vf_module_id",
+ "tags": "vf_module_id",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vdns_vf_module_id",
+ "property": {
+ "description": "vdns_vf_module_id",
+ "type": "string"
+ },
+ "sources": {
+ "aai-data": {
+ "properties": {
+ "input-key-mapping": {
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "vdns_vf_module_id": "nm-profile-name"
+ },
+ "path": "",
+ "type": "JSON",
+ "url-path": "/aai/v14/network/generic-vnfs/generic-vnf/$vnf-id",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ },
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "vdns_vf_module_id": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vdns_vf_module_id",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "vdns_vf_module_id",
+ "updated-by": "Singal, Kapil <ks220y@att.com>"
+ },
+ "description": "vdns_vf_module_id",
+ "entry_schema": "string",
+ "name": "vdns_vf_module_id",
+ "tags": "vdns_vf_module_id",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vf-naming-policy",
+ "property": {
+ "description": "vf-naming-policy",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "processor-db": {
+ "properties": {
+ "input-key-mapping": {
+ "vnf_model_customization_uuid": "vnf-model-customization-uuid"
+ },
+ "key-dependencies": [
+ "vnf-model-customization-uuid"
+ ],
+ "output-key-mapping": {
+ "vf-naming-policy": "vf_naming_policy"
+ },
+ "query": "select sdnctl.VF_MODEL.naming_policy as vf_naming_policy from sdnctl.VF_MODEL where sdnctl.VF_MODEL.customization_uuid=:vnf_model_customization_uuid",
+ "type": "SQL"
+ },
+ "type": "source-db"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "vf-naming-policy": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vf-naming-policy",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "vf-naming-policy",
+ "updated-by": "Singal, Kapil <ks220y@att.com>"
+ },
+ "description": "vf-naming-policy",
+ "entry_schema": "string",
+ "name": "vf-naming-policy",
+ "tags": "vf-naming-policy",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vlb_0_int_pktgen_private_port_0_mac",
+ "property": {
+ "description": "vlb_0_int_pktgen_private_port_0_mac",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "vlb_0_int_pktgen_private_port_0_mac": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vlb_0_int_pktgen_private_port_0_mac",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "vlb_0_int_pktgen_private_port_0_mac",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "vlb_0_int_pktgen_private_port_0_mac",
+ "entry_schema": "string",
+ "name": "vlb_0_int_pktgen_private_port_0_mac",
+ "tags": "vlb_0_int_pktgen_private_port_0_mac",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vlb_flavor_name",
+ "property": {
+ "description": "vlb_flavor_name",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "vlb_flavor_name": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vlb_flavor_name",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "vlb_flavor_name",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "vlb_flavor_name",
+ "entry_schema": "string",
+ "name": "vlb_flavor_name",
+ "tags": "vlb_flavor_name",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vlb_image_name",
+ "property": {
+ "description": "vlb_image_name",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "vlb_image_name": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vlb_image_name",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "vlb_image_name",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "vlb_image_name",
+ "entry_schema": "string",
+ "name": "vlb_image_name",
+ "tags": "vlb_image_name",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vlb_private_net_id",
+ "property": {
+ "description": "vlb_private_net_id",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "vlb_private_net_id": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vlb_private_net_id",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "vlb_private_net_id",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "vlb_private_net_id",
+ "entry_schema": "string",
+ "name": "vlb_private_net_id",
+ "tags": "vlb_private_net_id",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vpg_flavor_name",
+ "property": {
+ "description": "vpg_flavor_name",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "vpg_flavor_name": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vpg_flavor_name",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "vpg_flavor_name",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "vpg_flavor_name",
+ "entry_schema": "string",
+ "name": "vpg_flavor_name",
+ "tags": "vpg_flavor_name",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vpg_image_name",
+ "property": {
+ "description": "vpg_image_name",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "vpg_image_name": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vpg_image_name",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "vpg_image_name",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "vpg_image_name",
+ "entry_schema": "string",
+ "name": "vpg_image_name",
+ "tags": "vpg_image_name",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "image_name",
+ "property": {
+ "description": "image_name",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "image_name": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/image_name",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "image_name",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "vpg_image_name",
+ "entry_schema": "string",
+ "name": "image_name",
+ "tags": "image_name",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "gre_ipaddr",
+ "property": {
+ "description": "gre_ipaddr",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "gre_ipaddr": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/gre_ipaddr",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "gre_ipaddr",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "gre_ipaddr",
+ "entry_schema": "string",
+ "name": "gre_ipaddr",
+ "tags": "gre_ipaddr",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "pg_int",
+ "property": {
+ "description": "pg_int",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "pg_int": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/pg_int",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "pg_int",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "pg_int",
+ "entry_schema": "string",
+ "name": "pg_int",
+ "tags": "pg_int",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vdns_int_private_ip_0",
+ "property": {
+ "description": "vdns_int_private_ip_0",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vdns_vf_module_id": "vdns_vf_module_id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id",
+ "vdns_vf_module_id"
+ ],
+ "output-key-mapping": {
+ "vdns_int_private_ip_0": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vf-modules/vf-module/$vdns_vf_module_id/vf-module-data/vf-module-topology/vf-module-parameters/param/vdns_int_private_ip_0",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "vdns_int_private_ip_0",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "vdns_int_private_ip_0",
+ "entry_schema": "string",
+ "name": "vdns_int_private_ip_0",
+ "tags": "vdns_int_private_ip_0",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vdns_onap_private_ip_0",
+ "property": {
+ "description": "vdns_onap_private_ip_0",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vdns_vf_module_id": "vdns_vf_module_id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id",
+ "vdns_vf_module_id"
+ ],
+ "output-key-mapping": {
+ "vdns_onap_private_ip_0": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vf-modules/vf-module/$vdns_vf_module_id/vf-module-data/vf-module-topology/vf-module-parameters/param/vdns_onap_private_ip_0",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "vdns_onap_private_ip_0",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "vdns_onap_private_ip_0",
+ "entry_schema": "string",
+ "name": "vdns_onap_private_ip_0",
+ "tags": "vdns_onap_private_ip_0",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vip",
+ "property": {
+ "description": "vip",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "vip": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vip",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "vip",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "vip",
+ "entry_schema": "string",
+ "name": "vip",
+ "tags": "vip",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vlb_int_pktgen_private_ip_0",
+ "property": {
+ "description": "vlb_int_pktgen_private_ip_0",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "vlb_int_pktgen_private_ip_0": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vlb_int_pktgen_private_ip_0",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "vlb_int_pktgen_private_ip_0",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "vlb_int_pktgen_private_ip_0",
+ "entry_schema": "string",
+ "name": "vlb_int_pktgen_private_ip_0",
+ "tags": "vlb_int_pktgen_private_ip_0",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "pktgen_private_net_id",
+ "property": {
+ "description": "pktgen_private_net_id",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "pktgen_private_net_id": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/pktgen_private_net_id",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "pktgen_private_net_id",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "pktgen_private_net_id",
+ "entry_schema": "string",
+ "name": "pktgen_private_net_id",
+ "tags": "pktgen_private_net_id",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vnf-id",
+ "property": {
+ "description": "vnf-id",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "vnf-id": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vnf-id",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "vnf-id",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "vnf-id",
+ "entry_schema": "string",
+ "name": "vnf-id",
+ "tags": "vnf-id",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vnf_name",
+ "property": {
+ "description": "vnf_name",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "vnf_name": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vnf_name",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "vnf_name",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "vnf_name",
+ "entry_schema": "string",
+ "name": "vnf_name",
+ "tags": "vnf_name",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vnf_name",
+ "property": {
+ "description": "vnf_name",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "vnf_name": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vnf_name",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "vnf_name",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "vnf_name",
+ "entry_schema": "string",
+ "name": "vnf_name",
+ "tags": "vnf_name",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "nfc-naming-code",
+ "property": {
+ "description": "nfc-naming-code",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "processor-db": {
+ "properties": {
+ "input-key-mapping": {
+ "vfccustomizationuuid": "vfccustomizationuuid"
+ },
+ "key-dependencies": [
+ "vfccustomizationuuid"
+ ],
+ "output-key-mapping": {
+ "nfc-naming-code": "nfc_naming_code"
+ },
+ "query": "select nfc_naming_code as nfc_naming_code from sdnctl.VFC_MODEL where customization_uuid=:vfccustomizationuuid",
+ "type": "SQL"
+ },
+ "type": "source-db"
+ }
+ },
+ "tags": "nfc-naming-code",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "nfc-naming-code",
+ "entry_schema": "string",
+ "name": "nfc-naming-code",
+ "tags": "nfc-naming-code",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vf-module-label",
+ "property": {
+ "description": "vf-module-label",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "processor-db": {
+ "properties": {
+ "input-key-mapping": {
+ "customizationid": "vf-module-model-customization-uuid"
+ },
+ "key-dependencies": [
+ "vf-module-model-customization-uuid"
+ ],
+ "output-key-mapping": {
+ "vf-module-label": "vf_module_label"
+ },
+ "query": "select sdnctl.VF_MODULE_MODEL.vf_module_label as vf_module_label from sdnctl.VF_MODULE_MODEL where sdnctl.VF_MODULE_MODEL.customization_uuid=:customizationid",
+ "type": "SQL"
+ },
+ "type": "source-db"
+ }
+ },
+ "tags": "vf-module-label",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "vf-module-label",
+ "entry_schema": "string",
+ "name": "vf-module-label",
+ "tags": "vf-module-label",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vlb_name_0",
+ "property": {
+ "description": "vlb_name_0",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "vlb_name_0": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vlb_name_0",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "vlb_name_0",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "vlb_name_0",
+ "entry_schema": "string",
+ "name": "vlb_name_0",
+ "tags": "vlb_name_0",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "key_name",
+ "property": {
+ "description": "key_name",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "key_name": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/key_name",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "key_name",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "key_name",
+ "entry_schema": "string",
+ "name": "key_name",
+ "tags": "key_name",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vsn_name_0",
+ "property": {
+ "description": "vsn_name_0",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "vsn_name_0": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vsn_name_0",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "vsn_name_0",
+ "updated-by": "Singal, Kapil <ks220y@att.com>"
+ },
+ "description": "vsn_name_0",
+ "entry_schema": "string",
+ "name": "vsn_name_0",
+ "tags": "vsn_name_0",
+ "updatedBy": "Singal, Kapil <ks220y@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vpg_name_0",
+ "property": {
+ "description": "vlb_name_0",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "vpg_name_0": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vpg_name_0",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "vpg_name_0",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "vpg_name_0",
+ "entry_schema": "string",
+ "name": "vpg_name_0",
+ "tags": "vpg_name_0",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vf-module-model-customization-uuid",
+ "property": {
+ "description": "vf-module-model-customization-uuid",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ }
+ },
+ "tags": "vf-module-model-customization-uuid",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "vf-module-model-customization-uuid",
+ "entry_schema": "string",
+ "name": "vf-module-model-customization-uuid",
+ "tags": "vf-module-model-customization-uuid",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vfccustomizationuuid",
+ "property": {
+ "description": "vfccustomizationuuid",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "processor-db": {
+ "properties": {
+ "input-key-mapping": {
+ "vfmodulecustomizationuuid": "vf-module-model-customization-uuid"
+ },
+ "key-dependencies": [
+ "vf-module-model-customization-uuid"
+ ],
+ "output-key-mapping": {
+ "vfccustomizationuuid": "vnf_customid"
+ },
+ "query": "select sdnctl.VF_MODULE_TO_VFC_MAPPING.vfc_customization_uuid as vnf_customid from sdnctl.VF_MODULE_TO_VFC_MAPPING where vm_count = 1 and sdnctl.VF_MODULE_TO_VFC_MAPPING.vf_module_customization_uuid=:vfmodulecustomizationuuid",
+ "type": "SQL"
+ },
+ "type": "source-db"
+ }
+ },
+ "tags": "vfccustomizationuuid",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "vfccustomizationuuid",
+ "entry_schema": "string",
+ "name": "vfccustomizationuuid",
+ "tags": "vfccustomizationuuid",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vnfc-model-version",
+ "property": {
+ "description": "vnfc-model-version",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "processor-db": {
+ "properties": {
+ "input-key-mapping": {
+ "vfccustomizationuuid": "vfccustomizationuuid"
+ },
+ "key-dependencies": [
+ "vfccustomizationuuid"
+ ],
+ "output-key-mapping": {
+ "vnfc-model-version": "vnfc_model_version"
+ },
+ "query": "select VFC_MODEL.version as vnfc_model_version from VFC_MODEL where customization_uuid=:vfccustomizationuuid",
+ "type": "SQL"
+ },
+ "type": "source-db"
+ }
+ },
+ "tags": "vnfc-model-version",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "vnfc-model-version",
+ "entry_schema": "string",
+ "name": "vnfc-model-version",
+ "tags": "vnfc-model-version",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vnfc-model-invariant-uuid",
+ "property": {
+ "description": "vnfc-model-invariant-uuid",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "processor-db": {
+ "properties": {
+ "input-key-mapping": {
+ "vfccustomizationuuid": "vfccustomizationuuid"
+ },
+ "key-dependencies": [
+ "vfccustomizationuuid"
+ ],
+ "output-key-mapping": {
+ "vnfc-model-invariant-uuid": "vfc_invariant_uuid"
+ },
+ "query": "select VFC_MODEL.invariant_uuid as vfc_invariant_uuid from VFC_MODEL where customization_uuid=:vfccustomizationuuid",
+ "type": "SQL"
+ },
+ "type": "source-db"
+ }
+ },
+ "tags": "vnfc-model-invariant-uuid",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "vnfc-model-invariant-uuid",
+ "entry_schema": "string",
+ "name": "vnfc-model-invariant-uuid",
+ "tags": "vnfc-model-invariant-uuid",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vm-type",
+ "property": {
+ "description": "vm-type",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "processor-db": {
+ "properties": {
+ "input-key-mapping": {
+ "vfccustomizationuuid": "vfccustomizationuuid"
+ },
+ "key-dependencies": [
+ "vfccustomizationuuid"
+ ],
+ "output-key-mapping": {
+ "vm-type": "vm_type"
+ },
+ "query": "select VFC_MODEL.vm_type as vm_type from VFC_MODEL where customization_uuid=:vfccustomizationuuid",
+ "type": "SQL"
+ },
+ "type": "source-db"
+ }
+ },
+ "tags": "vm-type",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "vm-type",
+ "entry_schema": "string",
+ "name": "vm-type",
+ "tags": "vm-type",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vf-module-type",
+ "property": {
+ "description": "vf-module-type",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "processor-db": {
+ "properties": {
+ "input-key-mapping": {
+ "customizationid": "vf-module-model-customization-uuid"
+ },
+ "key-dependencies": [
+ "vf-module-model-customization-uuid"
+ ],
+ "output-key-mapping": {
+ "vf-module-type": "vf_module_type"
+ },
+ "query": "select vf_module_type as vf_module_type from sdnctl.VF_MODULE_MODEL where customization_uuid=:customizationid",
+ "type": "SQL"
+ },
+ "type": "source-db"
+ }
+ },
+ "tags": "vf-module-type",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "vf-module-type",
+ "entry_schema": "string",
+ "name": "vf-module-type",
+ "tags": "vf-module-type",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "private-prefix-id",
+ "property": {
+ "description": "private-prefix-id",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "processor-db": {
+ "properties": {
+ "input-key-mapping": {},
+ "output-key-mapping": {
+ "private-prefix-id": "prefix_id"
+ },
+ "query": "select sdnctl.IPAM_IP_POOL.prefix_id as prefix_id from sdnctl.IPAM_IP_POOL where description = \"private\"",
+ "type": "SQL"
+ },
+ "type": "source-db"
+ }
+ },
+ "tags": "private-prefix-id",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "private-prefix-id",
+ "entry_schema": "string",
+ "name": "private-prefix-id",
+ "tags": "private-prefix-id",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "cloud_env",
+ "property": {
+ "description": "cloud_env",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "cloud_env": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/cloud_env",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "cloud_env",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "cloud_env",
+ "entry_schema": "string",
+ "name": "cloud_env",
+ "tags": "cloud_env",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "pktgen_private_net_cidr",
+ "property": {
+ "description": "pktgen_private_net_cidr",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "processor-db": {
+ "properties": {
+ "input-key-mapping": {},
+ "output-key-mapping": {
+ "pktgen_private_net_cidr": "prefix"
+ },
+ "query": "select sdnctl.IPAM_IP_POOL.prefix as prefix from sdnctl.IPAM_IP_POOL where description = \"private2\"",
+ "type": "SQL"
+ },
+ "type": "source-db"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "pktgen_private_net_cidr": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/pktgen_private_net_cidr",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "pktgen_private_net_cidr",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "pktgen_private_net_cidr",
+ "entry_schema": "string",
+ "name": "pktgen_private_net_cidr",
+ "tags": "pktgen_private_net_cidr",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "int_private2_net_cidr",
+ "property": {
+ "description": "int_private2_net_cidr",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "processor-db": {
+ "properties": {
+ "input-key-mapping": {},
+ "output-key-mapping": {
+ "int_private2_net_cidr": "prefix"
+ },
+ "query": "select sdnctl.IPAM_IP_POOL.prefix as prefix from sdnctl.IPAM_IP_POOL where description = \"private2\"",
+ "type": "SQL"
+ },
+ "type": "source-db"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "int_private2_net_cidr": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/int_private2_net_cidr",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "int_private2_net_cidr",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "int_private2_net_cidr",
+ "entry_schema": "string",
+ "name": "int_private2_net_cidr",
+ "tags": "int_private2_net_cidr",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "int_private1_net_cidr",
+ "property": {
+ "description": "int_private1_net_cidr",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "processor-db": {
+ "properties": {
+ "input-key-mapping": {},
+ "output-key-mapping": {
+ "int_private1_net_cidr": "prefix"
+ },
+ "query": "select sdnctl.IPAM_IP_POOL.prefix as prefix from sdnctl.IPAM_IP_POOL where description = \"private1\"",
+ "type": "SQL"
+ },
+ "type": "source-db"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "int_private1_net_cidr": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/int_private1_net_cidr",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "int_private1_net_cidr",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "int_private1_net_cidr",
+ "entry_schema": "string",
+ "name": "int_private1_net_cidr",
+ "tags": "int_private1_net_cidr",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "onap_private_net_cidr",
+ "property": {
+ "description": "onap_private_net_cidr",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "processor-db": {
+ "properties": {
+ "input-key-mapping": {},
+ "output-key-mapping": {
+ "onap_private_net_cidr": "prefix"
+ },
+ "query": "select sdnctl.IPAM_IP_POOL.prefix as prefix from sdnctl.IPAM_IP_POOL where description = \"management\"",
+ "type": "SQL"
+ },
+ "type": "source-db"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "onap_private_net_cidr": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/onap_private_net_cidr",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "onap_private_net_cidr",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "onap_private_net_cidr",
+ "entry_schema": "string",
+ "name": "onap_private_net_cidr",
+ "tags": "onap_private_net_cidr",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vlb_private_net_cidr",
+ "property": {
+ "description": "vlb_private_net_cidr",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "processor-db": {
+ "properties": {
+ "input-key-mapping": {},
+ "output-key-mapping": {
+ "vlb_private_net_cidr": "prefix"
+ },
+ "query": "select sdnctl.IPAM_IP_POOL.prefix as prefix from sdnctl.IPAM_IP_POOL where description = \"private1\"",
+ "type": "SQL"
+ },
+ "type": "source-db"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "vlb_private_net_cidr": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vlb_private_net_cidr",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "vlb_private_net_cidr",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "vlb_private_net_cidr",
+ "entry_schema": "string",
+ "name": "vlb_private_net_cidr",
+ "tags": "vlb_private_net_cidr",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "management-prefix-id",
+ "property": {
+ "description": "management-prefix-id",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "processor-db": {
+ "properties": {
+ "input-key-mapping": {},
+ "output-key-mapping": {
+ "management-prefix-id": "prefix_id"
+ },
+ "query": "select sdnctl.IPAM_IP_POOL.prefix_id as prefix_id from sdnctl.IPAM_IP_POOL where description = \"management\"",
+ "type": "SQL"
+ },
+ "type": "source-db"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "management-prefix-id": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/management-prefix-id",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "management-prefix-id",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "management-prefix-id",
+ "entry_schema": "string",
+ "name": "management-prefix-id",
+ "tags": "management-prefix-id",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "private1-prefix-id",
+ "property": {
+ "description": "private1-prefix-id",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "processor-db": {
+ "properties": {
+ "input-key-mapping": {},
+ "output-key-mapping": {
+ "private1-prefix-id": "prefix_id"
+ },
+ "query": "select sdnctl.IPAM_IP_POOL.prefix_id as prefix_id from sdnctl.IPAM_IP_POOL where description = \"private1\"",
+ "type": "SQL"
+ },
+ "type": "source-db"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "private1-prefix-id": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/private1-prefix-id",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "private1-prefix-id",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "private1-prefix-id",
+ "entry_schema": "string",
+ "name": "private1-prefix-id",
+ "tags": "private1-prefix-id",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "private2-prefix-id",
+ "property": {
+ "description": "private2-prefix-id",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "processor-db": {
+ "properties": {
+ "input-key-mapping": {},
+ "output-key-mapping": {
+ "private2-prefix-id": "prefix_id"
+ },
+ "query": "select sdnctl.IPAM_IP_POOL.prefix_id as prefix_id from sdnctl.IPAM_IP_POOL where description = \"private2\"",
+ "type": "SQL"
+ },
+ "type": "source-db"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "private2-prefix-id": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/private2-prefix-id",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "private2-prefix-id",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "private2-prefix-id",
+ "entry_schema": "string",
+ "name": "private2-prefix-id",
+ "tags": "private2-prefix-id",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ {
+ "data_type": "string",
+ "definition": {
+ "name": "vlb_onap_private_ip_0",
+ "property": {
+ "description": "vlb_onap_private_ip_0",
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "properties": {},
+ "type": "source-default"
+ },
+ "input": {
+ "type": "source-input"
+ },
+ "sdnc": {
+ "properties": {
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "output-key-mapping": {
+ "private2-prefix-id": "value"
+ },
+ "path": "/param/0/value",
+ "type": "JSON",
+ "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vlb_onap_private_ip_0",
+ "verb": "GET"
+ },
+ "type": "source-rest"
+ }
+ },
+ "tags": "vlb_onap_private_ip_0",
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ },
+ "description": "vlb_onap_private_ip_0",
+ "entry_schema": "string",
+ "name": "vlb_onap_private_ip_0",
+ "tags": "vlb_onap_private_ip_0",
+ "updatedBy": "MALAKOV, YURIY <yuriy.malakov@att.com>"
+ }
+]
diff --git a/src/onaptests/templates/artifacts/pnf-simulator.tar.gz b/src/onaptests/templates/artifacts/pnf-simulator.tar.gz
new file mode 100755
index 0000000..58cde89
--- /dev/null
+++ b/src/onaptests/templates/artifacts/pnf-simulator.tar.gz
Binary files differ
diff --git a/src/onaptests/templates/artifacts/profile.tar.gz b/src/onaptests/templates/artifacts/profile.tar.gz
new file mode 100755
index 0000000..cbfa3d6
--- /dev/null
+++ b/src/onaptests/templates/artifacts/profile.tar.gz
Binary files differ
diff --git a/src/onaptests/templates/heat-files/ubuntu16/ubuntu16.zip b/src/onaptests/templates/heat-files/ubuntu16/ubuntu16.zip
deleted file mode 100644
index 9a98baa..0000000
--- a/src/onaptests/templates/heat-files/ubuntu16/ubuntu16.zip
+++ /dev/null
Binary files differ
diff --git a/src/onaptests/templates/heat-files/ubuntu18/base_ubuntu18.env b/src/onaptests/templates/heat-files/ubuntu18/base_ubuntu18.env
deleted file mode 100644
index 062468a..0000000
--- a/src/onaptests/templates/heat-files/ubuntu18/base_ubuntu18.env
+++ /dev/null
@@ -1,19 +0,0 @@
-parameters:
-# Metadata required by ONAP
- vnf_id: Ubuntu18-VNF
- vf_module_id: Ubuntu18-VF-module
- vnf_name: Ubuntu18-VNF-name
-
-# Server parameters, naming required by ONAP
- ubuntu18_image_name: ubuntu-18.04-daily
- ubuntu18_flavor_name: onap.small
- ubuntu18_pub_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC3dbqgymZVpu2cIWqzlKNxnOy2Qjt07NZxaXtQyu9dr0kbmursTE5N0IW0qg/rsCXgw2vjjdPOxU6jtrTbyzbAmo9F6LtS9oqvct9LmLjDNyiQFuCPETIBGy43daDVgw3hrg3f9ihN88V/JwnI9n3ZFn8Wy15KV6XCHn3MASV31YnbkjruUtj7rZm5V8NUwAteZ91k5T7WBpywt483rrkeQjEzyKiVSmmOhHWNSmbnko9XzO7QDUHfVIk5qCf/aBES7hcE0YiqX5lfLamSyCqOGANnv+AN2opDEakUeCyJHZrsk3Nkk7A9p+CNlq42sUEKtrO0xiH63viMA6eBYSiaQPzckdq/T52naozx/Oj9ITCgX/6XjldMUF99afIydpC6+kymflTYA8P/9u1Ih93+Vjg1Bf2e4lJaf9z9frXcB9F+ZRDq6feN+XQ93Q8xQ9blu9Gq8BZUbPvAQxW0UaryeuzhCKx4QA33qqYA+tmWVXTsaG0uow6f0hm7z+pkYCM= master@Utilisateur-PC
- ubuntu18_name_0: ubuntu18
-
-# Network parameters, naming required by ONAP
- admin_plane_net_name: admin
-
-# APP/USER_DATA
- dcae_collector_ip: 10.4.2.166
- # 30417 is https node port to VES
- dcae_collector_port: 30417
diff --git a/src/onaptests/templates/heat-files/ubuntu18/base_ubuntu18.yaml b/src/onaptests/templates/heat-files/ubuntu18/base_ubuntu18.yaml
deleted file mode 100644
index 73612a0..0000000
--- a/src/onaptests/templates/heat-files/ubuntu18/base_ubuntu18.yaml
+++ /dev/null
@@ -1,153 +0,0 @@
-heat_template_version: 2013-05-23
-
-description: Heat template to deploy ubuntu VM Closed Loop for ONAP
-
-parameters:
- # Metadata required by ONAP
- vnf_name:
- type: string
- label: VM name
- description: The VM name
- vnf_id:
- type: string
- label: VNF ID
- description: The VNF ID is provided by ONAP
- vf_module_id:
- type: string
- label: VF module ID
- description: The VF Module ID is provided by ONAP
-
-# Server parameters, naming required by ONAP
- ubuntu18_image_name:
- type: string
- label: Image name or ID
- description: Image to be used for compute instance
- ubuntu18_flavor_name:
- type: string
- label: Flavor
- description: Type of instance (flavor) to be used
- ubuntu18_pub_key:
- type: string
- label: Public key
- description: Public key to be installed on the compute instance
- ubuntu18_name_0:
- type: string
- label: VM name
- description: The VM name
-
-# Network parameters, naming required by ONAP
- admin_plane_net_name:
- type: string
- label: management network
- description: The external management network
-
-# DCAE parameters
- dcae_collector_ip:
- type: string
- label: DCAE collector IP address
- description: IP address of the DCAE collector
- dcae_collector_port:
- type: string
- label: DCAE collector port
- description: Port of the DCAE collector
-
-resources:
- random-str:
- type: OS::Heat::RandomString
- properties:
- length: 4
-
- ubuntu18_instantiated_key_name:
- type: OS::Nova::KeyPair
- properties:
- name:
- str_replace:
- template: pre_base_rand
- params:
- pre: key_
- base: { get_param: vnf_name }
- rand: { get_resource: random-str }
- public_key: { get_param: ubuntu18_pub_key }
- save_private_key: false
-
- ubuntu18_admin_security_group:
- type: OS::Neutron::SecurityGroup
- properties:
- description: security group
- name:
- str_replace:
- template: pre_base_rand
- params:
- pre: sg_
- base: { get_param: vnf_name }
- rand: { get_resource: random-str }
- rules: [
- {remote_ip_prefix: 0.0.0.0/0, protocol: tcp, port_range_min: 22, port_range_max: 22},
- {remote_ip_prefix: 0.0.0.0/0, protocol: icmp}]
-
- ubuntu18_0_admin_plane_port_0:
- type: OS::Neutron::Port
- properties:
- name:
- str_replace:
- template: pre_base_rand
- params:
- pre: port_
- base: { get_param: vnf_name }
- rand: { get_resource: random-str }
- network: { get_param: admin_plane_net_name }
- security_groups: [{ get_resource: ubuntu18_admin_security_group }]
-
- ubuntu18_VM_settings:
- type: OS::Heat::SoftwareConfig
- properties:
- config: |
- #!/bin/bash
- sudo apt-get update
-
- ubuntu18_server_0:
- type: OS::Nova::Server
- properties:
- image: { get_param: ubuntu18_image_name }
- flavor: { get_param: ubuntu18_flavor_name }
- name: { get_param: ubuntu18_name_0 }
- metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }, vnf_name: { get_param: vnf_name }}
- key_name: { get_resource: ubuntu18_instantiated_key_name }
- networks:
- - port: { get_resource: ubuntu18_0_admin_plane_port_0 }
- user_data_format: RAW
- user_data:
- str_replace:
- params:
- __dcae_collector_ip__: { get_param: dcae_collector_ip }
- __dcae_collector_port__: { get_param: dcae_collector_port }
- template: |
- #!/bin/bash
-
- # Create configuration files
- sudo mkdir /opt/config
- echo __dcae_collector_ip__ > /opt/config/dcae_collector_ip.txt
- echo __dcae_collector_port__ > /opt/config/dcae_collector_port.txt
- cd /opt
- sudo apt-get update
- sudo apt-get install --allow-unauthenticated -y make gcc rpl
- sudo apt-get update && sudo apt-get -y upgrade
- sudo apt-get install -y libcurl4-openssl-dev
- sudo git clone https://github.com/onap/vnfsdk-ves-agent.git
- sudo cp -r vnfsdk-ves-agent/veslibrary/ves_clibrary/ /opt
- sudo rm -rf /opt/vnfsdk-ves-agent/
- sudo chmod +x /opt/ves_clibrary/evel/evel-library/code/VESreporting_vFW/go-client.sh
- cd /opt/ves_clibrary/evel/evel-library/bldjobs/
- sudo mv ../code/VESreporting_vFW ../code/VESreporting
- # choose HTTPS
- sudo rpl "0, /* HTTPS?" "1, /* HTTPS?" ../code/VESreporting/vpp_measurement_reporter.c
- sudo make clean
- sudo make all
- sudo sleep 1
- cd /opt/ves_clibrary/evel/evel-library/libs/x86_64
- sudo cp libevel.so /usr/lib
- sudo ldconfig
- # Start VES client
- cd /opt/ves_clibrary/evel/evel-library/code/VESreporting/
- ./go-client.sh &>/dev/null &disown
- #get_resource: ubuntu18_VM_settings
diff --git a/src/onaptests/templates/heat-files/ubuntu18/ubuntu18agent.zip b/src/onaptests/templates/heat-files/ubuntu18/ubuntu18agent.zip
index 90b07e7..3d15084 100644
--- a/src/onaptests/templates/heat-files/ubuntu18/ubuntu18agent.zip
+++ b/src/onaptests/templates/heat-files/ubuntu18/ubuntu18agent.zip
Binary files differ
diff --git a/src/onaptests/templates/heat-files/ubuntu20/ubuntu20agent.zip b/src/onaptests/templates/heat-files/ubuntu20/ubuntu20agent.zip
new file mode 100644
index 0000000..bd15d47
--- /dev/null
+++ b/src/onaptests/templates/heat-files/ubuntu20/ubuntu20agent.zip
Binary files differ
diff --git a/src/onaptests/templates/helm_charts/README.md b/src/onaptests/templates/helm_charts/README.md
new file mode 100755
index 0000000..bf76ee2
--- /dev/null
+++ b/src/onaptests/templates/helm_charts/README.md
@@ -0,0 +1,31 @@
+# Local helm chart directory
+
+It is adviced that a remote repository is used for simulators, to reduce local
+complexity and avoid mistakes related to the duplicate code, submodules etc.
+
+Place a .yaml file in this folder and mention it during HelmChartStep
+initialization.
+
+How a chart info .yaml file would look like:
+
+```yaml
+api_version: "v1"
+app_version: "3.11.9"
+chart_name: "mychart"
+version: "0.1.0"
+dependencies:
+- name: "cassandra"
+ version: "0.1.4"
+ repository: "https://charts.kube-ops.io"
+ local_repo_name: "kube-ops"
+ values: {}
+- name: "generate"
+ repository: https://charts.kube-ops.io
+ version: "~0.2.3"
+ local_repo_name: "kube-ops"
+ values: {}
+```
+
+All fields in the sample .yaml file above are required by the avionix library.
+For more details, refer to the
+[documentation](https://avionix.readthedocs.io/en/latest/reference/index.html).
diff --git a/src/onaptests/templates/reporting/reporting.html.j2 b/src/onaptests/templates/reporting/reporting.html.j2
index 05c00b7..246f362 100644
--- a/src/onaptests/templates/reporting/reporting.html.j2
+++ b/src/onaptests/templates/reporting/reporting.html.j2
@@ -28,7 +28,7 @@
</thead>
<tbody>
{% for step_report in report.report %}
- <tr {% if step_report.step_execution_status.value == 'FAIL' %} class="has-background-danger" {% else %} class="has-background-success-light" {% endif %}>
+ <tr {% if step_report.step_execution_status.value == 'FAIL' %} class="has-background-danger" {% elif step_report.step_execution_status.value == 'PASS' %} class="has-background-success-light" {% else %} class="has-background-warning-light" {% endif %}>
<td>
{{ step_report.step_description }}
</td>
diff --git a/src/onaptests/templates/vnf-services/ubuntu18agent-service.yaml b/src/onaptests/templates/vnf-services/basic_clamp-service.yaml
index baf804e..f5fe653 100644
--- a/src/onaptests/templates/vnf-services/ubuntu18agent-service.yaml
+++ b/src/onaptests/templates/vnf-services/basic_clamp-service.yaml
@@ -1,7 +1,7 @@
---
-basicclamp-1:
+basicclamp:
vnfs:
- - vnf_name: basicclamp-1
+ - vnf_name: basicclamp
heat_files_to_upload: onaptests/templates/heat-files/ubuntu18/ubuntu18agent.zip
vnf_parameters: [
{"name": "ubuntu18_image_name",
@@ -19,7 +19,7 @@ h+t2lrzvKUSWGZbX+dLiFiEpjsUL3tDqzkEMNUn4pdv69OJuzWHCxRWPfdrY9Wg0j3mJesP29EBh\
t+w+EC9/kBKq+1VKdmsXUXAcjEvjovVL8l1BrX3BY0R8D imported-openssh-key"
},
{"name": "ubuntu18_flavor_name",
- "value": "onap.small"
+ "value": "m1.smaller"
},
{"name": "VM_name",
"value": "ubuntu18agent-VM-01"
diff --git a/src/onaptests/templates/vnf-services/basic_onboard-service.yaml.j2 b/src/onaptests/templates/vnf-services/basic_onboard-service.yaml.j2
new file mode 100644
index 0000000..db84783
--- /dev/null
+++ b/src/onaptests/templates/vnf-services/basic_onboard-service.yaml.j2
@@ -0,0 +1,39 @@
+---
+{{ service_name }}:
+ vnfs:
+ - vnf_name: {{ service_name }}
+ heat_files_to_upload: onaptests/templates/heat-files/ubuntu18/ubuntu18agent.zip
+ vnf_parameters: [
+ {"name": "ubuntu18_image_name",
+ "value": "ubuntu-agent"
+ },
+ {"name": "ubuntu18_key_name",
+ "value": "cleouverte"
+ },
+ {"name": "ubuntu18_pub_key",
+ "value": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAA\
+BAQDY15cdBmIs2XOpe4EiFCsaY6bmUmK/GysMoLl4UG51JCfJwvwoWCoA+6mDIbymZxhxq9IGx\
+ilp/yTA6WQ9s/5pBag1cUMJmFuda9PjOkXl04jgqh5tR6I+GZ97AvCg93KAECis5ubSqw1xOCj4\
+utfEUtPoF1OuzqM/lE5mY4N6VKXn+fT7pCD6cifBEs6JHhVNvs5OLLp/tO8Pa3kKYQOdyS0xc3r\
+h+t2lrzvKUSWGZbX+dLiFiEpjsUL3tDqzkEMNUn4pdv69OJuzWHCxRWPfdrY9Wg0j3mJesP29EBh\
+t+w+EC9/kBKq+1VKdmsXUXAcjEvjovVL8l1BrX3BY0R8D imported-openssh-key"
+ },
+ {"name": "ubuntu18_flavor_name",
+ "value": "m1.smaller"
+ },
+ {"name": "VM_name",
+ "value": "ubuntu18agent-VM-01"
+ },
+ {"name": "vnf_id",
+ "value": "ubuntu18agent-VNF-instance"
+ },
+ {"name": "vf_module_id",
+ "value": "ubuntu18agent-vfmodule-instance"
+ },
+ {"name": "vnf_name",
+ "value": "ubuntu18agent-VNF"
+ },
+ {"name": "admin_plane_net_name",
+ "value": "admin"
+ }
+ ]
diff --git a/src/onaptests/templates/vnf-services/ubuntu16test-service.yaml b/src/onaptests/templates/vnf-services/basic_vm-service.yaml
index 708991a..4609bae 100644
--- a/src/onaptests/templates/vnf-services/ubuntu16test-service.yaml
+++ b/src/onaptests/templates/vnf-services/basic_vm-service.yaml
@@ -1,18 +1,16 @@
---
-ubuntu16test:
- tosca_file_from_SDC: service-Ubuntu16tha-template
- version: "1.0"
+basic_vm:
vnfs:
- - vnf_name: ubuntu16test
- heat_files_to_upload: onaptests/templates/heat-files/ubuntu16/ubuntu16.zip
+ - vnf_name: basic_vm
+ heat_files_to_upload: onaptests/templates/heat-files/ubuntu20/ubuntu20agent.zip
vnf_parameters: [
- {"name": "ubuntu16_image_name",
- "value": "ubuntu-16.04-daily"
+ {"name": "ubuntu20_image_name",
+ "value": "ubuntu-agent"
},
- {"name": "ubuntu16_key_name",
+ {"name": "ubuntu20_key_name",
"value": "cleouverte"
},
- {"name": "ubuntu16_pub_key",
+ {"name": "ubuntu20_pub_key",
"value": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAA\
BAQDY15cdBmIs2XOpe4EiFCsaY6bmUmK/GysMoLl4UG51JCfJwvwoWCoA+6mDIbymZxhxq9IGx\
ilp/yTA6WQ9s/5pBag1cUMJmFuda9PjOkXl04jgqh5tR6I+GZ97AvCg93KAECis5ubSqw1xOCj4\
@@ -20,20 +18,20 @@ utfEUtPoF1OuzqM/lE5mY4N6VKXn+fT7pCD6cifBEs6JHhVNvs5OLLp/tO8Pa3kKYQOdyS0xc3r\
h+t2lrzvKUSWGZbX+dLiFiEpjsUL3tDqzkEMNUn4pdv69OJuzWHCxRWPfdrY9Wg0j3mJesP29EBh\
t+w+EC9/kBKq+1VKdmsXUXAcjEvjovVL8l1BrX3BY0R8D imported-openssh-key"
},
- {"name": "ubuntu16_flavor_name",
- "value": "m1.small"
+ {"name": "ubuntu20_flavor_name",
+ "value": "m1.smaller"
},
{"name": "VM_name",
- "value": "ubuntu16test-VM-01"
+ "value": "ubuntu20agent-VM-01"
},
{"name": "vnf_id",
- "value": "ubuntu16test-VNF-instance"
+ "value": "ubuntu20agent-VNF-instance"
},
{"name": "vf_module_id",
- "value": "ubuntu16test-vfmodule-instance"
+ "value": "ubuntu20agent-vfmodule-instance"
},
{"name": "vnf_name",
- "value": "ubuntu16test-VNF"
+ "value": "ubuntu20agent-VNF"
},
{"name": "admin_plane_net_name",
"value": "admin"
diff --git a/src/onaptests/templates/vnf-services/basic_vm_macro-service.yaml b/src/onaptests/templates/vnf-services/basic_vm_macro-service.yaml
new file mode 100644
index 0000000..a129d41
--- /dev/null
+++ b/src/onaptests/templates/vnf-services/basic_vm_macro-service.yaml
@@ -0,0 +1,54 @@
+---
+basic_vm_macro:
+ instantiation_type: "Macro"
+ vnfs:
+ - vnf_name: basic_vm_macro
+ properties:
+ controller_actor: "CDS"
+ skip_post_instantiation_configuration: False
+ sdnc_artifact_name: "vnf"
+ sdnc_model_version: "1.0.0"
+ sdnc_model_name: "ubuntu20"
+ vnf_artifact_type: "CONTROLLER_BLUEPRINT_ARCHIVE"
+ vnf_artifact_name: "BASIC_VM_enriched.zip"
+ vnf_artifact_label: "vnfcds"
+ vnf_artifact_file_path: "/tmp/BASIC_VM_enriched.zip"
+ heat_files_to_upload: onaptests/templates/heat-files/ubuntu20/ubuntu20agent.zip
+ vf_module_parameters:
+ - vf_module_name: base_ubuntu20
+ parameters: [
+ {"name": "ubuntu20_image_name",
+ "value": "Ubuntu_2004"
+ },
+ {"name": "ubuntu20_key_name",
+ "value": "cleouverte"
+ },
+ {"name": "ubuntu20_pub_key",
+ "value": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAA\
+ BAQDY15cdBmIs2XOpe4EiFCsaY6bmUmK/GysMoLl4UG51JCfJwvwoWCoA+6mDIbymZxhxq9IGx\
+ ilp/yTA6WQ9s/5pBag1cUMJmFuda9PjOkXl04jgqh5tR6I+GZ97AvCg93KAECis5ubSqw1xOCj4\
+ utfEUtPoF1OuzqM/lE5mY4N6VKXn+fT7pCD6cifBEs6JHhVNvs5OLLp/tO8Pa3kKYQOdyS0xc3r\
+ h+t2lrzvKUSWGZbX+dLiFiEpjsUL3tDqzkEMNUn4pdv69OJuzWHCxRWPfdrY9Wg0j3mJesP29EBh\
+ t+w+EC9/kBKq+1VKdmsXUXAcjEvjovVL8l1BrX3BY0R8D imported-openssh-key"
+ },
+ {"name": "ubuntu20_flavor_name",
+ "value": "m1.smaller"
+ },
+ {"name": "VM_name",
+ "value": "ubuntu20agent-VM-01"
+ },
+ {"name": "vnf_id",
+ "value": "ubuntu20agent-VNF-instance"
+ },
+ {"name": "vf_module_id",
+ "value": "ubuntu20agent-vfmodule-instance"
+ },
+ {"name": "vnf_name",
+ "value": "ubuntu20agent-VNF"
+ },
+ {"name": "admin_plane_net_name",
+ "value": "admin"
+ },
+ {"name": "ubuntu20_name_0",
+ "value": "ubuntu20agent-VNF"}
+ ]
diff --git a/src/onaptests/templates/vnf-services/pnf-service.yaml b/src/onaptests/templates/vnf-services/pnf-service.yaml
new file mode 100644
index 0000000..0676ce4
--- /dev/null
+++ b/src/onaptests/templates/vnf-services/pnf-service.yaml
@@ -0,0 +1,18 @@
+---
+test_pnf_macro:
+ tosca_file_from_SDC: service-basic_network-template
+ version: "1.0"
+ subscription_type: "net"
+ instantiation_type: "Macro"
+ pnfs:
+ - pnf_name: "test-pnf"
+ pnf_artifact_type: "CONTROLLER_BLUEPRINT_ARCHIVE"
+ pnf_artifact_name: "CBA_enriched.zip"
+ pnf_artifact_label: "cbapnf"
+ pnf_artifact_file_path: "/tmp/PNF_DEMO_enriched.zip"
+ properties:
+ controller_actor: "CDS"
+ skip_post_instantiation_configuration: False
+ sdnc_artifact_name: "test"
+ sdnc_model_version: "1.0.0"
+ sdnc_model_name: "CBA_PNF_SIM"
diff --git a/src/onaptests/utils/exceptions.py b/src/onaptests/utils/exceptions.py
index daadc32..c12ee2f 100644
--- a/src/onaptests/utils/exceptions.py
+++ b/src/onaptests/utils/exceptions.py
@@ -1,6 +1,4 @@
-#!/usr/bin/env python
-
-# Copyright (c) 2018 Orange and others.
+# Copyright (c) 2018-2020 Orange and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
@@ -10,48 +8,73 @@
__author__ = ("Morgan Richomme <morgan.richomme@orange.com>")
+class OnapTestException(Exception):
+ """Parent Class for all Onap Test Exceptions."""
+ error_message='Generic OnapTest exception'
-class TestConfigurationException(Exception):
- """Raise when configutation of the use cases is not complete or buggy."""
-
+class TestConfigurationException(OnapTestException):
+ """Raise when configuration of the use case is incomplete or buggy."""
+ error_message='Configuration error'
-class ServiceDistributionException(Exception):
+class ServiceDistributionException(OnapTestException):
"""Service not properly distributed."""
+ error_message='Service not well distributed'
-class ServiceInstantiateException(Exception):
- """Service cannot be instantiate."""
+class ServiceInstantiateException(OnapTestException):
+ """Service cannot be instantiated."""
+ error_message='Service instantiation error'
-class ServiceCleanupException(Exception):
+class ServiceCleanupException(OnapTestException):
"""Service cannot be cleaned."""
+ error_message='Service not well cleaned up'
-class VnfInstantiateException(Exception):
- """VNF cannot be instantiate."""
+class VnfInstantiateException(OnapTestException):
+ """VNF cannot be instantiated."""
+ error_message='VNF instantiation error'
-class VnfCleanupException(Exception):
+class VnfCleanupException(OnapTestException):
"""VNF cannot be cleaned."""
+ error_message="VNF can't be cleaned"
-class VfModuleInstantiateException(Exception):
- """VF Module cannot be instantiate."""
+class VfModuleInstantiateException(OnapTestException):
+ """VF Module cannot be instantiated."""
+ error_message='VF Module instantiation error'
-class VfModuleCleanupException(Exception):
- """VF Module cannot be instantiate."""
+class VfModuleCleanupException(OnapTestException):
+ """VF Module cannot be cleaned."""
+ error_message="VF Module can't be cleaned"
-class NetworkInstantiateException(Exception):
- """Network cannot be instantiate."""
+class NetworkInstantiateException(OnapTestException):
+ """Network cannot be instantiated."""
+ error_message='Network instantiation error'
-class NetworkCleanupException(Exception):
+class NetworkCleanupException(OnapTestException):
"""Network cannot be cleaned."""
+ error_message="Network can't be cleaned"
-class ProfileInformationException(Exception):
+class ProfileInformationException(OnapTestException):
"""Missing k8s profile information."""
+ error_message='Missing k8s profile information'
-class ProfileCleanupException(Exception):
+class ProfileCleanupException(OnapTestException):
"""K8s profile cannot be cleaned."""
+ error_message="Profile can't be cleaned"
+
+class EnvironmentPreparationException(OnapTestException):
+ """Test environment preparation exception."""
+ error_message="Test can't be run properly due to preparation error"
+
+class SubstepExecutionException(OnapTestException):
+ """Exception raised if substep execution fails."""
+
+class EnvironmentCleanupException(OnapTestException):
+ """Test environment cleanup exception."""
+ error_message="Test couldn't finish a cleanup"
diff --git a/src/onaptests/utils/simulators.py b/src/onaptests/utils/simulators.py
new file mode 100644
index 0000000..08acdbd
--- /dev/null
+++ b/src/onaptests/utils/simulators.py
@@ -0,0 +1,13 @@
+"""Standard functions for the simulator wrapper."""
+from importlib.resources import path
+
+def get_local_dir():
+ """Get the default path for helm charts.
+
+ Returns:
+ chart_directory (Path):
+ local helm chart folder relative to the package.
+ """
+ with path('onaptests', 'templates') as templates:
+ chart_directory = templates / 'helm_charts'
+ return chart_directory
diff --git a/tests/data/service_macro_template_pnfs.yaml b/tests/data/service_macro_template_pnfs.yaml
new file mode 100644
index 0000000..b0559b6
--- /dev/null
+++ b/tests/data/service_macro_template_pnfs.yaml
@@ -0,0 +1,4 @@
+---
+test_pnfs:
+ pnfs:
+ - pnf_name: pnf
diff --git a/tests/data/service_macro_template_vnfs.yaml b/tests/data/service_macro_template_vnfs.yaml
new file mode 100644
index 0000000..28fcc49
--- /dev/null
+++ b/tests/data/service_macro_template_vnfs.yaml
@@ -0,0 +1,6 @@
+---
+test_vnfs:
+ vnfs:
+ - vnf_name: vnf
+ pnfs:
+ - pnf_name: pnf
diff --git a/tests/test_service_macro_instantiation.py b/tests/test_service_macro_instantiation.py
new file mode 100644
index 0000000..382a86e
--- /dev/null
+++ b/tests/test_service_macro_instantiation.py
@@ -0,0 +1,42 @@
+from unittest import mock
+
+from onaptests.steps.instantiate.service_macro import (
+ YamlTemplateServiceMacroInstantiateStep
+)
+
+VNFS_PNFS_YAML = './tests/data/service_macro_template_vnfs.yaml'
+PNFS_YAML = './tests/data/service_macro_template_pnfs.yaml'
+
+
+@mock.patch("onaptests.steps.base.BaseStep.add_step")
+@mock.patch("onaptests.steps.instantiate.service_macro.settings")
+@mock.patch("onaptests.steps.instantiate.service_macro.YamlTemplateServiceOnboardStep")
+@mock.patch("onaptests.steps.instantiate.service_macro.ConnectServiceSubToCloudRegionStep")
+@mock.patch("onaptests.steps.instantiate.service_macro.CustomerServiceSubscriptionCreateStep")
+def test_are_vnfs(CustomerStep, CloudStep, OnboardStep, settings, add_step):
+
+ settings.SERVICE_YAML_TEMPLATE = VNFS_PNFS_YAML
+ settings.ONLY_INSTANTIATE = False
+
+ YamlTemplateServiceMacroInstantiateStep()
+
+ CustomerStep.assert_not_called()
+ assert add_step.mock_calls == [
+ mock.call(OnboardStep()), mock.call(CloudStep())]
+
+
+@mock.patch("onaptests.steps.base.BaseStep.add_step")
+@mock.patch("onaptests.steps.instantiate.service_macro.settings")
+@mock.patch("onaptests.steps.instantiate.service_macro.YamlTemplateServiceOnboardStep")
+@mock.patch("onaptests.steps.instantiate.service_macro.ConnectServiceSubToCloudRegionStep")
+@mock.patch("onaptests.steps.instantiate.service_macro.CustomerServiceSubscriptionCreateStep")
+def test_are_pnfs(CustomerStep, CloudStep, OnboardStep, settings, add_step):
+
+ settings.SERVICE_YAML_TEMPLATE = PNFS_YAML
+ settings.ONLY_INSTANTIATE = False
+
+ YamlTemplateServiceMacroInstantiateStep()
+
+ CloudStep.assert_not_called()
+ assert add_step.mock_calls == [
+ mock.call(OnboardStep()), mock.call(CustomerStep())]
diff --git a/tests/test_store_state.py b/tests/test_store_state.py
index f5fcc62..d4fb733 100644
--- a/tests/test_store_state.py
+++ b/tests/test_store_state.py
@@ -1,6 +1,9 @@
+from time import sleep
+
import pytest
from onaptests.steps.base import BaseStep
+from onaptests.utils.exceptions import OnapTestException
@@ -10,6 +13,10 @@ class TestStep(BaseStep):
def execute(self):
return super().execute()
+ @BaseStep.store_state(cleanup=True)
+ def cleanup(self) -> None:
+ return super().cleanup()
+
@property
def description(self):
return "Test pass step"
@@ -24,7 +31,11 @@ class TestFailStep(BaseStep):
@BaseStep.store_state
def execute(self):
super().execute()
- raise Exception
+ raise OnapTestException
+
+ @BaseStep.store_state(cleanup=True)
+ def cleanup(self) -> None:
+ raise OnapTestException
@property
def description(self):
@@ -35,6 +46,77 @@ class TestFailStep(BaseStep):
return "Test"
+class TestOneSecStep(BaseStep):
+
+ @BaseStep.store_state
+ def execute(self):
+ super().execute()
+ sleep(1)
+
+ @property
+ def description(self):
+ return "One second test step"
+
+ @property
+ def component(self) -> str:
+ return "Test"
+
+
+class TestStepNoSuperExecute(BaseStep):
+
+ @BaseStep.store_state
+ def execute(self):
+ sleep(1)
+
+ @property
+ def description(self):
+ return "One second test step - no super execute call"
+
+ @property
+ def component(self) -> str:
+ return "Test"
+
+
+class TestCleanupStepA(BaseStep):
+
+ @BaseStep.store_state
+ def execute(self):
+ return super().execute()
+
+ @BaseStep.store_state(cleanup=True)
+ def cleanup(self):
+ return super().cleanup()
+
+ @property
+ def description(self):
+ return "Test cleanup step A"
+
+ @property
+ def component(self) -> str:
+ return "Test"
+
+
+class TestCleanupStepB(TestCleanupStepA):
+
+ @property
+ def description(self):
+ return "Test cleanup step B"
+
+
+class TestCleanupStepC(TestCleanupStepA):
+
+ @property
+ def description(self):
+ return "Test cleanup step C"
+
+
+class TestCleanupStepD(TestCleanupStepA):
+
+ @property
+ def description(self):
+ return "Test cleanup step D"
+
+
def test_store_state():
ts = TestStep()
ts.execute()
@@ -56,3 +138,105 @@ def test_store_state():
assert rep_s.step_description == "[Test] TestStep: Test pass step"
assert rep_s.step_execution_status.value == "PASS"
assert rep_s.step_execution_duration != 0
+
+ ts = TestStep(cleanup=True)
+ ts.add_step(TestFailStep(cleanup=True))
+ with pytest.raises(Exception):
+ ts.execute()
+ with pytest.raises(Exception):
+ ts.cleanup()
+ assert len(ts.reports_collection.report) == 4
+ cln_rep_f, cln_rep_s, rep_s, rep_f = ts.reports_collection.report
+ assert rep_f.step_description == "[Test] TestFailStep: Test fail step"
+ assert rep_f.step_execution_status.value == "FAIL"
+ assert rep_f.step_execution_duration != 0
+
+ assert rep_s.step_description == "[Test] TestStep: Test pass step"
+ assert rep_s.step_execution_status.value == "NOT EXECUTED"
+ assert rep_s.step_execution_duration != 0
+
+ assert cln_rep_s.step_description == "[Test] TestStep cleanup: Test pass step"
+ assert cln_rep_s.step_execution_status.value == "PASS"
+ assert cln_rep_s.step_execution_duration != 0
+
+ assert cln_rep_f.step_description == "[Test] TestFailStep cleanup: Test fail step"
+ assert cln_rep_f.step_execution_status.value == "FAIL"
+ assert cln_rep_f.step_execution_duration != 0
+
+ ts = TestStep(cleanup=True)
+ tsf = TestFailStep(cleanup=True)
+ tsf.add_step(TestStep(cleanup=True))
+ ts.add_step(tsf)
+ ts.add_step(TestStep(cleanup=True))
+ with pytest.raises(Exception):
+ ts.execute()
+ with pytest.raises(Exception):
+ ts.cleanup()
+
+ assert len(ts.reports_collection.report) == 5
+ cln_2, cln_1, exec_3, exec_2, exec_1 = ts.reports_collection.report
+
+ assert exec_1.step_description == "[Test] TestStep: Test pass step"
+ assert exec_1.step_execution_status.value == "PASS"
+ assert exec_1.step_execution_duration != 0
+
+ assert exec_2.step_description == "[Test] TestFailStep: Test fail step"
+ assert exec_2.step_execution_status.value == "FAIL"
+ assert exec_2.step_execution_duration != 0
+
+ assert exec_3.step_description == "[Test] TestStep: Test pass step"
+ assert exec_3.step_execution_status.value == "NOT EXECUTED"
+ assert exec_3.step_execution_duration != 0
+
+ assert cln_1.step_description == "[Test] TestStep cleanup: Test pass step"
+ assert cln_1.step_execution_status.value == "PASS"
+ assert cln_1.step_execution_duration != 0
+
+ assert cln_2.step_description == "[Test] TestFailStep cleanup: Test fail step"
+ assert cln_2.step_execution_status.value == "FAIL"
+ assert cln_2.step_execution_duration != 0
+
+
+def test_store_state_time_measurement():
+
+ ts = TestOneSecStep()
+ ts.execute()
+ assert len(ts.reports_collection.report) == 1
+ rep = ts.reports_collection.report[0]
+ assert rep.step_execution_duration > 1
+
+ ts = TestOneSecStep()
+ ts.add_step(TestOneSecStep())
+ ts.execute()
+ assert len(ts.reports_collection.report) == 2
+ rep_one, rep_two = ts.reports_collection.report
+ assert rep_one.step_execution_duration > 1 and rep_one.step_execution_duration < 2
+ assert rep_two.step_execution_duration > 1 and rep_two.step_execution_duration < 2
+
+ ts = TestStepNoSuperExecute()
+ ts.execute()
+ assert len(ts.reports_collection.report) == 1
+ rep = ts.reports_collection.report[0]
+ assert rep.step_execution_duration < 1
+
+
+def test_store_state_with_cleanup():
+
+ ts = TestCleanupStepA(cleanup=True)
+ ts_b = TestCleanupStepB(cleanup=True)
+ ts_b.add_step(TestCleanupStepC(cleanup=True))
+ ts.add_step(ts_b)
+ ts.add_step(TestCleanupStepD(cleanup=True))
+ ts.execute()
+ ts.cleanup()
+ assert len(ts.reports_collection.report) == 8
+ (rep_cleanup_step_4, rep_cleanup_step_3, rep_cleanup_step_2, rep_cleanup_step_1,
+ rep_exec_step_4, rep_exec_step_3, rep_exec_step_2, rep_exec_step_1) = ts.reports_collection.report
+ assert rep_exec_step_1.step_description == "[Test] TestCleanupStepC: Test cleanup step C"
+ assert rep_exec_step_2.step_description == "[Test] TestCleanupStepB: Test cleanup step B"
+ assert rep_exec_step_3.step_description == "[Test] TestCleanupStepD: Test cleanup step D"
+ assert rep_exec_step_4.step_description == "[Test] TestCleanupStepA: Test cleanup step A"
+ assert rep_cleanup_step_1.step_description == "[Test] TestCleanupStepA cleanup: Test cleanup step A"
+ assert rep_cleanup_step_2.step_description == "[Test] TestCleanupStepB cleanup: Test cleanup step B"
+ assert rep_cleanup_step_3.step_description == "[Test] TestCleanupStepC cleanup: Test cleanup step C"
+ assert rep_cleanup_step_4.step_description == "[Test] TestCleanupStepD cleanup: Test cleanup step D"