summaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
Diffstat (limited to 'ci')
-rwxr-xr-xci/03-maasdeploy.sh20
-rw-r--r--ci/net.xml5
2 files changed, 12 insertions, 13 deletions
diff --git a/ci/03-maasdeploy.sh b/ci/03-maasdeploy.sh
index a6b311dc..ab144a5f 100755
--- a/ci/03-maasdeploy.sh
+++ b/ci/03-maasdeploy.sh
@@ -209,16 +209,12 @@ sudo virsh pool-define-as default --type dir --target /var/lib/libvirt/images/ |
sudo virsh pool-start default || true
sudo virsh pool-autostart default || true
-# In case of virtual install set network
-if [ "$virtinstall" -eq 1 ]; then
- sudo virsh net-dumpxml default > default-net-org.xml
- sed -i '/dhcp/d' default-net-org.xml
- sed -i '/range/d' default-net-org.xml
- sudo virsh net-destroy default
- sudo virsh net-define default-net-org.xml
- sudo virsh net-start default
- rm -f default-net-org.xml
-fi
+# As we use kvm so setup network on admin network
+ADMIN_BR=`cat labconfig.json | jq '.opnfv.spaces[] | select(.type=="admin")'.bridge | cut -d \" -f 2 `
+sed -i "s@brAdm@$ADMIN_BR@" net.xml
+sudo virsh net-destroy default
+sudo virsh net-define net.xml
+sudo virsh net-start default
#
# Cleanup, juju init and config backup
@@ -465,9 +461,7 @@ addnodes(){
VIRSHIP="" # TODO: parse from $VIRSHURL if needed
fi
- if [ "$virtinstall" -eq 1 ]; then
- netw=" --network bridge=virbr0,model=virtio"
- elif ([ "$VIRSHHOST" != "" ]); then
+ if ([ "$VIRSHHOST" != "" ]); then
# Get the bridge hosting the remote virsh
brid=$(ssh $VIRSHHOST "ip a l | grep $VIRSHHOST | perl -pe 's/.* (.*)\$/\$1/g'")
netw=" --network bridge=$brid,model=virtio"
diff --git a/ci/net.xml b/ci/net.xml
new file mode 100644
index 00000000..110428f1
--- /dev/null
+++ b/ci/net.xml
@@ -0,0 +1,5 @@
+<network>
+ <name>default</name>
+ <forward mode='bridge'/>
+ <bridge name='brAdm'/>
+</network>