aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>2020-05-06 04:42:18 -0700
committerBartek Grzybowski <b.grzybowski@partner.samsung.com>2020-05-08 06:50:13 +0000
commit8ec08166dc4aa24bf4bd1c514ec845f64e34f2d5 (patch)
tree586aa36a380d4ab7dab41db7be009ab7eb233812 /test
parent879d5677d2312a87dce030dc46d9f621a308ed2c (diff)
Drop superfluous variables and type casts
Change-Id: Ic8e9eab90c537584b2c771bdeb59c0b43deb992e Issue-ID: INT-1577 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
Diffstat (limited to 'test')
-rwxr-xr-xtest/mocks/mass-pnf-sim/mass-pnf-sim.py23
1 files changed, 10 insertions, 13 deletions
diff --git a/test/mocks/mass-pnf-sim/mass-pnf-sim.py b/test/mocks/mass-pnf-sim/mass-pnf-sim.py
index db567ede0..655b87ccc 100755
--- a/test/mocks/mass-pnf-sim/mass-pnf-sim.py
+++ b/test/mocks/mass-pnf-sim/mass-pnf-sim.py
@@ -62,11 +62,11 @@ logger.setLevel(getattr(logging, args.verbose.upper()))
if args.bootstrap and args.ipstart and args.urlves:
logger.info("Bootstrap:")
- start_port=2000
- ftps_pasv_port_start=8000
- ftps_pasv_port_num_of_ports=10
+ start_port = 2000
+ ftps_pasv_port_start = 8000
+ ftps_pasv_port_num_of_ports = 10
- ftps_pasv_port_end=ftps_pasv_port_start + ftps_pasv_port_num_of_ports
+ ftps_pasv_port_end = ftps_pasv_port_start + ftps_pasv_port_num_of_ports
for i in range(args.bootstrap):
logger.info("PNF simulator instance: " + str(i) + ".")
@@ -82,12 +82,9 @@ if args.bootstrap and args.ipstart and args.urlves:
IpPnfSim = args.ipstart + int(2 + (i * 16))
logger.debug("\tIp Pnf SIM:" + str(IpPnfSim))
- IpFileServer = str(args.ipfileserver)
- TypeFileServer = args.typefileserver
-
- PortSftp=start_port +1
- PortFtps=start_port +2
- start_port +=2
+ PortSftp = start_port + 1
+ PortFtps = start_port + 2
+ start_port += 2
UrlFtps = str(args.ipstart + int(3 + (i * 16)))
logger.debug("\tUrl Ftps: " + str(UrlFtps))
@@ -109,8 +106,8 @@ if args.bootstrap and args.ipstart and args.urlves:
str(i) + " " + \
args.urlves + " " + \
str(IpPnfSim) + " " + \
- IpFileServer + " " + \
- TypeFileServer + " " + \
+ str(args.ipfileserver) + " " + \
+ args.typefileserver + " " + \
str(PortSftp) + " " + \
str(PortFtps) + " " + \
str(UrlFtps) + " " + \
@@ -127,7 +124,7 @@ if args.bootstrap and args.ipstart and args.urlves:
logger.info(f'Cloning: {completed.stdout}')
ftps_pasv_port_start += ftps_pasv_port_num_of_ports + 1
- ftps_pasv_port_end += ftps_pasv_port_num_of_ports +1
+ ftps_pasv_port_end += ftps_pasv_port_num_of_ports + 1
completed = subprocess.run('set -x; cd pnf-sim-lightweight; ./simulator.sh build ', shell=True)
logger.info(f"Build docker image: {completed.stdout}")