Updated tests and domain objects if required

This commit is contained in:
Andrew Donald Kennedy 2012-03-13 09:53:13 +00:00
parent d08a0a99c4
commit 4706af5cc8
27 changed files with 1055 additions and 809 deletions

View File

@ -174,6 +174,12 @@ public class VCloudDirectorMediaType {
public static final String UNDEPLOY_VAPP_PARAMS = "application/vnd.vmware.vcloud.undeployVAppParams+xml";
public static final String MEDIA_PARAMS = "application/vnd.vmware.vcloud.mediaInsertOrEjectParams+xml";
public static final String RUNTIME_INFO_SECTION = "application/vnd.vmware.vcloud.runtimeInfoSection+xml";
public static final String SCREEN_TICKET = "application/vnd.vmware.vcloud.screenTicket+xml";
public static final String ADMIN_VDC = "application/vnd.vmware.admin.vdc+xml";
/**
@ -199,6 +205,7 @@ public class VCloudDirectorMediaType {
ORG_LEASE_SETTINGS, ORG_PASSWORD_POLICY_SETTINGS, ORG_LDAP_SETTINGS,
ORG_GENERAL_SETTINGS, ORG_EMAIL_SETTINGS, ORG_SETTINGS, ADMIN_NETWORK,
ADMIN_ORG_NETWORK, USER, ROLE, DEPLOY_VAPP_PARAMS, RECOMPOSE_VAPP_PARAMS,
RELOCATE_VM_PARAMS, UNDEPLOY_VAPP_PARAMS, ADMIN_VDC
RELOCATE_VM_PARAMS, UNDEPLOY_VAPP_PARAMS, ADMIN_VDC, MEDIA_PARAMS, RUNTIME_INFO_SECTION,
SCREEN_TICKET
);
}

View File

@ -35,7 +35,6 @@ import org.jclouds.ovf.OperatingSystemSection;
import org.jclouds.ovf.ProductSection;
import org.jclouds.ovf.Section;
import org.jclouds.ovf.VirtualHardwareSection;
import org.jclouds.vcloud.director.v1_5.domain.ovf.NetworkSection;
import com.google.common.base.Objects;
import com.google.common.collect.ImmutableSet;

View File

@ -1,4 +1,4 @@
/**
/*
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.vcloud.director.v1_5.domain;
import static com.google.common.base.Objects.*;
@ -26,9 +25,11 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
import com.google.common.base.Objects;
/**
* Represents vApp/VM deployment parameters.
*
*
* <pre>
* &lt;complexType name="DeployVAppParams" /&gt;
* </pre>
@ -37,7 +38,6 @@ import javax.xml.bind.annotation.XmlType;
@XmlType(name = "DeployVAppParams")
public class DeployVAppParams {
@SuppressWarnings("unchecked")
public static Builder builder() {
return new Builder();
}
@ -47,7 +47,7 @@ public class DeployVAppParams {
}
public static class Builder {
private Boolean powerOn = Boolean.TRUE;
private Integer deploymentLeaseSeconds;
private Boolean forceCustomization = Boolean.FALSE;
@ -113,11 +113,8 @@ public class DeployVAppParams {
return deployVAppParams;
}
public Builder fromDeployVAppParams(DeployVAppParams in) {
return powerOn(in.isPowerOn())
.deploymentLeaseSeconds(in.getDeploymentLeaseSeconds())
.forceCustomization(in.isForceCustomization());
return powerOn(in.isPowerOn()).deploymentLeaseSeconds(in.getDeploymentLeaseSeconds()).forceCustomization(in.isForceCustomization());
}
}
@ -131,67 +128,60 @@ public class DeployVAppParams {
this.forceCustomization = forceCustomization;
}
@XmlAttribute
protected Boolean powerOn;
@XmlAttribute
protected Integer deploymentLeaseSeconds;
@XmlAttribute
protected Boolean forceCustomization;
@XmlAttribute
protected Boolean powerOn;
@XmlAttribute
protected Integer deploymentLeaseSeconds;
@XmlAttribute
protected Boolean forceCustomization;
/**
* Used to specify whether to power on vapp on deployment, if not set default value is true.
*/
public Boolean isPowerOn() {
return powerOn;
}
/**
* Used to specify whether to power on vapp on deployment, if not set default value is true.
*/
public Boolean isPowerOn() {
return powerOn;
}
public void setPowerOn(Boolean value) {
this.powerOn = value;
}
public void setPowerOn(Boolean value) {
this.powerOn = value;
}
/**
* Lease in seconds for deployment.
*/
public Integer getDeploymentLeaseSeconds() {
return deploymentLeaseSeconds;
}
/**
* Lease in seconds for deployment.
*/
public Integer getDeploymentLeaseSeconds() {
return deploymentLeaseSeconds;
}
public void setDeploymentLeaseSeconds(Integer value) {
this.deploymentLeaseSeconds = value;
}
public void setDeploymentLeaseSeconds(Integer value) {
this.deploymentLeaseSeconds = value;
}
/**
* Used to specify whether to force customization on deployment, if not set default value is false.
*/
public Boolean isForceCustomization() {
return forceCustomization;
}
/**
* Used to specify whether to force customization on deployment, if not set default value is false.
*/
public Boolean isForceCustomization() {
return forceCustomization;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
return true;
if (o == null || getClass() != o.getClass())
return false;
DeployVAppParams that = DeployVAppParams.class.cast(o);
return equal(powerOn, that.powerOn) &&
equal(deploymentLeaseSeconds, that.deploymentLeaseSeconds) &&
equal(forceCustomization, that.forceCustomization);
return equal(powerOn, that.powerOn) && equal(deploymentLeaseSeconds, that.deploymentLeaseSeconds) && equal(forceCustomization, that.forceCustomization);
}
@Override
public int hashCode() {
return Objects.hashCode(powerOn,
deploymentLeaseSeconds,
forceCustomization);
return Objects.hashCode(powerOn, deploymentLeaseSeconds, forceCustomization);
}
@Override
public String toString() {
return Objects.toStringHelper("")
.add("powerOn", powerOn)
.add("deploymentLeaseSeconds", deploymentLeaseSeconds)
.add("forceCustomization", forceCustomization).toString();
return Objects.toStringHelper("").add("powerOn", powerOn).add("deploymentLeaseSeconds", deploymentLeaseSeconds).add("forceCustomization", forceCustomization).toString();
}
}

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.vcloud.director.v1_5.domain.ovf;
package org.jclouds.vcloud.director.v1_5.domain;
import static com.google.common.base.Preconditions.checkNotNull;
@ -27,6 +27,9 @@ import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.jclouds.javax.annotation.Nullable;
import org.jclouds.vcloud.director.v1_5.domain.ovf.Configuration;
import org.jclouds.vcloud.director.v1_5.domain.ovf.SectionType;
import org.jclouds.vcloud.director.v1_5.domain.ovf.SectionType.Builder;
import com.google.common.base.Objects;
import com.google.common.collect.ImmutableSet;

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.vcloud.director.v1_5.domain.ovf;
package org.jclouds.vcloud.director.v1_5.domain;
import static com.google.common.base.Preconditions.checkNotNull;
@ -25,6 +25,9 @@ import java.util.Set;
import javax.xml.bind.annotation.XmlRootElement;
import org.jclouds.javax.annotation.Nullable;
import org.jclouds.vcloud.director.v1_5.domain.ovf.Network;
import org.jclouds.vcloud.director.v1_5.domain.ovf.SectionType;
import org.jclouds.vcloud.director.v1_5.domain.ovf.SectionType.Builder;
import com.google.common.base.Objects;
import com.google.common.collect.ImmutableSet;
@ -39,7 +42,6 @@ import com.google.common.collect.Sets;
@XmlRootElement(name = "NetworkSection")
public class NetworkSection extends SectionType<NetworkSection> {
@SuppressWarnings("unchecked")
public static Builder builder() {
return new Builder();
}

View File

@ -16,13 +16,15 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.vcloud.director.v1_5.domain.ovf;
package org.jclouds.vcloud.director.v1_5.domain;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.jclouds.javax.annotation.Nullable;
import org.jclouds.vcloud.director.v1_5.domain.ovf.SectionType;
import org.jclouds.vcloud.director.v1_5.domain.ovf.SectionType.Builder;
import com.google.common.base.Objects;

View File

@ -1,4 +1,4 @@
/**
/*
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@ -16,25 +16,20 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.vcloud.director.v1_5.domain;
import static com.google.common.base.Objects.*;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import com.google.common.base.Objects;
/**
*
* Represents vApp re-composition parameters.
*
*
* <p>Java class for RecomposeVAppParams complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* Represents vApp re-composition parameters.
*
* <pre>
* &lt;complexType name="RecomposeVAppParams">
@ -49,29 +44,21 @@ import javax.xml.bind.annotation.XmlType;
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "RecomposeVAppParams", propOrder = {
"createItem",
"deleteItem"
})
public class RecomposeVAppParams
extends ComposeVAppParamsType<RecomposeVAppParams>
@XmlType(name = "RecomposeVAppParams")
public class RecomposeVAppParams extends ComposeVAppParams {
{
@SuppressWarnings("unchecked")
public static Builder builder() {
return new Builder();
}
@Override
public Builder toBuilder() {
return new Builder().fromRecomposeVAppParams(this);
}
public static class Builder extends ComposeVAppParamsType.Builder<RecomposeVAppParams> {
public static class Builder extends ComposeVAppParams.Builder {
private List<Vm> createItem;
private List<Reference> deleteItem;
@ -91,21 +78,19 @@ public class RecomposeVAppParams
return this;
}
@Override
public RecomposeVAppParams build() {
RecomposeVAppParams recomposeVAppParams = new RecomposeVAppParams(createItem, deleteItem);
return recomposeVAppParams;
}
@Override
public Builder fromComposeVAppParamsType(ComposeVAppParamsType<RecomposeVAppParams> in) {
return Builder.class.cast(super.fromComposeVAppParamsType(in));
public Builder fromComposeVAppParams(ComposeVAppParams in) {
return Builder.class.cast(super.fromComposeVAppParams(in));
}
public Builder fromRecomposeVAppParams(RecomposeVAppParams in) {
return fromComposeVAppParamsType(in)
.createItem(in.getCreateItem())
.deleteItem(in.getDeleteItem());
return fromComposeVAppParams(in).createItem(in.getCreateItem()).deleteItem(in.getDeleteItem());
}
}
@ -118,92 +103,49 @@ public class RecomposeVAppParams
this.deleteItem = deleteItem;
}
@XmlElement(name = "CreateItem")
protected List<Vm> createItem;
@XmlElement(name = "DeleteItem")
protected List<Reference> deleteItem;
@XmlElement(name = "CreateItem")
protected List<Vm> createItem;
@XmlElement(name = "DeleteItem")
protected List<Reference> deleteItem;
/**
* Gets the value of the createItem property.
*/
public List<Vm> getCreateItem() {
if (createItem == null) {
createItem = new ArrayList<Vm>();
}
return this.createItem;
}
/**
* Gets the value of the createItem property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the createItem property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getCreateItem().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link VmType }
*
*
*/
public List<Vm> getCreateItem() {
if (createItem == null) {
createItem = new ArrayList<Vm>();
}
return this.createItem;
}
/**
* Gets the value of the deleteItem property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the deleteItem property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getDeleteItem().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link ReferenceType }
*
*
*/
public List<Reference> getDeleteItem() {
if (deleteItem == null) {
deleteItem = new ArrayList<Reference>();
}
return this.deleteItem;
}
/**
* Gets the value of the deleteItem property.
*/
public List<Reference> getDeleteItem() {
if (deleteItem == null) {
deleteItem = new ArrayList<Reference>();
}
return this.deleteItem;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
return true;
if (o == null || getClass() != o.getClass())
return false;
RecomposeVAppParams that = RecomposeVAppParams.class.cast(o);
return equal(createItem, that.createItem) &&
equal(deleteItem, that.deleteItem);
return equal(createItem, that.createItem) && equal(deleteItem, that.deleteItem);
}
@Override
public int hashCode() {
return Objects.hashCode(createItem,
deleteItem);
return Objects.hashCode(createItem, deleteItem);
}
@Override
public String toString() {
return Objects.toStringHelper("")
.add("createItem", createItem)
.add("deleteItem", deleteItem).toString();
return Objects.toStringHelper("").add("createItem", createItem).add("deleteItem", deleteItem).toString();
}
}

