本文整理了Java中org.jclouds.compute.Utils.credentialStore()
方法的一些代码示例,展示了Utils.credentialStore()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.credentialStore()
方法的具体详情如下:
包路径:org.jclouds.compute.Utils
类名称:Utils
方法名:credentialStore
暂无
代码示例来源:origin: jclouds/legacy-jclouds
@Test(enabled = true, dependsOnMethods = "testCreateAnotherNodeWithANewContextToEnsureSharedMemIsntRequired")
public void testCredentialsCache() throws Exception {
initializeContext();
for (NodeMetadata node : nodes)
assert (view.utils().credentialStore().get("node#" + node.getId()) != null) : "credentials for " + node.getId();
}
代码示例来源:origin: apache/jclouds
@Test(enabled = true, dependsOnMethods = "testCreateAnotherNodeWithANewContextToEnsureSharedMemIsntRequired")
public void testCredentialsCache() throws Exception {
initializeContext();
for (NodeMetadata node : nodes)
assert view.utils().credentialStore().get("node#" + node.getId()) != null : "credentials for " + node.getId();
}
代码示例来源:origin: jclouds/legacy-jclouds
@Test(enabled = true, dependsOnMethods = { "testListNodes", "testGetNodesWithDetails", "testListNodesByIds" })
public void testDestroyNodes() {
int toDestroy = refreshNodes().size();
Set<? extends NodeMetadata> destroyed = client.destroyNodesMatching(inGroup(group));
assertEquals(toDestroy, destroyed.size());
for (NodeMetadata node : filter(client.listNodesDetailsMatching(all()), inGroup(group))) {
assert node.getStatus() == Status.TERMINATED : node;
assert view.utils().credentialStore().get("node#" + node.getId()) == null : "credential should have been null for "
+ "node#" + node.getId();
}
}
代码示例来源:origin: jclouds/legacy-jclouds
protected void checkNodes(Iterable<? extends NodeMetadata> nodes, String group, String taskName) throws IOException {
for (NodeMetadata node : nodes) {
assertNotNull(node.getProviderId());
assertNotNull(node.getGroup());
assertEquals(node.getGroup(), group);
assertEquals(node.getStatus(), Status.RUNNING);
Credentials fromStore = view.utils().credentialStore().get("node#" + node.getId());
assertEquals(fromStore, node.getCredentials());
assert node.getPublicAddresses().size() >= 1 || node.getPrivateAddresses().size() >= 1 : "no ips in" + node;
assertNotNull(node.getCredentials());
if (node.getCredentials().identity != null) {
assertNotNull(node.getCredentials().identity);
assertNotNull(node.getCredentials().credential);
sshPing(node, taskName);
}
}
}
代码示例来源:origin: apache/jclouds
protected void checkNodes(Iterable<? extends NodeMetadata> nodes, String group, String taskName) throws IOException {
for (NodeMetadata node : nodes) {
assertNotNull(node.getProviderId());
assertNotNull(node.getGroup());
assertEquals(node.getGroup(), group);
assertEquals(node.getStatus(), Status.RUNNING);
Credentials fromStore = view.utils().credentialStore().get("node#" + node.getId());
assertEquals(fromStore, node.getCredentials());
assert node.getPublicAddresses().size() >= 1 || node.getPrivateAddresses().size() >= 1 : "no ips in" + node;
assertNotNull(node.getCredentials());
if (node.getCredentials().identity != null) {
assertNotNull(node.getCredentials().identity);
sshPing(node, taskName);
}
}
}
代码示例来源:origin: apache/jclouds
@Test(enabled = true, alwaysRun = true, dependsOnMethods = { "testListNodes", "testGetNodesWithDetails", "testListNodesByIds" })
public void testDestroyNodes() {
int toDestroy = refreshNodes().size();
Set<? extends NodeMetadata> destroyed = client.destroyNodesMatching(inGroup(group));
assertEquals(toDestroy, destroyed.size());
waitGracePeriodForDestroyedNodes();
for (NodeMetadata node : filter(client.listNodesDetailsMatching(all()), inGroup(group))) {
assert node.getStatus() == Status.TERMINATED : node;
assert view.utils().credentialStore().get("node#" + node.getId()) == null : "credential should have been null for "
+ "node#" + node.getId();
}
}
内容来源于网络,如有侵权,请联系作者删除!