xentaur

annotate examples/fabergeN @ 20:34d502d7e06c

*** empty log message ***
author igor
date Thu Sep 20 18:29:23 2007 +0300 (2007-09-20)
parents 360ec7b5616c
children
rev   line source
igor@16 1 try:
igor@16 2 from xenomips_vars import N
igor@16 3 except:
igor@16 4 print "can't find xenomips_vars module"
igor@16 5
igor@16 6 pae=1
igor@16 7
igor@16 8 if pae:
igor@16 9 kernel = "/boot/vmlinuz-2.6.18-4-xen-686"
igor@16 10 ramdisk = "/boot/initrd.img-2.6.18-4-xen-686"
igor@16 11 else:
igor@16 12 kernel = "/boot/vmlinuz-2.6.18-without-PAE-4-xen-686"
igor@16 13 ramdisk = "/boot/initrd.img-2.6.18-without-PAE-4-xen-686-domU"
igor@16 14
igor@16 15 #builder='linux'
igor@16 16 cpu_cap = 10
igor@16 17
igor@16 18
igor@16 19 ############################################################################################
igor@16 20 # Topology description
igor@19 21 #
igor@19 22 #
igor@16 23
igor@16 24 network='change-default-route'
igor@16 25
igor@16 26 domains = [ 'dyn1', 'dyn2', 'dyn3', 'qua4', 'qua5', 'qua6', 'qua7', 'qua8', 'qua9', ]
igor@16 27 domain_types = [ 'xenomips', 'xenomips', 'xenomips', 'quagga', 'quagga', 'quagga', 'quagga', 'quagga', 'quagga', ]
igor@16 28 bridges = [
igor@16 29 'vlan100',
igor@16 30 'vlan101',
igor@16 31 'vlan102',
igor@16 32 'vlan103',
igor@16 33 'vlan104',
igor@16 34 'vlan105',
igor@16 35 'vlan106',
igor@16 36 'vlan107',
igor@16 37 'vlan108',
igor@16 38 'vlan109',
igor@16 39 'vlan110',
igor@16 40 'vlan111',
igor@16 41 ]
igor@16 42
igor@16 43 vbridges_table ={
igor@16 44 'dyn1' : [ 'vlan101', 'vlan102' ],
igor@16 45 'dyn2' : [ 'vlan101', 'vlan103' ],
igor@16 46 'dyn3' : [ 'vlan102', 'vlan103', 'vlan104' ],
igor@16 47
igor@16 48 'qua4' : [ 'vlan105', 'vlan106', 'vlan111' ],
igor@16 49 'qua5' : [ 'vlan110', 'vlan111' ],
igor@16 50 'qua6' : [ 'vlan109', 'vlan110' ],
igor@16 51 'qua7' : [ 'vlan108', 'vlan109' ],
igor@16 52 'qua8' : [ 'vlan107', 'vlan108' ],
igor@16 53 'qua9' : [ 'vlan106', 'vlan107' ],
igor@16 54 }
igor@16 55
igor@16 56 hidden_bridges = []
igor@16 57 broken_links = []
igor@16 58 temporary_links = []
igor@16 59
igor@16 60 ############################################################################################
igor@16 61
igor@16 62 if domain_types[int(N)] == 'quagga':
igor@16 63 memory = 64
igor@16 64 else:
igor@16 65 memory = 400
igor@16 66
igor@16 67 xenomips_dir='/xen/images/'
igor@16 68 ios_name='C7200-JK.BIN'
igor@16 69
igor@16 70 #this instance configuration
igor@16 71 name = domains[int(N)]
igor@16 72
igor@16 73 vbridges = vbridges_table[name]
igor@16 74
igor@16 75 vif=[]
igor@16 76 x=1
igor@16 77 for i in vbridges:
igor@16 78 vif.append('bridge='+i+',mac=00:16:3e:01:'+hex(int(N))[2:]+':'+hex(int('c0',16)+x)[2:])
igor@16 79 x+=1
igor@16 80
igor@16 81 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' ]
igor@16 82 root = "/dev/hda1 ro"
igor@16 83
igor@16 84 xenomips='/xenomips/ios/'+ios_name+' -m 00:16:3e:01:'+hex(int(N))[2:]+':01'
igor@16 85
igor@16 86 #for i in range(len(vbridges)-2):
igor@16 87 # xenomips += ' -p '+str(i+1)+':PA-FE-TX'
igor@16 88 #
igor@16 89 #for i in range(len(vbridges)-1):
igor@16 90 # xenomips += ' -s '+str(i)+':0:gen_eth:eth'+str(i+1)
igor@16 91
igor@16 92 for i in range(len(vbridges)-1):
igor@16 93 xenomips += ' -p '+str(i+1)+':PA-FE-TX'
igor@16 94
igor@16 95 for i in range(len(vbridges)):
igor@16 96 xenomips += ' -s '+str(i)+':0:gen_eth:eth'+str(i)
igor@16 97
igor@16 98
igor@16 99 if domain_types[int(N)] == 'quagga':
igor@16 100 extra = "quagga"
igor@16 101 else:
igor@16 102 extra = "xenomips=\""+xenomips+"\""
igor@16 103
igor@16 104 on_poweroff = 'destroy'
igor@16 105 on_reboot = 'restart'
igor@16 106 on_crash = 'restart'