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


Python ServiceNode.configure方法代码示例

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


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

示例1: configure

# 需要导入模块: from mpx.service import ServiceNode [as 别名]
# 或者: from mpx.service.ServiceNode import configure [as 别名]
 def configure(self, config):
     ServiceNode.configure(self, config)
     set_attribute(self, 'heating', REQUIRED, config, as_node)
     set_attribute(self, 'cooling', REQUIRED, config, as_node)
     set_attribute(self, 'temperature', REQUIRED, config, as_node)
     set_attribute(self, 'minimum', REQUIRED, config, float)
     set_attribute(self, 'maximum', REQUIRED, config, float)
开发者ID:mcruse,项目名称:monotone,代码行数:9,代码来源:service.py

示例2: configure

# 需要导入模块: from mpx.service import ServiceNode [as 别名]
# 或者: from mpx.service.ServiceNode import configure [as 别名]
 def configure(self, config):
     ServiceNode.configure(self, config)
     set_attribute(self, 'log', self.parent.parent, config, as_node)
     set_attribute(self, 'gm_time', 1, config, as_boolean)
     self.time_function = time.localtime
     if self.gm_time:
         self.time_function = time.gmtime
开发者ID:mcruse,项目名称:monotone,代码行数:9,代码来源:_exporter.py

示例3: configure

# 需要导入模块: from mpx.service import ServiceNode [as 别名]
# 或者: from mpx.service.ServiceNode import configure [as 别名]
 def configure(self, config):
     set_attribute(self, 'debug', 0, config, int)
     set_attribute(self, 'ip', '', config)
     default = '${mpx.properties.%s_PORT}' % self.server_type
     set_attribute(self,'port',default,config,int)
     set_attribute(self,'user_manager',
                   as_node('/services/User Manager'),config,as_node)
     set_attribute(self,'authentication','form',config)
     if (self.authentication is not None and
         self.authentication not in ('digest','basic','form')):
         raise EInvalidValue('authentication',self.authentication,
                             'Authentication scheme not recognized.')
     set_attribute(self,'port',default,config,int)
     set_attribute(self, 'maintenance_interval', 25, config, int)
     set_attribute(self, 'zombie_timeout', 600, config, int)
     set_attribute(self, 'thread_count', 3, config, int)        
     if not self.has_child("Request Responder"):
         self._setup_request_responder()
     if not self.has_child("Authenticator"):
         self._setup_authentication_handler()
     if not self.has_child("PSP Handler"):
         self._setup_psp_handler()
     if not self.has_child("JSON-RPC Handler"):
         self._setup_json_handler()
     ServiceNode.configure(self, config)
开发者ID:mcruse,项目名称:monotone,代码行数:27,代码来源:__init__.py

示例4: configure

# 需要导入模块: from mpx.service import ServiceNode [as 别名]
# 或者: from mpx.service.ServiceNode import configure [as 别名]
 def configure(self, config):
     ServiceNode.configure(self, config)
     set_attribute(self, 'server_url', REQUIRED, config)
     set_attribute(self, 'node', REQUIRED, config)
     set_attribute(self, 'period', 30, config, int)
     set_attribute(self,'connection','/services/network',config,as_node)
     set_attribute(self,'timeout',60,config,int)
开发者ID:mcruse,项目名称:monotone,代码行数:9,代码来源:sie_command.py

示例5: configure

# 需要导入模块: from mpx.service import ServiceNode [as 别名]
# 或者: from mpx.service.ServiceNode import configure [as 别名]
 def configure(self,config):
     ServiceNode.configure(self,config)
     set_attribute(self,'connection','/services/network',config,as_node)
     set_attribute(self,'timeout',60,config,int)
     set_attribute(self, 'gm_time', 1, config, as_boolean)
     self.time_function = time.localtime
     if self.gm_time:
         self.time_function = time.gmtime
开发者ID:mcruse,项目名称:monotone,代码行数:10,代码来源:exporter.py

示例6: configure

# 需要导入模块: from mpx.service import ServiceNode [as 别名]
# 或者: from mpx.service.ServiceNode import configure [as 别名]
 def configure(self, config):
     ServiceNode.configure(self, config)
     set_attribute(self, 'security_level', 'NoSec', config)
     msglog.log('broadway', msglog.types.INFO,
                'RNA_Socket.configure: security_level = %s.' % self.security_level)
     self.transportClass = SimpleTcpService
     if (self.security_level == 'Auth-Only') \
         or (self.security_level == 'Full-Enc'):
         self.transportClass = SrnaService
     # Handle changes to the enabled attribute, once we've started.
     if self.enabled != self.was_enabled:
         if self.enabled:
             if self.start_count and self._start():
                 self.start_count += 1
                 self.was_enabled = self.enabled
         elif self.start_count > self.stop_count:
             self.stop_count += 1
             self._stop()
     return
开发者ID:mcruse,项目名称:monotone,代码行数:21,代码来源:rna.py

示例7: configure

# 需要导入模块: from mpx.service import ServiceNode [as 别名]
# 或者: from mpx.service.ServiceNode import configure [as 别名]
 def configure(self,config):
     ServiceNode.configure(self,config)
开发者ID:mcruse,项目名称:monotone,代码行数:4,代码来源:garbage_collector.py

示例8: configure

# 需要导入模块: from mpx.service import ServiceNode [as 别名]
# 或者: from mpx.service.ServiceNode import configure [as 别名]
 def configure(self,config): 
     ServiceNode.configure(self,config)
     set_attribute(self, 'minimum_size', 250, config, int)
     set_attribute(self, 'maximum_size', 500, config, int)
     self.log = mpx.lib.log.TrimmingLog(self.name)
     return
开发者ID:mcruse,项目名称:monotone,代码行数:8,代码来源:log.py

示例9: configure

# 需要导入模块: from mpx.service import ServiceNode [as 别名]
# 或者: from mpx.service.ServiceNode import configure [as 别名]
 def configure(self, config):
     ServiceNode.configure(self,config)
     set_attribute(self,'default_log','/services/logger/local_view',config)
     set_attribute(self,'use_cache', 1, config, int)
     set_attribute(self,'debug', 1, config, int)
     return
开发者ID:mcruse,项目名称:monotone,代码行数:8,代码来源:log_helper.py

示例10: configure

# 需要导入模块: from mpx.service import ServiceNode [as 别名]
# 或者: from mpx.service.ServiceNode import configure [as 别名]
 def configure(self, cd):
     ServiceNode.configure(self, cd)
     set_attribute(self, "allow_ftp", "1", cd, int)
     return
开发者ID:mcruse,项目名称:monotone,代码行数:6,代码来源:webdev.py

示例11: configure

# 需要导入模块: from mpx.service import ServiceNode [as 别名]
# 或者: from mpx.service.ServiceNode import configure [as 别名]
 def configure(self, config):
     ServiceNode.configure(self, config)
     if self._id_manager is None:
         self._id_manager = UniqueID(self)
     return
开发者ID:mcruse,项目名称:monotone,代码行数:7,代码来源:__init__.py


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