xentaur

diff xendomain.py @ 45:9c7a4cfa9738

many platforms support
author igor
date Wed Oct 24 15:17:30 2007 +0300 (2007-10-24)
parents 04f0c6694d1e
children b67ffcdd0043
line diff
     1.1 --- a/xendomain.py	Wed Oct 24 14:53:12 2007 +0300
     1.2 +++ b/xendomain.py	Wed Oct 24 15:17:30 2007 +0300
     1.3 @@ -58,9 +58,13 @@
     1.4  if platform == '7200':
     1.5      npe_option=" -t "+npe_type
     1.6  
     1.7 -xenomips='/xenomips/ios/'+ios_name+platform_option+npe_option+' -m 00:16:3e:01:'+hex(int(N))[2:]+':01'
     1.8 +mac_option=' -m 00:16:3e:01:'+hex(int(N))[2:]+':01'
     1.9 +if platform != '7200':
    1.10 +    mac_option =''
    1.11  
    1.12 -defult_network_module={
    1.13 +xenomips='/xenomips/ios/'+ios_name+platform_option+npe_option+mac_option
    1.14 +
    1.15 +default_network_module={
    1.16      '7200' : 'PA-FE-TX',
    1.17      '3600' : 'NM-1FE-TX',
    1.18      '3725' : 'NM-1FE-TX',
    1.19 @@ -69,8 +73,9 @@
    1.20  }
    1.21  network_module=default_network_module[platform]
    1.22  
    1.23 -for i in range(len(vbridges)-1):
    1.24 - xenomips += ' -p '+str(i+1)+':'+network_module
    1.25 +for i in range(len(vbridges)):
    1.26 +    if platform!= '7200' or i!=0:
    1.27 +        xenomips += ' -p '+str(i)+':'+network_module
    1.28  
    1.29  for i in range(len(vbridges)):
    1.30   xenomips += ' -s '+str(i)+':0:gen_eth:eth'+str(i)