aboutsummaryrefslogtreecommitdiffstats
path: root/src/onaptests/steps/simulator
diff options
context:
space:
mode:
authorLukasz Rajewski <lukasz.rajewski@orange.com>2021-01-05 20:58:12 +0000
committerGerrit Code Review <gerrit@onap.org>2021-01-05 20:58:12 +0000
commitd089e89005df1b4b3b6238a2937e23791c07d9ae (patch)
treef527f96f06985e770cd60be71b62260ae48dfcc2 /src/onaptests/steps/simulator
parenta2da63228ee409830170239c7ad0d9c073793909 (diff)
parentaf63861d32daac92cfaf1e00842fa23bc6ba7c6b (diff)
Merge "PNF macro instantiation"
Diffstat (limited to 'src/onaptests/steps/simulator')
-rw-r--r--src/onaptests/steps/simulator/pnf/pnf_instantiate.py1
-rw-r--r--src/onaptests/steps/simulator/pnf/utils.py8
2 files changed, 6 insertions, 3 deletions
diff --git a/src/onaptests/steps/simulator/pnf/pnf_instantiate.py b/src/onaptests/steps/simulator/pnf/pnf_instantiate.py
index 31ea6bf..5fb664d 100644
--- a/src/onaptests/steps/simulator/pnf/pnf_instantiate.py
+++ b/src/onaptests/steps/simulator/pnf/pnf_instantiate.py
@@ -22,7 +22,6 @@ class PNFInstanceStep(BaseStep):
utils.bootstrap_simulator()
utils.run_container()
- @BaseStep.store_state
def cleanup(self) -> None:
"""Remove containers and images."""
utils.stop_container()
diff --git a/src/onaptests/steps/simulator/pnf/utils.py b/src/onaptests/steps/simulator/pnf/utils.py
index c9ca4e8..efac46e 100644
--- a/src/onaptests/steps/simulator/pnf/utils.py
+++ b/src/onaptests/steps/simulator/pnf/utils.py
@@ -2,11 +2,14 @@
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
)
@@ -88,8 +91,9 @@ def bootstrap_simulator() -> None:
# collect settings that will be placed in the simulator directory
vesprotocol = config["setup"].get('vesprotocol', "http")
- vesip = config["setup"].get('vesip', "")
- vesport = config["setup"].get('vesport', "")
+ 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', "")