def configure(self, config):
     try:
         ct ={}
         ct['LAN'] = '/services/network'
         ct['Dial out'] = '/interfaces/modem/ppp0/outgoing'
         config['connection_node'] = ct[config['connection_type']]
         del config['connection_type']    
         PeriodicExporter.configure(self, config)
     except KeyError,e:
         msg = '"' + str(config['connection_type']) + '"' + ' NOT supported'
         raise EAttributeError(msg )
示例#2
0
 def configure(self, config):
     try:
         ct = {}
         ct['LAN'] = '/services/network'
         ct['Dial out'] = '/interfaces/modem/ppp0/outgoing'
         config['connection_node'] = ct[config['connection_type']]
         del config['connection_type']
         PeriodicExporter.configure(self, config)
     except KeyError, e:
         msg = '"' + str(config['connection_type']) + '"' + ' NOT supported'
         raise EAttributeError(msg)
示例#3
0
    def configuration(self):
        config = PeriodicExporter.configuration(self)
        ct = {}
        ct['/services/network'] = 'LAN'
        ct['/interfaces/modem/ppp0/outgoing'] = 'Dial out'
        config['connection_type'] = ct[config['connection_node']]
        del config['connection_node']

        return config
 def configuration(self):
     config = PeriodicExporter.configuration(self)
     ct = {}
     ct['/services/network'] = 'LAN'
     ct['/interfaces/modem/ppp0/outgoing'] = 'Dial out'
     config['connection_type'] =ct[config['connection_node']]
     del config['connection_node']
     
     
     return config