mirror of https://github.com/apache/jclouds.git
Issue 130: tune output in compute service
git-svn-id: http://jclouds.googlecode.com/svn/trunk@2646 3d8758e0-26b5-11de-8745-db77d3ebf521
This commit is contained in:
parent
2d19e33828
commit
313e56e8d6
|
@ -88,4 +88,9 @@ public class NodeIdentityImpl implements NodeIdentity {
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "[id=" + id + ", name=" + name + "]";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -51,6 +51,13 @@ public class NodeMetadataImpl extends NodeIdentityImpl implements NodeMetadata {
|
|||
private final int loginPort;
|
||||
private final LoginType loginType;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "[id=" + getId() + ", name=" + getName() + ", state=" + getState()
|
||||
+ ", privateAddresses=" + privateAddresses + ", publicAddresses=" + publicAddresses
|
||||
+ "]";
|
||||
}
|
||||
|
||||
public NodeMetadataImpl(String id, String name, NodeState state,
|
||||
Iterable<InetAddress> publicAddresses, Iterable<InetAddress> privateAddresses,
|
||||
int loginPort, LoginType loginType, Map<String, String> extra) {
|
||||
|
|
|
@ -66,9 +66,9 @@ public class TerremarkVCloudComputeService implements ComputeService {
|
|||
|
||||
private static final Map<VAppStatus, NodeState> vAppStatusToNodeState = ImmutableMap
|
||||
.<VAppStatus, NodeState> builder().put(VAppStatus.OFF, NodeState.TERMINATED).put(
|
||||
VAppStatus.ON, NodeState.RUNNING).put(VAppStatus.RESOLVED,
|
||||
NodeState.PENDING).put(VAppStatus.SUSPENDED, NodeState.SUSPENDED).put(
|
||||
VAppStatus.UNRESOLVED, NodeState.PENDING).build();
|
||||
VAppStatus.ON, NodeState.RUNNING).put(VAppStatus.RESOLVED, NodeState.PENDING)
|
||||
.put(VAppStatus.SUSPENDED, NodeState.SUSPENDED).put(VAppStatus.UNRESOLVED,
|
||||
NodeState.PENDING).build();
|
||||
|
||||
@Inject
|
||||
public TerremarkVCloudComputeService(TerremarkVCloudClient tmClient,
|
||||
|
@ -92,8 +92,7 @@ public class TerremarkVCloudComputeService implements ComputeService {
|
|||
@Override
|
||||
public NodeMetadata getNodeMetadata(String id) {
|
||||
VApp vApp = tmClient.getVApp(id);
|
||||
// TODO
|
||||
Set<InetAddress> publicAddresses = ImmutableSet.<InetAddress> of();
|
||||
Set<InetAddress> publicAddresses = computeClient.getPublicAddresses(id);
|
||||
return new NodeMetadataImpl(vApp.getId(), vApp.getName(), vAppStatusToNodeState.get(vApp
|
||||
.getStatus()), publicAddresses, vApp.getNetworkToAddresses().values(), 22,
|
||||
LoginType.SSH, ImmutableMap.<String, String> of());
|
||||
|
|
Loading…
Reference in New Issue