rate=rate)
logger.debug("Executing cmd: %s", cmd)
- proc = subprocess.run(cmd, shell=True,
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
+ proc = subprocess.Popen(cmd, shell=True,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE)
+
+ proc.wait()
logger.debug("Process: {}".format(proc))
while True:
count += 1
- proc = subprocess.run(cmd, shell=True,
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
+ proc = subprocess.Popen(cmd, shell=True,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE)
+ proc.wait()
logger.debug("Process: {}".format(proc))
if proc.returncode == 0:
# Check if response is 200 OK
- resp = proc.stdout.decode()
+ resp = proc.stdout.read().decode()
if 'HTTP/1.1 200 OK' in resp:
rc = 0
break
start=start)
logger.debug("Executing cmd: %s", cmd)
- proc = subprocess.run(cmd, shell=True,
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
+ proc = subprocess.Popen(cmd, shell=True,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE)
+ proc.wait()
logger.debug("Process: {}".format(proc))
rc = proc.returncode
if rc == 0:
# Check if we got 200 OK
- resp = proc.stdout.decode()
+ resp = proc.stdout.read().decode()
if 'HTTP/1.1 200 OK' not in resp:
self._log.error("Got error response: {}".format(resp))
rc = 1
while True:
count += 1
- proc = subprocess.run(config_cmd, shell=True,
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
+ proc = subprocess.Popen(config_cmd, shell=True,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE)
+ proc.wait()
logger.debug("Process: {}".format(proc))
if proc.returncode == 0:
# Check if response is 200 OK
- resp = proc.stdout.decode()
+ resp = proc.stdout.read().decode()
if 'HTTP/1.1 200 OK' in resp:
rc = 0
break
start=start)
logger.debug("Executing cmd: %s", cmd)
- proc = subprocess.run(cmd, shell=True,
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
+ proc = subprocess.Popen(cmd, shell=True,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE)
+ proc.wait()
logger.debug("Process: {}".format(proc))
rc = proc.returncode
if rc == 0:
# Check if we got 200 OK
- resp = proc.stdout.decode()
+ resp = proc.stdout.read().decode()
if 'HTTP/1.1 200 OK' not in resp:
self._log.error("Got error response: {}".format(resp))
rc = 1
vnf_type=vnf_type)
logger.debug("Executing cmd: %s", curl_cmd)
- proc = subprocess.run(curl_cmd, shell=True,
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
+ proc = subprocess.Popen(curl_cmd, shell=True,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE)
+ proc.wait()
logger.debug("Process: {}".format(proc))
return proc.returncode