{
return new ConcreteBuilder();
}
+ @Override
public Builder> toBuilder() {
return builder().fromTasksList(this);
}
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/UploadVAppTemplateParams.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/UploadVAppTemplateParams.java
index 15d18a455d..d40715e3df 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/UploadVAppTemplateParams.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/UploadVAppTemplateParams.java
@@ -43,6 +43,7 @@ public class UploadVAppTemplateParams extends ParamsType {
return new ConcreteBuilder();
}
+ @Override
public Builder> toBuilder() {
return builder().fromUploadVAppTemplateParams(this);
}
@@ -72,6 +73,7 @@ public class UploadVAppTemplateParams extends ParamsType {
}
+ @Override
public UploadVAppTemplateParams build() {
return new UploadVAppTemplateParams(this);
}
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/User.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/User.java
index accc0ece1a..20a54c287e 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/User.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/User.java
@@ -97,6 +97,7 @@ public class User extends EntityType {
return new ConcreteBuilder();
}
+ @Override
public Builder> toBuilder() {
return builder().fromUser(this);
}
@@ -128,6 +129,7 @@ public class User extends EntityType {
/**
* @see EntityType#getName()
*/
+ @Override
public B name(String name) {
return super.name(name.toLowerCase());
}
@@ -284,6 +286,7 @@ public class User extends EntityType {
return self();
}
+ @Override
public User build() {
return new User(this);
}
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/VApp.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/VApp.java
index 44781a7531..09b1ceefd7 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/VApp.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/VApp.java
@@ -45,6 +45,7 @@ public class VApp extends AbstractVAppType {
return new ConcreteBuilder();
}
+ @Override
public Builder> toBuilder() {
return builder().fromVApp(this);
}
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/VAppCreationParams.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/VAppCreationParams.java
index 7fea3e9dda..41da48e1e6 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/VAppCreationParams.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/VAppCreationParams.java
@@ -18,51 +18,165 @@
*/
package org.jclouds.vcloud.director.v1_5.domain;
+import static com.google.common.base.Objects.equal;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
+import com.google.common.base.Objects;
+import com.google.common.base.Objects.ToStringHelper;
/**
* Represents vApp creation parameters.
*
- *
- * <complexType name="VAppCreationParams" />
- *
- *
* @author grkvlt@apache.org
+ * @see
+ * vCloud REST API - VAppCreationParamsType
+ * @since 0.9
*/
-@XmlType(name = "VAppCreationParams")
-public class VAppCreationParams extends VAppCreationParamsType {
+@XmlRootElement(name = "VAppCreationParams")
+@XmlType(name = "VAppCreationParamsType")
+public class VAppCreationParams extends ParamsType {
public static Builder> builder() {
return new ConcreteBuilder();
}
+ @Override
public Builder> toBuilder() {
- return builder().fromVAppCreationParams(this);
+ return builder().fromVAppCreationParamsType(this);
}
private static class ConcreteBuilder extends Builder {
}
- public static abstract class Builder> extends VAppCreationParamsType.Builder {
+ public static abstract class Builder> extends ParamsType.Builder {
- @Override
- public VAppCreationParams build() {
- VAppCreationParams vAppCreationParams = new VAppCreationParams(this);
- return vAppCreationParams;
+ private Reference vAppParent;
+ private InstantiationParams instantiationParams;
+ private Boolean deploy;
+ private Boolean powerOn;
+
+ /**
+ * @see VAppCreationParamsType#getVAppParent()
+ */
+ public B vAppParent(Reference vAppParent) {
+ this.vAppParent = vAppParent;
+ return self();
}
- public B fromVAppCreationParams(VAppCreationParams in) {
- return fromVAppCreationParamsType(in);
+ /**
+ * @see VAppCreationParamsType#getInstantiationParams()
+ */
+ public B instantiationParams(InstantiationParams instantiationParams) {
+ this.instantiationParams = instantiationParams;
+ return self();
+ }
+
+ /**
+ * @see VAppCreationParamsType#isDeploy()
+ */
+ public B deploy(Boolean deploy) {
+ this.deploy = deploy;
+ return self();
+ }
+
+ /**
+ * @see VAppCreationParamsType#isDeploy()
+ */
+ public B deploy() {
+ this.deploy = Boolean.TRUE;
+ return self();
+ }
+
+ /**
+ * @see VAppCreationParamsType#isDeploy()
+ */
+ public B notDeploy() {
+ this.deploy = Boolean.FALSE;
+ return self();
+ }
+
+ /**
+ * @see VAppCreationParamsType#isPowerOn()
+ */
+ public B powerOn(Boolean powerOn) {
+ this.powerOn = powerOn;
+ return self();
+ }
+
+ /**
+ * @see VAppCreationParamsType#isPowerOn()
+ */
+ public B powerOn() {
+ this.powerOn = Boolean.TRUE;
+ return self();
+ }
+
+ /**
+ * @see VAppCreationParamsType#isPowerOn()
+ */
+ public B notPowerOn() {
+ this.powerOn = Boolean.FALSE;
+ return self();
+ }
+
+ public B fromVAppCreationParamsType(VAppCreationParams in) {
+ return fromParamsType(in).vAppParent(in.getVAppParent()).instantiationParams(in.getInstantiationParams()).deploy(in.isDeploy()).powerOn(in.isPowerOn());
}
}
protected VAppCreationParams() {
- // For JAXB and builder use
+ // For JAXB and B use
}
- protected VAppCreationParams(Builder> builder) {
+ public VAppCreationParams(Builder> builder) {
super(builder);
+ this.vAppParent = builder.vAppParent;
+ this.instantiationParams = builder.instantiationParams;
+ this.deploy = builder.deploy;
+ this.powerOn = builder.powerOn;
+ }
+
+ @XmlElement(name = "VAppParent")
+ protected Reference vAppParent;
+ @XmlElement(name = "InstantiationParams")
+ protected InstantiationParams instantiationParams;
+ @XmlAttribute
+ protected Boolean deploy;
+ @XmlAttribute
+ protected Boolean powerOn;
+
+ /**
+ * Reserved.
+ *
+ * Unimplemented.
+ */
+ public Reference getVAppParent() {
+ return vAppParent;
+ }
+
+ /**
+ * Instantiation parameters of a VApp.
+ */
+ public InstantiationParams getInstantiationParams() {
+ return instantiationParams;
+ }
+
+ /**
+ * Flag to deploy the VApp after successful creation.
+ */
+ public Boolean isDeploy() {
+ return deploy;
+ }
+
+ /**
+ * Flag to deploy and power on the VApp after successful creation.
+ */
+ public Boolean isPowerOn() {
+ return powerOn;
}
@Override
@@ -72,6 +186,24 @@ public class VAppCreationParams extends VAppCreationParamsType {
if (o == null || getClass() != o.getClass())
return false;
VAppCreationParams that = VAppCreationParams.class.cast(o);
- return super.equals(that);
+ return super.equals(that) &&
+ equal(vAppParent, that.vAppParent) &&
+ equal(instantiationParams, that.instantiationParams) &&
+ equal(deploy, that.deploy) &&
+ equal(powerOn, that.powerOn);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hashCode(super.hashCode(), vAppParent, instantiationParams, deploy, powerOn);
+ }
+
+ @Override
+ public ToStringHelper string() {
+ return Objects.toStringHelper("")
+ .add("vAppParent", vAppParent)
+ .add("instantiationParams", instantiationParams)
+ .add("deploy", deploy)
+ .add("powerOn", powerOn);
}
}
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/VAppCreationParamsType.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/VAppCreationParamsType.java
deleted file mode 100644
index 5f25f98701..0000000000
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/VAppCreationParamsType.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.vcloud.director.v1_5.domain;
-
-import static com.google.common.base.Objects.equal;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
-import com.google.common.base.Objects;
-import com.google.common.base.Objects.ToStringHelper;
-
-/**
- * Represents vApp creation parameters.
- *
- * @author grkvlt@apache.org
- * @see
- * vCloud REST API - VAppCreationParamsType
- * @since 0.9
- */
-@XmlType(name = "VAppCreationParamsType")
-public class VAppCreationParamsType extends ParamsType {
-
- public static Builder> builder() {
- return new ConcreteBuilder();
- }
-
- @Override
- public Builder> toBuilder() {
- return builder().fromVAppCreationParamsType(this);
- }
-
- private static class ConcreteBuilder extends Builder {
- }
-
- public static abstract class Builder> extends ParamsType.Builder {
-
- private Reference vAppParent;
- private InstantiationParams instantiationParams;
- private Boolean deploy;
- private Boolean powerOn;
-
- /**
- * @see VAppCreationParamsType#getVAppParent()
- */
- public B vAppParent(Reference vAppParent) {
- this.vAppParent = vAppParent;
- return self();
- }
-
- /**
- * @see VAppCreationParamsType#getInstantiationParams()
- */
- public B instantiationParams(InstantiationParams instantiationParams) {
- this.instantiationParams = instantiationParams;
- return self();
- }
-
- /**
- * @see VAppCreationParamsType#isDeploy()
- */
- public B deploy(Boolean deploy) {
- this.deploy = deploy;
- return self();
- }
-
- /**
- * @see VAppCreationParamsType#isDeploy()
- */
- public B deploy() {
- this.deploy = Boolean.TRUE;
- return self();
- }
-
- /**
- * @see VAppCreationParamsType#isDeploy()
- */
- public B notDeploy() {
- this.deploy = Boolean.FALSE;
- return self();
- }
-
- /**
- * @see VAppCreationParamsType#isPowerOn()
- */
- public B powerOn(Boolean powerOn) {
- this.powerOn = powerOn;
- return self();
- }
-
- /**
- * @see VAppCreationParamsType#isPowerOn()
- */
- public B powerOn() {
- this.powerOn = Boolean.TRUE;
- return self();
- }
-
- /**
- * @see VAppCreationParamsType#isPowerOn()
- */
- public B notPowerOn() {
- this.powerOn = Boolean.FALSE;
- return self();
- }
-
- public B fromVAppCreationParamsType(VAppCreationParamsType in) {
- return fromParamsType(in).vAppParent(in.getVAppParent()).instantiationParams(in.getInstantiationParams()).deploy(in.isDeploy()).powerOn(in.isPowerOn());
- }
- }
-
- protected VAppCreationParamsType() {
- // For JAXB and B use
- }
-
- public VAppCreationParamsType(Builder> builder) {
- super(builder);
- this.vAppParent = builder.vAppParent;
- this.instantiationParams = builder.instantiationParams;
- this.deploy = builder.deploy;
- this.powerOn = builder.powerOn;
- }
-
- @XmlElement(name = "VAppParent")
- protected Reference vAppParent;
- @XmlElement(name = "InstantiationParams")
- protected InstantiationParams instantiationParams;
- @XmlAttribute
- protected Boolean deploy;
- @XmlAttribute
- protected Boolean powerOn;
-
- /**
- * Reserved.
- *
- * Unimplemented.
- */
- public Reference getVAppParent() {
- return vAppParent;
- }
-
- /**
- * Instantiation parameters of a VApp.
- */
- public InstantiationParams getInstantiationParams() {
- return instantiationParams;
- }
-
- /**
- * Flag to deploy the VApp after successful creation.
- */
- public Boolean isDeploy() {
- return deploy;
- }
-
- /**
- * Flag to deploy and power on the VApp after successful creation.
- */
- public Boolean isPowerOn() {
- return powerOn;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o)
- return true;
- if (o == null || getClass() != o.getClass())
- return false;
- VAppCreationParamsType that = VAppCreationParamsType.class.cast(o);
- return super.equals(that) &&
- equal(vAppParent, that.vAppParent) &&
- equal(instantiationParams, that.instantiationParams) &&
- equal(deploy, that.deploy) &&
- equal(powerOn, that.powerOn);
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(super.hashCode(), vAppParent, instantiationParams, deploy, powerOn);
- }
-
- @Override
- public ToStringHelper string() {
- return Objects.toStringHelper("")
- .add("vAppParent", vAppParent)
- .add("instantiationParams", instantiationParams)
- .add("deploy", deploy)
- .add("powerOn", powerOn);
- }
-}
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/VAppNetwork.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/VAppNetwork.java
index dd60ec9d21..1ecbbf9a61 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/VAppNetwork.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/VAppNetwork.java
@@ -41,6 +41,7 @@ public class VAppNetwork extends Network {
return new ConcreteBuilder();
}
+ @Override
public Builder> toBuilder() {
return builder().fromVAppNetwork(this);
}
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/VAppNetworkConfiguration.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/VAppNetworkConfiguration.java
index 1d84820f5b..8f4874dc71 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/VAppNetworkConfiguration.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/VAppNetworkConfiguration.java
@@ -43,6 +43,7 @@ public class VAppNetworkConfiguration extends ResourceType {
return new ConcreteBuilder();
}
+ @Override
public Builder> toBuilder() {
return builder().fromVAppNetworkConfiguration(this);
}
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/VAppTemplate.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/VAppTemplate.java
index 7d8e3781f4..751ead8e36 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/VAppTemplate.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/VAppTemplate.java
@@ -27,10 +27,18 @@ import java.util.Set;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementRef;
+import javax.xml.bind.annotation.XmlElementRefs;
import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlSeeAlso;
-import org.jclouds.vcloud.director.v1_5.domain.ovf.SectionType;
-import org.jclouds.vcloud.director.v1_5.domain.ovf.StartupSection;
+import org.jclouds.dmtf.ovf.DeploymentOptionSection;
+import org.jclouds.dmtf.ovf.DiskSection;
+import org.jclouds.dmtf.ovf.NetworkSection;
+import org.jclouds.dmtf.ovf.OperatingSystemSection;
+import org.jclouds.dmtf.ovf.ProductSection;
+import org.jclouds.dmtf.ovf.SectionType;
+import org.jclouds.dmtf.ovf.StartupSection;
+import org.jclouds.dmtf.ovf.VirtualHardwareSection;
import com.google.common.base.Objects;
import com.google.common.collect.ImmutableSet;
@@ -50,6 +58,7 @@ public class VAppTemplate extends ResourceEntityType {
return new ConcreteBuilder();
}
+ @Override
public Builder> toBuilder() {
return builder().fromVAppTemplate(this);
}
@@ -133,7 +142,26 @@ public class VAppTemplate extends ResourceEntityType {
private Owner owner;
@XmlElement(name = "Children")
private VAppTemplateChildren children = VAppTemplateChildren.builder().build();
- @XmlElementRef
+ @XmlElementRefs({
+ @XmlElementRef(type = SectionType.class),
+ @XmlElementRef(type = VirtualHardwareSection.class),
+ @XmlElementRef(type = LeaseSettingsSection.class),
+// @XmlElementRef(type = EulaSection.class),
+ @XmlElementRef(type = RuntimeInfoSection.class),
+// @XmlElementRef(type = AnnotationSection.class),
+ @XmlElementRef(type = DeploymentOptionSection.class),
+ @XmlElementRef(type = StartupSection.class),
+// @XmlElementRef(type = ResourceAllocationSection.class),
+ @XmlElementRef(type = NetworkConnectionSection.class),
+ @XmlElementRef(type = CustomizationSection.class),
+ @XmlElementRef(type = ProductSection.class),
+ @XmlElementRef(type = GuestCustomizationSection.class),
+ @XmlElementRef(type = OperatingSystemSection.class),
+ @XmlElementRef(type = NetworkConfigSection.class),
+ @XmlElementRef(type = NetworkSection.class),
+// @XmlElementRef(type = InstallSection.class),
+ @XmlElementRef(type = DiskSection.class)
+ })
private Set extends SectionType> sections = Sets.newLinkedHashSet();
@XmlElement(name = "VAppScopedLocalId")
private String vAppScopedLocalId;
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/VirtualHardwareSection.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/VirtualHardwareSection.java
new file mode 100644
index 0000000000..a5c216a7df
--- /dev/null
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/VirtualHardwareSection.java
@@ -0,0 +1,189 @@
+/**
+ * Licensed to jclouds, Inc. (jclouds) under one or more
+ * contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. jclouds licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+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 org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.VCLOUD_1_5_NS;
+
+import java.net.URI;
+import java.util.Set;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlSchemaType;
+import javax.xml.bind.annotation.XmlSeeAlso;
+
+import com.google.common.base.Objects;
+import com.google.common.base.Objects.ToStringHelper;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Sets;
+
+/**
+ * The virtual hardware required by a virtual machine is specified in VirtualHardwareSection.
+ *
+ * @author grkvlt@apache.org
+ */
+@XmlRootElement(name = "VirtualHardwareSection", namespace = VCLOUD_1_5_NS)
+@XmlSeeAlso({ org.jclouds.dmtf.ovf.VirtualHardwareSection.class })
+public class VirtualHardwareSection extends org.jclouds.dmtf.ovf.VirtualHardwareSection {
+
+ public static Builder> builder() {
+ return new ConcreteBuilder();
+ }
+
+ @Override
+ public Builder> toBuilder() {
+ return builder().fromVirtualHardwareSection(this);
+ }
+
+ private static class ConcreteBuilder extends Builder {
+ }
+
+ public static class Builder> extends org.jclouds.dmtf.ovf.VirtualHardwareSection.Builder {
+
+ private URI href;
+ private String type;
+ private Set links = Sets.newLinkedHashSet();
+
+ @Override
+ @SuppressWarnings("unchecked")
+ protected B self() {
+ return (B) this;
+ }
+
+ /**
+ * @see VirtualHardwareSection#getType()
+ */
+ public B type(String type) {
+ this.type = type;
+ return self();
+ }
+
+ /**
+ * @see VirtualHardwareSection#getHref()
+ */
+ public B href(URI href) {
+ this.href = href;
+ return self();
+ }
+
+ /**
+ * @see VirtualHardwareSection#getLinks()
+ */
+ public B links(Set links) {
+ this.links = Sets.newLinkedHashSet(checkNotNull(links, "links"));
+ return self();
+ }
+
+ /**
+ * @see VirtualHardwareSection#getLinks()
+ */
+ public B link(Link link) {
+ this.links.add(checkNotNull(link, "link"));
+ return self();
+ }
+
+ @Override
+ public VirtualHardwareSection build() {
+ return new VirtualHardwareSection(this);
+ }
+
+ public B fromVirtualHardwareSection(VirtualHardwareSection in) {
+ return super.fromVirtualHardwareSection(in)
+ .type(in.getType())
+ .href(in.getHref())
+ .links(in.getLinks());
+ }
+ }
+
+ @XmlAttribute(namespace = VCLOUD_1_5_NS)
+ protected String type;
+ @XmlAttribute(namespace = VCLOUD_1_5_NS)
+ @XmlSchemaType(name = "anyURI")
+ protected URI href;
+ @XmlElement(name = "Link", namespace = VCLOUD_1_5_NS)
+ protected Set links = Sets.newLinkedHashSet();
+
+
+ protected VirtualHardwareSection(Builder> builder) {
+ super(builder);
+ this.type = builder.type;
+ this.href = builder.href;
+ this.links = builder.links != null && builder.links.isEmpty() ? null : builder.links;;
+ }
+
+ protected VirtualHardwareSection() {
+ // for JAXB
+ }
+
+ /**
+ * Contains the URI to the entity.
+ *
+ * @see ResourceType#getHref()
+ */
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * Contains the type of the the entity.
+ *
+ * @see ResourceType#getType()
+ */
+ public URI getHref() {
+ return href;
+ }
+
+ /**
+ * Set of optional links to an entity or operation associated with this object.
+ *
+ * @see ResourceType#getLinks()
+ */
+ public Set getLinks() {
+ return links != null ? ImmutableSet.copyOf(links) : Sets.newLinkedHashSet();
+ }
+
+ @Override
+ public ToStringHelper string() {
+ return super.string()
+ .add("type", type)
+ .add("href", href)
+ .add("links", links);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hashCode(super.hashCode(), type, href, links);
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) return true;
+ if (obj == null) return false;
+ if (getClass() != obj.getClass()) return false;
+
+ VirtualHardwareSection that = VirtualHardwareSection.class.cast(obj);
+ return super.equals(that)
+ && equal(this.type, that.type)
+ && equal(this.href, that.href)
+ && equal(this.links, that.links);
+ }
+}
\ No newline at end of file
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/VirtualSystem.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/VirtualSystem.java
new file mode 100644
index 0000000000..2f1eb49d48
--- /dev/null
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/VirtualSystem.java
@@ -0,0 +1,149 @@
+/**
+ * Licensed to jclouds, Inc. (jclouds) under one or more
+ * contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. jclouds licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+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 org.jclouds.dmtf.DMTFConstants.OVF_NS;
+
+import java.util.Set;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.jclouds.dmtf.ovf.internal.BaseVirtualSystem;
+
+import com.google.common.base.Objects;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Sets;
+
+/**
+ * @author Adrian Cole
+ * @author Adam Lowe
+ */
+@XmlRootElement(name = "VirtualSystem", namespace = OVF_NS)
+public class VirtualSystem extends BaseVirtualSystem {
+
+ public static Builder> builder() {
+ return new ConcreteBuilder();
+ }
+
+ public Builder> toBuilder() {
+ return builder().fromVirtualSystem(this);
+ }
+
+ private static class ConcreteBuilder extends Builder {
+ }
+
+ public static class Builder> extends BaseVirtualSystem.Builder {
+
+ private OperatingSystemSection operatingSystem;
+ private Set virtualHardwareSections = Sets.newLinkedHashSet();
+
+
+ /**
+ * @see BaseVirtualSystem#getOperatingSystemSection()
+ */
+ public B operatingSystemSection(OperatingSystemSection operatingSystem) {
+ this.operatingSystem = operatingSystem;
+ return self();
+ }
+
+ /**
+ * @see BaseVirtualSystem#getVirtualHardwareSections()
+ */
+ public B virtualHardwareSection(VirtualHardwareSection virtualHardwareSection) {
+ this.virtualHardwareSections.add(checkNotNull(virtualHardwareSection, "virtualHardwareSection"));
+ return self();
+ }
+
+ /**
+ * @see BaseVirtualSystem#getVirtualHardwareSections()
+ */
+ public B virtualHardwareSections(Iterable extends VirtualHardwareSection> virtualHardwareSections) {
+ this.virtualHardwareSections = Sets.newLinkedHashSet(checkNotNull(virtualHardwareSections, "virtualHardwareSections"));
+ return self();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public VirtualSystem build() {
+ return new VirtualSystem(this);
+ }
+
+ public B fromVirtualSystem(VirtualSystem in) {
+ return fromBaseVirtualSystem(in)
+ .operatingSystemSection(in.getOperatingSystemSection())
+ .virtualHardwareSections(in.getVirtualHardwareSections());
+ }
+ }
+
+ @XmlElement(name = "OperatingSystemSection", namespace = OVF_NS)
+ private OperatingSystemSection operatingSystem;
+ @XmlElement(name = "VirtualHardwareSection", namespace = OVF_NS)
+ private Set extends VirtualHardwareSection> virtualHardwareSections;
+
+ private VirtualSystem(Builder> builder) {
+ super(builder);
+ this.operatingSystem = checkNotNull(builder.operatingSystem, "operatingSystem");
+ this.virtualHardwareSections = ImmutableSet.copyOf(checkNotNull(builder.virtualHardwareSections, "virtualHardwareSections"));
+ }
+
+ private VirtualSystem() {
+ // for JAXB
+ }
+
+ public OperatingSystemSection getOperatingSystemSection() {
+ return operatingSystem;
+ }
+
+ /**
+ * Each VirtualSystem element may contain one or more VirtualHardwareSection elements, each of
+ * which describes the virtual virtualHardwareSections required by the virtual system.
+ */
+ public Set extends VirtualHardwareSection> getVirtualHardwareSections() {
+ return virtualHardwareSections;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hashCode(super.hashCode(), operatingSystem, virtualHardwareSections);
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) return true;
+ if (obj == null) return false;
+ if (getClass() != obj.getClass()) return false;
+
+ VirtualSystem other = (VirtualSystem) obj;
+ return super.equals(other)
+ && equal(operatingSystem, other.operatingSystem)
+ && equal(virtualHardwareSections, other.virtualHardwareSections);
+ }
+
+ @Override
+ protected Objects.ToStringHelper string() {
+ return super.string()
+ .add("operatingSystem", operatingSystem)
+ .add("virtualHardwareSections", virtualHardwareSections);
+ }
+}
\ No newline at end of file
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Vm.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Vm.java
index a7d71d3bd7..d961091764 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Vm.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Vm.java
@@ -24,7 +24,7 @@ import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
-import org.jclouds.vcloud.director.v1_5.domain.ovf.environment.EnvironmentType;
+import org.jclouds.dmtf.ovf.environment.EnvironmentType;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
@@ -45,6 +45,7 @@ public class Vm extends AbstractVAppType {
return new ConcreteBuilder();
}
+ @Override
public Builder> toBuilder() {
return builder().fromVm(this);
}
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/VmPendingQuestion.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/VmPendingQuestion.java
index bce76e6e30..a2d51d9bed 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/VmPendingQuestion.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/VmPendingQuestion.java
@@ -45,6 +45,7 @@ public class VmPendingQuestion extends ResourceType {
return new ConcreteBuilder();
}
+ @Override
public Builder> toBuilder() {
return builder().fromVmPendingQuestion(this);
}
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/ovf/Envelope.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/ovf/Envelope.java
deleted file mode 100644
index 6352083217..0000000000
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/ovf/Envelope.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.vcloud.director.v1_5.domain.ovf;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.VCLOUD_OVF_NS;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.jclouds.vcloud.director.v1_5.domain.ovf.internal.BaseEnvelope;
-
-import com.google.common.collect.ImmutableSet;
-
-/**
- * @author Adrian Cole
- * @author Adam Lowe
- */
-@XmlRootElement(name = "Envelope", namespace = VCLOUD_OVF_NS)
-public class Envelope extends BaseEnvelope {
-
- public static Builder builder() {
- return new Builder();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder toBuilder() {
- return new Builder().fromEnvelope(this);
- }
-
- public static class Builder extends BaseEnvelope.Builder {
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Envelope build() {
- return new Envelope(diskSections, networkSections, additionalSections, virtualSystem);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder additionalSection(SectionType additionalSection) {
- this.additionalSections.add(checkNotNull(additionalSection, "additionalSection"));
- return this;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder additionalSections(Iterable extends SectionType> additionalSections) {
- this.additionalSections = ImmutableSet. copyOf(checkNotNull(additionalSections, "additionalSections"));
- return this;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder diskSection(DiskSection diskSection) {
- return Builder.class.cast(super.diskSection(diskSection));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder diskSections(Iterable extends DiskSection> diskSections) {
- return Builder.class.cast(super.diskSections(diskSections));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder fromEnvelope(BaseEnvelope in) {
- return Builder.class.cast(super.fromEnvelope(in));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder networkSection(NetworkSection networkSection) {
- return Builder.class.cast(super.networkSection(networkSection));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder networkSections(Iterable extends NetworkSection> networkSections) {
- return Builder.class.cast(super.networkSections(networkSections));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder virtualSystem(VirtualSystem virtualSystem) {
- return Builder.class.cast(super.virtualSystem(virtualSystem));
- }
-
- }
-
- private Envelope(Iterable extends DiskSection> diskSections, Iterable extends NetworkSection> networkSections,
- Iterable extends SectionType> additionalSections, VirtualSystem virtualSystem) {
- super(diskSections, networkSections, additionalSections, virtualSystem);
- }
-
- private Envelope() {
- // For JaxB
- }
-
-}
\ No newline at end of file
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/ovf/internal/BaseVirtualSystem.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/ovf/internal/BaseVirtualSystem.java
deleted file mode 100644
index 498e9b6819..0000000000
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/ovf/internal/BaseVirtualSystem.java
+++ /dev/null
@@ -1,224 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.vcloud.director.v1_5.domain.ovf.internal;
-
-import static com.google.common.base.Objects.equal;
-import static com.google.common.base.Preconditions.checkNotNull;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.VCLOUD_OVF_NS;
-
-import java.util.Set;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-
-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 com.google.common.base.Objects;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Sets;
-
-/**
- * @author Adrian Cole
- */
-public abstract class BaseVirtualSystem extends SectionType {
-
- public static abstract class Builder> extends SectionType.Builder {
-
- private String id;
- private String name;
- private OperatingSystemSection operatingSystem;
- private Set virtualHardwareSections = Sets.newLinkedHashSet();
- private Set productSections = Sets.newLinkedHashSet();
- private Set additionalSections = Sets.newLinkedHashSet();
-
- /**
- * @see BaseVirtualSystem#getName
- */
- public B name(String name) {
- this.name = name;
- return self();
- }
-
- /**
- * @see BaseVirtualSystem#getId
- */
- public B id(String id) {
- this.id = id;
- return self();
- }
-
- /**
- * @see BaseVirtualSystem#getOperatingSystemSection
- */
- public B operatingSystemSection(OperatingSystemSection operatingSystem) {
- this.operatingSystem = operatingSystem;
- return self();
- }
-
- /**
- * @see BaseVirtualSystem#getVirtualHardwareSections
- */
- public B virtualHardwareSection(VirtualHardwareSection virtualHardwareSection) {
- this.virtualHardwareSections.add(checkNotNull(virtualHardwareSection, "virtualHardwareSection"));
- return self();
- }
-
- /**
- * @see BaseVirtualSystem#getVirtualHardwareSections
- */
- public B virtualHardwareSections(Iterable extends VirtualHardwareSection> virtualHardwareSections) {
- this.virtualHardwareSections = ImmutableSet. copyOf(checkNotNull(virtualHardwareSections,
- "virtualHardwareSections"));
- return self();
- }
-
- /**
- * @see BaseVirtualSystem#getProductSections
- */
- public B productSection(ProductSection productSection) {
- this.productSections.add(checkNotNull(productSection, "productSection"));
- return self();
- }
-
- /**
- * @see BaseVirtualSystem#getProductSections
- */
- public B productSections(Iterable extends ProductSection> productSections) {
- this.productSections = ImmutableSet. copyOf(checkNotNull(productSections, "productSections"));
- return self();
- }
-
- /**
- * @see BaseVirtualSystem#getAdditionalSections
- */
- public B additionalSection(SectionType additionalSection) {
- this.additionalSections.add(checkNotNull(additionalSection, "additionalSection"));
- return self();
- }
-
- /**
- * @see BaseVirtualSystem#getAdditionalSections
- */
- public B additionalSections(Set additionalSections) {
- this.additionalSections = checkNotNull(additionalSections, "additionalSections");
- return self();
- }
-
- public B fromBaseVirtualSystem(BaseVirtualSystem in) {
- return fromSectionType(in).id(in.getId()).name(in.getName())
- .operatingSystemSection(in.getOperatingSystemSection())
- .virtualHardwareSections(in.getVirtualHardwareSections())
- .productSections(in.getProductSections())
- .additionalSections(in.getAdditionalSections());
- }
- }
-
- @XmlAttribute(namespace = VCLOUD_OVF_NS)
- private String id;
- @XmlElement(name = "Name")
- private String name;
- @XmlElement(name = "OperatingSystemSection")
- private OperatingSystemSection operatingSystem;
- @XmlElement(name = "VirtualHardwareSection")
- private Set virtualHardwareSections;
- @XmlElement(name = "ProductSection")
- private Set productSections;
-
- // NOTE what is the right annotation here?
- private Set additionalSections;
-
- protected BaseVirtualSystem(Builder> builder) {
- super(builder);
- this.id = builder.id;
- this.name = builder.name;
- this.operatingSystem = checkNotNull(builder.operatingSystem, "operatingSystem");
- this.virtualHardwareSections = ImmutableSet.copyOf(checkNotNull(builder.virtualHardwareSections, "virtualHardwareSections"));
- this.productSections = ImmutableSet.copyOf(checkNotNull(builder.productSections, "productSections"));
- this.additionalSections = ImmutableSet.copyOf(checkNotNull(builder.additionalSections, "additionalSections"));
- }
-
- protected BaseVirtualSystem() {
- // For JAXB
- }
-
-
- public String getId() {
- return id;
- }
-
- public String getName() {
- return name;
- }
-
- public OperatingSystemSection getOperatingSystemSection() {
- return operatingSystem;
- }
-
- /**
- * Each VirtualSystem element may contain one or more VirtualHardwareSection elements, each of
- * which describes the virtual virtualHardwareSections required by the virtual system.
- */
- public Set extends VirtualHardwareSection> getVirtualHardwareSections() {
- return virtualHardwareSections;
- }
-
- /**
- * Specifies product-information for a package, such as product name and version, along with a
- * set of properties that can be configured
- */
- public Set extends ProductSection> getProductSections() {
- return productSections;
- }
-
- public Set getAdditionalSections() {
- return additionalSections;
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(super.hashCode(), id, name, operatingSystem, virtualHardwareSections, productSections, additionalSections);
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) return true;
- if (obj == null) return false;
- if (getClass() != obj.getClass()) return false;
-
- BaseVirtualSystem other = (BaseVirtualSystem) obj;
- return super.equals(other)
- && equal(id, other.id)
- && equal(name, other.name)
- && equal(operatingSystem, other.operatingSystem)
- && equal(virtualHardwareSections, other.virtualHardwareSections)
- && equal(productSections, other.productSections)
- && equal(additionalSections, other.additionalSections);
- }
-
- @Override
- protected Objects.ToStringHelper string() {
- return super.string().add("id", id).add("name", name)
- .add("operatingSystem", operatingSystem).add("virtualHardwareSections", virtualHardwareSections)
- .add("productSections", productSections).add("additionalSections", additionalSections)
- .add("additionalSections", additionalSections);
- }
-}
\ No newline at end of file
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/package-info.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/package-info.java
index d479475fde..fe2926586c 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/package-info.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/package-info.java
@@ -17,22 +17,15 @@
* under the License.
*/
@XmlSchema(namespace = VCLOUD_1_5_NS,
- location = "http://vcloudbeta.bluelock.com/api/v1.5/schema/master.xsd",
elementFormDefault = XmlNsForm.QUALIFIED,
xmlns = {
- @XmlNs(prefix = "", namespaceURI = VCLOUD_1_5_NS),
- @XmlNs(prefix = "cim", namespaceURI = VCLOUD_CIM_NS),
- @XmlNs(prefix = "ovf", namespaceURI = VCLOUD_OVF_NS),
- @XmlNs(prefix = "env", namespaceURI = VCLOUD_OVF_ENV_NS)
+ @XmlNs(prefix = "", namespaceURI = VCLOUD_1_5_NS)
}
)
@XmlAccessorType(XmlAccessType.FIELD)
package org.jclouds.vcloud.director.v1_5.domain;
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.VCLOUD_1_5_NS;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.VCLOUD_CIM_NS;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.VCLOUD_OVF_ENV_NS;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.VCLOUD_OVF_NS;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryList.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryList.java
index e194c65530..b8949e7075 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryList.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryList.java
@@ -41,6 +41,7 @@ public class QueryList extends ContainerType {
return new ConcreteBuilder();
}
+ @Override
public Builder> toBuilder() {
return builder().fromQueryList(this);
}
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultNetworkRecord.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultNetworkRecord.java
index ad974f3949..b6f9a415bc 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultNetworkRecord.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultNetworkRecord.java
@@ -169,7 +169,7 @@ public class QueryResultNetworkRecord extends QueryResultRecordType {
}
private QueryResultNetworkRecord() {
- // Qfor JAXB
+ // for JAXB
}
@XmlAttribute
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/package-info.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/package-info.java
index 58514959d2..899fb3ac1d 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/package-info.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/package-info.java
@@ -17,22 +17,15 @@
* under the License.
*/
@XmlSchema(namespace = VCLOUD_1_5_NS,
- location = "http://vcloudbeta.bluelock.com/api/v1.5/schema/master.xsd",
elementFormDefault = XmlNsForm.QUALIFIED,
xmlns = {
- @XmlNs(prefix = "", namespaceURI = VCLOUD_1_5_NS),
- @XmlNs(prefix = "cim", namespaceURI = VCLOUD_CIM_NS),
- @XmlNs(prefix = "ovf", namespaceURI = VCLOUD_OVF_NS),
- @XmlNs(prefix = "env", namespaceURI = VCLOUD_OVF_ENV_NS)
+ @XmlNs(prefix = "", namespaceURI = VCLOUD_1_5_NS)
}
)
@XmlAccessorType(XmlAccessType.FIELD)
package org.jclouds.vcloud.director.v1_5.domain.query;
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.VCLOUD_1_5_NS;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.VCLOUD_CIM_NS;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.VCLOUD_OVF_ENV_NS;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.VCLOUD_OVF_NS;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppAsyncClient.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppAsyncClient.java
index 585f3fe063..6793f86307 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppAsyncClient.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppAsyncClient.java
@@ -50,6 +50,8 @@ import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
+import org.jclouds.dmtf.ovf.NetworkSection;
+import org.jclouds.dmtf.ovf.StartupSection;
import org.jclouds.rest.annotations.BinderParam;
import org.jclouds.rest.annotations.Delegate;
import org.jclouds.rest.annotations.EndpointParam;
@@ -66,8 +68,10 @@ 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.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.RasdItem;
import org.jclouds.vcloud.director.v1_5.domain.RasdItemsList;
import org.jclouds.vcloud.director.v1_5.domain.RecomposeVAppParams;
import org.jclouds.vcloud.director.v1_5.domain.RelocateParams;
@@ -76,13 +80,9 @@ import org.jclouds.vcloud.director.v1_5.domain.ScreenTicket;
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.cim.ResourceAllocationSettingData;
-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.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.ReturnPayloadBytes;
@@ -575,7 +575,7 @@ public interface VAppAsyncClient {
@Consumes
@JAXBResponseParser
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
- ListenableFuture getVirtualHardwareSectionCpu(@EndpointParam URI vmURI);
+ ListenableFuture getVirtualHardwareSectionCpu(@EndpointParam URI vmURI);
/**
* @see VAppClient#modifyVirtualHardwareSectionCpu(URI, ResourceAllocationSettingData)
@@ -586,7 +586,7 @@ public interface VAppAsyncClient {
@Consumes(TASK)
@JAXBResponseParser
ListenableFuture modifyVirtualHardwareSectionCpu(@EndpointParam URI vmURI,
- @BinderParam(BindToXMLPayload.class) ResourceAllocationSettingData rasd);
+ @BinderParam(BindToXMLPayload.class) RasdItem rasd);
/**
* @see VAppClient#getVirtualHardwareSectionDisks(URI)
@@ -627,7 +627,7 @@ public interface VAppAsyncClient {
@Consumes
@JAXBResponseParser
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
- ListenableFuture getVirtualHardwareSectionMemory(@EndpointParam URI vmURI);
+ ListenableFuture getVirtualHardwareSectionMemory(@EndpointParam URI vmURI);
/**
* @see VAppClient#modifyVirtualHardwareSectionMemory(URI, ResourceAllocationSettingData)
@@ -638,7 +638,7 @@ public interface VAppAsyncClient {
@Consumes(TASK)
@JAXBResponseParser
ListenableFuture modifyVirtualHardwareSectionMemory(@EndpointParam URI vmURI,
- @BinderParam(BindToXMLPayload.class) ResourceAllocationSettingData rasd);
+ @BinderParam(BindToXMLPayload.class) RasdItem rasd);
/**
* @see VAppClient#getVirtualHardwareSectionNetworkCards(URI)
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppClient.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppClient.java
index 2daa5e0da8..4dbc9aae6f 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppClient.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppClient.java
@@ -22,6 +22,8 @@ import java.net.URI;
import java.util.concurrent.TimeUnit;
import org.jclouds.concurrent.Timeout;
+import org.jclouds.dmtf.ovf.NetworkSection;
+import org.jclouds.dmtf.ovf.StartupSection;
import org.jclouds.rest.annotations.Delegate;
import org.jclouds.vcloud.director.v1_5.domain.ControlAccessParams;
import org.jclouds.vcloud.director.v1_5.domain.DeployVAppParams;
@@ -30,8 +32,10 @@ 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.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.RasdItem;
import org.jclouds.vcloud.director.v1_5.domain.RasdItemsList;
import org.jclouds.vcloud.director.v1_5.domain.RecomposeVAppParams;
import org.jclouds.vcloud.director.v1_5.domain.RelocateParams;
@@ -40,13 +44,9 @@ import org.jclouds.vcloud.director.v1_5.domain.ScreenTicket;
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.cim.ResourceAllocationSettingData;
-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.StartupSection;
-import org.jclouds.vcloud.director.v1_5.domain.ovf.VirtualHardwareSection;
/**
* Provides synchronous access to {@link VApp} objects.
@@ -674,7 +674,7 @@ public interface VAppClient {
*
* @since 0.9
*/
- ResourceAllocationSettingData getVirtualHardwareSectionCpu(URI vmURI);
+ RasdItem getVirtualHardwareSectionCpu(URI vmURI);
/**
* Modifies the CPU properties in virtual hardware section of a VM.
@@ -685,7 +685,7 @@ public interface VAppClient {
*
* @since 0.9
*/
- Task modifyVirtualHardwareSectionCpu(URI vmURI, ResourceAllocationSettingData rasd);
+ Task modifyVirtualHardwareSectionCpu(URI vmURI, RasdItem rasd);
/**
* Retrieves a list of ResourceAllocationSettingData items for disks from virtual hardware section of a VM.
@@ -729,7 +729,7 @@ public interface VAppClient {
*
* @since 0.9
*/
- ResourceAllocationSettingData getVirtualHardwareSectionMemory(URI vmURI);
+ RasdItem getVirtualHardwareSectionMemory(URI vmURI);
/**
* Modifies the memory properties in virtual hardware section of a VM.
@@ -740,7 +740,7 @@ public interface VAppClient {
*
* @since 0.9
*/
- Task modifyVirtualHardwareSectionMemory(URI vmURI, ResourceAllocationSettingData rasd);
+ Task modifyVirtualHardwareSectionMemory(URI vmURI, RasdItem rasd);
/**
* Retrieves a list of ResourceAllocationSettingData items for network cards from virtual hardware section of a VM.
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppTemplateAsyncClient.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppTemplateAsyncClient.java
index 7219a37fc4..e49e85d604 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppTemplateAsyncClient.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppTemplateAsyncClient.java
@@ -40,6 +40,7 @@ import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
+import org.jclouds.dmtf.ovf.NetworkSection;
import org.jclouds.rest.annotations.BinderParam;
import org.jclouds.rest.annotations.Delegate;
import org.jclouds.rest.annotations.EndpointParam;
@@ -49,6 +50,7 @@ import org.jclouds.rest.annotations.RequestFilters;
import org.jclouds.rest.binders.BindToXMLPayload;
import org.jclouds.rest.functions.ReturnNullOnNotFoundOr404;
import org.jclouds.vcloud.director.v1_5.domain.CustomizationSection;
+import org.jclouds.vcloud.director.v1_5.domain.Envelope;
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;
@@ -59,8 +61,6 @@ import org.jclouds.vcloud.director.v1_5.domain.References;
import org.jclouds.vcloud.director.v1_5.domain.RelocateParams;
import org.jclouds.vcloud.director.v1_5.domain.Task;
import org.jclouds.vcloud.director.v1_5.domain.VAppTemplate;
-import org.jclouds.vcloud.director.v1_5.domain.ovf.Envelope;
-import org.jclouds.vcloud.director.v1_5.domain.ovf.NetworkSection;
import org.jclouds.vcloud.director.v1_5.filters.AddVCloudAuthorizationToRequest;
import com.google.common.util.concurrent.ListenableFuture;
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppTemplateClient.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppTemplateClient.java
index bdc154750a..4f5a74a5bb 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppTemplateClient.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppTemplateClient.java
@@ -22,8 +22,10 @@ import java.net.URI;
import java.util.concurrent.TimeUnit;
import org.jclouds.concurrent.Timeout;
+import org.jclouds.dmtf.ovf.NetworkSection;
import org.jclouds.rest.annotations.Delegate;
import org.jclouds.vcloud.director.v1_5.domain.CustomizationSection;
+import org.jclouds.vcloud.director.v1_5.domain.Envelope;
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;
@@ -34,8 +36,6 @@ import org.jclouds.vcloud.director.v1_5.domain.References;
import org.jclouds.vcloud.director.v1_5.domain.RelocateParams;
import org.jclouds.vcloud.director.v1_5.domain.Task;
import org.jclouds.vcloud.director.v1_5.domain.VAppTemplate;
-import org.jclouds.vcloud.director.v1_5.domain.ovf.Envelope;
-import org.jclouds.vcloud.director.v1_5.domain.ovf.NetworkSection;
/**
* Provides synchronous access to {@link VAppTemplate} objects.
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminCatalogAsyncClient.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminCatalogAsyncClient.java
index fe1996a5de..418c09358f 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminCatalogAsyncClient.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminCatalogAsyncClient.java
@@ -42,7 +42,6 @@ import org.jclouds.vcloud.director.v1_5.domain.Owner;
import org.jclouds.vcloud.director.v1_5.domain.PublishCatalogParams;
import org.jclouds.vcloud.director.v1_5.features.CatalogAsyncClient;
import org.jclouds.vcloud.director.v1_5.features.MetadataAsyncClient;
-import org.jclouds.vcloud.director.v1_5.features.MetadataAsyncClient.Writeable;
import org.jclouds.vcloud.director.v1_5.filters.AddVCloudAuthorizationToRequest;
import com.google.common.util.concurrent.ListenableFuture;
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminCatalogClient.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminCatalogClient.java
index 110ae3b4d8..5cffad6c3b 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminCatalogClient.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminCatalogClient.java
@@ -24,7 +24,6 @@ import java.util.concurrent.TimeUnit;
import org.jclouds.concurrent.Timeout;
import org.jclouds.rest.annotations.Delegate;
import org.jclouds.vcloud.director.v1_5.domain.AdminCatalog;
-import org.jclouds.vcloud.director.v1_5.domain.Metadata;
import org.jclouds.vcloud.director.v1_5.domain.Owner;
import org.jclouds.vcloud.director.v1_5.domain.PublishCatalogParams;
import org.jclouds.vcloud.director.v1_5.features.CatalogClient;
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminNetworkAsyncClient.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminNetworkAsyncClient.java
index d0b6f90056..883a8f4a85 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminNetworkAsyncClient.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminNetworkAsyncClient.java
@@ -41,7 +41,6 @@ import org.jclouds.vcloud.director.v1_5.domain.OrgNetwork;
import org.jclouds.vcloud.director.v1_5.domain.Task;
import org.jclouds.vcloud.director.v1_5.features.MetadataAsyncClient;
import org.jclouds.vcloud.director.v1_5.features.NetworkAsyncClient;
-import org.jclouds.vcloud.director.v1_5.features.MetadataAsyncClient.Writeable;
import org.jclouds.vcloud.director.v1_5.filters.AddVCloudAuthorizationToRequest;
import com.google.common.util.concurrent.ListenableFuture;
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminNetworkClient.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminNetworkClient.java
index 44fca80ede..01e4884ebc 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminNetworkClient.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminNetworkClient.java
@@ -28,7 +28,6 @@ import org.jclouds.vcloud.director.v1_5.domain.OrgNetwork;
import org.jclouds.vcloud.director.v1_5.domain.Task;
import org.jclouds.vcloud.director.v1_5.features.MetadataClient;
import org.jclouds.vcloud.director.v1_5.features.NetworkClient;
-import org.jclouds.vcloud.director.v1_5.features.MetadataClient.Writeable;
/**
* Provides synchronous access to admin {@link Network} objects.
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminOrgAsyncClient.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminOrgAsyncClient.java
index d4294f9fea..11c303cda9 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminOrgAsyncClient.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminOrgAsyncClient.java
@@ -45,7 +45,6 @@ import org.jclouds.vcloud.director.v1_5.domain.OrgSettings;
import org.jclouds.vcloud.director.v1_5.domain.OrgVAppTemplateLeaseSettings;
import org.jclouds.vcloud.director.v1_5.features.MetadataAsyncClient;
import org.jclouds.vcloud.director.v1_5.features.OrgAsyncClient;
-import org.jclouds.vcloud.director.v1_5.features.MetadataAsyncClient.Writeable;
import org.jclouds.vcloud.director.v1_5.filters.AddVCloudAuthorizationToRequest;
import com.google.common.util.concurrent.ListenableFuture;
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminOrgClient.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminOrgClient.java
index 5b1bcbfa84..ac86ada421 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminOrgClient.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminOrgClient.java
@@ -33,7 +33,6 @@ import org.jclouds.vcloud.director.v1_5.domain.OrgSettings;
import org.jclouds.vcloud.director.v1_5.domain.OrgVAppTemplateLeaseSettings;
import org.jclouds.vcloud.director.v1_5.features.MetadataClient;
import org.jclouds.vcloud.director.v1_5.features.OrgClient;
-import org.jclouds.vcloud.director.v1_5.features.MetadataClient.Writeable;
/**
* Provides synchronous access to {@link Org} objects.
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminVdcAsyncClient.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminVdcAsyncClient.java
index 984d623bef..6f593d4361 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminVdcAsyncClient.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminVdcAsyncClient.java
@@ -39,7 +39,6 @@ import org.jclouds.vcloud.director.v1_5.domain.AdminVdc;
import org.jclouds.vcloud.director.v1_5.domain.Task;
import org.jclouds.vcloud.director.v1_5.features.MetadataAsyncClient;
import org.jclouds.vcloud.director.v1_5.features.VdcAsyncClient;
-import org.jclouds.vcloud.director.v1_5.features.MetadataAsyncClient.Writeable;
import org.jclouds.vcloud.director.v1_5.filters.AddVCloudAuthorizationToRequest;
import com.google.common.util.concurrent.ListenableFuture;
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminVdcClient.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminVdcClient.java
index 735402dae4..7ad436c377 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminVdcClient.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminVdcClient.java
@@ -28,7 +28,6 @@ import org.jclouds.vcloud.director.v1_5.domain.AdminVdc;
import org.jclouds.vcloud.director.v1_5.domain.Task;
import org.jclouds.vcloud.director.v1_5.features.MetadataClient;
import org.jclouds.vcloud.director.v1_5.features.VdcClient;
-import org.jclouds.vcloud.director.v1_5.features.MetadataAsyncClient.Writeable;
/**
* Provides synchronous access to {@link AdminVdc}.
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/user/VCloudDirectorAsyncClient.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/user/VCloudDirectorAsyncClient.java
index 9488ba7fda..90b848b5e9 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/user/VCloudDirectorAsyncClient.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/user/VCloudDirectorAsyncClient.java
@@ -19,15 +19,7 @@
package org.jclouds.vcloud.director.v1_5.user;
import org.jclouds.rest.annotations.Delegate;
-import org.jclouds.vcloud.director.v1_5.domain.Catalog;
-import org.jclouds.vcloud.director.v1_5.domain.Media;
-import org.jclouds.vcloud.director.v1_5.domain.Org;
import org.jclouds.vcloud.director.v1_5.domain.Session;
-import org.jclouds.vcloud.director.v1_5.domain.Task;
-import org.jclouds.vcloud.director.v1_5.domain.VApp;
-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.ovf.Network;
import org.jclouds.vcloud.director.v1_5.features.CatalogAsyncClient;
import org.jclouds.vcloud.director.v1_5.features.NetworkAsyncClient;
import org.jclouds.vcloud.director.v1_5.features.OrgAsyncClient;
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/user/VCloudDirectorClient.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/user/VCloudDirectorClient.java
index f0a3f02574..fda7a3686e 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/user/VCloudDirectorClient.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/user/VCloudDirectorClient.java
@@ -22,16 +22,7 @@ import java.util.concurrent.TimeUnit;
import org.jclouds.concurrent.Timeout;
import org.jclouds.rest.annotations.Delegate;
-import org.jclouds.vcloud.director.v1_5.admin.VCloudDirectorAdminAsyncClient;
-import org.jclouds.vcloud.director.v1_5.domain.Catalog;
-import org.jclouds.vcloud.director.v1_5.domain.Media;
-import org.jclouds.vcloud.director.v1_5.domain.Org;
import org.jclouds.vcloud.director.v1_5.domain.Session;
-import org.jclouds.vcloud.director.v1_5.domain.Task;
-import org.jclouds.vcloud.director.v1_5.domain.VApp;
-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.ovf.Network;
import org.jclouds.vcloud.director.v1_5.features.CatalogClient;
import org.jclouds.vcloud.director.v1_5.features.MediaClient;
import org.jclouds.vcloud.director.v1_5.features.NetworkClient;
diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/AbstractVAppClientLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/AbstractVAppClientLiveTest.java
index 78eed46dfd..9f341d7be1 100644
--- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/AbstractVAppClientLiveTest.java
+++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/AbstractVAppClientLiveTest.java
@@ -33,8 +33,13 @@ import java.math.BigInteger;
import java.net.URI;
import java.util.List;
+import org.jclouds.dmtf.cim.CimBoolean;
+import org.jclouds.dmtf.cim.CimString;
+import org.jclouds.dmtf.cim.CimUnsignedInt;
+import org.jclouds.dmtf.cim.CimUnsignedLong;
import org.jclouds.vcloud.director.v1_5.domain.GuestCustomizationSection;
import org.jclouds.vcloud.director.v1_5.domain.NetworkConnectionSection;
+import org.jclouds.vcloud.director.v1_5.domain.RasdItem;
import org.jclouds.vcloud.director.v1_5.domain.RasdItemsList;
import org.jclouds.vcloud.director.v1_5.domain.Reference;
import org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status;
@@ -43,11 +48,6 @@ import org.jclouds.vcloud.director.v1_5.domain.VApp;
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.Vm;
-import org.jclouds.vcloud.director.v1_5.domain.cim.CimBoolean;
-import org.jclouds.vcloud.director.v1_5.domain.cim.CimString;
-import org.jclouds.vcloud.director.v1_5.domain.cim.CimUnsignedInt;
-import org.jclouds.vcloud.director.v1_5.domain.cim.CimUnsignedLong;
-import org.jclouds.vcloud.director.v1_5.domain.cim.ResourceAllocationSettingData;
import org.jclouds.vcloud.director.v1_5.features.CatalogClient;
import org.jclouds.vcloud.director.v1_5.features.MetadataClient;
import org.jclouds.vcloud.director.v1_5.features.QueryClient;
@@ -74,329 +74,262 @@ import com.google.common.collect.Iterables;
*
* @author grkvlt@apache.org
*/
-public abstract class AbstractVAppClientLiveTest extends BaseVCloudDirectorClientLiveTest
-{
+public abstract class AbstractVAppClientLiveTest extends BaseVCloudDirectorClientLiveTest {
- public static final String VAPP = "vApp";
+ public static final String VAPP = "vApp";
+ public static final String VAPP_TEMPLATE = "vAppTemplate";
+ public static final String VDC = "vdc";
- public static final String VAPP_TEMPLATE = "vAppTemplate";
+ /*
+ * Convenience reference to API clients.
+ */
- public static final String VDC = "vdc";
+ protected CatalogClient catalogClient;
+ protected QueryClient queryClient;
+ protected VAppClient vAppClient;
+ protected VAppTemplateClient vAppTemplateClient;
+ protected VdcClient vdcClient;
+ protected MetadataClient.Writeable metadataClient;
- /*
- * Convenience reference to API clients.
- */
+ /*
+ * Objects shared between tests.
+ */
- protected CatalogClient catalogClient;
+ protected Vdc vdc;
+ protected Vm vm;
+ protected URI vAppURI;
+ protected VApp vApp;
+ protected VAppTemplate vAppTemplate;
- protected QueryClient queryClient;
+ /**
+ * Retrieves the required clients from the REST API context
+ *
+ * @see BaseVCloudDirectorClientLiveTest#setupRequiredClients()
+ */
+ @Override
+ @BeforeClass(alwaysRun = true, description = "Retrieves the required clients from the REST API context")
+ protected void setupRequiredClients() {
+ assertNotNull(context.getApi());
- protected VAppClient vAppClient;
+ catalogClient = context.getApi().getCatalogClient();
+ queryClient = context.getApi().getQueryClient();
+ vAppClient = context.getApi().getVAppClient();
+ vAppTemplateClient = context.getApi().getVAppTemplateClient();
+ vdcClient = context.getApi().getVdcClient();
- protected VAppTemplateClient vAppTemplateClient;
+ setupEnvironment();
+ }
- protected VdcClient vdcClient;
+ /**
+ * Sets up the environment. Retrieves the test {@link Vdc} and {@link VAppTemplate} from their
+ * configured {@link URI}s. Instantiates a new test VApp.
+ */
+ protected void setupEnvironment() {
+ // Get the configured Vdc for the tests
+ vdc = vdcClient.getVdc(vdcURI);
+ assertNotNull(vdc, String.format(ENTITY_NON_NULL, VDC));
- protected MetadataClient.Writeable metadataClient;
+ // Get the configured VAppTemplate for the tests
+ vAppTemplate = vAppTemplateClient.getVAppTemplate(vAppTemplateURI);
+ assertNotNull(vAppTemplate, String.format(ENTITY_NON_NULL, VAPP_TEMPLATE));
- /*
- * Objects shared between tests.
- */
+ // Instantiate a new VApp
+ VApp vAppInstantiated = instantiateVApp();
+ assertNotNull(vAppInstantiated, String.format(ENTITY_NON_NULL, VAPP));
+ vAppURI = vAppInstantiated.getHref();
- protected Vdc vdc;
+ // Wait for the task to complete
+ Task instantiateTask = Iterables.getOnlyElement(vAppInstantiated.getTasks());
+ assertTrue(retryTaskSuccessLong.apply(instantiateTask), String.format(TASK_COMPLETE_TIMELY, "instantiateTask"));
- protected Vm vm;
+ // Get the instantiated VApp
+ vApp = vAppClient.getVApp(vAppURI);
- protected URI vAppURI;
+ // Get the Vm
+ List vms = vApp.getChildren().getVms();
+ vm = Iterables.getOnlyElement(vms);
+ assertFalse(vms.isEmpty(), "The VApp must have a Vm");
+ }
- protected VApp vApp;
+ protected void getGuestCustomizationSection(final Function getGuestCustomizationSection) {
+ // Get URI for child VM
+ URI vmURI = Iterables.getOnlyElement(vApp.getChildren().getVms()).getHref();
- protected VAppTemplate vAppTemplate;
+ // The method under test
+ try {
+ GuestCustomizationSection section = getGuestCustomizationSection.apply(vmURI);
- /**
- * Retrieves the required clients from the REST API context
- *
- * @see BaseVCloudDirectorClientLiveTest#setupRequiredClients()
- */
- @Override
- @BeforeClass(alwaysRun = true, description = "Retrieves the required clients from the REST API context")
- protected void setupRequiredClients()
- {
- assertNotNull(context.getApi());
+ // Check the retrieved object is well formed
+ checkGuestCustomizationSection(section);
+ } catch (Exception e) {
+ Throwables.propagate(e);
+ }
+ }
- catalogClient = context.getApi().getCatalogClient();
- queryClient = context.getApi().getQueryClient();
- vAppClient = context.getApi().getVAppClient();
- vAppTemplateClient = context.getApi().getVAppTemplateClient();
- vdcClient = context.getApi().getVdcClient();
+ protected void getNetworkConnectionSection(final Function getNetworkConnectionSection) {
+ // Get URI for child VM
+ URI vmURI = Iterables.getOnlyElement(vApp.getChildren().getVms()).getHref();
- setupEnvironment();
- }
+ // The method under test
+ try {
+ NetworkConnectionSection section = getNetworkConnectionSection.apply(vmURI);
- /**
- * Sets up the environment. Retrieves the test {@link Vdc} and {@link VAppTemplate} from their
- * configured {@link URI}s. Instantiates a new test VApp.
- */
- protected void setupEnvironment()
- {
- // Get the configured Vdc for the tests
- vdc = vdcClient.getVdc(vdcURI);
- assertNotNull(vdc, String.format(ENTITY_NON_NULL, VDC));
+ // Check the retrieved object is well formed
+ checkNetworkConnectionSection(section);
+ } catch (Exception e) {
+ Throwables.propagate(e);
+ }
+ }
- // Get the configured VAppTemplate for the tests
- vAppTemplate = vAppTemplateClient.getVAppTemplate(vAppTemplateURI);
- assertNotNull(vAppTemplate, String.format(ENTITY_NON_NULL, VAPP_TEMPLATE));
+ @AfterClass(alwaysRun = true, description = "Cleans up the environment by deleting created VApps")
+ protected void cleanUp() {
+ vdc = vdcClient.getVdc(vdcURI); // Refresh
+ // Find references in the Vdc with the VApp type and in the list of instantiated VApp names
+ Iterable vApps = Iterables.filter(vdc.getResourceEntities(),
+ Predicates.and(ReferencePredicates. typeEquals(VCloudDirectorMediaType.VAPP), ReferencePredicates. nameIn(vAppNames)));
- // Instantiate a new VApp
- VApp vAppInstantiated = instantiateVApp();
- assertNotNull(vAppInstantiated, String.format(ENTITY_NON_NULL, VAPP));
- vAppURI = vAppInstantiated.getHref();
+ // If we found any references, delete the VApp they point to
+ if (!Iterables.isEmpty(vApps)) {
+ for (Reference ref : vApps) {
+ cleanUpVApp(ref.getHref()); // NOTE may fail, but should continue deleting
+ }
+ } else {
+ logger.warn("No VApps in list found in Vdc %s (%s)", vdc.getName(), Iterables.toString(vAppNames));
+ }
+ }
- // Wait for the task to complete
- Task instantiateTask = Iterables.getOnlyElement(vAppInstantiated.getTasks());
- assertTrue(retryTaskSuccessLong.apply(instantiateTask),
- String.format(TASK_COMPLETE_TIMELY, "instantiateTask"));
+ protected static CimBoolean cimBoolean(boolean val) {
+ CimBoolean result = new CimBoolean();
+ result.setValue(val);
+ return result;
+ }
- // Get the instantiated VApp
- vApp = vAppClient.getVApp(vAppURI);
+ protected static CimUnsignedInt cimUnsignedInt(long val) {
+ CimUnsignedInt result = new CimUnsignedInt();
+ result.setValue(val);
+ return result;
+ }
- // Get the Vm
- List vms = vApp.getChildren().getVms();
- vm = Iterables.getOnlyElement(vms);
- assertFalse(vms.isEmpty(), "The VApp must have a Vm");
- }
+ protected static CimUnsignedLong cimUnsignedLong(BigInteger val) {
+ CimUnsignedLong result = new CimUnsignedLong();
+ result.setValue(val);
+ return result;
+ }
- protected void getGuestCustomizationSection(
- final Function getGuestCustomizationSection)
- {
- // Get URI for child VM
- URI vmURI = Iterables.getOnlyElement(vApp.getChildren().getVms()).getHref();
+ protected static CimString cimString(String value) {
+ return new CimString(value);
+ }
- // The method under test
- try
- {
- GuestCustomizationSection section = getGuestCustomizationSection.apply(vmURI);
-
- // Check the retrieved object is well formed
- checkGuestCustomizationSection(section);
- }
- catch (Exception e)
- {
- Throwables.propagate(e);
- }
- }
-
- protected void getNetworkConnectionSection(
- final Function getNetworkConnectionSection)
- {
- // Get URI for child VM
- URI vmURI = Iterables.getOnlyElement(vApp.getChildren().getVms()).getHref();
-
- // The method under test
- try
- {
- NetworkConnectionSection section = getNetworkConnectionSection.apply(vmURI);
-
- // Check the retrieved object is well formed
- checkNetworkConnectionSection(section);
- }
- catch (Exception e)
- {
- Throwables.propagate(e);
- }
- }
-
- @AfterClass(alwaysRun = true, description = "Cleans up the environment by deleting created VApps")
- protected void cleanUp()
- {
- vdc = vdcClient.getVdc(vdcURI); // Refresh
- // Find references in the Vdc with the VApp type and in the list of instantiated VApp names
- Iterable vApps =
- Iterables.filter(vdc.getResourceEntities(), Predicates.and(
- ReferencePredicates. typeEquals(VCloudDirectorMediaType.VAPP),
- ReferencePredicates. nameIn(vAppNames)));
-
- // If we found any references, delete the VApp they point to
- if (!Iterables.isEmpty(vApps))
- {
- for (Reference ref : vApps)
- {
- cleanUpVApp(ref.getHref()); // NOTE may fail, but should continue deleting
+ protected void checkHasMatchingItem(final String context, final RasdItemsList items, final String instanceId, final String elementName) {
+ Optional found = Iterables.tryFind(items.getItems(), new Predicate() {
+ @Override
+ public boolean apply(RasdItem item) {
+ String itemInstanceId = item.getInstanceID();
+ if (itemInstanceId.equals(instanceId)) {
+ Assert.assertEquals(item.getElementName(), elementName,
+ String.format(OBJ_FIELD_EQ, VAPP, context + "/" + instanceId + "/elementName", elementName, item.getElementName()));
+ return true;
}
- }
- else
- {
- logger.warn("No VApps in list found in Vdc %s (%s)", vdc.getName(),
- Iterables.toString(vAppNames));
- }
- }
+ return false;
+ }
+ });
+ assertTrue(found.isPresent(), "no " + context + " item found with id " + instanceId + "; only found " + items);
+ }
- protected static CimBoolean cimBoolean(final boolean val)
- {
- CimBoolean result = new CimBoolean();
- result.setValue(val);
- return result;
- }
+ /**
+ * Power on a {@link VApp}s {@link Vm}s.
+ *
+ * @see #powerOn(URI)
+ */
+ protected VApp powerOn(final VApp testVApp) {
+ return powerOn(testVApp.getHref());
+ }
- protected static CimUnsignedInt cimUnsignedInt(final long val)
- {
- CimUnsignedInt result = new CimUnsignedInt();
- result.setValue(val);
- return result;
- }
+ /**
+ * Power on a VApp.
+ */
+ protected VApp powerOn(final URI testVAppURI) {
+ VApp testVApp = vAppClient.getVApp(testVAppURI);
+ Vm vm = Iterables.getOnlyElement(testVApp.getChildren().getVms());
+ Status status = Status.fromValue(vm.getStatus());
+ if (status != Status.POWERED_ON) {
+ Task powerOn = vAppClient.powerOn(vm.getHref());
+ assertTaskSucceedsLong(powerOn);
+ }
+ assertVAppStatus(testVAppURI, Status.POWERED_ON);
+ return testVApp;
+ }
- protected static CimUnsignedLong cimUnsignedLong(final BigInteger val)
- {
- CimUnsignedLong result = new CimUnsignedLong();
- result.setValue(val);
- return result;
- }
+ /**
+ * Power off a {@link VApp}s {@link Vm}s.
+ *
+ * @see #powerOff(URI)
+ */
+ protected VApp powerOff(final VApp testVApp) {
+ return powerOff(testVApp.getHref());
+ }
- protected static CimString cimString(final String value)
- {
- return new CimString(value);
- }
+ /**
+ * Power off a {@link VApp}s {@link Vm}s.
+ */
+ protected VApp powerOff(final URI testVAppURI) {
+ VApp testVApp = vAppClient.getVApp(testVAppURI);
+ Vm vm = Iterables.getOnlyElement(testVApp.getChildren().getVms());
+ Status status = Status.fromValue(vm.getStatus());
+ if (status != Status.POWERED_OFF) {
+ Task powerOff = vAppClient.powerOff(vm.getHref());
+ assertTaskSucceedsLong(powerOff);
+ }
+ assertVAppStatus(testVAppURI, Status.POWERED_OFF);
+ return testVApp;
+ }
- protected void checkHasMatchingItem(final String context, final RasdItemsList items,
- final String instanceId, final String elementName)
- {
- Optional found =
- Iterables.tryFind(items.getItems(), new Predicate()
- {
- @Override
- public boolean apply(final ResourceAllocationSettingData item)
- {
- String itemInstanceId = item.getInstanceID();
- if (itemInstanceId.equals(instanceId))
- {
- Assert.assertEquals(
- item.getElementName(),
- elementName,
- String.format(OBJ_FIELD_EQ, VAPP, context + "/" + instanceId
- + "/elementName", elementName, item.getElementName()));
+ /**
+ * Suspend a {@link VApp}s {@link Vm}s.
+ *
+ * @see #suspend(URI)
+ */
+ protected VApp suspend(final VApp testVApp) {
+ return powerOff(testVApp.getHref());
+ }
- return true;
- }
- return false;
- }
- });
- assertTrue(found.isPresent(), "no " + context + " item found with id " + instanceId
- + "; only found " + items);
- }
+ /**
+ * Suspend a {@link VApp}s {@link Vm}s.
+ */
+ protected VApp suspend(final URI testVAppURI) {
+ VApp testVApp = vAppClient.getVApp(testVAppURI);
+ Vm vm = Iterables.getOnlyElement(testVApp.getChildren().getVms());
+ Status status = Status.fromValue(vm.getStatus());
+ if (status != Status.SUSPENDED) {
+ Task suspend = vAppClient.suspend(vm.getHref());
+ assertTaskSucceedsLong(suspend);
+ }
+ assertVAppStatus(testVAppURI, Status.SUSPENDED);
+ return testVApp;
+ }
- /**
- * Power on a {@link VApp}s {@link Vm}s.
- *
- * @see #powerOn(URI)
- */
- protected VApp powerOn(final VApp testVApp)
- {
- return powerOn(testVApp.getHref());
- }
+ /**
+ * Check the {@link VApp}s {@link Vm}s current status.
+ */
+ protected void assertVAppStatus(final URI testVAppURI, final Status status) {
+ VApp testVApp = vAppClient.getVApp(testVAppURI);
+ Vm vm = Iterables.getOnlyElement(testVApp.getChildren().getVms());
+ assertEquals(vm.getStatus(), status.getValue(), String.format(OBJ_FIELD_EQ, VAPP, "status", status.toString(), Status.fromValue(vm.getStatus()).toString()));
+ }
- /**
- * Power on a VApp.
- */
- protected VApp powerOn(final URI testVAppURI)
- {
- VApp testVApp = vAppClient.getVApp(testVAppURI);
- Vm vm = Iterables.getOnlyElement(testVApp.getChildren().getVms());
- Status status = Status.fromValue(vm.getStatus());
- if (status != Status.POWERED_ON)
- {
- Task powerOn = vAppClient.powerOn(vm.getHref());
- assertTaskSucceedsLong(powerOn);
- }
- assertVAppStatus(testVAppURI, Status.POWERED_ON);
- return testVApp;
- }
-
- /**
- * Power off a {@link VApp}s {@link Vm}s.
- *
- * @see #powerOff(URI)
- */
- protected VApp powerOff(final VApp testVApp)
- {
- return powerOff(testVApp.getHref());
- }
-
- /**
- * Power off a {@link VApp}s {@link Vm}s.
- */
- protected VApp powerOff(final URI testVAppURI)
- {
- VApp testVApp = vAppClient.getVApp(testVAppURI);
- Vm vm = Iterables.getOnlyElement(testVApp.getChildren().getVms());
- Status status = Status.fromValue(vm.getStatus());
- if (status != Status.POWERED_OFF)
- {
- Task powerOff = vAppClient.powerOff(vm.getHref());
- assertTaskSucceedsLong(powerOff);
- }
- assertVAppStatus(testVAppURI, Status.POWERED_OFF);
- return testVApp;
- }
-
- /**
- * Suspend a {@link VApp}s {@link Vm}s.
- *
- * @see #suspend(URI)
- */
- protected VApp suspend(final VApp testVApp)
- {
- return powerOff(testVApp.getHref());
- }
-
- /**
- * Suspend a {@link VApp}s {@link Vm}s.
- */
- protected VApp suspend(final URI testVAppURI)
- {
- VApp testVApp = vAppClient.getVApp(testVAppURI);
- Vm vm = Iterables.getOnlyElement(testVApp.getChildren().getVms());
- Status status = Status.fromValue(vm.getStatus());
- if (status != Status.SUSPENDED)
- {
- Task suspend = vAppClient.suspend(vm.getHref());
- assertTaskSucceedsLong(suspend);
- }
- assertVAppStatus(testVAppURI, Status.SUSPENDED);
- return testVApp;
- }
-
- /**
- * Check the {@link VApp}s {@link Vm}s current status.
- */
- protected void assertVAppStatus(final URI testVAppURI, final Status status)
- {
- VApp testVApp = vAppClient.getVApp(testVAppURI);
- Vm vm = Iterables.getOnlyElement(testVApp.getChildren().getVms());
- assertEquals(
- vm.getStatus(),
- status.getValue(),
- String.format(OBJ_FIELD_EQ, VAPP, "status", status.toString(),
- Status.fromValue(vm.getStatus()).toString()));
- }
-
- /**
- * Marshals a JAXB annotated object into XML. The XML is output using
- * {@link org.jclouds.logging.Logger#debug(String)}
- */
- protected void debug(final Object object)
- {
- JAXBParser parser = new JAXBParser("true");
- try
- {
- String xml = parser.toXML(object);
- logger.debug(Strings.padStart(
- Strings.padEnd(" " + object.getClass().toString() + " ", 70, '-'), 80, '-'));
- logger.debug(xml);
- logger.debug(Strings.repeat("-", 80));
- }
- catch (IOException ioe)
- {
- Throwables.propagate(ioe);
- }
- }
+ /**
+ * Marshals a JAXB annotated object into XML. The XML is output using
+ * {@link org.jclouds.logging.Logger#debug(String)}
+ */
+ protected void debug(final Object object) {
+ JAXBParser parser = new JAXBParser("true");
+ try {
+ String xml = parser.toXML(object);
+ logger.debug(Strings.padStart(Strings.padEnd(" " + object.getClass().toString() + " ", 70, '-'), 80, '-'));
+ logger.debug(xml);
+ logger.debug(Strings.repeat("-", 80));
+ } catch (IOException ioe) {
+ Throwables.propagate(ioe);
+ }
+ }
}
diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/NonClientOperationsLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/NonClientOperationsLiveTest.java
index 3904d25d63..65f4aa31e5 100644
--- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/NonClientOperationsLiveTest.java
+++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/NonClientOperationsLiveTest.java
@@ -32,7 +32,6 @@ import org.jclouds.http.HttpResponse;
import org.jclouds.util.Strings2;
import org.jclouds.vcloud.director.v1_5.domain.OrgList;
import org.jclouds.vcloud.director.v1_5.domain.SessionWithToken;
-import org.jclouds.vcloud.director.v1_5.features.admin.AdminCatalogClient;
import org.jclouds.vcloud.director.v1_5.internal.BaseVCloudDirectorClientLiveTest;
import org.jclouds.xml.internal.JAXBParser;
import org.testng.annotations.Test;
diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/domain/Checks.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/domain/Checks.java
index f4f6a80d88..9779ec5efe 100644
--- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/domain/Checks.java
+++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/domain/Checks.java
@@ -46,24 +46,20 @@ import java.util.Map;
import java.util.Set;
import java.util.UUID;
+import org.jclouds.dmtf.cim.ResourceAllocationSettingData;
+import org.jclouds.dmtf.cim.VirtualSystemSettingData;
+import org.jclouds.dmtf.ovf.Disk;
+import org.jclouds.dmtf.ovf.DiskSection;
+import org.jclouds.dmtf.ovf.NetworkSection;
+import org.jclouds.dmtf.ovf.ProductSection;
+import org.jclouds.dmtf.ovf.SectionType;
+import org.jclouds.dmtf.ovf.StartupSection;
+import org.jclouds.dmtf.ovf.environment.EnvironmentType;
import org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType;
import org.jclouds.vcloud.director.v1_5.domain.CustomOrgLdapSettings.AuthenticationMechanism;
import org.jclouds.vcloud.director.v1_5.domain.CustomOrgLdapSettings.ConnectorType;
import org.jclouds.vcloud.director.v1_5.domain.NetworkConnection.IpAddressAllocationMode;
import org.jclouds.vcloud.director.v1_5.domain.OrgLdapSettings.LdapMode;
-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.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.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.StartupSection;
-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;
import org.jclouds.vcloud.director.v1_5.domain.query.ContainerType;
import org.jclouds.vcloud.director.v1_5.domain.query.QueryResultRecordType;
@@ -713,7 +709,7 @@ public class Checks {
// NOTE transport cannot be checked
if (hardware.getItems() != null) {
for (ResourceAllocationSettingData item : hardware.getItems()) {
- checkResourceAllocationSettingData(item);
+ checkResourceAllocationSettingData((RasdItem) item);
}
}
@@ -744,7 +740,7 @@ public class Checks {
// assertNotNull(virtualSystem.getVirtualSystemType(), String.format(OBJ_FIELD_REQ, "VirtualSystemSettingData", "virtualSystemType"));
}
- public static void checkResourceAllocationSettingData(ResourceAllocationSettingData item) {
+ public static void checkResourceAllocationSettingData(RasdItem item) {
// TODO
}
@@ -1101,8 +1097,8 @@ public class Checks {
// Check optional fields
if (section.getNetworks() != null) {
- for (org.jclouds.vcloud.director.v1_5.domain.ovf.Network network : section.getNetworks()) {
- checkNetwork(network);
+ for (org.jclouds.dmtf.ovf.Network network : section.getNetworks()) {
+ checkOvfNetwork(network);
}
}
@@ -1110,7 +1106,7 @@ public class Checks {
checkOvfSectionType(section);
}
- public static void checkNetwork(org.jclouds.vcloud.director.v1_5.domain.ovf.Network network) {
+ public static void checkOvfNetwork(org.jclouds.dmtf.ovf.Network network) {
assertNotNull(network, String.format(NOT_NULL_OBJ_FMT, "Network"));
// Check optional fields
@@ -1222,7 +1218,7 @@ public class Checks {
// Check fields
// TODO
- for (ResourceAllocationSettingData item : items.getItems()) {
+ for (RasdItem item : items.getItems()) {
checkResourceAllocationSettingData(item);
}
}
@@ -1235,7 +1231,7 @@ public class Checks {
assertNotNull(val, String.format(NOT_NULL_OBJ_FMT, "ProductSection"));
if (val.getProperties() != null) {
- for (org.jclouds.vcloud.director.v1_5.domain.ovf.Property property : val.getProperties()) {
+ for (org.jclouds.dmtf.ovf.Property property : val.getProperties()) {
checkOvfProperty(property);
}
}
@@ -1244,7 +1240,7 @@ public class Checks {
checkOvfSectionType(val);
}
- private static void checkOvfProperty(org.jclouds.vcloud.director.v1_5.domain.ovf.Property val) {
+ private static void checkOvfProperty(org.jclouds.dmtf.ovf.Property val) {
assertNotNull(val, String.format(NOT_NULL_OBJ_FMT, "Property"));
}
@@ -1252,7 +1248,7 @@ public class Checks {
assertNotNull(val, String.format(NOT_NULL_OBJ_FMT, "NetworkSection"));
if (val.getNetworks() != null) {
- for (org.jclouds.vcloud.director.v1_5.domain.ovf.Network network : val.getNetworks()) {
+ for (org.jclouds.dmtf.ovf.Network network : val.getNetworks()) {
checkOvfNetwork(network);
}
}
@@ -1260,10 +1256,6 @@ public class Checks {
checkOvfSectionType(val);
}
- private static void checkOvfNetwork(org.jclouds.vcloud.director.v1_5.domain.ovf.Network val) {
- assertNotNull(val, String.format(NOT_NULL_OBJ_FMT, "Network"));
- }
-
public static void checkOvfEnvelope(Envelope val) {
assertNotNull(val, String.format(NOT_NULL_OBJ_FMT, "Envelope"));
@@ -1329,7 +1321,7 @@ public class Checks {
if (section.getItems() != null) {
for (ResourceAllocationSettingData item : section.getItems()) {
- checkCimResourceAllocationSettingData(item);
+ checkCimResourceAllocationSettingData((RasdItem) item);
}
}
if (section.getSystem() != null) {
@@ -1345,7 +1337,7 @@ public class Checks {
assertNotNull(val, String.format(NOT_NULL_OBJ_FMT, "VirtualSystemSettingData"));
}
- private static void checkCimResourceAllocationSettingData(ResourceAllocationSettingData val) {
+ private static void checkCimResourceAllocationSettingData(RasdItem val) {
// TODO Could do more assertions...
assertNotNull(val, String.format(NOT_NULL_OBJ_FMT, "ResouorceAllocatoinSettingData"));
}
diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VAppClientExpectTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VAppClientExpectTest.java
index c8d273b91d..ebf622b700 100644
--- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VAppClientExpectTest.java
+++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VAppClientExpectTest.java
@@ -22,6 +22,8 @@ import static org.testng.Assert.assertEquals;
import java.net.URI;
+import org.jclouds.dmtf.ovf.NetworkSection;
+import org.jclouds.dmtf.ovf.StartupSection;
import org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType;
import org.jclouds.vcloud.director.v1_5.domain.ControlAccessParams;
import org.jclouds.vcloud.director.v1_5.domain.DeployVAppParams;
@@ -32,8 +34,10 @@ import org.jclouds.vcloud.director.v1_5.domain.Link;
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.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.RasdItem;
import org.jclouds.vcloud.director.v1_5.domain.RasdItemsList;
import org.jclouds.vcloud.director.v1_5.domain.RecomposeVAppParams;
import org.jclouds.vcloud.director.v1_5.domain.Reference;
@@ -43,13 +47,9 @@ import org.jclouds.vcloud.director.v1_5.domain.ScreenTicket;
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.cim.ResourceAllocationSettingData;
-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.StartupSection;
-import org.jclouds.vcloud.director.v1_5.domain.ovf.VirtualHardwareSection;
import org.jclouds.vcloud.director.v1_5.internal.VCloudDirectorAdminClientExpectTest;
import org.jclouds.vcloud.director.v1_5.user.VCloudDirectorClient;
import org.testng.annotations.BeforeClass;
@@ -898,7 +898,7 @@ public class VAppClientExpectTest extends VCloudDirectorAdminClientExpectTest {
.xmlFilePayload("/vApp/getVirtualHardwareSectionCpu.xml", VCloudDirectorMediaType.OVF_RASD_ITEM)
.httpResponseBuilder().build());
- ResourceAllocationSettingData expected = getVirtualHardwareSectionCpu();
+ RasdItem expected = getVirtualHardwareSectionCpu();
assertEquals(client.getVAppClient().getVirtualHardwareSectionCpu(vAppURI), expected);
}
@@ -915,7 +915,7 @@ public class VAppClientExpectTest extends VCloudDirectorAdminClientExpectTest {
.xmlFilePayload("/vApp/modifyVirtualHardwareSectionCpuTask.xml", VCloudDirectorMediaType.TASK)
.httpResponseBuilder().build());
- ResourceAllocationSettingData cpu = getVirtualHardwareSectionCpu(); // .toBuilder();
+ RasdItem cpu = getVirtualHardwareSectionCpu(); // .toBuilder();
// .build();
Task expected = modifyVirtualHardwareSectionCpuTask();
@@ -986,7 +986,7 @@ public class VAppClientExpectTest extends VCloudDirectorAdminClientExpectTest {
.xmlFilePayload("/vApp/getVirtualHardwareSectionMemory.xml", VCloudDirectorMediaType.OVF_RASD_ITEM)
.httpResponseBuilder().build());
- ResourceAllocationSettingData expected = getVirtualHardwareSectionMemory();
+ RasdItem expected = getVirtualHardwareSectionMemory();
assertEquals(client.getVAppClient().getVirtualHardwareSectionMemory(vAppURI), expected);
}
@@ -1003,7 +1003,7 @@ public class VAppClientExpectTest extends VCloudDirectorAdminClientExpectTest {
.xmlFilePayload("/vApp/modifyVirtualHardwareSectionMemoryTask.xml", VCloudDirectorMediaType.TASK)
.httpResponseBuilder().build());
- ResourceAllocationSettingData memory = getVirtualHardwareSectionCpu(); // .toBuilder();
+ RasdItem memory = getVirtualHardwareSectionCpu(); // .toBuilder();
// .build();
Task expected = modifyVirtualHardwareSectionMemoryTask();
@@ -1414,8 +1414,8 @@ public class VAppClientExpectTest extends VCloudDirectorAdminClientExpectTest {
return task;
}
- public static ResourceAllocationSettingData getVirtualHardwareSectionCpu() {
- ResourceAllocationSettingData cpu = ResourceAllocationSettingData.builder()
+ public static RasdItem getVirtualHardwareSectionCpu() {
+ RasdItem cpu = RasdItem.builder()
.build();
return cpu;
@@ -1449,8 +1449,8 @@ public class VAppClientExpectTest extends VCloudDirectorAdminClientExpectTest {
return media;
}
- public static ResourceAllocationSettingData getVirtualHardwareSectionMemory() {
- ResourceAllocationSettingData memory = ResourceAllocationSettingData.builder()
+ public static RasdItem getVirtualHardwareSectionMemory() {
+ RasdItem memory = RasdItem.builder()
.build();
return memory;
diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VAppClientLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VAppClientLiveTest.java
index ade21eef5c..0f0879696e 100644
--- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VAppClientLiveTest.java
+++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VAppClientLiveTest.java
@@ -69,6 +69,12 @@ import java.util.Set;
import java.util.concurrent.TimeUnit;
import org.jclouds.io.Payloads;
+import org.jclouds.dmtf.cim.OSType;
+import org.jclouds.dmtf.cim.ResourceAllocationSettingData;
+import org.jclouds.dmtf.ovf.MsgType;
+import org.jclouds.dmtf.ovf.NetworkSection;
+import org.jclouds.dmtf.ovf.ProductSection;
+import org.jclouds.dmtf.ovf.StartupSection;
import org.jclouds.vcloud.director.v1_5.AbstractVAppClientLiveTest;
import org.jclouds.vcloud.director.v1_5.VCloudDirectorException;
import org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType;
@@ -88,8 +94,10 @@ import org.jclouds.vcloud.director.v1_5.domain.NetworkConfigSection;
import org.jclouds.vcloud.director.v1_5.domain.NetworkConnection;
import org.jclouds.vcloud.director.v1_5.domain.NetworkConnection.IpAddressAllocationMode;
import org.jclouds.vcloud.director.v1_5.domain.NetworkConnectionSection;
+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.RasdItem;
import org.jclouds.vcloud.director.v1_5.domain.RasdItemsList;
import org.jclouds.vcloud.director.v1_5.domain.RecomposeVAppParams;
import org.jclouds.vcloud.director.v1_5.domain.Reference;
@@ -100,17 +108,10 @@ import org.jclouds.vcloud.director.v1_5.domain.ScreenTicket;
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.VmQuestionAnswerChoice;
-import org.jclouds.vcloud.director.v1_5.domain.cim.OSType;
-import org.jclouds.vcloud.director.v1_5.domain.cim.ResourceAllocationSettingData;
-import org.jclouds.vcloud.director.v1_5.domain.ovf.MsgType;
-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.StartupSection;
-import org.jclouds.vcloud.director.v1_5.domain.ovf.VirtualHardwareSection;
import org.jclouds.vcloud.director.v1_5.domain.query.QueryResultRecordType;
import org.jclouds.vcloud.director.v1_5.domain.query.QueryResultRecords;
import org.testng.annotations.AfterClass;
@@ -966,7 +967,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
// Copy existing section and update fields
VirtualHardwareSection oldSection = vAppClient.getVirtualHardwareSection(vm.getHref());
- Set oldItems = oldSection.getItems();
+ Set extends ResourceAllocationSettingData> oldItems = oldSection.getItems();
Set newItems = Sets.newLinkedHashSet(oldItems);
ResourceAllocationSettingData oldMemory = Iterables.find(oldItems, new Predicate() {
@Override
@@ -1010,7 +1011,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
@Test(description = "GET /vApp/{id}/virtualHardwareSection/cpu", dependsOnMethods = { "testGetVirtualHardwareSection" })
public void testGetVirtualHardwareSectionCpu() {
// Method under test
- ResourceAllocationSettingData rasd = vAppClient.getVirtualHardwareSectionCpu(vm.getHref());
+ RasdItem rasd = vAppClient.getVirtualHardwareSectionCpu(vm.getHref());
// Check the retrieved object is well formed
checkResourceAllocationSettingData(rasd);
@@ -1019,8 +1020,8 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
@Test(description = "PUT /vApp/{id}/virtualHardwareSection/cpu", dependsOnMethods = { "testGetVirtualHardwareSectionCpu" })
public void testModifyVirtualHardwareSectionCpu() {
// Copy existing section and update fields
- ResourceAllocationSettingData oldItem = vAppClient.getVirtualHardwareSectionCpu(vm.getHref());
- ResourceAllocationSettingData newItem = oldItem.toBuilder()
+ RasdItem oldItem = vAppClient.getVirtualHardwareSectionCpu(vm.getHref());
+ RasdItem newItem = oldItem.toBuilder()
.elementName("2 virtual CPU(s)")
.virtualQuantity(new BigInteger("2"))
.build();
@@ -1030,7 +1031,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
assertTrue(retryTaskSuccess.apply(modifyVirtualHardwareSectionCpu), String.format(TASK_COMPLETE_TIMELY, "modifyVirtualHardwareSectionCpu"));
// Retrieve the modified section
- ResourceAllocationSettingData modified = vAppClient.getVirtualHardwareSectionCpu(vm.getHref());
+ RasdItem modified = vAppClient.getVirtualHardwareSectionCpu(vm.getHref());
// Check the retrieved object
checkResourceAllocationSettingData(modified);
@@ -1098,7 +1099,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
@Test(description = "GET /vApp/{id}/virtualHardwareSection/memory", dependsOnMethods = { "testGetVirtualHardwareSection" })
public void testGetVirtualHardwareSectionMemory() {
// Method under test
- ResourceAllocationSettingData rasd = vAppClient.getVirtualHardwareSectionCpu(vm.getHref());
+ RasdItem rasd = vAppClient.getVirtualHardwareSectionCpu(vm.getHref());
// Check the retrieved object is well formed
checkResourceAllocationSettingData(rasd);
@@ -1106,8 +1107,8 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
@Test(description = "PUT /vApp/{id}/virtualHardwareSection/memory", dependsOnMethods = { "testGetVirtualHardwareSectionMemory" })
public void testModifyVirtualHardwareSectionMemory() {
- ResourceAllocationSettingData origItem = vAppClient.getVirtualHardwareSectionMemory(vm.getHref());
- ResourceAllocationSettingData newItem = origItem.toBuilder()
+ RasdItem origItem = vAppClient.getVirtualHardwareSectionMemory(vm.getHref());
+ RasdItem newItem = origItem.toBuilder()
.elementName("1024 MB of memory")
.virtualQuantity(new BigInteger("1024"))
.build();
@@ -1117,7 +1118,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
assertTrue(retryTaskSuccess.apply(modifyVirtualHardwareSectionMemory), String.format(TASK_COMPLETE_TIMELY, "modifyVirtualHardwareSectionMemory"));
// Retrieve the modified section
- ResourceAllocationSettingData modified = vAppClient.getVirtualHardwareSectionMemory(vm.getHref());
+ RasdItem modified = vAppClient.getVirtualHardwareSectionMemory(vm.getHref());
// Check the retrieved object
checkResourceAllocationSettingData(modified);
diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VAppTemplateClientLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VAppTemplateClientLiveTest.java
index 1f1b2a9982..14f8254657 100644
--- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VAppTemplateClientLiveTest.java
+++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VAppTemplateClientLiveTest.java
@@ -41,11 +41,13 @@ import java.net.URI;
import java.util.Map;
import java.util.Set;
+import org.jclouds.dmtf.ovf.NetworkSection;
import org.jclouds.vcloud.director.v1_5.AbstractVAppClientLiveTest;
import org.jclouds.vcloud.director.v1_5.VCloudDirectorException;
import org.jclouds.vcloud.director.v1_5.domain.Checks;
import org.jclouds.vcloud.director.v1_5.domain.CloneVAppTemplateParams;
import org.jclouds.vcloud.director.v1_5.domain.CustomizationSection;
+import org.jclouds.vcloud.director.v1_5.domain.Envelope;
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.Link;
@@ -63,8 +65,6 @@ import org.jclouds.vcloud.director.v1_5.domain.References;
import org.jclouds.vcloud.director.v1_5.domain.RelocateParams;
import org.jclouds.vcloud.director.v1_5.domain.Task;
import org.jclouds.vcloud.director.v1_5.domain.VAppTemplate;
-import org.jclouds.vcloud.director.v1_5.domain.ovf.Envelope;
-import org.jclouds.vcloud.director.v1_5.domain.ovf.NetworkSection;
import org.testng.annotations.AfterClass;
import org.testng.annotations.Test;
diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminCatalogClientExpectTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminCatalogClientExpectTest.java
index 6391ce39ed..5f2c3a71ff 100644
--- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminCatalogClientExpectTest.java
+++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminCatalogClientExpectTest.java
@@ -30,7 +30,6 @@ import org.jclouds.vcloud.director.v1_5.domain.Owner;
import org.jclouds.vcloud.director.v1_5.domain.PublishCatalogParams;
import org.jclouds.vcloud.director.v1_5.domain.Reference;
import org.jclouds.vcloud.director.v1_5.domain.Task;
-import org.jclouds.vcloud.director.v1_5.features.admin.AdminCatalogClient;
import org.jclouds.vcloud.director.v1_5.internal.VCloudDirectorAdminClientExpectTest;
import org.testng.annotations.Test;
diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminNetworkClientExpectTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminNetworkClientExpectTest.java
index 5fe8699d89..380f14c061 100644
--- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminNetworkClientExpectTest.java
+++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminNetworkClientExpectTest.java
@@ -29,7 +29,6 @@ import org.jclouds.vcloud.director.v1_5.domain.OrgNetwork;
import org.jclouds.vcloud.director.v1_5.domain.Reference;
import org.jclouds.vcloud.director.v1_5.domain.Task;
import org.jclouds.vcloud.director.v1_5.features.NetworkClientExpectTest;
-import org.jclouds.vcloud.director.v1_5.features.admin.AdminNetworkClient;
import org.jclouds.vcloud.director.v1_5.internal.VCloudDirectorAdminClientExpectTest;
import org.testng.annotations.Test;
diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminOrgClientExpectTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminOrgClientExpectTest.java
index 11c725d072..2539fce13d 100644
--- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminOrgClientExpectTest.java
+++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminOrgClientExpectTest.java
@@ -35,7 +35,6 @@ import org.jclouds.vcloud.director.v1_5.domain.OrgSettings;
import org.jclouds.vcloud.director.v1_5.domain.OrgVAppTemplateLeaseSettings;
import org.jclouds.vcloud.director.v1_5.domain.Reference;
import org.jclouds.vcloud.director.v1_5.domain.SmtpServerSettings;
-import org.jclouds.vcloud.director.v1_5.features.admin.AdminOrgClient;
import org.jclouds.vcloud.director.v1_5.internal.VCloudDirectorAdminClientExpectTest;
import org.testng.annotations.Test;
diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminQueryClientExpectTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminQueryClientExpectTest.java
index 531c35aeb2..aac0747ce1 100644
--- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminQueryClientExpectTest.java
+++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminQueryClientExpectTest.java
@@ -29,7 +29,6 @@ import org.jclouds.vcloud.director.v1_5.admin.VCloudDirectorAdminClient;
import org.jclouds.vcloud.director.v1_5.domain.Link;
import org.jclouds.vcloud.director.v1_5.domain.query.QueryResultRecords;
import org.jclouds.vcloud.director.v1_5.domain.query.QueryResultRoleRecord;
-import org.jclouds.vcloud.director.v1_5.features.admin.AdminQueryClient;
import org.jclouds.vcloud.director.v1_5.internal.VCloudDirectorAdminClientExpectTest;
import org.testng.annotations.Test;
diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminVdcClientExpectTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminVdcClientExpectTest.java
index 59e962be29..b34dad2d43 100644
--- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminVdcClientExpectTest.java
+++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminVdcClientExpectTest.java
@@ -27,7 +27,6 @@ import org.jclouds.vcloud.director.v1_5.admin.VCloudDirectorAdminClient;
import org.jclouds.vcloud.director.v1_5.domain.AdminVdc;
import org.jclouds.vcloud.director.v1_5.domain.Reference;
import org.jclouds.vcloud.director.v1_5.features.VdcClientExpectTest;
-import org.jclouds.vcloud.director.v1_5.features.admin.AdminVdcClient;
import org.jclouds.vcloud.director.v1_5.internal.VCloudDirectorAdminClientExpectTest;
import org.testng.annotations.Test;
diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminVdcClientLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminVdcClientLiveTest.java
index baed95de50..6ef70f5087 100644
--- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminVdcClientLiveTest.java
+++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminVdcClientLiveTest.java
@@ -34,8 +34,6 @@ import org.jclouds.vcloud.director.v1_5.domain.MetadataEntry;
import org.jclouds.vcloud.director.v1_5.domain.MetadataValue;
import org.jclouds.vcloud.director.v1_5.domain.Task;
import org.jclouds.vcloud.director.v1_5.features.MetadataClient;
-import org.jclouds.vcloud.director.v1_5.features.VdcClient;
-import org.jclouds.vcloud.director.v1_5.features.MetadataClient.Writeable;
import org.jclouds.vcloud.director.v1_5.features.admin.AdminVdcClient;
import org.jclouds.vcloud.director.v1_5.internal.BaseVCloudDirectorClientLiveTest;
import org.testng.annotations.AfterClass;
diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/handlers/InvalidateSessionAndRetryOn401AndLogoutOnCloseTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/handlers/InvalidateSessionAndRetryOn401AndLogoutOnCloseTest.java
index ec0f1dc55e..24183b5695 100644
--- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/handlers/InvalidateSessionAndRetryOn401AndLogoutOnCloseTest.java
+++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/handlers/InvalidateSessionAndRetryOn401AndLogoutOnCloseTest.java
@@ -42,7 +42,6 @@ import com.google.common.cache.LoadingCache;
*/
@Test(groups = "unit", testName = "InvalidateSessionAndRetryOn401AndLogoutOnCloseTest")
public class InvalidateSessionAndRetryOn401AndLogoutOnCloseTest {
- @SuppressWarnings("unchecked")
@Test
public void test401ShouldInvalidateSessionAndRetry() {
HttpCommand command = createMock(HttpCommand.class);
diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/internal/BaseVCloudDirectorExpectTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/internal/BaseVCloudDirectorExpectTest.java
index 75a45c3327..d55ee72a6d 100644
--- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/internal/BaseVCloudDirectorExpectTest.java
+++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/internal/BaseVCloudDirectorExpectTest.java
@@ -19,7 +19,6 @@
package org.jclouds.vcloud.director.v1_5.internal;
import static com.google.common.base.Preconditions.checkNotNull;
-import static org.jclouds.rest.RestContextFactory.createContext;
import static org.testng.Assert.assertNotNull;
import java.net.URI;
@@ -29,22 +28,15 @@ import org.jclouds.Constants;
import org.jclouds.date.DateService;
import org.jclouds.http.HttpRequest;
import org.jclouds.http.HttpResponse;
-import org.jclouds.logging.config.NullLoggingModule;
import org.jclouds.rest.BaseRestClientExpectTest;
-import org.jclouds.rest.RestContextSpec;
-import org.jclouds.rest.BaseRestClientExpectTest.ExpectModule;
import org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType;
import org.jclouds.vcloud.director.v1_5.domain.Reference;
-import org.jclouds.vcloud.director.v1_5.user.VCloudDirectorClient;
import org.testng.annotations.BeforeGroups;
-import com.google.common.base.Function;
import com.google.common.collect.ImmutableMultimap;
-import com.google.common.collect.ImmutableSet;
import com.google.common.collect.LinkedListMultimap;
import com.google.common.collect.Multimap;
import com.google.inject.Guice;
-import com.google.inject.Module;
/**
* Base class for writing KeyStone Rest Client Expect tests