- Timestamp:
- Mar 3, 2014 10:16:51 AM (11 years ago)
- Branches:
- master
- Children:
- 26821ac, 2c16731, 7862660
- Parents:
- 0608d96
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/federation/desktop_access.py
r0608d96 rea0e8cb 68 68 # File containing the routing entries for external networks 69 69 self.external_networks = config.get('access', 'external_networks') 70 # Comma-separated list of interfaces to export (may be empty) 71 self.export_interfaces = config.get('access', 'export_interfaces') 72 if self.export_interfaces is not None: 73 self.export_interfaces = \ 74 [ x.strip() for x in self.export_interfaces.split(',')] 75 else: 76 self.export_interfaces = [] 77 78 # Comma separated list of connected nets to export - these won't work 79 # in external_networks 80 self.export_networks = config.get('access', 'export_networks') 81 if self.export_networks is not None: 82 self.export_networks = \ 83 [ x.strip() for x in self.export_networks.split(',')] 84 else: 85 self.export_networks = [] 86 70 87 # values for locations of zebra and ospfd. 71 88 self.zebra = config.get('access', 'zebra') … … 454 471 print >>f, 'hostname %s' % my_name 455 472 print >>f, 'interface tap0' 473 for i in self.export_interfaces: 474 print >>f, 'interface %s' % i 456 475 if self.external_networks is not None: 457 476 try: … … 471 490 print >>f, ' redistribute static' 472 491 print >>f, ' network %s/24 area 0.0.0.2' % my_addr 492 for i in self.export_networks: 493 print >>f, ' network %s area 0.0.0.2' % i 473 494 except EnvironmentError, e: 474 495 raise service_error(service_error.internal, 475 496 'Cannot create connect %s: %s' % (e.filename, e.strerror)) 476 497 script_log = open('/tmp/connect.log', 'w') 477 subprocess.Popen(['sudo', '/bin/sh', cscript], stdout=script_log, stderr=script_log) 498 subprocess.Popen(['sudo', '/bin/sh', cscript], stdout=script_log, 499 stderr=script_log) 478 500 return True 479 501
Note: See TracChangeset
for help on using the changeset viewer.