예제 #1
0
 def configure(self, config):
     if self.debug:
         msg = 'Inside Configure api '
         msglog.log('Energywise:', msglog.types.INFO, msg )
         msg = 'sys path %s'
         msglog.log('Energywise:', msglog.types.INFO, msg %sys.path)
     Node.configure(self, config)
     set_attribute(self, 'ttl', 30, config, int)
     set_attribute(self, 'debug', 0, config, int)
     set_attribute(self, 'address', REQUIRED, config)
     set_attribute(self, 'shared_secret', REQUIRED, config)
     set_attribute(self, 'cpex_port', 43440, config, int)
     set_attribute(self, 'primary', False, config, as_boolean)
     #SNMP is taken as default for reverse compatibility
     set_attribute(self, 'protocol', 'SNMP', config, 
                   self.as_protocol_name)
     set_attribute(self, 'snmp_batch_size', 50, config, int)
     if self.debug:
         msg = 'Configured address  %s '
         msglog.log('Energywise:', msglog.types.INFO, msg %self.address)
     if not self.domain:
         self.domain = _find_domain(self)
         if self.debug:
             msg = 'Configured CPEX domain %s '
             msglog.log('Energywise:', msglog.types.INFO, msg %self.domain)
     set_attribute(self,'snmp_version', REQUIRED, config)
     if self.debug:
         msg = 'Configured snmp_version %s'
         msglog.log('Energywise:', msglog.types.INFO, msg %self.snmp_version)
     set_attribute(self,'community_name',REQUIRED, config)
     if self.debug:
         msg = 'Configured community_name %s'
         msglog.log('Energywise:', msglog.types.INFO,
                                   msg %self.community_name)
     set_attribute(self,'security_name','default', config)
     if self.debug:
         msg = 'Configured security_name %s'
         msglog.log('Energywise:', msglog.types.INFO,
                                   msg %self.security_name)
     set_attribute(self,'user_name',' ', config)
     set_attribute(self,'authentication_protocol','usmNoAuthProtocol',
                   config)
     set_attribute(self,'authentication_key',' ', config)
     set_attribute(self,'privacy_protocol','usmNoPrivProtocol', config)
     set_attribute(self,'privacy_key', ' ',config)
     return
예제 #2
0
 def configure(self, config):
      Node.configure(self, config)
      set_attribute(self, 'ttl', 30, config, int)
      return
예제 #3
0
 def configure(self, config):
     Node.configure(self, config)
     set_attribute(self, 'auto_discover', 1, config, as_boolean)
     set_attribute(self, 'debug', 0, config, as_boolean)
     return
예제 #4
0
 def configure(self, config):
     Node.configure(self, config)
     set_attribute(self, "auto_discover", 1, config, as_boolean)
     set_attribute(self, "debug", 0, config, as_boolean)
     return
예제 #5
0
파일: level.py 프로젝트: mcruse/monotone
 def configure(self,config):
     Node.configure(self,config)
     # set_attribute(self, '', REQUIRED, config, int)
     return
예제 #6
0
 def configure(self, config):
     Node.configure(self, config)
     set_attribute(self, 'group', REQUIRED, config, int)
     return
예제 #7
0
파일: network.py 프로젝트: mcruse/monotone
 def configure(self,config):
     Node.configure(self,config)
     set_attribute(self, 'network_path', REQUIRED, config)
     return