本文整理汇总了Python中ovs.extensions.generic.sshclient.SSHClient.strip方法的典型用法代码示例。如果您正苦于以下问题:Python SSHClient.strip方法的具体用法?Python SSHClient.strip怎么用?Python SSHClient.strip使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ovs.extensions.generic.sshclient.SSHClient
的用法示例。
在下文中一共展示了SSHClient.strip方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_single_node
# 需要导入模块: from ovs.extensions.generic.sshclient import SSHClient [as 别名]
# 或者: from ovs.extensions.generic.sshclient.SSHClient import strip [as 别名]
def test_single_node(self):
node = sorted(TestArakoonInstaller.nodes.keys())[0]
result = ArakoonInstaller.create_cluster(TestArakoonInstaller.cluster_name, node, '/tmp/db')
contents = SSHClient(node).file_read(TestArakoonInstaller.cluster_config_file)
expected = TestArakoonInstaller.expected_global.format(TestArakoonInstaller.nodes[node], TestArakoonInstaller.cluster_name)
expected += TestArakoonInstaller.expected_base.format(TestArakoonInstaller.nodes[node], result['client_port'], result['messaging_port'], TestArakoonInstaller.cluster_name, node)
self.assertEqual(contents.strip(), expected.strip())
示例2: test_single_node
# 需要导入模块: from ovs.extensions.generic.sshclient import SSHClient [as 别名]
# 或者: from ovs.extensions.generic.sshclient.SSHClient import strip [as 别名]
def test_single_node(self):
base_port = Configuration.get('ovs.ports.arakoon')[0]
cluster = 'one'
node = sorted(TestArakoonInstaller.nodes.keys())[0]
ArakoonInstaller.create_cluster(cluster, node, [])
contents = SSHClient(node).file_read(self._get_config_path(cluster))
expected = TestArakoonInstaller.expected_global.format(cluster, TestArakoonInstaller.nodes[node])
expected += TestArakoonInstaller.expected_base.format(TestArakoonInstaller.nodes[node], node, base_port, base_port + 1)
self.assertEqual(contents.strip(), expected.strip())