xentaur
diff examples/fabergeN @ 17:6d2b4b61733f
messages
author | igor |
---|---|
date | Thu Sep 20 16:34:22 2007 +0300 (2007-09-20) |
parents | |
children | aa20b6252730 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/examples/fabergeN Thu Sep 20 16:34:22 2007 +0300 1.3 @@ -0,0 +1,104 @@ 1.4 +try: 1.5 + from xenomips_vars import N 1.6 +except: 1.7 + print "can't find xenomips_vars module" 1.8 + 1.9 +pae=1 1.10 + 1.11 +if pae: 1.12 + kernel = "/boot/vmlinuz-2.6.18-4-xen-686" 1.13 + ramdisk = "/boot/initrd.img-2.6.18-4-xen-686" 1.14 +else: 1.15 + kernel = "/boot/vmlinuz-2.6.18-without-PAE-4-xen-686" 1.16 + ramdisk = "/boot/initrd.img-2.6.18-without-PAE-4-xen-686-domU" 1.17 + 1.18 +#builder='linux' 1.19 +cpu_cap = 10 1.20 + 1.21 + 1.22 +############################################################################################ 1.23 +# Topology description 1.24 + 1.25 +network='change-default-route' 1.26 + 1.27 +domains = [ 'dyn1', 'dyn2', 'dyn3', 'qua4', 'qua5', 'qua6', 'qua7', 'qua8', 'qua9', ] 1.28 +domain_types = [ 'xenomips', 'xenomips', 'xenomips', 'quagga', 'quagga', 'quagga', 'quagga', 'quagga', 'quagga', ] 1.29 +bridges = [ 1.30 + 'vlan100', 1.31 + 'vlan101', 1.32 + 'vlan102', 1.33 + 'vlan103', 1.34 + 'vlan104', 1.35 + 'vlan105', 1.36 + 'vlan106', 1.37 + 'vlan107', 1.38 + 'vlan108', 1.39 + 'vlan109', 1.40 + 'vlan110', 1.41 + 'vlan111', 1.42 + ] 1.43 + 1.44 +vbridges_table ={ 1.45 + 'dyn1' : [ 'vlan101', 'vlan102' ], 1.46 + 'dyn2' : [ 'vlan101', 'vlan103' ], 1.47 + 'dyn3' : [ 'vlan102', 'vlan103', 'vlan104' ], 1.48 + 1.49 + 'qua4' : [ 'vlan105', 'vlan106', 'vlan111' ], 1.50 + 'qua5' : [ 'vlan110', 'vlan111' ], 1.51 + 'qua6' : [ 'vlan109', 'vlan110' ], 1.52 + 'qua7' : [ 'vlan108', 'vlan109' ], 1.53 + 'qua8' : [ 'vlan107', 'vlan108' ], 1.54 + 'qua9' : [ 'vlan106', 'vlan107' ], 1.55 + } 1.56 + 1.57 +hidden_bridges = [] 1.58 +broken_links = [] 1.59 +temporary_links = [] 1.60 + 1.61 +############################################################################################ 1.62 + 1.63 +if domain_types[int(N)] == 'quagga': 1.64 + memory = 64 1.65 +else: 1.66 + memory = 400 1.67 + 1.68 +xenomips_dir='/xen/images/' 1.69 +ios_name='C7200-JK.BIN' 1.70 + 1.71 +#this instance configuration 1.72 +name = domains[int(N)] 1.73 + 1.74 +vbridges = vbridges_table[name] 1.75 + 1.76 +vif=[] 1.77 +x=1 1.78 +for i in vbridges: 1.79 + vif.append('bridge='+i+',mac=00:16:3e:01:'+hex(int(N))[2:]+':'+hex(int('c0',16)+x)[2:]) 1.80 + x+=1 1.81 + 1.82 +disk = [ 'file:'+xenomips_dir+'xenomips1.img,hda1,r', 'file:'+xenomips_dir+'xenomips-ios1.img,hda2,r', 'file:'+xenomips_dir+'xenomips-config'+N+'.img,hda3,w' ] 1.83 +root = "/dev/hda1 ro" 1.84 + 1.85 +xenomips='/xenomips/ios/'+ios_name+' -m 00:16:3e:01:'+hex(int(N))[2:]+':01' 1.86 + 1.87 +#for i in range(len(vbridges)-2): 1.88 +# xenomips += ' -p '+str(i+1)+':PA-FE-TX' 1.89 +# 1.90 +#for i in range(len(vbridges)-1): 1.91 +# xenomips += ' -s '+str(i)+':0:gen_eth:eth'+str(i+1) 1.92 + 1.93 +for i in range(len(vbridges)-1): 1.94 + xenomips += ' -p '+str(i+1)+':PA-FE-TX' 1.95 + 1.96 +for i in range(len(vbridges)): 1.97 + xenomips += ' -s '+str(i)+':0:gen_eth:eth'+str(i) 1.98 + 1.99 + 1.100 +if domain_types[int(N)] == 'quagga': 1.101 + extra = "quagga" 1.102 +else: 1.103 + extra = "xenomips=\""+xenomips+"\"" 1.104 + 1.105 +on_poweroff = 'destroy' 1.106 +on_reboot = 'restart' 1.107 +on_crash = 'restart'