aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitreview12
-rw-r--r--README.md5
-rw-r--r--run_basic_onboard.py20
-rw-r--r--setup.cfg4
-rw-r--r--setup.py2
-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_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/scenario/basic_onboard.py49
-rw-r--r--src/onaptests/scenario/basic_vm.py3
-rw-r--r--src/onaptests/steps/onboard/cds.py36
-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 -> 2495 bytes
-rw-r--r--src/onaptests/templates/heat-files/ubuntu20/ubuntu20agent.zipbin0 -> 2492 bytes
-rw-r--r--src/onaptests/templates/vnf-services/basic_onboard-service.yaml.j240
-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/ubuntu18agent-service.yaml2
20 files changed, 245 insertions, 212 deletions
diff --git a/.gitreview b/.gitreview
index 82d6a22..2f7cc39 100644
--- a/.gitreview
+++ b/.gitreview
@@ -1,7 +1,5 @@
-
- [gerrit]
- host=gerrit.onap.org
- port=29418
- project=testsuite/pythonsdk-tests
- defaultbranch=master
- \ No newline at end of file
+[gerrit]
+ host=gerrit.onap.org
+ port=29418
+ project=testsuite/pythonsdk-tests
+ defaultbranch=guilin
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/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 8ac68c4..a2a0d45 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -45,7 +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/setup.py b/setup.py
index 8b44c49..991295e 100644
--- a/setup.py
+++ b/setup.py
@@ -5,6 +5,6 @@
from setuptools import setup
setup(
- setup_requires=['pbr','setuptools'],
+ setup_requires=['pbr<5.6.0','setuptools'],
pbr=True
)
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/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/scenario/basic_onboard.py b/src/onaptests/scenario/basic_onboard.py
new file mode 100644
index 0000000..af689bd
--- /dev/null
+++ b/src/onaptests/scenario/basic_onboard.py
@@ -0,0 +1,49 @@
+#!/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 as exc:
+ self.result = 0
+ self.__logger.error(exc.error_message)
+ except SDKException:
+ self.result = 0
+ self.__logger.error("SDK Exception")
+ 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 cbf9b7c..ff432db 100644
--- a/src/onaptests/scenario/basic_vm.py
+++ b/src/onaptests/scenario/basic_vm.py
@@ -16,7 +16,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)
@@ -28,7 +27,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:
diff --git a/src/onaptests/steps/onboard/cds.py b/src/onaptests/steps/onboard/cds.py
index ed381ad..83579ec 100644
--- a/src/onaptests/steps/onboard/cds.py
+++ b/src/onaptests/steps/onboard/cds.py
@@ -3,6 +3,7 @@
from abc import ABC
from pathlib import Path
+from typing import Optional
from kubernetes import client, config
from onapsdk.cds import Blueprint, DataDictionarySet
@@ -24,6 +25,12 @@ class CDSBaseStep(BaseStep, ABC):
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."""
@@ -40,13 +47,36 @@ class ExposeCDSBlueprintprocessorNodePortStep(CDSBaseStep):
"""
super().execute()
config.load_kube_config(settings.K8S_CONFIG)
- k8s_client = client.CoreV1Api()
- k8s_client.patch_namespaced_service(
- "cds-blueprints-processor-http",
+ 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."""
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..aa32f85 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..49f9b71
--- /dev/null
+++ b/src/onaptests/templates/heat-files/ubuntu20/ubuntu20agent.zip
Binary files differ
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..6c91994
--- /dev/null
+++ b/src/onaptests/templates/vnf-services/basic_onboard-service.yaml.j2
@@ -0,0 +1,40 @@
+---
+{{ 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/ubuntu18agent-service.yaml b/src/onaptests/templates/vnf-services/ubuntu18agent-service.yaml
index baf804e..9d01696 100644
--- a/src/onaptests/templates/vnf-services/ubuntu18agent-service.yaml
+++ b/src/onaptests/templates/vnf-services/ubuntu18agent-service.yaml
@@ -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"