xentaur

changeset 37:3245e12b66d5

+example1
author igor
date Tue Sep 25 23:31:23 2007 +0300 (2007-09-25)
parents 7bf7abe92123
children f71b298798c2
files examples/example1.py
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/examples/example1.py	Tue Sep 25 23:31:23 2007 +0300
     1.3 @@ -0,0 +1,40 @@
     1.4 +import os
     1.5 +domain=os.environ['xendomain']
     1.6 +
     1.7 +network='netw'
     1.8 +
     1.9 +domains =       [ 'qua1',   'qua2',   'dyn3',     'qua4',   'qua5',   'dyn6',   ]
    1.10 +domain_types =  [ 'quagga', 'quagga', 'xenomips', 'quagga', 'quagga', 'xenomips', ]
    1.11 +bridges =       [
    1.12 +                  'br1',
    1.13 +                  'br2',
    1.14 +                  'br3',
    1.15 +                  'br4',
    1.16 +                  'br5',
    1.17 +                  'br6',
    1.18 +                ]
    1.19 +
    1.20 +vbridges_table ={
    1.21 +                  'qua1'    : [ 'br1' ],
    1.22 +		  'qua2'    : [ 'br2', 'br5' ],
    1.23 +		  'dyn3'    : [ 'br1', 'br2', 'br3' ],
    1.24 +		  'qua4'    : [ 'br3', 'br4', 'br6' ],
    1.25 +		  'qua5'    : [ 'br4' ],
    1.26 +		  'dyn6'    : [ 'br5',  'br6' ],
    1.27 +  
    1.28 +		  }
    1.29 +
    1.30 +hidden_bridges = []
    1.31 +broken_links = []
    1.32 +temporary_links = []
    1.33 +
    1.34 +N=domains.index(domain)
    1.35 +if domain_types[N] == 'quagga':
    1.36 +    memory = 64
    1.37 +else:
    1.38 +    memory = 400
    1.39 +
    1.40 +xenomips_dir='/home/nata/xenomips-images/'
    1.41 +ios_name='C7200-AD.BIN'
    1.42 +npe_type='npe-400'
    1.43 +