本文整理汇总了Python中zmon_worker_monitor.adapters.ifunctionfactory_plugin.propartial函数的典型用法代码示例。如果您正苦于以下问题:Python propartial函数的具体用法?Python propartial怎么用?Python propartial使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了propartial函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: create
def create(self, factory_ctx):
"""
Automatically called to create the check function's object
:param factory_ctx: (dict) names available for Function instantiation
:return: an object that implements a check function
"""
return propartial(SAMLWrapper, url=self.saml_url, user=self.username, password=self.__password)
示例2: create
def create(self, factory_ctx):
"""
Automatically called to create the check function's object
:param factory_ctx: (dict) names available for Function instantiation
:return: an object that implements a check function
"""
return propartial(ElasticsearchWrapper, url=self._url)
示例3: create
def create(self, factory_ctx):
"""
Automatically called to create the check function's object
:param factory_ctx: (dict) names available for Function instantiation
:return: an object that implements a check function
"""
return propartial(MongoDBWrapper, host=factory_ctx.get('host'))
示例4: create
def create(self, factory_ctx):
"""
Automatically called to create the check function's object
:param factory_ctx: (dict) names available for Function instantiation
:return: an object that implements a check function
"""
return propartial(ScalyrWrapper, read_key=self.read_key, scalyr_region=self.scalyr_region)
示例5: create
def create(self, factory_ctx):
"""
Automatically called to create the check function's object
:param factory_ctx: (dict) names available for Function instantiation
:return: an object that implements a check function
"""
return propartial(CloudwatchWrapper, region=factory_ctx.get('entity').get('region', None))
示例6: create
def create(self, factory_ctx):
"""
Automatically called to create the check function's object
:param factory_ctx: (dict) names available for Function instantiation
:return: an object that implements a check function
"""
return propartial(ZmonWrapper, factory_ctx['redis_host'], factory_ctx['redis_port'])
示例7: create
def create(self, factory_ctx):
"""
Automatically called to create the check function's object
:param factory_ctx: (dict) names available for Function instantiation
:return: an object that implements a check function
"""
return propartial(JoblocksWrapper, cmdb_url=self.cmdb_url, project=factory_ctx['entity'].get('name'))
示例8: create
def create(self, factory_ctx):
"""
Automatically called to create the check function's object
:param factory_ctx: (dict) names available for Function instantiation
:return: an object that implements a check function
"""
return propartial(ExaplusWrapper, cluster=self._exacrm_cluster, password=self._exacrm_pass,
user=self._exacrm_user)
示例9: create
def create(self, factory_ctx):
"""
Automatically called to create the check function's object
:param factory_ctx: (dict) names available for Function instantiation
:return: an object that implements a check function
"""
return propartial(SqlOracleWrapper, factory_ctx['host'], factory_ctx['port'], factory_ctx['entity'].get('sid'),
user=self._user, password=self._pass)
示例10: create
def create(self, factory_ctx):
"""
Automatically called to create the check function's object
:param factory_ctx: (dict) names available for Function instantiation
:return: an object that implements a check function
"""
return propartial(MySqlWrapper, shards=factory_ctx['shards'], user=self._user, password=self._pass,
timeout=factory_ctx['soft_time_limit'] * 1000)
示例11: create
def create(self, factory_ctx):
"""
Automatically called to create the check function's object
:param factory_ctx: (dict) names available for Function instantiation
:return: an object that implements a check function
"""
return propartial(CounterWrapper, key_prefix='{}:{}:'.format(factory_ctx['check_id'], factory_ctx['entity_id']),
redis_host=factory_ctx['redis_host'], redis_port=factory_ctx['redis_port'])
示例12: create
def create(self, factory_ctx):
"""
Automatically called to create the check function's object
:param factory_ctx: (dict) names available for Function instantiation
:return: an object that implements a check function
"""
seeds = factory_ctx.get('entity', {}).get('seeds') or factory_ctx.get('host')
return propartial(CassandraWrapper, node=seeds, username=self._username, password=self._password)
示例13: create
def create(self, factory_ctx):
"""
Automatically called to create the check function's object
:param factory_ctx: (dict) names available for Function instantiation
:return: an object that implements a check function
"""
return propartial(
AppdynamicsWrapper, url=self._url, username=self._user, password=self._pass, es_url=self._es_url,
index_prefix=self._index_prefix)
示例14: create
def create(self, factory_ctx):
"""
Automatically called to create the check function's object
:param factory_ctx: (dict) names available for Function instantiation
:return: an object that implements a check function
"""
return propartial(EntitiesWrapper,
infrastructure_account=factory_ctx.get('entity', {}).get('infrastructure_account', None),
service_url=self.service_url, oauth2=self.oauth2)
示例15: create
def create(self, factory_ctx):
"""
Automatically called to create the check function's object
:param factory_ctx: (dict) names available for Function instantiation
:return: an object that implements a check function
"""
# load plugins dependencies and store them locally for efficiency
if not self.counter_factory:
self.counter_factory = plugin_manager.get_plugin_obj_by_name('counter', 'Function')
return propartial(MemcachedWrapper, counter=self.counter_factory.create(factory_ctx), host=factory_ctx['host'])