当前位置: 首页>>代码示例>>Python>>正文


Python ConfigurableNode.configure方法代码示例

本文整理汇总了Python中mpx.lib.node.ConfigurableNode.configure方法的典型用法代码示例。如果您正苦于以下问题:Python ConfigurableNode.configure方法的具体用法?Python ConfigurableNode.configure怎么用?Python ConfigurableNode.configure使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在mpx.lib.node.ConfigurableNode的用法示例。


在下文中一共展示了ConfigurableNode.configure方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: configure

# 需要导入模块: from mpx.lib.node import ConfigurableNode [as 别名]
# 或者: from mpx.lib.node.ConfigurableNode import configure [as 别名]
    def configure(self, config):
        """method configure(): Called by MFW."""
        self.debug_print('Starting configuration...', 0)

        ConfigurableNode.configure(self, config)

        self.debug_print('Configuration complete.', 0)
开发者ID:mcruse,项目名称:monotone,代码行数:9,代码来源:InterfaceRouteNode.py

示例2: configure

# 需要导入模块: from mpx.lib.node import ConfigurableNode [as 别名]
# 或者: from mpx.lib.node.ConfigurableNode import configure [as 别名]
 def configure(self,config):
     ConfigurableNode.configure(self, config)
     message = ''
     if not (config.has_key('message') and config['message']):
         for var in self.variables:
             if message:
                 message += ', '
             message += '%s = ${%s}' % (var['vn'],var['vn'])
         set_attribute(self, 'message', message, {})
     else:
         set_attribute(self, 'message', REQUIRED, config)
     set_attribute(self, 'subject', '', config, str)
     set_attribute(self, 'send_retries', 3, config, int)
     set_attribute(self, 'enabled', 1, config, as_boolean)
     set_attribute(self, 'prodnode', '', config, str)
     set_attribute(self, 'eventmodule', '', config, str)
     set_attribute(self, 'eventclass', '', config, str)
     set_attribute(self, 'debug', 0, config, int)
     self._event_class = None
      # Try to import our specified event class.
     try:
         x = __import__(self.eventmodule, {}, {}, self.eventclass)
         self._event_class = eval('x.%s' % self.eventclass)
     except:
         msglog.log('broadway',msglog.types.WARN,
                    'Got exception trying to import event class.')
         msglog.exception()
     self._manager = self.parent.parent
开发者ID:mcruse,项目名称:monotone,代码行数:30,代码来源:trigger.py

示例3: configure

# 需要导入模块: from mpx.lib.node import ConfigurableNode [as 别名]
# 或者: from mpx.lib.node.ConfigurableNode import configure [as 别名]
 def configure( self, config ):
     set_attribute( self, 'enable', 0, config, int )   
     set_attribute( self, 'user_id', '', config )   
     set_attribute( self, 'password', '', config )   
     set_attribute( self, 'local_ip', '', config )   
     set_attribute( self, 'client_ip', '', config )   
     set_attribute( self, 'debug', 0, config, int )         
     ConfigurableNode.configure( self, config )
开发者ID:mcruse,项目名称:monotone,代码行数:10,代码来源:direct_ppp.py

示例4: configure

# 需要导入模块: from mpx.lib.node import ConfigurableNode [as 别名]
# 或者: from mpx.lib.node.ConfigurableNode import configure [as 别名]
	def configure(self, config):
		"""method configure(): Called by MFW."""
		self.debug_print('Starting configuration...', 0)
		
		ConfigurableNode.configure(self, config) # includes addition of "parent" attr
		
		try:
			self.parent.open()
		except termios.error, details:
			print 'termios.error: %s.' % str(details)
开发者ID:mcruse,项目名称:monotone,代码行数:12,代码来源:test_open.py

示例5: configure

# 需要导入模块: from mpx.lib.node import ConfigurableNode [as 别名]
# 或者: from mpx.lib.node.ConfigurableNode import configure [as 别名]
 def configure( self, config_dict ):     
     ConfigurableNode.configure( self, config_dict )
     set_attribute( self, 'enable', 0, config_dict, int )
     set_attribute( self, 'debug', 0, config_dict, int )
     
     set_attribute( self, 'ddns_service', 0, config_dict )
     set_attribute( self, 'ddns_acct', 0, config_dict )
     set_attribute( self, 'ddns_pswd', 0, config_dict )
     set_attribute( self, 'host_name', 0, config_dict )
     map_to_attribute( self, 'period', 0, config_dict, map_to_seconds )
开发者ID:mcruse,项目名称:monotone,代码行数:12,代码来源:dyndns.py

示例6: configure

