本文整理汇总了Python中remote.remote_util.RemoteMachineShellConnection.pause_memcached方法的典型用法代码示例。如果您正苦于以下问题:Python RemoteMachineShellConnection.pause_memcached方法的具体用法?Python RemoteMachineShellConnection.pause_memcached怎么用?Python RemoteMachineShellConnection.pause_memcached使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类remote.remote_util.RemoteMachineShellConnection
的用法示例。
在下文中一共展示了RemoteMachineShellConnection.pause_memcached方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_capi_with_memcached_crash
# 需要导入模块: from remote.remote_util import RemoteMachineShellConnection [as 别名]
# 或者: from remote.remote_util.RemoteMachineShellConnection import pause_memcached [as 别名]
def test_capi_with_memcached_crash(self):
bucket = self._input.param("bucket", 'default')
repl_id = self._start_es_replication(bucket=bucket)
rest_conn = RestConnection(self.src_master)
rest_conn.pause_resume_repl_by_id(repl_id, REPL_PARAM.PAUSE_REQUESTED, 'true')
gen = DocumentGenerator('es', '{{"key":"value","mutated":0}}', xrange(100), start=0, end=self._num_items)
self.src_cluster.load_all_buckets_from_generator(gen)
rest_conn.pause_resume_repl_by_id(repl_id, REPL_PARAM.PAUSE_REQUESTED, 'false')
self.async_perform_update_delete()
conn = RemoteMachineShellConnection(self.src_master)
conn.pause_memcached()
conn.unpause_memcached()
self.sleep(30)
self._wait_for_es_replication_to_catchup()
self._verify_es_results(bucket=bucket)
示例2: _pause_memcached
# 需要导入模块: from remote.remote_util import RemoteMachineShellConnection [as 别名]
# 或者: from remote.remote_util.RemoteMachineShellConnection import pause_memcached [as 别名]
def _pause_memcached(self, server):
log = logger.Logger.get_logger()
shell = RemoteMachineShellConnection(server)
shell.pause_memcached()
shell.disconnect()
log.info("stopped couchbase server on {0}".format(server))