本文整理汇总了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)
示例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
示例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)
示例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)
示例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
示例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
示例7: configure
# 需要导入模块: from mpx.service import ServiceNode [as 别名]
# 或者: from mpx.service.ServiceNode import configure [as 别名]
def configure(self,config):
ServiceNode.configure(self,config)
示例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
示例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
示例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
示例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