mirror of https://github.com/apache/jclouds.git
Issue 695: Added VirtualMachine domain class and example xml. Tweaked TaskedHandler
This commit is contained in:
parent
508973b7ab
commit
d0f77def4f
|
@ -18,66 +18,21 @@
|
||||||
*/
|
*/
|
||||||
package org.jclouds.trmk.enterprisecloud.domain;
|
package org.jclouds.trmk.enterprisecloud.domain;
|
||||||
|
|
||||||
import static com.google.common.base.CaseFormat.UPPER_CAMEL;
|
import org.jclouds.trmk.enterprisecloud.domain.internal.BaseNamedResource;
|
||||||
import static com.google.common.base.CaseFormat.UPPER_UNDERSCORE;
|
import org.jclouds.trmk.enterprisecloud.domain.internal.BaseResource;
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
|
||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Date;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.jclouds.javax.annotation.Nullable;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
import org.jclouds.trmk.enterprisecloud.domain.internal.BaseResource;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Adrian Cole
|
* @author Jason King
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class VirtualMachine extends BaseResource<VirtualMachine> {
|
public class VirtualMachine extends BaseNamedResource<VirtualMachine> {
|
||||||
public static enum Status {
|
|
||||||
/**
|
|
||||||
* the task is queued for execution.
|
|
||||||
*/
|
|
||||||
QUEUED,
|
|
||||||
/**
|
|
||||||
* the task is running.
|
|
||||||
*/
|
|
||||||
RUNNING,
|
|
||||||
/**
|
|
||||||
* the task failed.
|
|
||||||
*/
|
|
||||||
FAILED,
|
|
||||||
/**
|
|
||||||
* the task completed successfully.
|
|
||||||
*/
|
|
||||||
SUCCESS,
|
|
||||||
/**
|
|
||||||
* the task failed with an error.
|
|
||||||
*/
|
|
||||||
ERROR,
|
|
||||||
/**
|
|
||||||
* Status was not parsed by jclouds.
|
|
||||||
*/
|
|
||||||
UNRECOGNIZED;
|
|
||||||
|
|
||||||
public String value() {
|
|
||||||
return UPPER_UNDERSCORE.to(UPPER_CAMEL, name());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return value();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Status fromValue(String status) {
|
|
||||||
try {
|
|
||||||
return valueOf(UPPER_CAMEL.to(UPPER_UNDERSCORE, checkNotNull(status, "status")));
|
|
||||||
} catch (IllegalArgumentException e) {
|
|
||||||
return UNRECOGNIZED;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public static Builder builder() {
|
public static Builder builder() {
|
||||||
|
@ -89,93 +44,59 @@ public class VirtualMachine extends BaseResource<VirtualMachine> {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Builder toBuilder() {
|
public Builder toBuilder() {
|
||||||
return new Builder().fromTask(this);
|
return new Builder().fromVirtualMachine(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Builder extends BaseResource.Builder<VirtualMachine> {
|
public static class Builder extends BaseNamedResource.Builder<VirtualMachine> {
|
||||||
protected String operation;
|
private List<Link> links;
|
||||||
protected Status status;
|
private List<Action> actions;
|
||||||
protected NamedResource impactedItem;
|
private List<Task> tasks;
|
||||||
protected Date startTime;
|
private String description;
|
||||||
protected Date completedTime;
|
|
||||||
protected String notes;
|
|
||||||
protected String errorMessage;
|
|
||||||
protected NamedResource initiatedBy;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.jclouds.trmk.enterprisecloud.domain.VirtualMachine#getOperation
|
* @see org.jclouds.trmk.enterprisecloud.domain.VirtualMachine#getLinks
|
||||||
*/
|
*/
|
||||||
public Builder operation(String operation) {
|
public Builder links(List<Link> links) {
|
||||||
this.operation = operation;
|
this.links = links;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.jclouds.trmk.enterprisecloud.domain.VirtualMachine#getStatus
|
* @see org.jclouds.trmk.enterprisecloud.domain.VirtualMachine#getActions
|
||||||
*/
|
*/
|
||||||
public Builder status(Status status) {
|
public Builder actions(List<Action> actions) {
|
||||||
this.status = status;
|
this.actions = actions;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.jclouds.trmk.enterprisecloud.domain.VirtualMachine#getImpactedItem
|
* @see org.jclouds.trmk.enterprisecloud.domain.VirtualMachine#getTasks
|
||||||
*/
|
*/
|
||||||
public Builder impactedItem(NamedResource impactedItem) {
|
public Builder tasks(List<Task> tasks) {
|
||||||
this.impactedItem = impactedItem;
|
this.tasks = tasks;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @see org.jclouds.trmk.enterprisecloud.domain.VirtualMachine#getStartTime
|
|
||||||
*/
|
|
||||||
public Builder startTime(Date startTime) {
|
|
||||||
this.startTime = startTime;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.jclouds.trmk.enterprisecloud.domain.VirtualMachine#getCompletedTime
|
* @see org.jclouds.trmk.enterprisecloud.domain.VirtualMachine#getDescription
|
||||||
*/
|
*/
|
||||||
public Builder completedTime(Date completedTime) {
|
public Builder description(String description) {
|
||||||
this.completedTime = completedTime;
|
this.description = description;
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see org.jclouds.trmk.enterprisecloud.domain.VirtualMachine#getNotes
|
|
||||||
*/
|
|
||||||
public Builder notes(String notes) {
|
|
||||||
this.notes = notes;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see org.jclouds.trmk.enterprisecloud.domain.VirtualMachine#getErrorMessage
|
|
||||||
*/
|
|
||||||
public Builder errorMessage(String errorMessage) {
|
|
||||||
this.errorMessage = errorMessage;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see org.jclouds.trmk.enterprisecloud.domain.VirtualMachine#getInitiatedBy
|
|
||||||
*/
|
|
||||||
public Builder initiatedBy(NamedResource initiatedBy) {
|
|
||||||
this.initiatedBy = initiatedBy;
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public VirtualMachine build() {
|
public VirtualMachine build() {
|
||||||
return new VirtualMachine(href, type, operation, status, impactedItem, startTime, completedTime, notes, errorMessage,
|
return new VirtualMachine(href, type, name, tasks, actions, links, description);
|
||||||
initiatedBy);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Builder fromTask(VirtualMachine in) {
|
public Builder fromVirtualMachine(VirtualMachine in) {
|
||||||
return fromResource(in).operation(in.getOperation()).status(in.getStatus()).impactedItem(in.getImpactedItem())
|
return fromNamedResource(in)
|
||||||
.startTime(in.getStartTime()).completedTime(in.getCompletedTime()).notes(in.getNotes())
|
.links(in.getLinks())
|
||||||
.errorMessage(in.getErrorMessage()).initiatedBy(in.getInitiatedBy());
|
.tasks(in.getTasks())
|
||||||
|
.actions(in.getActions())
|
||||||
|
.description(in.getDescription());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -186,6 +107,14 @@ public class VirtualMachine extends BaseResource<VirtualMachine> {
|
||||||
return Builder.class.cast(super.fromResource(in));
|
return Builder.class.cast(super.fromResource(in));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Builder fromNamedResource(BaseNamedResource<VirtualMachine> in) {
|
||||||
|
return Builder.class.cast(super.fromNamedResource(in));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
|
@ -202,108 +131,89 @@ public class VirtualMachine extends BaseResource<VirtualMachine> {
|
||||||
return Builder.class.cast(super.href(href));
|
return Builder.class.cast(super.href(href));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Builder name(String name) {
|
||||||
|
return Builder.class.cast(super.name(name));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Builder fromAttributes(Map<String, String> attributes) {
|
public Builder fromAttributes(Map<String, String> attributes) {
|
||||||
return Builder.class.cast(super.fromAttributes(attributes));
|
return Builder.class.cast(super.fromAttributes(attributes));
|
||||||
|
// TODO Other fields?
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected final String operation;
|
private final List<Link> links;
|
||||||
protected final Status status;
|
private final List<Task> tasks;
|
||||||
protected final NamedResource impactedItem;
|
private final List<Action> actions;
|
||||||
protected final Date startTime;
|
private final String description;
|
||||||
protected final Date completedTime;
|
|
||||||
protected final String notes;
|
|
||||||
protected final String errorMessage;
|
|
||||||
protected final NamedResource initiatedBy;
|
|
||||||
|
|
||||||
public VirtualMachine(URI href, String type, String operation, Status status, NamedResource impactedItem, Date startTime,
|
public VirtualMachine(URI href, String type, String name, List<Task> tasks, List<Action> actions, List<Link> links, String description) {
|
||||||
@Nullable Date completedTime, @Nullable String notes, @Nullable String errorMessage, NamedResource initiatedBy) {
|
super(href, type, name);
|
||||||
super(href, type);
|
this.description = checkNotNull(description, "description");
|
||||||
this.operation = checkNotNull(operation, "operation");
|
this.links = checkNotNull(links, "links");
|
||||||
this.status = checkNotNull(status, "status");
|
this.tasks = checkNotNull(tasks, "tasks");
|
||||||
this.impactedItem = checkNotNull(impactedItem, "impactedItem");
|
this.actions = checkNotNull(actions, "actions");
|
||||||
this.startTime = checkNotNull(startTime, "startTime");
|
}
|
||||||
this.completedTime = completedTime;// null if Queued or Running
|
|
||||||
this.notes = notes;
|
public List<Link> getLinks() {
|
||||||
this.errorMessage = errorMessage;
|
return links;
|
||||||
this.initiatedBy = checkNotNull(initiatedBy, "initiatedBy");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* refers to tasks regarding the virtual machine.
|
||||||
*
|
* Only the most recent tasks, up to twenty, are returned.
|
||||||
* @return name of action performed
|
* Use the href to retrieve the complete list of tasks.
|
||||||
|
* @return most recent tasks
|
||||||
*/
|
*/
|
||||||
public String getOperation() {
|
public List<Task> getTasks() {
|
||||||
return operation;
|
return tasks;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public List<Action> getActions() {
|
||||||
*
|
return actions;
|
||||||
*
|
|
||||||
* @return the status of the task
|
|
||||||
*/
|
|
||||||
public Status getStatus() {
|
|
||||||
return status;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public String getDescription() {
|
||||||
*
|
return description;
|
||||||
* @return the item acted upon
|
|
||||||
*/
|
|
||||||
public NamedResource getImpactedItem() {
|
|
||||||
return impactedItem;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @return time action started
|
|
||||||
*/
|
|
||||||
public Date getStartTime() {
|
|
||||||
return startTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @return time action completed, or null if Queued or Running
|
|
||||||
*/
|
|
||||||
@Nullable
|
|
||||||
public Date getCompletedTime() {
|
|
||||||
return completedTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return notes on action
|
|
||||||
*/
|
|
||||||
public String getNotes() {
|
|
||||||
return notes;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return error message
|
|
||||||
*/
|
|
||||||
public String getErrorMessage() {
|
|
||||||
return errorMessage;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @return the item acted upon
|
|
||||||
*/
|
|
||||||
public NamedResource getInitiatedBy() {
|
|
||||||
return initiatedBy;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public boolean equals(Object o) {
|
||||||
return "[type=" + type + ", href=" + href + ", operation=" + operation + ", status=" + status + ", impactedItem="
|
if (this == o) return true;
|
||||||
+ impactedItem + ", startTime=" + startTime + ", completedTime=" + completedTime + ", notes=" + notes
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
+ ", errorMessage=" + errorMessage + ", initiatedBy=" + initiatedBy + "]";
|
if (!super.equals(o)) return false;
|
||||||
|
|
||||||
|
VirtualMachine that = (VirtualMachine) o;
|
||||||
|
|
||||||
|
if (!actions.equals(that.actions)) return false;
|
||||||
|
if (!description.equals(that.description)) return false;
|
||||||
|
if (!links.equals(that.links)) return false;
|
||||||
|
if (!tasks.equals(that.tasks)) return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
int result = super.hashCode();
|
||||||
|
result = 31 * result + links.hashCode();
|
||||||
|
result = 31 * result + tasks.hashCode();
|
||||||
|
result = 31 * result + actions.hashCode();
|
||||||
|
result = 31 * result + description.hashCode();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String string() {
|
||||||
|
return super.string()+", links="+links+", tasks="+tasks+", actions="+actions+", description="+description;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -30,7 +30,6 @@ import org.xml.sax.Attributes;
|
||||||
import org.xml.sax.SAXException;
|
import org.xml.sax.SAXException;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
||||||
import com.google.common.collect.ImmutableSet.Builder;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Adrian Cole
|
* @author Adrian Cole
|
||||||
|
@ -46,7 +45,7 @@ public class TasksHandler extends ParseSax.HandlerWithResult<Set<Task>> {
|
||||||
|
|
||||||
protected final TaskHandler taskHandler;
|
protected final TaskHandler taskHandler;
|
||||||
|
|
||||||
protected Builder<Task> builder = ImmutableSet.<Task> builder();
|
protected ImmutableSet.Builder<Task> builder = ImmutableSet.<Task> builder();
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public TasksHandler(TaskHandler taskHandler) {
|
public TasksHandler(TaskHandler taskHandler) {
|
||||||
|
|
|
@ -0,0 +1,143 @@
|
||||||
|
<VirtualMachine href="/cloudapi/ecloud/virtualmachines/5504" name="helloworld"
|
||||||
|
type="application/vnd.tmrk.cloud.virtualMachine"
|
||||||
|
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<Links>
|
||||||
|
<Link href="/cloudapi/ecloud/computepools/89"
|
||||||
|
name="Default Compute Pool"
|
||||||
|
type="application/vnd.tmrk.cloud.computePool" rel="up"/>
|
||||||
|
<Link href="/cloudapi/ecloud/environments/77" name="Beta Environment 01"
|
||||||
|
type="application/vnd.tmrk.cloud.environment" rel="up"/>
|
||||||
|
<Link href="/cloudapi/ecloud/tasks/virtualmachines/5504"
|
||||||
|
type="application/vnd.tmrk.cloud.task; type=collection"
|
||||||
|
rel="down"/>
|
||||||
|
<Link href="/cloudapi/ecloud/virtualmachines/5504/guest/processes"
|
||||||
|
name="helloworld"
|
||||||
|
type="application/vnd.tmrk.cloud.guest.process; type=collection"
|
||||||
|
rel="down"/>
|
||||||
|
<Link href="/cloudapi/ecloud/virtualmachines/5504/configurationoptions"
|
||||||
|
name="helloworld"
|
||||||
|
type="application/vnd.tmrk.cloud.virtualMachineConfigurationOptions"
|
||||||
|
rel="down"/>
|
||||||
|
<Link href="/cloudapi/ecloud/virtualmachines-streaming/5504/guest/action/files"
|
||||||
|
name="helloworld" type="application/octet-stream" rel="down"/>
|
||||||
|
</Links>
|
||||||
|
<Actions>
|
||||||
|
<Action href="/cloudapi/ecloud/virtualmachines/5504" name="edit"
|
||||||
|
type="application/vnd.tmrk.cloud.virtualMachine"/>
|
||||||
|
<Action href="/cloudapi/ecloud/virtualmachines/5504/action/move"
|
||||||
|
name="move"
|
||||||
|
type="application/vnd.tmrk.cloud.moveLayoutRequest"/>
|
||||||
|
<Action href="/cloudapi/ecloud/virtualmachines/5504" name="remove"/>
|
||||||
|
<Action href="/cloudapi/ecloud/virtualmachines/5504/action/poweroff"
|
||||||
|
name="power:powerOff" actionDisabled="disabled"/>
|
||||||
|
<Action href="/cloudapi/ecloud/virtualmachines/5504/action/reboot"
|
||||||
|
name="power:reboot" actionDisabled="disabled"/>
|
||||||
|
<Action href="/cloudapi/ecloud/virtualmachines/5504/action/shutdown"
|
||||||
|
name="power:shutdown" actionDisabled="disabled"/>
|
||||||
|
<Action href="/cloudapi/ecloud/virtualmachines/5504/action/poweron"
|
||||||
|
name="power:powerOn"/>
|
||||||
|
<Action href="/cloudapi/ecloud/virtualmachines/5504/tools/action/mount"
|
||||||
|
name="tools:mount" actionDisabled="disabled"/>
|
||||||
|
<Action href="/cloudapi/ecloud/virtualmachines/5504/tools/action/unmount"
|
||||||
|
name="tools:unmount" actionDisabled="disabled"/>
|
||||||
|
<Action href="/cloudapi/ecloud/virtualmachines/5504/guest/action/createprocess"
|
||||||
|
name="createGuestProcess"
|
||||||
|
type="application/vnd.tmrk.cloud.guest.process"
|
||||||
|
actionDisabled="disabled"/>
|
||||||
|
<Action href="/cloudapi/ecloud/virtualmachines-streaming/5504/guest/action/files"
|
||||||
|
name="createFile" type="application/octet-stream"
|
||||||
|
actionDisabled="disabled"/>
|
||||||
|
</Actions>
|
||||||
|
<Tasks type="application/vnd.tmrk.cloud.task; type=collection">
|
||||||
|
<Links>
|
||||||
|
<Link href="/cloudapi/ecloud/virtualmachines/5504" name="helloworld"
|
||||||
|
type="application/vnd.tmrk.cloud.virtualMachine" rel="up"/>
|
||||||
|
</Links>
|
||||||
|
<Task href="/cloudapi/ecloud/tasks/12345"
|
||||||
|
type="application/vnd.tmrk.cloud.task">
|
||||||
|
<Operation>Create Server</Operation>
|
||||||
|
<Status>Complete</Status>
|
||||||
|
<ImpactedItem href="/cloudapi/ecloud/virtualmachines/5504"
|
||||||
|
name="helloworld"
|
||||||
|
type="application/vnd.tmrk.cloud.virtualMachine"/>
|
||||||
|
<StartTime>2011-11-09T21:46:11.787Z</StartTime>
|
||||||
|
<CompletedTime>2011-11-09T21:50:32.933Z</CompletedTime>
|
||||||
|
<InitiatedBy href="/cloudapi/ecloud/admin/users/1804"
|
||||||
|
name="Jason King"
|
||||||
|
type="application/vnd.tmrk.cloud.admin.user"/>
|
||||||
|
</Task>
|
||||||
|
<TotalCount>1</TotalCount>
|
||||||
|
</Tasks>
|
||||||
|
<Description>My first terremark server</Description>
|
||||||
|
<Layout>
|
||||||
|
<Row href="/cloudapi/ecloud/layoutrows/285" name="test row"
|
||||||
|
type="application/vnd.tmrk.cloud.layoutRow"/>
|
||||||
|
<Group href="/cloudapi/ecloud/layoutgroups/308" name="test group"
|
||||||
|
type="application/vnd.tmrk.cloud.layoutGroup"/>
|
||||||
|
</Layout>
|
||||||
|
<Status>Deployed</Status>
|
||||||
|
<PoweredOn>false</PoweredOn>
|
||||||
|
<HardwareConfiguration
|
||||||
|
href="/cloudapi/ecloud/virtualmachines/5504/hardwareconfiguration"
|
||||||
|
type="application/vnd.tmrk.cloud.virtualMachineHardware">
|
||||||
|
<Actions>
|
||||||
|
<Action href="/cloudapi/ecloud/virtualmachines/5504/hardwareconfiguration"
|
||||||
|
name="edit"
|
||||||
|
type="application/vnd.tmrk.cloud.virtualMachineHardware"/>
|
||||||
|
</Actions>
|
||||||
|
<ProcessorCount>1</ProcessorCount>
|
||||||
|
<Memory>
|
||||||
|
<Unit>MB</Unit>
|
||||||
|
<Value>384</Value>
|
||||||
|
</Memory>
|
||||||
|
<Disks>
|
||||||
|
<Disk>
|
||||||
|
<Index>0</Index>
|
||||||
|
<Size>
|
||||||
|
<Unit>GB</Unit>
|
||||||
|
<Value>10</Value>
|
||||||
|
</Size>
|
||||||
|
<Name>Hard Disk 1</Name>
|
||||||
|
</Disk>
|
||||||
|
</Disks>
|
||||||
|
<Nics>
|
||||||
|
<Nic>
|
||||||
|
<UnitNumber>7</UnitNumber>
|
||||||
|
<Name>Network adapter 1</Name>
|
||||||
|
<MacAddress>00:50:56:b8:00:58</MacAddress>
|
||||||
|
<Network href="/cloudapi/ecloud/networks/3936"
|
||||||
|
name="10.146.204.64/28"
|
||||||
|
type="application/vnd.tmrk.cloud.network">
|
||||||
|
<NetworkType>Internal</NetworkType>
|
||||||
|
</Network>
|
||||||
|
</Nic>
|
||||||
|
</Nics>
|
||||||
|
</HardwareConfiguration>
|
||||||
|
<IpAddresses>
|
||||||
|
<AssignedIpAddresses
|
||||||
|
href="/cloudapi/ecloud/virtualmachines/5504/assignedips"
|
||||||
|
type="application/vnd.tmrk.cloud.virtualMachineAssignedIps">
|
||||||
|
<Actions>
|
||||||
|
<Action href="/cloudapi/ecloud/virtualmachines/5504/assignedips"
|
||||||
|
name="edit"
|
||||||
|
type="application/vnd.tmrk.cloud.virtualMachineAssignedIps"/>
|
||||||
|
</Actions>
|
||||||
|
<Networks>
|
||||||
|
<Network href="/cloudapi/ecloud/networks/3936"
|
||||||
|
name="10.146.204.64/28 (INT_202)"
|
||||||
|
type="application/vnd.tmrk.cloud.network">
|
||||||
|
<IpAddresses>
|
||||||
|
<IpAddress>10.146.204.67</IpAddress>
|
||||||
|
</IpAddresses>
|
||||||
|
</Network>
|
||||||
|
</Networks>
|
||||||
|
</AssignedIpAddresses>
|
||||||
|
</IpAddresses>
|
||||||
|
<OperatingSystem
|
||||||
|
href="/cloudapi/ecloud/operatingsystems/rhel5_64guest/computepools/89"
|
||||||
|
name="Red Hat Enterprise Linux 5 (64-bit)"
|
||||||
|
type="application/vnd.tmrk.cloud.operatingSystem"/>
|
||||||
|
<ToolsStatus>NotRunning</ToolsStatus>
|
||||||
|
<MediaStatus>Unmounted</MediaStatus>
|
||||||
|
<CustomizationPending>false</CustomizationPending>
|
||||||
|
</VirtualMachine>
|
Loading…
Reference in New Issue