aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/virl/bin/start-testcase
diff options
context:
space:
mode:
authorCarsten Koester <ckoester@cisco.com>2016-04-10 11:51:18 -0400
committerGerrit Code Review <gerrit@fd.io>2016-04-11 12:10:43 +0000
commit5538ed5471f5de3324924534cd8e43ee7c5a58d5 (patch)
treeadb44e71ac5e15c5713898d1da7e3737ae53488d /resources/tools/virl/bin/start-testcase
parentca1b17f089c77380678cb329b044072d4e373f56 (diff)
Fix cosmetic issues in VIRL topologies
Fix cosmetic issues in VIRL topologies: - Replace double whitespace by single whitespace in XML - Remove reserved but unused IP address allocations from VIRL config - Modify "start-testcase" script to handle links without IP address Change-Id: Ie447bd91172df61b30ebb8650b56bdfca0f25fd4 Signed-off-by: Carsten Koester <ckoester@cisco.com>
Diffstat (limited to 'resources/tools/virl/bin/start-testcase')
-rwxr-xr-xresources/tools/virl/bin/start-testcase5
1 files changed, 3 insertions, 2 deletions
diff --git a/resources/tools/virl/bin/start-testcase b/resources/tools/virl/bin/start-testcase
index e532ec7ef3..b46f5add27 100755
--- a/resources/tools/virl/bin/start-testcase
+++ b/resources/tools/virl/bin/start-testcase
@@ -261,8 +261,9 @@ def main():
for key2 in data[session_id][key]:
topology[key]["nic-"+key2] = data[session_id][key][key2]
if 'ip-address' in topology[key]["nic-"+key2]:
- topology[key]["nic-"+key2]['ip-addr'] = re.split('\\/', \
- topology[key]["nic-"+key2]['ip-address'])[0]
+ if topology[key]["nic-"+key2]['ip-address'] is not None:
+ topology[key]["nic-"+key2]['ip-addr'] = re.split('\\/', \
+ topology[key]["nic-"+key2]['ip-address'])[0]
# Write ansible file
ansiblehosts = open(os.path.join(scratch_directory, 'ansible-hosts'), 'w')