Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 24 lines (16 sloc) 0.898 kB
f77e728 Initial import of hg.uk.xensource.com/carbon/trunk/api.hg c/s 9691:9a…
Xen hg user authored
1 #!/bin/bash
2
3 set -e
4
13b8348 @jonludlam Move everything over to using Fhs.ml / @ substitution
jonludlam authored
5 . @INVENTORY@
f77e728 Initial import of hg.uk.xensource.com/carbon/trunk/api.hg c/s 9691:9a…
Xen hg user authored
6
c5781d0 interface-reconfigure: exclude VLANs when setting up test environment
Ian Campbell authored
7 names=$(xe pif-list host-uuid="$INSTALLATION_UUID" management=false params=device VLAN=-1 --minimal | sed -e 's/,/+/g')
8 pifs=$(xe pif-list host-uuid="$INSTALLATION_UUID" management=false VLAN=-1 --minimal)
f77e728 Initial import of hg.uk.xensource.com/carbon/trunk/api.hg c/s 9691:9a…
Xen hg user authored
9
10 echo "Creating network associated with $names"
11 BOND_NET=$(xe network-create name-label="Pool-wide network associated with $names")
12
13 BOND=$(xe bond-create network-uuid=$BOND_NET pif-uuids="$pifs")
14
15 PIF=$(xe bond-list params=master uuid=$BOND --minimal)
16
17 xe pif-list host-uuid="$INSTALLATION_UUID" management=false VLAN=-1 --minimal | sed -e 's/,/\n/g' | while read PIF ; do
18 name=$(xe pif-param-get uuid=$PIF param-name=network-name-label)
19 VLAN_NR=$(( $RANDOM % 255 ))
20 echo "Creating $name vlan $VLAN_NR"
21 NET=$(xe network-create name-label="$name vlan $VLAN_NR")
22 VLAN=$(xe vlan-create network-uuid=$NET pif-uuid=$PIF vlan=$VLAN_NR)
23 done
Something went wrong with that request. Please try again.