aboutsummaryrefslogtreecommitdiffstats
path: root/test/mocks/mass-pnf-sim/deployment
diff options
context:
space:
mode:
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>2020-07-23 11:08:36 +0200
committerPaweł Wieczorek <p.wieczorek2@samsung.com>2020-07-27 12:46:58 +0000
commit3ad7e505bc57626f95e54670d13903366b703f55 (patch)
tree89604504dcc689367520088a897286947d32d495 /test/mocks/mass-pnf-sim/deployment
parent4c6e4fc080c732420dead13d4d6eb2a55ddc3089 (diff)
Add HOT parameters for the simulator
Run simulator instances from runner script Change-Id: I9d9a317c378a84b1846821916fee5f47452944c5 Issue-ID: INT-1662 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
Diffstat (limited to 'test/mocks/mass-pnf-sim/deployment')
-rw-r--r--test/mocks/mass-pnf-sim/deployment/heat/heat.env4
-rw-r--r--test/mocks/mass-pnf-sim/deployment/heat/heat.yaml33
-rw-r--r--test/mocks/mass-pnf-sim/deployment/heat/mass-pnf-sim_run.sh5
3 files changed, 38 insertions, 4 deletions
diff --git a/test/mocks/mass-pnf-sim/deployment/heat/heat.env b/test/mocks/mass-pnf-sim/deployment/heat/heat.env
index feed7d293..3e402fe49 100644
--- a/test/mocks/mass-pnf-sim/deployment/heat/heat.env
+++ b/test/mocks/mass-pnf-sim/deployment/heat/heat.env
@@ -4,3 +4,7 @@ parameters:
key_name:
instance_net_id:
float_net_id:
+ simulator_instances:
+ ves_url:
+ ftp_user:
+ ftp_password:
diff --git a/test/mocks/mass-pnf-sim/deployment/heat/heat.yaml b/test/mocks/mass-pnf-sim/deployment/heat/heat.yaml
index be6032eb7..9718c5c68 100644
--- a/test/mocks/mass-pnf-sim/deployment/heat/heat.yaml
+++ b/test/mocks/mass-pnf-sim/deployment/heat/heat.yaml
@@ -17,6 +17,18 @@ parameters:
instance_net_id:
type: string
description: Id of a private network for instance interface
+ simulator_instances:
+ type: number
+ description: Number of simulator instances to run on cloud instance
+ ves_url:
+ type: string
+ description: VES Collector url
+ ftp_user:
+ type: string
+ description: Username for the ftp server
+ ftp_password:
+ type: string
+ description: Password for the ftp server
resources:
config:
type: OS::Heat::SoftwareConfig
@@ -27,7 +39,15 @@ resources:
type: OS::Heat::SoftwareConfig
properties:
config:
- get_file: mass-pnf-sim_run.sh
+ str_replace:
+ template:
+ get_file: mass-pnf-sim_run.sh
+ params:
+ $SIMULATOR_INSTANCES: { get_param: simulator_instances }
+ $VES_URL: { get_param: ves_url }
+ $FILE_SERVER: { get_attr: [simulator_floating_ip, floating_ip_address] }
+ $FTP_USER: { get_param: ftp_user }
+ $FTP_PASSWORD: { get_param: ftp_password }
sim_script_file:
type: OS::Heat::CloudConfig
properties:
@@ -36,13 +56,18 @@ resources:
- path: /root/mass-pnf-sim_run.sh
content:
get_attr: [sim_script, config]
+ simulator_port:
+ type: OS::Neutron::Port
+ properties:
+ network:
+ get_param: instance_net_id
simulator_floating_ip:
type: OS::Neutron::FloatingIP
properties:
floating_network:
get_param: float_net_id
port_id:
- get_attr: [simulator, addresses, get_param: instance_net_id, 0, port]
+ get_resource: simulator_port
cloud_config:
type: OS::Heat::MultipartMime
properties:
@@ -62,8 +87,8 @@ resources:
flavor:
get_param: flavor_name
networks:
- - network:
- get_param: instance_net_id
+ - port:
+ get_resource: simulator_port
user_data_format: RAW
user_data:
get_resource: cloud_config
diff --git a/test/mocks/mass-pnf-sim/deployment/heat/mass-pnf-sim_run.sh b/test/mocks/mass-pnf-sim/deployment/heat/mass-pnf-sim_run.sh
index 8200536b4..20880003a 100644
--- a/test/mocks/mass-pnf-sim/deployment/heat/mass-pnf-sim_run.sh
+++ b/test/mocks/mass-pnf-sim/deployment/heat/mass-pnf-sim_run.sh
@@ -4,3 +4,8 @@ git clone https://git.onap.org/integration
pushd integration/test/mocks/mass-pnf-sim
./setup.sh
source .tox/MassPnfSim-runtime/bin/activate
+./mass-pnf-sim.py build
+./mass-pnf-sim.py bootstrap --count $SIMULATOR_INSTANCES --urlves $VES_URL --ipfileserver $FILE_SERVER --typefileserver ftps --ipstart 10.11.0.16 --user $FTP_USER --password $FTP_PASSWORD
+./mass-pnf-sim.py start
+sleep 30
+./mass-pnf-sim.py trigger