View File

@ -30,7 +30,6 @@ import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import org.jclouds.vcloud.director.v1_5.VCloudDirectorRuntimeException;
import org.jclouds.vcloud.director.v1_5.domain.AbstractVAppType.Builder;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;

View File

@ -18,18 +18,19 @@
*/
package org.jclouds.vcloud.director.v1_5.domain;
import static com.google.common.base.Objects.equal;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Objects.*;
import static com.google.common.base.Preconditions.*;
import java.net.URI;
import java.util.Collections;
import java.util.Set;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import org.jclouds.javax.annotation.Nullable;
import org.jclouds.vcloud.director.v1_5.domain.AbstractVAppType.Builder;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
@ -40,13 +41,14 @@ import com.google.common.collect.Sets;
* The base type for all objects in the vCloud model.
*
* Has an optional list of links and href and type attributes.
* <p/>
* <p>
* <pre>
* &lt;xs:complexType name="ResourceType"&gt;
* &lt;xs:complexType name="ResourceType" /&gt;
* </pre>
*
* @author Adrian Cole
*/
@XmlAccessorType(XmlAccessType.FIELD)
public abstract class ResourceType<T extends ResourceType<T>> {
public NewBuilder<?> toNewBuilder() {

View File

@ -5,7 +5,7 @@
// Generated on: 2012.02.08 at 02:47:44 PM GMT
//
package org.jclouds.vcloud.director.v1_5.domain.ovf;
package org.jclouds.vcloud.director.v1_5.domain;
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.*;
@ -16,6 +16,10 @@ import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.jclouds.vcloud.director.v1_5.domain.ovf.SectionType;
import org.jclouds.vcloud.director.v1_5.domain.ovf.StartupSectionItem;
import org.jclouds.vcloud.director.v1_5.domain.ovf.SectionType.Builder;
/**
* Specifies the order in which entities in a VirtualSystemCollection are powered on and shut down
*

View File

@ -19,20 +19,17 @@
package org.jclouds.vcloud.director.v1_5.domain;
import static com.google.common.base.Objects.*;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import com.google.common.base.Objects;
/**
*
* Represents vApp/VM undeployment parameters.
*
*
* <p>Java class for UndeployVAppParams complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* Represents vApp/VM undeployment parameters.
*
* <pre>
* &lt;complexType name="UndeployVAppParams">
@ -46,18 +43,11 @@ import javax.xml.bind.annotation.XmlType;
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "UndeployVAppParams", propOrder = {
"undeployPowerAction"
})
public class UndeployVAppParams
@XmlType(name = "UndeployVAppParams")
public class UndeployVAppParams {
{
@SuppressWarnings("unchecked")
public static Builder builder() {
return new Builder();
}
@ -67,7 +57,7 @@ public class UndeployVAppParams
}
public static class Builder {
private String undeployPowerAction;
/**
@ -78,14 +68,12 @@ public class UndeployVAppParams
return this;
}
public UndeployVAppParams build() {
UndeployVAppParams undeployVAppParams = new UndeployVAppParams();
undeployVAppParams.setUndeployPowerAction(undeployPowerAction);
undeployVAppParams.undeployPowerAction = undeployPowerAction;
return undeployVAppParams;
}
public Builder fromUndeployVAppParams(UndeployVAppParams in) {
return undeployPowerAction(in.getUndeployPowerAction());
}
@ -95,39 +83,20 @@ public class UndeployVAppParams
// For JAXB and builder use
}
@XmlElement(name = "UndeployPowerAction")
protected String undeployPowerAction;
@XmlElement(name = "UndeployPowerAction")
protected String undeployPowerAction;
/**
* Gets the value of the undeployPowerAction property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getUndeployPowerAction() {
return undeployPowerAction;
}
/**
* Sets the value of the undeployPowerAction property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setUndeployPowerAction(String value) {
this.undeployPowerAction = value;
}
/**
* Gets the value of the undeployPowerAction property.
*/
public String getUndeployPowerAction() {
return undeployPowerAction;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
return true;
if (o == null || getClass() != o.getClass())
return false;
UndeployVAppParams that = UndeployVAppParams.class.cast(o);
@ -141,8 +110,7 @@ public class UndeployVAppParams
@Override
public String toString() {
return Objects.toStringHelper("")
.add("undeployPowerAction", undeployPowerAction).toString();
return Objects.toStringHelper("").add("undeployPowerAction", undeployPowerAction).toString();
}
}

View File

@ -94,10 +94,8 @@ import com.google.common.collect.Sets;
"password",
"groups"
})
public class User
extends EntityType<User>
public class User extends EntityType<User> {
{
public static Builder builder() {
return new Builder();
}

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.vcloud.director.v1_5.domain.ovf;
package org.jclouds.vcloud.director.v1_5.domain;
import static com.google.common.base.Preconditions.*;
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.*;
@ -28,6 +28,8 @@ import javax.xml.bind.annotation.XmlRootElement;
import org.jclouds.javax.annotation.Nullable;
import org.jclouds.vcloud.director.v1_5.domain.cim.ResourceAllocationSettingData;
import org.jclouds.vcloud.director.v1_5.domain.cim.VirtualSystemSettingData;
import org.jclouds.vcloud.director.v1_5.domain.ovf.SectionType;
import org.jclouds.vcloud.director.v1_5.domain.ovf.SectionType.Builder;
import com.google.common.base.Objects;
import com.google.common.collect.ImmutableSet;

View File

@ -22,6 +22,7 @@ import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.VCLOUD_OV
import javax.xml.bind.annotation.XmlRootElement;
import org.jclouds.vcloud.director.v1_5.domain.NetworkSection;
import org.jclouds.vcloud.director.v1_5.domain.ovf.internal.BaseEnvelope;
import com.google.common.collect.Multimap;

View File

@ -26,10 +26,13 @@ import javax.xml.bind.annotation.XmlSeeAlso;
import org.jclouds.javax.annotation.Nullable;
import org.jclouds.vcloud.director.v1_5.domain.CustomizationSection;
import org.jclouds.vcloud.director.v1_5.domain.DeploymentOptionSection;
import org.jclouds.vcloud.director.v1_5.domain.GuestCustomizationSection;
import org.jclouds.vcloud.director.v1_5.domain.LeaseSettingsSection;
import org.jclouds.vcloud.director.v1_5.domain.NetworkConfigSection;
import org.jclouds.vcloud.director.v1_5.domain.NetworkConnectionSection;
import org.jclouds.vcloud.director.v1_5.domain.NetworkSection;
import org.jclouds.vcloud.director.v1_5.domain.VirtualHardwareSection;
import com.google.common.base.Objects;

View File

@ -23,6 +23,8 @@ import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.*;
import javax.xml.bind.annotation.XmlRootElement;
import org.jclouds.javax.annotation.Nullable;
import org.jclouds.vcloud.director.v1_5.domain.OperatingSystemSection;
import org.jclouds.vcloud.director.v1_5.domain.VirtualHardwareSection;
import org.jclouds.vcloud.director.v1_5.domain.ovf.internal.BaseVirtualSystem;
import com.google.common.collect.Multimap;

View File

@ -22,8 +22,8 @@ import static com.google.common.base.Preconditions.checkNotNull;
import java.util.Set;
import org.jclouds.vcloud.director.v1_5.domain.NetworkSection;
import org.jclouds.vcloud.director.v1_5.domain.ovf.DiskSection;
import org.jclouds.vcloud.director.v1_5.domain.ovf.NetworkSection;
import org.jclouds.vcloud.director.v1_5.domain.ovf.SectionType;
import com.google.common.base.Objects;

View File

@ -23,10 +23,10 @@ import static com.google.common.base.Preconditions.checkNotNull;
import java.util.Set;
import org.jclouds.javax.annotation.Nullable;
import org.jclouds.vcloud.director.v1_5.domain.ovf.OperatingSystemSection;
import org.jclouds.vcloud.director.v1_5.domain.OperatingSystemSection;
import org.jclouds.vcloud.director.v1_5.domain.VirtualHardwareSection;
import org.jclouds.vcloud.director.v1_5.domain.ovf.ProductSection;
import org.jclouds.vcloud.director.v1_5.domain.ovf.SectionType;
import org.jclouds.vcloud.director.v1_5.domain.ovf.VirtualHardwareSection;
import com.google.common.base.Objects;
import com.google.common.collect.ImmutableMultimap;

View File

@ -43,6 +43,8 @@ import org.jclouds.vcloud.director.v1_5.domain.LeaseSettingsSection;
import org.jclouds.vcloud.director.v1_5.domain.MediaInsertOrEjectParams;
import org.jclouds.vcloud.director.v1_5.domain.NetworkConfigSection;
import org.jclouds.vcloud.director.v1_5.domain.NetworkConnectionSection;
import org.jclouds.vcloud.director.v1_5.domain.NetworkSection;
import org.jclouds.vcloud.director.v1_5.domain.OperatingSystemSection;
import org.jclouds.vcloud.director.v1_5.domain.Owner;
import org.jclouds.vcloud.director.v1_5.domain.ProductSectionList;
import org.jclouds.vcloud.director.v1_5.domain.RasdItemsList;
@ -50,16 +52,14 @@ import org.jclouds.vcloud.director.v1_5.domain.RecomposeVAppParams;
import org.jclouds.vcloud.director.v1_5.domain.RelocateParams;
import org.jclouds.vcloud.director.v1_5.domain.RuntimeInfoSection;
import org.jclouds.vcloud.director.v1_5.domain.ScreenTicket;
import org.jclouds.vcloud.director.v1_5.domain.StartupSection;
import org.jclouds.vcloud.director.v1_5.domain.Task;
import org.jclouds.vcloud.director.v1_5.domain.UndeployVAppParams;
import org.jclouds.vcloud.director.v1_5.domain.VApp;
import org.jclouds.vcloud.director.v1_5.domain.VirtualHardwareSection;
import org.jclouds.vcloud.director.v1_5.domain.VmPendingQuestion;
import org.jclouds.vcloud.director.v1_5.domain.VmQuestionAnswer;
import org.jclouds.vcloud.director.v1_5.domain.ovf.NetworkSection;
import org.jclouds.vcloud.director.v1_5.domain.ovf.OperatingSystemSection;
import org.jclouds.vcloud.director.v1_5.domain.ovf.RASD;
import org.jclouds.vcloud.director.v1_5.domain.ovf.StartupSection;
import org.jclouds.vcloud.director.v1_5.domain.ovf.VirtualHardwareSection;
import org.jclouds.vcloud.director.v1_5.filters.AddVCloudAuthorizationToRequest;
import org.jclouds.vcloud.director.v1_5.functions.ThrowVCloudErrorOn4xx;
@ -108,7 +108,7 @@ public interface VAppAsyncClient {
@Consumes(VCloudDirectorMediaType.TASK)
@JAXBResponseParser
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
ListenableFuture<Task> consolidate(@EndpointParam URI vAppURI);
ListenableFuture<Task> consolidateVApp(@EndpointParam URI vAppURI);
/**
* @see VAppClient#controlAccess(URI, ControlAccessParams)
@ -223,7 +223,7 @@ public interface VAppAsyncClient {
@Consumes(VCloudDirectorMediaType.CONTROL_ACCESS)
@JAXBResponseParser
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
ListenableFuture<ControlAccessParams> controlAccess(@EndpointParam URI vAppURI);
ListenableFuture<ControlAccessParams> getControlAccess(@EndpointParam URI vAppURI);
/**
* @see VAppClient#powerOff(URI)

View File

@ -30,6 +30,8 @@ import org.jclouds.vcloud.director.v1_5.domain.LeaseSettingsSection;
import org.jclouds.vcloud.director.v1_5.domain.MediaInsertOrEjectParams;
import org.jclouds.vcloud.director.v1_5.domain.NetworkConfigSection;
import org.jclouds.vcloud.director.v1_5.domain.NetworkConnectionSection;
import org.jclouds.vcloud.director.v1_5.domain.NetworkSection;
import org.jclouds.vcloud.director.v1_5.domain.OperatingSystemSection;
import org.jclouds.vcloud.director.v1_5.domain.Owner;
import org.jclouds.vcloud.director.v1_5.domain.ProductSectionList;
import org.jclouds.vcloud.director.v1_5.domain.RasdItemsList;
@ -37,16 +39,14 @@ import org.jclouds.vcloud.director.v1_5.domain.RecomposeVAppParams;
import org.jclouds.vcloud.director.v1_5.domain.RelocateParams;
import org.jclouds.vcloud.director.v1_5.domain.RuntimeInfoSection;
import org.jclouds.vcloud.director.v1_5.domain.ScreenTicket;
import org.jclouds.vcloud.director.v1_5.domain.StartupSection;
import org.jclouds.vcloud.director.v1_5.domain.Task;
import org.jclouds.vcloud.director.v1_5.domain.UndeployVAppParams;
import org.jclouds.vcloud.director.v1_5.domain.VApp;
import org.jclouds.vcloud.director.v1_5.domain.VirtualHardwareSection;
import org.jclouds.vcloud.director.v1_5.domain.VmPendingQuestion;
import org.jclouds.vcloud.director.v1_5.domain.VmQuestionAnswer;
import org.jclouds.vcloud.director.v1_5.domain.ovf.NetworkSection;
import org.jclouds.vcloud.director.v1_5.domain.ovf.OperatingSystemSection;
import org.jclouds.vcloud.director.v1_5.domain.ovf.RASD;
import org.jclouds.vcloud.director.v1_5.domain.ovf.StartupSection;
import org.jclouds.vcloud.director.v1_5.domain.ovf.VirtualHardwareSection;
/**
* Provides synchronous access to {@link VApp} objects.

View File

@ -35,11 +35,8 @@ import org.jclouds.vcloud.director.v1_5.domain.ovf.Disk;
import org.jclouds.vcloud.director.v1_5.domain.ovf.DiskSection;
import org.jclouds.vcloud.director.v1_5.domain.ovf.Envelope;
import org.jclouds.vcloud.director.v1_5.domain.ovf.Network;
import org.jclouds.vcloud.director.v1_5.domain.ovf.NetworkSection;
import org.jclouds.vcloud.director.v1_5.domain.ovf.OperatingSystemSection;
import org.jclouds.vcloud.director.v1_5.domain.ovf.ProductSection;
import org.jclouds.vcloud.director.v1_5.domain.ovf.SectionType;
import org.jclouds.vcloud.director.v1_5.domain.ovf.VirtualHardwareSection;
import org.jclouds.vcloud.director.v1_5.domain.ovf.VirtualSystem;
import org.jclouds.vcloud.director.v1_5.domain.ovf.environment.EnvironmentType;

View File

@ -27,6 +27,8 @@ import java.util.concurrent.TimeUnit;
import org.jclouds.vcloud.director.v1_5.VCloudDirectorException;
import org.jclouds.vcloud.director.v1_5.VCloudDirectorLiveTestConstants;
import org.jclouds.vcloud.director.v1_5.domain.AccessSetting;
import org.jclouds.vcloud.director.v1_5.domain.AccessSettings;
import org.jclouds.vcloud.director.v1_5.domain.ControlAccessParams;
import org.jclouds.vcloud.director.v1_5.domain.DeployVAppParams;
import org.jclouds.vcloud.director.v1_5.domain.GuestCustomizationSection;
@ -37,6 +39,8 @@ import org.jclouds.vcloud.director.v1_5.domain.MediaInsertOrEjectParams;
import org.jclouds.vcloud.director.v1_5.domain.NetworkConfigSection;
import org.jclouds.vcloud.director.v1_5.domain.NetworkConfiguration;
import org.jclouds.vcloud.director.v1_5.domain.NetworkConnectionSection;
import org.jclouds.vcloud.director.v1_5.domain.NetworkSection;
import org.jclouds.vcloud.director.v1_5.domain.OperatingSystemSection;
import org.jclouds.vcloud.director.v1_5.domain.Owner;
import org.jclouds.vcloud.director.v1_5.domain.ProductSectionList;
import org.jclouds.vcloud.director.v1_5.domain.RasdItemsList;
@ -45,19 +49,16 @@ import org.jclouds.vcloud.director.v1_5.domain.Reference;
import org.jclouds.vcloud.director.v1_5.domain.RelocateParams;
import org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status;
import org.jclouds.vcloud.director.v1_5.domain.RuntimeInfoSection;
import org.jclouds.vcloud.director.v1_5.domain.StartupSection;
import org.jclouds.vcloud.director.v1_5.domain.Task;
import org.jclouds.vcloud.director.v1_5.domain.UndeployVAppParams;
import org.jclouds.vcloud.director.v1_5.domain.VApp;
import org.jclouds.vcloud.director.v1_5.domain.VAppNetworkConfiguration;
import org.jclouds.vcloud.director.v1_5.domain.VAppTemplate;
import org.jclouds.vcloud.director.v1_5.domain.Vdc;
import org.jclouds.vcloud.director.v1_5.domain.VirtualHardwareSection;
import org.jclouds.vcloud.director.v1_5.domain.VmPendingQuestion;
import org.jclouds.vcloud.director.v1_5.domain.VmQuestionAnswer;
import org.jclouds.vcloud.director.v1_5.domain.ovf.NetworkSection;
import org.jclouds.vcloud.director.v1_5.domain.ovf.OperatingSystemSection;
import org.jclouds.vcloud.director.v1_5.domain.ovf.RASD;
import org.jclouds.vcloud.director.v1_5.domain.ovf.StartupSection;
import org.jclouds.vcloud.director.v1_5.domain.ovf.VirtualHardwareSection;
import org.jclouds.vcloud.director.v1_5.internal.BaseVCloudDirectorClientLiveTest;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
@ -72,7 +73,7 @@ import com.google.common.collect.Iterables;
*
* @author grkvlt@apache.org
*/
@Test(groups = { "live", "user", "vapp" }, testName = "VAppClientLiveTest")
@Test(groups = { "live", "user", "vapp" }, singleThreaded = true, testName = "VAppClientLiveTest")
public class VAppClientLiveTest extends BaseVCloudDirectorClientLiveTest {
public static final String VAPP = "vApp";
@ -154,7 +155,7 @@ public class VAppClientLiveTest extends BaseVCloudDirectorClientLiveTest {
vApp = vAppClient.getVApp(vApp.getHref());
Integer deployedStatus = Status.DEPLOYED.getValue();
assertEquals(vApp.getStatus(), deployedStatus, String.format(OBJ_FIELD_EQ, VAPP, "status", deployedStatus, "deployed"));
assertEquals(vApp.getStatus(), deployedStatus, String.format(OBJ_FIELD_EQ, VAPP, "status", deployedStatus, vApp.getStatus()));
}
@Test(testName = "POST /vApp/{id}/power/action/powerOn", dependsOnMethods = { "testDeployVApp" })
@ -165,10 +166,10 @@ public class VAppClientLiveTest extends BaseVCloudDirectorClientLiveTest {
vApp = vAppClient.getVApp(vApp.getHref());
Integer poweredOnStatus = Status.POWERED_ON.getValue();
assertEquals(vApp.getStatus(), poweredOnStatus, String.format(OBJ_FIELD_EQ, VAPP, "status", poweredOnStatus, "powered on"));
assertEquals(vApp.getStatus(), poweredOnStatus, String.format(OBJ_FIELD_EQ, VAPP, "status", poweredOnStatus, vApp.getStatus()));
}
@Test(testName = "POST /vApp/{id}/power/action/powerOff", dependsOnMethods = { "testPowerOnVApp" })
@Test(testName = "POST /vApp/{id}/power/action/powerOff", dependsOnMethods = { "testUndeployVApp" })
public void testPowerOffVApp() {
// The method under test
Task powerOffVApp = vAppClient.powerOff(vApp.getHref());
@ -176,26 +177,44 @@ public class VAppClientLiveTest extends BaseVCloudDirectorClientLiveTest {
vApp = vAppClient.getVApp(vApp.getHref());
Integer poweredOffStatus = Status.POWERED_OFF.getValue();
assertEquals(vApp.getStatus(), poweredOffStatus, String.format(OBJ_FIELD_EQ, VAPP, "status", poweredOffStatus, "powered off"));
assertEquals(vApp.getStatus(), poweredOffStatus, String.format(OBJ_FIELD_EQ, VAPP, "status", poweredOffStatus, vApp.getStatus()));
}
@Test(enabled = false, testName = "POST /vApp/{id}/action/consolidate", dependsOnMethods = { "testGetVApp" })
@Test(testName = "POST /vApp/{id}/action/consolidate", dependsOnMethods = { "testGetVApp" })
public void testConsolidateVApp(URI vAppURI) {
// The method under test
Task consolidateVApp = vAppClient.consolidateVApp(vApp.getHref());
assertTrue(retryTaskSuccess.apply(consolidateVApp), String.format(TASK_COMPLETE_TIMELY, "consolidateVApp"));
}
@Test(enabled = false, testName = "POST /vApp/{id}/action/controlAccess", dependsOnMethods = { "testGetVApp" })
public void testControlAccess() {
@Test(testName = "POST /vApp/{id}/action/controlAccess", dependsOnMethods = { "testGetVApp" })
public void testControlAccessUser() {
ControlAccessParams params = ControlAccessParams.builder()
.sharedToEveryone()
.notSharedToEveryone()
.accessSettings(AccessSettings.builder()
.accessSetting(AccessSetting.builder()
.subject(Reference.builder().href(userURI).build())
.accessLevel("ReadOnly")
.build())
.build())
.build();
// The method under test
ControlAccessParams modified = vAppClient.controlAccess(vApp.getHref(), params);
checkControlAccessParams(modified);
assertEquals(modified, params, String.format(ENTITY_EQUAL, "ControlAccessParams"));
}
@Test(testName = "POST /vApp/{id}/action/controlAccess", dependsOnMethods = { "testControlAccessUser" })
public void testControlAccessEveryone() {
ControlAccessParams params = ControlAccessParams.builder()
.sharedToEveryone()
.everyoneAccessLevel("FullControl")
.build();
// The method under test
ControlAccessParams modified = vAppClient.controlAccess(vApp.getHref(), params);
checkControlAccessParams(modified);
// TODO check individual fields
assertEquals(modified, params, String.format(ENTITY_EQUAL, "ControlAccessParams"));
}
@ -224,7 +243,7 @@ public class VAppClientLiveTest extends BaseVCloudDirectorClientLiveTest {
assertFalse(vApp.isInMaintenanceMode(), String.format(CONDITION_FMT, "InMaintenanceMode", "FALSE", vApp.isInMaintenanceMode()));
}
@Test(enabled = false, testName = "POST /vApp/{id}/action/installVMwareTools", dependsOnMethods = { "testGetVApp" })
@Test(testName = "POST /vApp/{id}/action/installVMwareTools", dependsOnMethods = { "testGetVApp" })
public void testInstallVMwareTools() {
// The method under test
Task installVMwareTools = vAppClient.installVMwareTools(vApp.getHref());
@ -234,7 +253,6 @@ public class VAppClientLiveTest extends BaseVCloudDirectorClientLiveTest {
@Test(enabled = false, testName = "POST /vApp/{id}/action/recomposeVApp", dependsOnMethods = { "testGetVApp" })
public void testRecomposeVApp() {
RecomposeVAppParams params = RecomposeVAppParams.builder()
.build();
// The method under test
@ -245,7 +263,6 @@ public class VAppClientLiveTest extends BaseVCloudDirectorClientLiveTest {
@Test(enabled = false, testName = "POST /vApp/{id}/action/relocate", dependsOnMethods = { "testGetVApp" })
public void testRelocate() {
RelocateParams params = RelocateParams.builder()
.build();
// The method under test
@ -253,15 +270,18 @@ public class VAppClientLiveTest extends BaseVCloudDirectorClientLiveTest {
assertTrue(retryTaskSuccess.apply(relocate), String.format(TASK_COMPLETE_TIMELY, "relocate"));
}
@Test(enabled = false, testName = "POST /vApp/{id}/action/undeploy", dependsOnMethods = { "testGetVApp" })
public void testUndeploy() {
@Test(testName = "POST /vApp/{id}/action/undeploy", dependsOnMethods = { "testDeployVApp" })
public void testUndeployVApp() {
UndeployVAppParams params = UndeployVAppParams.builder()
.build();
// The method under test
Task undeploy = vAppClient.undeploy(vApp.getHref(), params);
assertTrue(retryTaskSuccess.apply(undeploy), String.format(TASK_COMPLETE_TIMELY, "undeploy"));
vApp = vAppClient.getVApp(vApp.getHref());
Integer resolvedStatus = Status.RESOLVED.getValue();
assertEquals(vApp.getStatus(), resolvedStatus, String.format(OBJ_FIELD_EQ, VAPP, "status", resolvedStatus, vApp.getStatus()));
}
@Test(enabled = false, testName = "POST /vApp/{id}/action/upgradeHardwareVersion", dependsOnMethods = { "testGetVApp" })
@ -274,8 +294,8 @@ public class VAppClientLiveTest extends BaseVCloudDirectorClientLiveTest {
@Test(enabled = false, testName = "POST /vApp/{id}/power/action/reboot", dependsOnMethods = { "testGetVApp" })
public void testReboot() {
// The method under test
Task powerOffVApp = vAppClient.reboot(vApp.getHref());
assertTrue(retryTaskSuccess.apply(powerOffVApp), String.format(TASK_COMPLETE_TIMELY, "powerOffVApp"));
Task reboot = vAppClient.reboot(vApp.getHref());
assertTrue(retryTaskSuccess.apply(reboot), String.format(TASK_COMPLETE_TIMELY, "reboot"));
vApp = vAppClient.getVApp(vApp.getHref());
Integer poweredOnStatus = Status.POWERED_ON.getValue();
@ -285,8 +305,8 @@ public class VAppClientLiveTest extends BaseVCloudDirectorClientLiveTest {
@Test(enabled = false, testName = "POST /vApp/{id}/power/action/reset", dependsOnMethods = { "testGetVApp" })
public void testReset() {
// The method under test
Task powerOffVApp = vAppClient.reset(vApp.getHref());
assertTrue(retryTaskSuccess.apply(powerOffVApp), String.format(TASK_COMPLETE_TIMELY, "powerOffVApp"));
Task reset = vAppClient.reset(vApp.getHref());
assertTrue(retryTaskSuccess.apply(reset), String.format(TASK_COMPLETE_TIMELY, "reset"));
vApp = vAppClient.getVApp(vApp.getHref());
Integer poweredOffStatus = Status.POWERED_ON.getValue();
@ -296,8 +316,8 @@ public class VAppClientLiveTest extends BaseVCloudDirectorClientLiveTest {
@Test(enabled = false, testName = "POST /vApp/{id}/power/action/shutdown", dependsOnMethods = { "testGetVApp" })
public void testShutdown() {
// The method under test
Task powerOffVApp = vAppClient.shutdown(vApp.getHref());
assertTrue(retryTaskSuccess.apply(powerOffVApp), String.format(TASK_COMPLETE_TIMELY, "powerOffVApp"));
Task shutdown = vAppClient.shutdown(vApp.getHref());
assertTrue(retryTaskSuccess.apply(shutdown), String.format(TASK_COMPLETE_TIMELY, "shutdown"));
vApp = vAppClient.getVApp(vApp.getHref());
Integer poweredOffStatus = Status.POWERED_OFF.getValue();
@ -307,26 +327,26 @@ public class VAppClientLiveTest extends BaseVCloudDirectorClientLiveTest {
@Test(enabled = false, testName = "POST /vApp/{id}/power/action/suspend", dependsOnMethods = { "testGetVApp" })
public void testSuspend() {
// The method under test
Task powerOffVApp = vAppClient.suspend(vApp.getHref());
assertTrue(retryTaskSuccess.apply(powerOffVApp), String.format(TASK_COMPLETE_TIMELY, "powerOffVApp"));
Task suspend = vAppClient.suspend(vApp.getHref());
assertTrue(retryTaskSuccess.apply(suspend), String.format(TASK_COMPLETE_TIMELY, "suspend"));
vApp = vAppClient.getVApp(vApp.getHref());
Integer poweredOffStatus = Status.POWERED_OFF.getValue();
assertEquals(vApp.getStatus(), poweredOffStatus, String.format(OBJ_FIELD_EQ, VAPP, "status", poweredOffStatus, "powered off"));
}
@Test(enabled = false, testName = "GET /vApp/{id}/controlAccess", dependsOnMethods = { "testGetVApp" })
@Test(testName = "GET /vApp/{id}/controlAccess", dependsOnMethods = { "testGetVApp" })
public void testGetControlAccess() {
// The method under test
ControlAccessParams controlAccess = vAppClient.getControlAccess(vApp.getHref());
// checkControlAccessParams(controlAccess);
checkControlAccessParams(controlAccess);
}
@Test(enabled = false, testName = "GET /vApp/{id}/guestCustomizationSection", dependsOnMethods = { "testGetVApp" })
@Test(testName = "GET /vApp/{id}/guestCustomizationSection", dependsOnMethods = { "testGetVApp" })
public void testGetGuestCustomizationSection() {
// The method under test
GuestCustomizationSection section = vAppClient.getGuestCustomizationSection(vApp.getHref());
// checkGuestCustomizationSection(section);
checkGuestCustomizationSection(section);
}
@Test(enabled = false, testName = "PUT /vApp/{id}/guestCustomizationSection", dependsOnMethods = { "testGetGuestCustomizationSection" })
@ -343,11 +363,11 @@ public class VAppClientLiveTest extends BaseVCloudDirectorClientLiveTest {
// assertEquals(modified.getX, "");
}
@Test(enabled = false, testName = "GET /vApp/{id}/leaseSettingsSection", dependsOnMethods = { "testGetVApp" })
@Test(testName = "GET /vApp/{id}/leaseSettingsSection", dependsOnMethods = { "testGetVApp" })
public void testGetLeaseSettingsSection() {
// The method under test
LeaseSettingsSection section = vAppClient.getLeaseSettingsSection(vApp.getHref());
// checkLeaseSettingsSection(section);
checkLeaseSettingsSection(section);
}
@Test(enabled = false, testName = "PUT /vApp/{id}/leaseSettingsSection", dependsOnMethods = { "testGetLeaseSettingsSection" })
@ -384,11 +404,11 @@ public class VAppClientLiveTest extends BaseVCloudDirectorClientLiveTest {
assertTrue(retryTaskSuccess.apply(ejectMedia), String.format(TASK_COMPLETE_TIMELY, "ejectMedia"));
}
@Test(enabled = false, testName = "GET /vApp/{id}/networkConfigSection", dependsOnMethods = { "testGetVApp" })
@Test(testName = "GET /vApp/{id}/networkConfigSection", dependsOnMethods = { "testGetVApp" })
public void testGetNetworkConfigSection() {
// The method under test
NetworkConfigSection section = vAppClient.getNetworkConfigSection(vApp.getHref());
// checkNetworkConfigSection(section);
checkNetworkConfigSection(section);
}
@Test(enabled = false, testName = "PUT /vApp/{id}/networkConfigSection", dependsOnMethods = { "testGetNetworkConfigSection" })
@ -405,11 +425,11 @@ public class VAppClientLiveTest extends BaseVCloudDirectorClientLiveTest {
// assertEquals(modified.getX, "");
}
@Test(enabled = false, testName = "GET /vApp/{id}/networkConnectionSection", dependsOnMethods = { "testGetVApp" })
@Test(testName = "GET /vApp/{id}/networkConnectionSection", dependsOnMethods = { "testGetVApp" })
public void testGetNetworkConnectionSection() {
// The method under test
NetworkConnectionSection section = vAppClient.getNetworkConnectionSection(vApp.getHref());
// checkNetworkConnectionSection(section);
checkNetworkConnectionSection(section);
}
@Test(enabled = false, testName = "PUT /vApp/{id}/networkConnectionSection", dependsOnMethods = { "testGetNetworkConnectionSection" })
@ -430,14 +450,14 @@ public class VAppClientLiveTest extends BaseVCloudDirectorClientLiveTest {
public void testGetNetworkSection() {
// The method under test
NetworkSection section = vAppClient.getNetworkSection(vApp.getHref());
// checkNetworkSection(section);
// checkNetworkSection(section);
}
@Test(enabled = false, testName = "GET /vApp/{id}/operatingSystemSection", dependsOnMethods = { "testGetVApp" })
public void testGetOperatingSystemSection() {
// The method under test
OperatingSystemSection section = vAppClient.getOperatingSystemSection(vApp.getHref());
// checkOperatingSystemSection(section);
// checkOperatingSystemSection(section);
}
@Test(enabled = false, testName = "PUT /vApp/{id}/operatingSystemSection", dependsOnMethods = { "testGetOperatingSystemSection" })
@ -454,16 +474,17 @@ public class VAppClientLiveTest extends BaseVCloudDirectorClientLiveTest {
// assertEquals(modified.getX, "");
}
@Test(enabled = false, testName = "GET /vApp/{id}/owner", dependsOnMethods = { "testGetVApp" })
@Test(testName = "GET /vApp/{id}/owner", dependsOnMethods = { "testGetVApp" })
public void testGetOwner() {
// The method under test
Owner owner = vAppClient.getOwner(vApp.getHref());
checkOwner(owner);
}
@Test(enabled = false, testName = "PUT /vApp/{id}/owner", dependsOnMethods = { "testGetOwner" })
@Test(testName = "PUT /vApp/{id}/owner", dependsOnMethods = { "testGetOwner" })
public void testModifyOwner() {
Owner newOwner = Owner.builder()
.user(Reference.builder().href(userURI).build())
.build();
// The method under test
@ -474,11 +495,11 @@ public class VAppClientLiveTest extends BaseVCloudDirectorClientLiveTest {
assertEquals(modified, newOwner);
}
@Test(enabled = false, testName = "GET /vApp/{id}/productSections", dependsOnMethods = { "testGetVApp" })
@Test(testName = "GET /vApp/{id}/productSections", dependsOnMethods = { "testGetVApp" })
public void testGetProductSections() {
// The method under test
ProductSectionList sectionList = vAppClient.getProductSections(vApp.getHref());
// checkProductSectionList(sectionList);
checkProductSectionList(sectionList);
}
@Test(enabled = false, testName = "PUT /vApp/{id}/productSections", dependsOnMethods = { "testGetProductSections" })
@ -518,7 +539,7 @@ public class VAppClientLiveTest extends BaseVCloudDirectorClientLiveTest {
public void testGetRuntimeInfoSection() {
// The method under test
RuntimeInfoSection section = vAppClient.getRuntimeInfoSection(vApp.getHref());
// checkRuntimeInfoSection(section);
// checkRuntimeInfoSection(section);
}
@Test(enabled = false, testName = "GET /vApp/{id}/screen", dependsOnMethods = { "testGetVApp" })
@ -540,7 +561,7 @@ public class VAppClientLiveTest extends BaseVCloudDirectorClientLiveTest {
public void testGetStartupSection() {
// The method under test
StartupSection section = vAppClient.getStartupSection(vApp.getHref());
// checkStartupSection(section);
// checkStartupSection(section);
}
@Test(enabled = false, testName = "PUT /vApp/{id}/startupSection", dependsOnMethods = { "testGetStartupSection" })
@ -557,14 +578,14 @@ public class VAppClientLiveTest extends BaseVCloudDirectorClientLiveTest {
// assertEquals(modified.getX, "");
}
@Test(enabled = false, testName = "GET /vApp/{id}/virtualHardwareSection", dependsOnMethods = { "testGetVApp" })
@Test(testName = "GET /vApp/{id}/virtualHardwareSection", dependsOnMethods = { "testGetVApp" })
public void testGetVirtualHardwareSection() {
// Method under test
VirtualHardwareSection hardware = vAppClient.getVirtualHardwareSection(vApp.getHref());
checkVirtualHardwareSection(hardware);
}
@Test(enabled = false, testName = "PUT /vApp/{id}/virtualHardwareSection", dependsOnMethods = { "testGetVirtualHardwareSection" })
@Test(testName = "PUT /vApp/{id}/virtualHardwareSection", dependsOnMethods = { "testGetVirtualHardwareSection" })
public void testModifyVirtualHardwareSection() {
VirtualHardwareSection hardware = vAppClient.getVirtualHardwareSection(vApp.getHref());
hardware.setInfo("New Info");
@ -580,7 +601,7 @@ public class VAppClientLiveTest extends BaseVCloudDirectorClientLiveTest {
@Test(enabled = false, testName = "GET /vApp/{id}/virtualHardwareSection/cpu", dependsOnMethods = { "testGetVirtualHardwareSection" })
public void testGetVirtualHardwareSectionCpu() {
RASD rasd = vAppClient.getVirtualHardwareSectionCpu(vApp.getHref());
// checkRASD(rasd);
// checkRASD(rasd);
}
@Test(enabled = false, testName = "PUT /vApp/{id}/virtualHardwareSection/cpu", dependsOnMethods = { "testGetVirtualHardwareSectionCpu" })

View File

@ -59,7 +59,7 @@ import com.google.inject.Module;
* @author Adrian Cole
* @author grkvlt@apache.org
*/
@Listeners(FormatApiResultsListener.class)
//@Listeners(FormatApiResultsListener.class)
@Test(groups = "live")
public abstract class BaseVCloudDirectorClientLiveTest extends BaseVersionedServiceLiveTest {
@ -97,6 +97,7 @@ public abstract class BaseVCloudDirectorClientLiveTest extends BaseVersionedServ
protected URI vAppTemplateURI;
protected URI networkURI;
protected URI vdcURI;
protected URI userURI;
// TODO change properties to URI, not id
@SuppressWarnings("unchecked")
@ -114,6 +115,10 @@ public abstract class BaseVCloudDirectorClientLiveTest extends BaseVersionedServ
String networkId = Strings.emptyToNull(System.getProperty("test." + provider + ".network-id"));
if (networkId != null)
networkURI = URI.create(endpoint + "/network/" + networkId);
String userId = Strings.emptyToNull(System.getProperty("test." + provider + ".user-id"));
if (userId != null)
userURI = URI.create(endpoint + "/admin/user/" + userId);
if (Iterables.any(Lists.newArrayList(catalogName, vAppTemplateURI, networkURI, vdcURI), Predicates.isNull())) {
Org thisOrg = context.getApi().getOrgClient().getOrg(
@ -128,6 +133,10 @@ public abstract class BaseVCloudDirectorClientLiveTest extends BaseVersionedServ
networkURI = Iterables.find(thisOrg.getLinks(),
ReferenceTypePredicates.<Link> typeEquals(VCloudDirectorMediaType.ORG_NETWORK)).getHref();
if (userURI == null)
userURI = Iterables.find(thisOrg.getLinks(),
ReferenceTypePredicates.<Link> typeEquals(VCloudDirectorMediaType.ADMIN_USER)).getHref();
if (catalogName == null)
catalogName = Iterables.find(thisOrg.getLinks(),
ReferenceTypePredicates.<Link> typeEquals(VCloudDirectorMediaType.CATALOG)).getName();

View File

@ -0,0 +1,266 @@
<?xml version="1.0" encoding="UTF-8"?>
<VApp xmlns="http://www.vmware.com/vcloud/v1.5" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" deployed="false" status="8" name="test-vapp" id="urn:vcloud:vapp:d0e2b6b9-4381-4ddc-9572-cdfae54059be" type="application/vnd.vmware.vcloud.vApp+xml" href="https://mycloud.greenhousedata.com/api/vApp/vapp-d0e2b6b9-4381-4ddc-9572-cdfae54059be" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2.22.0/CIM_VirtualSystemSettingData.xsd http://schemas.dmtf.org/ovf/envelope/1 http://schemas.dmtf.org/ovf/envelope/1/dsp8023_1.1.0.xsd http://www.vmware.com/vcloud/v1.5 http://mycloud.greenhousedata.com/api/v1.5/schema/master.xsd http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2.22.0/CIM_ResourceAllocationSettingData.xsd">
<Link rel="power:powerOn" href="https://mycloud.greenhousedata.com/api/vApp/vapp-d0e2b6b9-4381-4ddc-9572-cdfae54059be/power/action/powerOn"/>
<Link rel="deploy" type="application/vnd.vmware.vcloud.deployVAppParams+xml" href="https://mycloud.greenhousedata.com/api/vApp/vapp-d0e2b6b9-4381-4ddc-9572-cdfae54059be/action/deploy"/>
<Link rel="down" type="application/vnd.vmware.vcloud.vAppNetwork+xml" name="orgNet-cloudsoft-External" href="https://mycloud.greenhousedata.com/api/network/2a2e2da4-446a-4ebc-a086-06df7c9570f0"/>
<Link rel="down" type="application/vnd.vmware.vcloud.controlAccess+xml" href="https://mycloud.greenhousedata.com/api/vApp/vapp-d0e2b6b9-4381-4ddc-9572-cdfae54059be/controlAccess/"/>
<Link rel="controlAccess" type="application/vnd.vmware.vcloud.controlAccess+xml" href="https://mycloud.greenhousedata.com/api/vApp/vapp-d0e2b6b9-4381-4ddc-9572-cdfae54059be/action/controlAccess"/>
<Link rel="recompose" type="application/vnd.vmware.vcloud.recomposeVAppParams+xml" href="https://mycloud.greenhousedata.com/api/vApp/vapp-d0e2b6b9-4381-4ddc-9572-cdfae54059be/action/recomposeVApp"/>
<Link rel="up" type="application/vnd.vmware.vcloud.vdc+xml" href="https://mycloud.greenhousedata.com/api/vdc/e9cd3387-ac57-4d27-a481-9bee75e0690f"/>
<Link rel="edit" type="application/vnd.vmware.vcloud.vApp+xml" href="https://mycloud.greenhousedata.com/api/vApp/vapp-d0e2b6b9-4381-4ddc-9572-cdfae54059be"/>
<Link rel="remove" href="https://mycloud.greenhousedata.com/api/vApp/vapp-d0e2b6b9-4381-4ddc-9572-cdfae54059be"/>
<Link rel="down" type="application/vnd.vmware.vcloud.owner+xml" href="https://mycloud.greenhousedata.com/api/vApp/vapp-d0e2b6b9-4381-4ddc-9572-cdfae54059be/owner"/>
<Link rel="down" type="application/vnd.vmware.vcloud.metadata+xml" href="https://mycloud.greenhousedata.com/api/vApp/vapp-d0e2b6b9-4381-4ddc-9572-cdfae54059be/metadata"/>
<Description>Test VApp</Description>
<LeaseSettingsSection type="application/vnd.vmware.vcloud.leaseSettingsSection+xml" href="https://mycloud.greenhousedata.com/api/vApp/vapp-d0e2b6b9-4381-4ddc-9572-cdfae54059be/leaseSettingsSection/" ovf:required="false">
<ovf:Info>Lease settings section</ovf:Info>
<Link rel="edit" type="application/vnd.vmware.vcloud.leaseSettingsSection+xml" href="https://mycloud.greenhousedata.com/api/vApp/vapp-d0e2b6b9-4381-4ddc-9572-cdfae54059be/leaseSettingsSection/"/>
<DeploymentLeaseInSeconds>5184000</DeploymentLeaseInSeconds>
<StorageLeaseInSeconds>5184000</StorageLeaseInSeconds>
<StorageLeaseExpiration>2012-05-11T10:41:19.420-06:00</StorageLeaseExpiration>
</LeaseSettingsSection>
<ovf:StartupSection xmlns:vcloud="http://www.vmware.com/vcloud/v1.5" vcloud:href="https://mycloud.greenhousedata.com/api/vApp/vapp-d0e2b6b9-4381-4ddc-9572-cdfae54059be/startupSection/" vcloud:type="application/vnd.vmware.vcloud.startupSection+xml">
<ovf:Info>VApp startup section</ovf:Info>
<ovf:Item ovf:stopDelay="0" ovf:stopAction="powerOff" ovf:startDelay="0" ovf:startAction="powerOn" ovf:order="0" ovf:id="UbuntuServer-x64-2GB"/>
<Link rel="edit" type="application/vnd.vmware.vcloud.startupSection+xml" href="https://mycloud.greenhousedata.com/api/vApp/vapp-d0e2b6b9-4381-4ddc-9572-cdfae54059be/startupSection/"/>
</ovf:StartupSection>
<ovf:NetworkSection xmlns:vcloud="http://www.vmware.com/vcloud/v1.5" vcloud:href="https://mycloud.greenhousedata.com/api/vApp/vapp-d0e2b6b9-4381-4ddc-9572-cdfae54059be/networkSection/" vcloud:type="application/vnd.vmware.vcloud.networkSection+xml">
<ovf:Info>The list of logical networks</ovf:Info>
<ovf:Network ovf:name="orgNet-cloudsoft-External">
<ovf:Description>Direct access to internet</ovf:Description>
</ovf:Network>
<ovf:Network ovf:name="none">
<ovf:Description>This is a special place-holder used for disconnected network interfaces.</ovf:Description>
</ovf:Network>
</ovf:NetworkSection>
<NetworkConfigSection type="application/vnd.vmware.vcloud.networkConfigSection+xml" href="https://mycloud.greenhousedata.com/api/vApp/vapp-d0e2b6b9-4381-4ddc-9572-cdfae54059be/networkConfigSection/" ovf:required="false">
<ovf:Info>The configuration parameters for logical networks</ovf:Info>
<Link rel="edit" type="application/vnd.vmware.vcloud.networkConfigSection+xml" href="https://mycloud.greenhousedata.com/api/vApp/vapp-d0e2b6b9-4381-4ddc-9572-cdfae54059be/networkConfigSection/"/>
<NetworkConfig networkName="orgNet-cloudsoft-External">
<Link rel="repair" href="https://mycloud.greenhousedata.com/api/admin/network/2a2e2da4-446a-4ebc-a086-06df7c9570f0/action/reset"/>
<Description>Direct access to internet</Description>
<Configuration>
<IpScope>
<IsInherited>true</IsInherited>
<Gateway>68.168.252.1</Gateway>
<Netmask>255.255.255.0</Netmask>
<Dns1>208.89.160.139</Dns1>
<Dns2>69.146.232.254</Dns2>
<DnsSuffix>greenhousedata.com</DnsSuffix>
<IpRanges>
<IpRange>
<StartAddress>68.168.252.5</StartAddress>
<EndAddress>68.168.252.254</EndAddress>
</IpRange>
</IpRanges>
</IpScope>
<ParentNetwork type="application/vnd.vmware.vcloud.network+xml" name="orgNet-cloudsoft-External" href="https://mycloud.greenhousedata.com/api/network/b466c0c5-8a5c-4335-b703-a2e2e6b5f3e1"/>
<FenceMode>bridged</FenceMode>
<RetainNetInfoAcrossDeployments>false</RetainNetInfoAcrossDeployments>
<Features>
<DhcpService>
<IsEnabled>false</IsEnabled>
<DefaultLeaseTime>3600</DefaultLeaseTime>
<MaxLeaseTime>7200</MaxLeaseTime>
<IpRange>
<StartAddress>68.168.252.2</StartAddress>
<EndAddress>68.168.252.4</EndAddress>
</IpRange>
</DhcpService>
<FirewallService>
<IsEnabled>true</IsEnabled>
<DefaultAction>drop</DefaultAction>
<LogDefaultAction>false</LogDefaultAction>
<FirewallRule>
<IsEnabled>true</IsEnabled>
<Description>Allow all outgoing traffic</Description>
<Policy>allow</Policy>
<Protocols>
<Any>true</Any>
</Protocols>
<Port>-1</Port>
<DestinationIp>Any</DestinationIp>
<SourcePort>-1</SourcePort>
<SourceIp>Any</SourceIp>
<Direction>out</Direction>
<EnableLogging>false</EnableLogging>
</FirewallRule>
</FirewallService>
<NatService>
<IsEnabled>true</IsEnabled>
<NatType>ipTranslation</NatType>
<Policy>allowTraffic</Policy>
</NatService>
<StaticRoutingService>
<IsEnabled>false</IsEnabled>
</StaticRoutingService>
</Features>
<SyslogServerSettings/>
</Configuration>
<IsDeployed>false</IsDeployed>
</NetworkConfig>
<NetworkConfig networkName="none">
<Description>This is a special place-holder used for disconnected network interfaces.</Description>
<Configuration>
<IpScope>
<IsInherited>false</IsInherited>
<Gateway>196.254.254.254</Gateway>
<Netmask>255.255.0.0</Netmask>
<Dns1>196.254.254.254</Dns1>
</IpScope>
<FenceMode>isolated</FenceMode>
</Configuration>
<IsDeployed>false</IsDeployed>
</NetworkConfig>
</NetworkConfigSection>
<Owner type="application/vnd.vmware.vcloud.owner+xml">
<User type="application/vnd.vmware.admin.user+xml" name="acole" href="https://mycloud.greenhousedata.com/api/admin/user/c090335b-708c-4c1c-9e3d-89560d002120"/>
</Owner>
<InMaintenanceMode>false</InMaintenanceMode>
<Children>
<Vm needsCustomization="true" deployed="false" status="8" name="UbuntuServer-x64-2GB" id="urn:vcloud:vm:5a030301-0928-48a4-a834-57edd16fdccd" type="application/vnd.vmware.vcloud.vm+xml" href="https://mycloud.greenhousedata.com/api/vApp/vm-5a030301-0928-48a4-a834-57edd16fdccd">
<Link rel="power:powerOn" href="https://mycloud.greenhousedata.com/api/vApp/vm-5a030301-0928-48a4-a834-57edd16fdccd/power/action/powerOn"/>
<Link rel="deploy" type="application/vnd.vmware.vcloud.deployVAppParams+xml" href="https://mycloud.greenhousedata.com/api/vApp/vm-5a030301-0928-48a4-a834-57edd16fdccd/action/deploy"/>
<Link rel="edit" type="application/vnd.vmware.vcloud.vm+xml" href="https://mycloud.greenhousedata.com/api/vApp/vm-5a030301-0928-48a4-a834-57edd16fdccd"/>
<Link rel="remove" href="https://mycloud.greenhousedata.com/api/vApp/vm-5a030301-0928-48a4-a834-57edd16fdccd"/>
<Link rel="down" type="application/vnd.vmware.vcloud.metadata+xml" href="https://mycloud.greenhousedata.com/api/vApp/vm-5a030301-0928-48a4-a834-57edd16fdccd/metadata"/>
<Link rel="screen:thumbnail" href="https://mycloud.greenhousedata.com/api/vApp/vm-5a030301-0928-48a4-a834-57edd16fdccd/screen"/>
<Link rel="media:insertMedia" type="application/vnd.vmware.vcloud.mediaInsertOrEjectParams+xml" href="https://mycloud.greenhousedata.com/api/vApp/vm-5a030301-0928-48a4-a834-57edd16fdccd/media/action/insertMedia"/>
<Link rel="media:ejectMedia" type="application/vnd.vmware.vcloud.mediaInsertOrEjectParams+xml" href="https://mycloud.greenhousedata.com/api/vApp/vm-5a030301-0928-48a4-a834-57edd16fdccd/media/action/ejectMedia"/>
<Link rel="upgrade" href="https://mycloud.greenhousedata.com/api/vApp/vm-5a030301-0928-48a4-a834-57edd16fdccd/action/upgradeHardwareVersion"/>
<Link rel="up" type="application/vnd.vmware.vcloud.vApp+xml" href="https://mycloud.greenhousedata.com/api/vApp/vapp-d0e2b6b9-4381-4ddc-9572-cdfae54059be"/>
<Description/>
<ovf:VirtualHardwareSection xmlns:vcloud="http://www.vmware.com/vcloud/v1.5" ovf:transport="" vcloud:href="https://mycloud.greenhousedata.com/api/vApp/vm-5a030301-0928-48a4-a834-57edd16fdccd/virtualHardwareSection/" vcloud:type="application/vnd.vmware.vcloud.virtualHardwareSection+xml">
<ovf:Info>Virtual hardware requirements</ovf:Info>
<ovf:System>
<vssd:ElementName>Virtual Hardware Family</vssd:ElementName>
<vssd:InstanceID>0</vssd:InstanceID>
<vssd:VirtualSystemIdentifier>UbuntuServer-x64-2GB</vssd:VirtualSystemIdentifier>
<vssd:VirtualSystemType>vmx-07</vssd:VirtualSystemType>
</ovf:System>
<ovf:Item>
<rasd:Address>00:50:56:01:01:dc</rasd:Address>
<rasd:AddressOnParent>0</rasd:AddressOnParent>
<rasd:AutomaticAllocation>false</rasd:AutomaticAllocation>
<rasd:Connection vcloud:primaryNetworkConnection="true" vcloud:ipAddressingMode="NONE">none</rasd:Connection>
<rasd:Description>PCNet32 ethernet adapter</rasd:Description>
<rasd:ElementName>Network adapter 0</rasd:ElementName>
<rasd:InstanceID>1</rasd:InstanceID>
<rasd:ResourceSubType>PCNet32</rasd:ResourceSubType>
<rasd:ResourceType>10</rasd:ResourceType>
</ovf:Item>
<ovf:Item>
<rasd:Address>0</rasd:Address>
<rasd:Description>SCSI Controller</rasd:Description>
<rasd:ElementName>SCSI Controller 0</rasd:ElementName>
<rasd:InstanceID>2</rasd:InstanceID>
<rasd:ResourceSubType>lsilogic</rasd:ResourceSubType>
<rasd:ResourceType>6</rasd:ResourceType>
</ovf:Item>
<ovf:Item>
<rasd:AddressOnParent>0</rasd:AddressOnParent>
<rasd:Description>Hard disk</rasd:Description>
<rasd:ElementName>Hard disk 1</rasd:ElementName>
<rasd:HostResource vcloud:capacity="2048" vcloud:busSubType="lsilogic" vcloud:busType="6"/>
<rasd:InstanceID>2000</rasd:InstanceID>
<rasd:Parent>2</rasd:Parent>
<rasd:ResourceType>17</rasd:ResourceType>
</ovf:Item>
<ovf:Item>
<rasd:Address>0</rasd:Address>
<rasd:Description>IDE Controller</rasd:Description>
<rasd:ElementName>IDE Controller 0</rasd:ElementName>
<rasd:InstanceID>3</rasd:InstanceID>
<rasd:ResourceType>5</rasd:ResourceType>
</ovf:Item>
<ovf:Item>
<rasd:AddressOnParent>0</rasd:AddressOnParent>
<rasd:AutomaticAllocation>false</rasd:AutomaticAllocation>
<rasd:Description>CD/DVD Drive</rasd:Description>
<rasd:ElementName>CD/DVD Drive 1</rasd:ElementName>
<rasd:HostResource/>
<rasd:InstanceID>3000</rasd:InstanceID>
<rasd:Parent>3</rasd:Parent>
<rasd:ResourceType>15</rasd:ResourceType>
</ovf:Item>
<ovf:Item>
<rasd:AddressOnParent>0</rasd:AddressOnParent>
<rasd:AutomaticAllocation>false</rasd:AutomaticAllocation>
<rasd:Description>Floppy Drive</rasd:Description>
<rasd:ElementName>Floppy Drive 1</rasd:ElementName>
<rasd:HostResource/>
<rasd:InstanceID>8000</rasd:InstanceID>
<rasd:ResourceType>14</rasd:ResourceType>
</ovf:Item>
<ovf:Item vcloud:href="https://mycloud.greenhousedata.com/api/vApp/vm-5a030301-0928-48a4-a834-57edd16fdccd/virtualHardwareSection/cpu" vcloud:type="application/vnd.vmware.vcloud.rasdItem+xml">
<rasd:AllocationUnits>hertz * 10^6</rasd:AllocationUnits>
<rasd:Description>Number of Virtual CPUs</rasd:Description>
<rasd:ElementName>1 virtual CPU(s)</rasd:ElementName>
<rasd:InstanceID>4</rasd:InstanceID>
<rasd:Reservation>0</rasd:Reservation>
<rasd:ResourceType>3</rasd:ResourceType>
<rasd:VirtualQuantity>1</rasd:VirtualQuantity>
<rasd:Weight>0</rasd:Weight>
<Link rel="edit" type="application/vnd.vmware.vcloud.rasdItem+xml" href="https://mycloud.greenhousedata.com/api/vApp/vm-5a030301-0928-48a4-a834-57edd16fdccd/virtualHardwareSection/cpu"/>
</ovf:Item>
<ovf:Item vcloud:href="https://mycloud.greenhousedata.com/api/vApp/vm-5a030301-0928-48a4-a834-57edd16fdccd/virtualHardwareSection/memory" vcloud:type="application/vnd.vmware.vcloud.rasdItem+xml">
<rasd:AllocationUnits>byte * 2^20</rasd:AllocationUnits>
<rasd:Description>Memory Size</rasd:Description>
<rasd:ElementName>256 MB of memory</rasd:ElementName>
<rasd:InstanceID>5</rasd:InstanceID>
<rasd:Reservation>0</rasd:Reservation>
<rasd:ResourceType>4</rasd:ResourceType>
<rasd:VirtualQuantity>256</rasd:VirtualQuantity>
<rasd:Weight>0</rasd:Weight>
<Link rel="edit" type="application/vnd.vmware.vcloud.rasdItem+xml" href="https://mycloud.greenhousedata.com/api/vApp/vm-5a030301-0928-48a4-a834-57edd16fdccd/virtualHardwareSection/memory"/>
</ovf:Item>
<Link rel="edit" type="application/vnd.vmware.vcloud.virtualHardwareSection+xml" href="https://mycloud.greenhousedata.com/api/vApp/vm-5a030301-0928-48a4-a834-57edd16fdccd/virtualHardwareSection/"/>
<Link rel="down" type="application/vnd.vmware.vcloud.rasdItem+xml" href="https://mycloud.greenhousedata.com/api/vApp/vm-5a030301-0928-48a4-a834-57edd16fdccd/virtualHardwareSection/cpu"/>
<Link rel="edit" type="application/vnd.vmware.vcloud.rasdItem+xml" href="https://mycloud.greenhousedata.com/api/vApp/vm-5a030301-0928-48a4-a834-57edd16fdccd/virtualHardwareSection/cpu"/>
<Link rel="down" type="application/vnd.vmware.vcloud.rasdItem+xml" href="https://mycloud.greenhousedata.com/api/vApp/vm-5a030301-0928-48a4-a834-57edd16fdccd/virtualHardwareSection/memory"/>
<Link rel="edit" type="application/vnd.vmware.vcloud.rasdItem+xml" href="https://mycloud.greenhousedata.com/api/vApp/vm-5a030301-0928-48a4-a834-57edd16fdccd/virtualHardwareSection/memory"/>
<Link rel="down" type="application/vnd.vmware.vcloud.rasdItemsList+xml" href="https://mycloud.greenhousedata.com/api/vApp/vm-5a030301-0928-48a4-a834-57edd16fdccd/virtualHardwareSection/disks"/>
<Link rel="edit" type="application/vnd.vmware.vcloud.rasdItemsList+xml" href="https://mycloud.greenhousedata.com/api/vApp/vm-5a030301-0928-48a4-a834-57edd16fdccd/virtualHardwareSection/disks"/>
<Link rel="down" type="application/vnd.vmware.vcloud.rasdItemsList+xml" href="https://mycloud.greenhousedata.com/api/vApp/vm-5a030301-0928-48a4-a834-57edd16fdccd/virtualHardwareSection/media"/>
<Link rel="down" type="application/vnd.vmware.vcloud.rasdItemsList+xml" href="https://mycloud.greenhousedata.com/api/vApp/vm-5a030301-0928-48a4-a834-57edd16fdccd/virtualHardwareSection/networkCards"/>
<Link rel="edit" type="application/vnd.vmware.vcloud.rasdItemsList+xml" href="https://mycloud.greenhousedata.com/api/vApp/vm-5a030301-0928-48a4-a834-57edd16fdccd/virtualHardwareSection/networkCards"/>
<Link rel="down" type="application/vnd.vmware.vcloud.rasdItemsList+xml" href="https://mycloud.greenhousedata.com/api/vApp/vm-5a030301-0928-48a4-a834-57edd16fdccd/virtualHardwareSection/serialPorts"/>
<Link rel="edit" type="application/vnd.vmware.vcloud.rasdItemsList+xml" href="https://mycloud.greenhousedata.com/api/vApp/vm-5a030301-0928-48a4-a834-57edd16fdccd/virtualHardwareSection/serialPorts"/>
</ovf:VirtualHardwareSection>
<ovf:OperatingSystemSection xmlns:vcloud="http://www.vmware.com/vcloud/v1.5" xmlns:vmw="http://www.vmware.com/schema/ovf" ovf:id="94" vcloud:href="https://mycloud.greenhousedata.com/api/vApp/vm-5a030301-0928-48a4-a834-57edd16fdccd/operatingSystemSection/" vcloud:type="application/vnd.vmware.vcloud.operatingSystemSection+xml" vmw:osType="ubuntu64Guest">
<ovf:Info>Specifies the operating system installed</ovf:Info>
<ovf:Description>Ubuntu Linux (64-bit)</ovf:Description>
<Link rel="edit" type="application/vnd.vmware.vcloud.operatingSystemSection+xml" href="https://mycloud.greenhousedata.com/api/vApp/vm-5a030301-0928-48a4-a834-57edd16fdccd/operatingSystemSection/"/>
</ovf:OperatingSystemSection>
<NetworkConnectionSection type="application/vnd.vmware.vcloud.networkConnectionSection+xml" href="https://mycloud.greenhousedata.com/api/vApp/vm-5a030301-0928-48a4-a834-57edd16fdccd/networkConnectionSection/" ovf:required="false">
<ovf:Info>Specifies the available VM network connections</ovf:Info>
<PrimaryNetworkConnectionIndex>0</PrimaryNetworkConnectionIndex>
<NetworkConnection network="none" needsCustomization="true">
<NetworkConnectionIndex>0</NetworkConnectionIndex>
<IsConnected>false</IsConnected>
<MACAddress>00:50:56:01:01:dc</MACAddress>
<IpAddressAllocationMode>NONE</IpAddressAllocationMode>
</NetworkConnection>
<Link rel="edit" type="application/vnd.vmware.vcloud.networkConnectionSection+xml" href="https://mycloud.greenhousedata.com/api/vApp/vm-5a030301-0928-48a4-a834-57edd16fdccd/networkConnectionSection/"/>
</NetworkConnectionSection>
<GuestCustomizationSection type="application/vnd.vmware.vcloud.guestCustomizationSection+xml" href="https://mycloud.greenhousedata.com/api/vApp/vm-5a030301-0928-48a4-a834-57edd16fdccd/guestCustomizationSection/" ovf:required="false">
<ovf:Info>Specifies Guest OS Customization Settings</ovf:Info>
<Enabled>true</Enabled>
<ChangeSid>false</ChangeSid>
<VirtualMachineId>5a030301-0928-48a4-a834-57edd16fdccd</VirtualMachineId>
<JoinDomainEnabled>false</JoinDomainEnabled>
<UseOrgSettings>false</UseOrgSettings>
<AdminPasswordEnabled>true</AdminPasswordEnabled>
<AdminPasswordAuto>true</AdminPasswordAuto>
<ResetPasswordRequired>false</ResetPasswordRequired>
<ComputerName>UbuntuServer</ComputerName>
<Link rel="edit" type="application/vnd.vmware.vcloud.guestCustomizationSection+xml" href="https://mycloud.greenhousedata.com/api/vApp/vm-5a030301-0928-48a4-a834-57edd16fdccd/guestCustomizationSection/"/>
</GuestCustomizationSection>
<RuntimeInfoSection xmlns:vcloud="http://www.vmware.com/vcloud/v1.5" vcloud:href="https://mycloud.greenhousedata.com/api/vApp/vm-5a030301-0928-48a4-a834-57edd16fdccd/runtimeInfoSection" vcloud:type="application/vnd.vmware.vcloud.virtualHardwareSection+xml">
<ovf:Info>Specifies Runtime info</ovf:Info>
<VMWareTools version="8295"/>
</RuntimeInfoSection>
<VAppScopedLocalId>f114ade7-a63f-4f8b-b30b-44e9ff77e068</VAppScopedLocalId>
</Vm>
</Children>
</VApp>

View File

@ -12,12 +12,12 @@
<ovf:Info>Configuration parameters for logical networks</ovf:Info>
<NetworkConfig networkName="vAppNetwork">
<Configuration>
<ParentNetwork href="https://vcloud.example.com/api/network/b466c0c5-8a5c-4335-b703-a2e2e6b5f3e1" />
<ParentNetwork href="https://mycloud.greenhousedatavcloud.example.com/api/network/b466c0c5-8a5c-4335-b703-a2e2e6b5f3e1" />
<FenceMode>bridged</FenceMode>
</Configuration>
</NetworkConfig>
</NetworkConfigSection>
</InstantiationParams>
<Source href="https://vcloud.example.com/api/vAppTemplate/vappTemplate-33578b29-1437-4b30-9f9a-4d4a3393b913" />
<Source href="https://mycloud.greenhousedata.com/api/vAppTemplate/vappTemplate-33578b29-1437-4b30-9f9a-4d4a3393b913" />
<AllEULAsAccepted>true</AllEULAsAccepted>
</InstantiateVAppTemplateParams>