xentaur

annotate examples/icnd2.py @ 66:aaf034af3a35

Merge of Xgurulla into Xentaur code. Not completed yet!!!

Now Xentaur can work with Amazon EC2,
but only with. Local domains management
is switched off temporarily.
author Igor Chubin <igor@chub.in>
date Sat Jan 09 20:20:08 2010 +0200 (2010-01-09)
parents
children
rev   line source
igor@57 1 import os
igor@57 2 domain=os.environ['xendomain']
igor@57 3
igor@57 4 network='icnd2'
igor@57 5
igor@57 6 domains = [
igor@57 7 'r1', 'r2', 'r3', 'r4', 'core',
igor@57 8 'sw1', 'sw2', 'sw3',
igor@57 9 'win1', 'win2', 'win3',
igor@57 10 'linux'
igor@57 11 ]
igor@57 12 domain_types = [
igor@57 13 'cisco', 'cisco', 'cisco', 'cisco', 'cisco',
igor@57 14 'catalyst', 'catalyst', 'catalyst',
igor@57 15 'windows' , 'windows' , 'windows' ,
igor@57 16 'linux'
igor@57 17 ]
igor@57 18 bridges = [
igor@57 19 'sw1', 'sw2', 'sw3',
igor@57 20 'cross4', 'cross5', 'cross6', 'cross7', 'cross8', 'cross9', 'cross10'
igor@57 21 ]
igor@57 22
igor@57 23 vbridges_table ={
igor@57 24 'r1': ['sw1:fa0/0', 'cross4:s0/0', 'cross5:s0/1'],
igor@57 25 'r2': ['sw2:fa0/0', 'cross6:s0/0', 'cross5:s0/1'],
igor@57 26 'r3': ['sw3:fa0/0', 'cross7:s0/0', 'cross8:s0/1'],
igor@57 27 'r4': ['cross9', 'cross8'],
igor@57 28 'core': ['cross4:s0/0','cross6:s0/1','cross7:s0/2','cross9:s0/3', 'cross10:eth0/0' ],
igor@57 29 'win1': ['sw1'],
igor@57 30 'win2': ['sw2'],
igor@57 31 'win3': ['sw3'],
igor@57 32 'linux': ['cross10'],
igor@57 33 }
igor@57 34
igor@57 35 bridge_bridge_table = {
igor@57 36 }
igor@57 37
igor@57 38 hidden_bridges = []
igor@57 39 cross_bridges= [ 'cross4', 'cross5', 'cross6', 'cross7', 'cross8', 'cross9', 'cross10' ]
igor@57 40
igor@57 41 broken_links = []
igor@57 42 temporary_links = []
igor@57 43
igor@57 44 real_bridges=['sw1', 'sw2', 'sw3',]
igor@57 45 real_nodes=['r1','r2','r3', 'r4', 'core', 'win1', 'win2', 'win3', 'linux']
igor@57 46
igor@57 47 N=domains.index(domain)
igor@57 48 if domain_types[N] == 'quagga':
igor@57 49 memory = 64
igor@57 50 else:
igor@57 51 memory = 400
igor@57 52
igor@57 53 xenomips_dir='/home/nata/xenomips-images/'
igor@57 54 ios_name='C7200-AD.BIN'
igor@57 55 npe_type='npe-400'
igor@57 56
igor@57 57 connection_table={
igor@57 58 'sw1' : 'minicom -o ttyV0',
igor@57 59 'sw2' : 'minicom -o ttyV1',
igor@57 60 'sw3' : 'minicom -o ttyV2',
igor@57 61 'r1' : 'minicom -o ttyV3',
igor@57 62 'r2' : 'minicom -o ttyV4',
igor@57 63 'r3' : 'minicom -o ttyV5',
igor@57 64 'r4' : 'minicom -o ttyV7',
igor@57 65 'core' : 'minicom -o ttyV6',
igor@57 66 }
igor@57 67
igor@57 68
igor@57 69 # connection types:
igor@57 70 # minicom
igor@57 71 # vnc
igor@57 72 # rdesktop
igor@57 73