# 需要导入模块: from mpx.lib.node import ConfigurableNode [as 别名]
# 或者: from mpx.lib.node.ConfigurableNode import configure [as 别名]
 def configure(self, config):
     set_attribute(self, 'debug', self.debug, config, int)
     self._init_debug()
     self.DEBUG3("configure(%r):\n", config)
     ConfigurableNode.configure(self, config)
     self._url = as_node_url(self)
     if self.output is REQUIRED:
         self.output = self.parent
     set_attribute(self, 'output', self.parent, config, self.as_deferred_node)
     set_attribute(self, 'input', REQUIRED, config, self.as_deferred_node)
     set_attribute(self, 'period', self.period, config, float)
     set_attribute(self, 'asyncOK', self.asyncOK, config, int)
     # in cov mode, only changing values are driven.
     set_attribute(self, 'cov_mode', self.cov_mode, config, int)
     set_attribute(self, 'enabled', 1, config, as_boolean)
     set_attribute(self, 'backoff_on_failure', 0, config, as_boolean)
     set_attribute(self, 'conversion', self.conversion, config, str)
     self._period = self.period
     return
开发者ID:mcruse,项目名称:monotone,代码行数:21,代码来源:__init__.py

示例7: configure

# 需要导入模块: from mpx.lib.node import ConfigurableNode [as 别名]
# 或者: from mpx.lib.node.ConfigurableNode import configure [as 别名]
 def configure(self, config):
     if config.has_key("node"):
         self._Alias__node = config["node"]
     elif config.has_key("node_url"):
         set_attribute(self, "node_url", REQUIRED, config)
     return ConfigurableNode.configure(self, config)
开发者ID:mcruse,项目名称:monotone,代码行数:8,代码来源:__init__.py

示例8: configure

# 需要导入模块: from mpx.lib.node import ConfigurableNode [as 别名]
# 或者: from mpx.lib.node.ConfigurableNode import configure [as 别名]
 def configure( self, config_dict ):     
     ConfigurableNode.configure( self, config_dict )
     set_attribute( self, 'debug', 0, config_dict, int )
开发者ID:mcruse,项目名称:monotone,代码行数:5,代码来源:storage.py

示例9: configure

# 需要导入模块: from mpx.lib.node import ConfigurableNode [as 别名]
# 或者: from mpx.lib.node.ConfigurableNode import configure [as 别名]
 def configure(self,config):
     ConfigurableNode.configure(self, config)
     set_attribute(self, self.ION, self.parent, config, as_node)
     set_attribute(self, self.MULTIPLIER, REQUIRED, config)
开发者ID:mcruse,项目名称:monotone,代码行数:6,代码来源:dg50.py

示例10: configure

# 需要导入模块: from mpx.lib.node import ConfigurableNode [as 别名]
# 或者: from mpx.lib.node.ConfigurableNode import configure [as 别名]
 def configure(self, dict):
     ConfigurableNode.configure(self, dict)
         
     set_attribute(self, 'debug', 0, dict, as_boolean)            
     set_attribute(self, 'value', None, dict)     
     set_attribute(self, '__node_id__', '120075', dict)
开发者ID:mcruse,项目名称:monotone,代码行数:8,代码来源:dynamic_children.py

示例11: configure

# 需要导入模块: from mpx.lib.node import ConfigurableNode [as 别名]
# 或者: from mpx.lib.node.ConfigurableNode import configure [as 别名]
 def configure(self, cd):
     ConfigurableNode.configure(self,cd)
     set_attribute(self,'www_file_path','/test_html_node.xyz',cd,str)
     html_str = '<a href=%s>Download File</a>' % self.www_file_path
     set_attribute(self,'HTML_target_file',html_str,cd,str)
     return
开发者ID:mcruse,项目名称:monotone,代码行数:8,代码来源:test_html.py

示例12: configure

# 需要导入模块: from mpx.lib.node import ConfigurableNode [as 别名]
# 或者: from mpx.lib.node.ConfigurableNode import configure [as 别名]
 def configure(self,config):
     ConfigurableNode.configure(self,config)
     set_attribute(self, 'bit', REQUIRED, config, int)
开发者ID:mcruse,项目名称:monotone,代码行数:5,代码来源:enx.py

示例13: configure

# 需要导入模块: from mpx.lib.node import ConfigurableNode [as 别名]
# 或者: from mpx.lib.node.ConfigurableNode import configure [as 别名]
 def configure(self, config):
     ConfigurableNode.configure(self, config)
     # set ion attribute to be a reference to parent.
     set_attribute(self, 'ion', self.parent, config, as_node)
     set_attribute(self, 'divisor', REQUIRED, config, float)
开发者ID:mcruse,项目名称:monotone,代码行数:7,代码来源:temperature.py


注:本文中的mpx.lib.node.ConfigurableNode.configure方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。