aboutsummaryrefslogtreecommitdiffstats
path: root/test/mocks/mass-pnf-sim/mass-pnf-sim.py
diff options
context:
space:
mode:
authorTamasBakai <tamas.bakai@est.tech>2019-03-26 09:20:16 +0000
committerTamasBakai <tamas.bakai@est.tech>2019-03-26 09:20:16 +0000
commitbab325bf8248fd9033c828981b22942c2098b48a (patch)
tree7e91a663290b7ff87fb6d8d7eb722ba63c9e17d7 /test/mocks/mass-pnf-sim/mass-pnf-sim.py
parentc25ab4f11ff8944142229ba92d514f2ae58ec966 (diff)
Mass-pnf-sim URL handling improvements
Change-Id: Ic10551cb0cd1f875ad6a1cec3d73e1cfcb35d00e Issue-ID: DCAEGEN2-1225 Signed-off-by: TamasBakai <tamas.bakai@est.tech>
Diffstat (limited to 'test/mocks/mass-pnf-sim/mass-pnf-sim.py')
-rwxr-xr-xtest/mocks/mass-pnf-sim/mass-pnf-sim.py39
1 files changed, 21 insertions, 18 deletions
diff --git a/test/mocks/mass-pnf-sim/mass-pnf-sim.py b/test/mocks/mass-pnf-sim/mass-pnf-sim.py
index 898cd650f..8a4f390aa 100755
--- a/test/mocks/mass-pnf-sim/mass-pnf-sim.py
+++ b/test/mocks/mass-pnf-sim/mass-pnf-sim.py
@@ -19,8 +19,8 @@ parser.add_argument(
)
parser.add_argument(
- '--ipves',
- help='IP of the VES collector',
+ '--urlves',
+ help='URL of the VES collector',
)
parser.add_argument(
@@ -56,7 +56,7 @@ parser.add_argument(
args = parser.parse_args()
-if args.bootstrap and args.ipstart and args.ipves:
+if args.bootstrap and args.ipstart and args.urlves:
print("Bootstrap:")
start_port=2000
@@ -81,11 +81,11 @@ if args.bootstrap and args.ipstart and args.ipves:
PortSftp=start_port +1
PortFtps=start_port +2
start_port +=2
- IpFtps = ipaddress.ip_address(args.ipstart) + int(3 + (i * 16))
- print("\tIp Ftps: " + str(IpFtps))
+ UrlFtps = str(ipaddress.ip_address(args.ipstart) + int(3 + (i * 16)))
+ print("\tUrl Ftps: " + str(UrlFtps))
- IpSftp = ipaddress.ip_address(args.ipstart) + int(4 + (i * 16))
- print("\tIp Sftp:" + str(IpSftp))
+ UrlSftp = str(ipaddress.ip_address(args.ipstart) + int(4 + (i * 16)))
+ print("\tUrl Sftp: " + str(UrlSftp))
foldername = "pnf-sim-lw-" + str(i)
completed = subprocess.run('mkdir ' + foldername, shell=True)
@@ -96,17 +96,17 @@ if args.bootstrap and args.ipstart and args.ipves:
shell=True)
print('\tCloning folder:', completed.stdout)
- composercmd = "./simulator.sh compose " +\
- str(ip_gw) + " " +\
- str(ip_subnet) + " " +\
- str(i) + " " +\
- str(args.ipves) + " " +\
- str(IpPnfSim) + " " +\
- str(IpFileServer) + " " +\
- str(PortSftp) + " " +\
- str(PortFtps) + " " +\
- str(IpFtps) + " " +\
- str(IpSftp)
+ composercmd = "./simulator.sh compose " + \
+ str(ip_gw) + " " + \
+ str(ip_subnet) + " " + \
+ str(i) + " " + \
+ str(args.urlves) + " " + \
+ str(IpPnfSim) + " " + \
+ str(IpFileServer) + " " + \
+ str(PortSftp) + " " + \
+ str(PortFtps) + " " + \
+ str(UrlFtps) + " " + \
+ str(UrlSftp)
completed = subprocess.run(
'set -x; cd ' +
@@ -116,6 +116,9 @@ if args.bootstrap and args.ipstart and args.ipves:
shell=True)
print('Cloning:', completed.stdout)
+ completed = subprocess.run('set -x; cd pnf-sim-lightweight; ./simulator.sh build ', shell=True)
+ print("Build docker image: ", completed.stdout)
+
sys.exit()
if args.clean: