summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/helper-scripts/openstackrapid/createrapid.py
diff options
context:
space:
mode:
authorLuc Provoost <luc.provoost@intel.com>2018-02-03 22:47:55 +0100
committerDeepak S <deepak.s@linux.intel.com>2018-02-04 01:52:43 +0000
commit7fa9c0b506709a683ec8984e19e9ba9deb27e021 (patch)
treeed893dd0782cb60ae1a0d372d9bb33044bd114ff /VNFs/DPPD-PROX/helper-scripts/openstackrapid/createrapid.py
parentd29f8fa251540b48371f76e47ddba6315607d192 (diff)
Fixed issues with the pkt_size command
Fixed issues with pkt_size. For a 64 byte packet, we need to issue pkt_size <core> <task> 60 4 extra bytes will be calculated and added automatically by PROX Also added the missing irq.test and irq.cfg files Added support for OpenStack systems not using floating IP addresses Change-Id: I05d775eb858a58dd349ea370a0e34ac6448590c9 Signed-off-by: Luc Provoost <luc.provoost@intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX/helper-scripts/openstackrapid/createrapid.py')
-rwxr-xr-xVNFs/DPPD-PROX/helper-scripts/openstackrapid/createrapid.py36
1 files changed, 21 insertions, 15 deletions
diff --git a/VNFs/DPPD-PROX/helper-scripts/openstackrapid/createrapid.py b/VNFs/DPPD-PROX/helper-scripts/openstackrapid/createrapid.py
index beca11c3..f40cc8b8 100755
--- a/VNFs/DPPD-PROX/helper-scripts/openstackrapid/createrapid.py
+++ b/VNFs/DPPD-PROX/helper-scripts/openstackrapid/createrapid.py
@@ -31,7 +31,7 @@ from logging import handlers
from prox_ctrl import prox_ctrl
import ConfigParser
-version="17.12.15"
+version="18.2.3"
stack = "rapid" #Default string for stack
yaml = "rapid.yaml" #Default string for yaml file
key = "prox" # This is also the default in the yaml file....
@@ -76,7 +76,7 @@ def usage():
print(" --subnet DP_SUBNET Specify the subnet name to be used for the dataplane. Default is %s."%subnet)
print(" --subnet_cidr SUBNET_CIDR Specify the subnet CIDR to be used for the dataplane. Default is %s."%subnet_cidr)
print(" --internal_network NETWORK Specify the network name to be used for the control plane. Default is %s."%internal_network)
- print(" --floating_network NETWORK Specify the external floating ip network name. Default is %s."%floating_network)
+ print(" --floating_network NETWORK Specify the external floating ip network name. Default is %s. NO if no floating ip used."%floating_network)
print(" --log Specify logging level for log file output, screen output level is hard coded")
print(" -h, --help Show help message and exit.")
print("")
@@ -205,16 +205,17 @@ else:
raise Exception("Control plane network " + internal_network + " not existing")
# Checking if the floating ip network already exists, if not, stop the script
-log.debug("Checking floating ip network: "+floating_network)
-cmd = 'openstack network show '+floating_network
-log.debug (cmd)
-cmd = cmd + ' |grep "status " | tr -s " " | cut -d" " -f 4'
-NetworkExist = subprocess.check_output(cmd , shell=True).strip()
-if NetworkExist == 'ACTIVE':
- log.info("Floating ip network ("+floating_network+") already active")
-else:
- log.exception("Floating ip network " + floating_network + " not existing")
- raise Exception("Floating ip network " + floating_network + " not existing")
+if floating_network <>'NO':
+ log.debug("Checking floating ip network: "+floating_network)
+ cmd = 'openstack network show '+floating_network
+ log.debug (cmd)
+ cmd = cmd + ' |grep "status " | tr -s " " | cut -d" " -f 4'
+ NetworkExist = subprocess.check_output(cmd , shell=True).strip()
+ if NetworkExist == 'ACTIVE':
+ log.info("Floating ip network ("+floating_network+") already active")
+ else:
+ log.exception("Floating ip network " + floating_network + " not existing")
+ raise Exception("Floating ip network " + floating_network + " not existing")
# Checking if the image already exists, if not create it
log.debug("Checking image: "+image)
@@ -357,9 +358,14 @@ for vm in range(1, int(total_number_of_VMs)+1):
searchString = '.*vm%d_dataplane_ip.*?([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*)' % vm
matchObj = re.search(searchString, output, re.DOTALL)
vmDPIP.append(matchObj.group(1))
- searchString = '.*vm%d_public_ip.*?([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*)' % vm
- matchObj = re.search(searchString, output, re.DOTALL)
- vmAdminIP.append(matchObj.group(1))
+ if floating_network <> 'NO':
+ searchString = '.*vm%d_public_ip.*?([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*)' % vm
+ matchObj = re.search(searchString, output, re.DOTALL)
+ vmAdminIP.append(matchObj.group(1))
+ else:
+ searchString = '.*vm%d_private_ip.*?([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*)' % vm
+ matchObj = re.search(searchString, output, re.DOTALL)
+ vmAdminIP.append(matchObj.group(1))
searchString = '.*vm%d_dataplane_mac.*?([a-fA-F0-9:]{17})' % vm
matchObj = re.search(searchString, output, re.DOTALL)
vmDPmac.append(matchObj.group(1))