From 5538ed5471f5de3324924534cd8e43ee7c5a58d5 Mon Sep 17 00:00:00 2001 From: Carsten Koester Date: Sun, 10 Apr 2016 11:51:18 -0400 Subject: 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 --- resources/tools/virl/bin/start-testcase | 5 +++-- resources/tools/virl/topologies/simple-ring-nested.virl | 17 +++++++---------- resources/tools/virl/topologies/simple-ring.virl | 17 +++++++---------- 3 files changed, 17 insertions(+), 22 deletions(-) (limited to 'resources') 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') diff --git a/resources/tools/virl/topologies/simple-ring-nested.virl b/resources/tools/virl/topologies/simple-ring-nested.virl index e1da5709cc..b2768f2205 100644 --- a/resources/tools/virl/topologies/simple-ring-nested.virl +++ b/resources/tools/virl/topologies/simple-ring-nested.virl @@ -67,9 +67,6 @@ write_files: permissions: '0755' content: |- #!/bin/sh - ifconfig eth1 up 10.0.0.6 netmask 255.255.255.252 - ifconfig eth2 up 10.0.0.14 netmask 255.255.255.252 - grep -q nfs_server_scratch /var/lib/cloud/instance/user-data.txt || exit 1 grep -q nfs_server_common /var/lib/cloud/instance/user-data.txt || exit 1 nfs_server_scratch=$(grep -E '^nfs_server_scratch:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }') @@ -99,10 +96,10 @@ write_files: false - - + + - + #cloud-config bootcmd: @@ -195,8 +192,8 @@ write_files: exit 0 - - + + @@ -291,8 +288,8 @@ write_files: exit 0 - - + + diff --git a/resources/tools/virl/topologies/simple-ring.virl b/resources/tools/virl/topologies/simple-ring.virl index 04babe5e99..82973aa745 100644 --- a/resources/tools/virl/topologies/simple-ring.virl +++ b/resources/tools/virl/topologies/simple-ring.virl @@ -67,9 +67,6 @@ write_files: permissions: '0755' content: |- #!/bin/sh - ifconfig eth1 up 10.0.0.6 netmask 255.255.255.252 - ifconfig eth2 up 10.0.0.14 netmask 255.255.255.252 - grep -q nfs_server_scratch /var/lib/cloud/instance/user-data.txt || exit 1 grep -q nfs_server_common /var/lib/cloud/instance/user-data.txt || exit 1 nfs_server_scratch=$(grep -E '^nfs_server_scratch:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }') @@ -99,10 +96,10 @@ write_files: false - - + + - + #cloud-config bootcmd: @@ -195,8 +192,8 @@ write_files: exit 0 - - + + @@ -291,8 +288,8 @@ write_files: exit 0 - - + + -- cgit 1.2.3-korg