xen-drbd
diff xen-drbd-start.py @ 38:30671fe7fd79
Now you can use 'domain' variable inside netowrk topology file
author | igor@manas.xt.vpn |
---|---|
date | Thu Sep 18 11:42:52 2008 +0300 (2008-09-18) |
parents | 44efea4507ac |
children | 26d7bae7dcde |
line diff
1.1 --- a/xen-drbd-start.py Sat Aug 30 11:14:50 2008 +0300 1.2 +++ b/xen-drbd-start.py Thu Sep 18 11:42:52 2008 +0300 1.3 @@ -7,9 +7,10 @@ 1.4 1.5 import sys 1.6 1.7 -sys.path.append('/etc/xen') 1.8 +#sys.path.append('/etc/xen') 1.9 + 1.10 try: 1.11 - exec 'from %s import *' % (network) 1.12 + execfile(network) 1.13 except: 1.14 print "Can't find or interpret module %s with topology description" %(network) 1.15 sys.exit(1) 1.16 @@ -28,8 +29,15 @@ 1.17 stdvga=0 1.18 serial='pty' 1.19 1.20 -memory=mem_table[domain] 1.21 -vcpus=vcpus_table[domain] 1.22 +try: 1.23 + memory=mem_table[domain] 1.24 +except: 1.25 + pass 1.26 + 1.27 +try: 1.28 + vcpus=vcpus_table[domain] 1.29 +except: 1.30 + pass 1.31 1.32 disk=[] 1.33 if domain_types[N] == 'hvm':