mirror of https://github.com/apache/jclouds.git
Issue 381: refined logging statements
This commit is contained in:
parent
faa57c71bb
commit
562b487b15
|
@ -63,9 +63,10 @@ public class TerremarkEncodeTagIntoNameRunNodesAndAddToSetStrategy extends Encod
|
||||||
Map<NodeMetadata, Exception> badNodes) {
|
Map<NodeMetadata, Exception> badNodes) {
|
||||||
assert template.getLocation().getParent().getScope() == LocationScope.REGION : "template location should have a parent of org, which should be mapped to region: "
|
assert template.getLocation().getParent().getScope() == LocationScope.REGION : "template location should have a parent of org, which should be mapped to region: "
|
||||||
+ template.getLocation();
|
+ template.getLocation();
|
||||||
createNewKeyPairUnlessUserSpecifiedOtherwise.execute(URI.create(template.getLocation().getParent().getId()), tag,
|
String orgId = template.getLocation().getParent().getId();
|
||||||
template.getImage().getDefaultCredentials().identity, template.getOptions().as(
|
assert orgId.startsWith("http") : "parent id should be a rest url: " + template.getLocation().getParent();
|
||||||
TerremarkVCloudTemplateOptions.class));
|
createNewKeyPairUnlessUserSpecifiedOtherwise.execute(URI.create(orgId), tag, template.getImage()
|
||||||
|
.getDefaultCredentials().identity, template.getOptions().as(TerremarkVCloudTemplateOptions.class));
|
||||||
return super.execute(tag, count, template, nodes, badNodes);
|
return super.execute(tag, count, template, nodes, badNodes);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -61,7 +61,7 @@ public class OrgURIToKeysListEndpoint implements Function<Object, URI> {
|
||||||
try {
|
try {
|
||||||
return TerremarkOrg.class.cast(uriToOrg.get(from == null ? defaultOrg : from)).getKeysList().getHref();
|
return TerremarkOrg.class.cast(uriToOrg.get(from == null ? defaultOrg : from)).getKeysList().getHref();
|
||||||
} catch (NullPointerException e) {
|
} catch (NullPointerException e) {
|
||||||
throw new ResourceNotFoundException("org " + from + " not found in " + uriToOrg);
|
throw new ResourceNotFoundException("org " + from + " not found in: " + uriToOrg, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue