groups;
-
- /**
- * Gets the value of the groupReference property.
- *
- *
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a set
method for the groupReference property.
- *
- *
- * For example, to add a new item, do as follows:
- *
- * getGroupReference().add(newItem);
- *
- *
- *
- *
- * Objects of the following type(s) are allowed in the list
- * {@link Reference }
- *
- *
- */
- public List getGroups() {
- if (groups == null) {
- groups = new ArrayList();
- }
- return this.groups;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o)
- return true;
- if (o == null || getClass() != o.getClass())
- return false;
- GroupsList that = GroupsList.class.cast(o);
- return equal(groups, that.groups);
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(groups);
- }
-
- @Override
- public String toString() {
- return Objects.toStringHelper("")
- .add("groups", groups).toString();
- }
-
-}
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Networks.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Networks.java
deleted file mode 100644
index 6509e9f213..0000000000
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Networks.java
+++ /dev/null
@@ -1,172 +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 static com.google.common.base.Preconditions.checkNotNull;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
-import com.google.common.base.Objects;
-import com.google.common.base.Objects.ToStringHelper;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Lists;
-
-
-/**
- *
- * Container for ReferenceType elements that reference ExternalNetwork objects.
- * This element is created by the server and is read only.
- *
- *
- * Java class for Networks complex type.
- *
- *
The following schema fragment specifies the expected content contained within this class.
- *
- *
- * <complexType name="Networks">
- * <complexContent>
- * <extension base="{http://www.vmware.com/vcloud/v1.5}VCloudExtensibleType">
- * <sequence>
- * <element name="Network" type="{http://www.vmware.com/vcloud/v1.5}ReferenceType" maxOccurs="unbounded" minOccurs="0"/>
- * </sequence>
- * <anyAttribute processContents='lax' namespace='##other'/>
- * </extension>
- * </complexContent>
- * </complexType>
- *
- *
- *
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "Networks", propOrder = {
- "networks"
-})
-public class Networks {
- public static Builder builder() {
- return new Builder();
- }
-
- public Builder toBuilder() {
- return new Builder().fromNetworks(this);
- }
-
- public static class Builder {
-
- private List networks = Lists.newArrayList();
-
- /**
- * @see Networks#getNetwork()
- */
- public Builder networks(List networks) {
- this.networks = ImmutableList.copyOf(networks);
- return this;
- }
-
- /**
- * @see Networks#getNetwork()
- */
- public Builder network(Reference network) {
- this.networks.add(checkNotNull(network, "network"));
- return this;
- }
-
- public Networks build() {
- return new Networks(networks);
- }
-
-
- public Builder fromNetworks(Networks in) {
- return networks(in.getNetwork());
- }
- }
-
- private Networks() {
- // For JAXB
- }
-
- private Networks(List networks) {
- this.networks = networks;
- }
-
- @XmlElement(name = "Network")
- protected List networks;
-
- /**
- * Gets the value of the network property.
- *
- *
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a set
method for the network property.
- *
- *
- * For example, to add a new item, do as follows:
- *
- * getNetwork().add(newItem);
- *
- *
- *
- *
- * Objects of the following type(s) are allowed in the list
- * {@link Reference }
- *
- *
- */
- public List getNetwork() {
- if (networks == null) {
- networks = new ArrayList();
- }
- return this.networks;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o)
- return true;
- if (o == null || getClass() != o.getClass())
- return false;
- Networks that = Networks.class.cast(o);
- return equal(networks, that.networks);
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(networks);
- }
-
- @Override
- public String toString() {
- return string().toString();
- }
-
- public ToStringHelper string() {
- return Objects.toStringHelper("")
- .add("networks", networks);
- }
-
-}
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/UsersList.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/UsersList.java
deleted file mode 100644
index 26250eff5d..0000000000
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/UsersList.java
+++ /dev/null
@@ -1,166 +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 static com.google.common.base.Preconditions.checkNotNull;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import com.google.common.base.Objects;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Lists;
-
-
-/**
- *
- * Container for ReferenceType elements that reference users.
- *
- *
- * Java class for UsersList complex type.
- *
- *
The following schema fragment specifies the expected content contained within this class.
- *
- *
- * <complexType name="UsersList">
- * <complexContent>
- * <extension base="{http://www.vmware.com/vcloud/v1.5}VCloudExtensibleType">
- * <sequence>
- * <element name="UserReference" type="{http://www.vmware.com/vcloud/v1.5}ReferenceType" maxOccurs="unbounded" minOccurs="0"/>
- * </sequence>
- * <anyAttribute processContents='lax' namespace='##other'/>
- * </extension>
- * </complexContent>
- * </complexType>
- *
- *
- *
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlRootElement(name = "UsersList")
-@XmlType(propOrder = {
- "users"
-})
-public class UsersList {
- public static Builder builder() {
- return new Builder();
- }
-
- public Builder toBuilder() {
- return new Builder().fromUsersList(this);
- }
-
- public static class Builder {
- private List users = Lists.newArrayList();
-
- /**
- * @see UsersList#getUsers()
- */
- public Builder users(List users) {
- this.users = ImmutableList.copyOf(users);
- return this;
- }
-
- /**
- * @see UsersList#getUsers()
- */
- public Builder user(Reference user) {
- users.add(checkNotNull(user, "user"));
- return this;
- }
-
- public UsersList build() {
- return new UsersList(users);
- }
-
- public Builder fromUsersList(UsersList in) {
- return users(in.getUsers());
- }
- }
-
- private UsersList() {
- // For JAXB and builder use
- }
-
- private UsersList(List users) {
- this.users = users;
- }
-
- @XmlElement(name = "UserReference")
- protected List users;
-
- /**
- * Gets the value of the userReference property.
- *
- *
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a set
method for the userReference property.
- *
- *
- * For example, to add a new item, do as follows:
- *
- * getUserReference().add(newItem);
- *
- *
- *
- *
- * Objects of the following type(s) are allowed in the list
- * {@link Reference }
- *
- *
- */
- public List getUsers() {
- if (users == null) {
- users = new ArrayList();
- }
- return this.users;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o)
- return true;
- if (o == null || getClass() != o.getClass())
- return false;
- UsersList that = UsersList.class.cast(o);
- return equal(users, that.users);
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(users);
- }
-
- @Override
- public String toString() {
- return Objects.toStringHelper("")
- .add("userReference", users).toString();
- }
-
-}
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Vdcs.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Vdcs.java
deleted file mode 100644
index 99f23f9ead..0000000000
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Vdcs.java
+++ /dev/null
@@ -1,176 +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 static com.google.common.base.Preconditions.checkNotNull;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import com.google.common.base.Objects;
-import com.google.common.base.Objects.ToStringHelper;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Lists;
-
-
-/**
- *
- * Represents a list of references to virtual data centers.
- *
- *
- * Java class for Vdcs complex type.
- *
- *
The following schema fragment specifies the expected content contained within this class.
- *
- *
- * <complexType name="Vdcs">
- * <complexContent>
- * <extension base="{http://www.vmware.com/vcloud/v1.5}VCloudExtensibleType">
- * <sequence>
- * <element name="Vdc" type="{http://www.vmware.com/vcloud/v1.5}ReferenceType" maxOccurs="unbounded" minOccurs="0"/>
- * </sequence>
- * <anyAttribute processContents='lax' namespace='##other'/>
- * </extension>
- * </complexContent>
- * </complexType>
- *
- *
- *
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlRootElement(name = "Vdcs")
-@XmlType(propOrder = {
- "vdcs"
-})
-public class Vdcs {
-
- // FIXME Delete Vdcs, and use Set
-
- public static Builder builder() {
- return new Builder();
- }
-
- public Builder toBuilder() {
- return new Builder().fromVdcs(this);
- }
-
- public static class Builder {
-
- private List vdcs = Lists.newArrayList();
-
- /**
- * @see Vdcs#getVdc()
- */
- public Builder vdcs(List vdcs) {
- this.vdcs = ImmutableList.copyOf(vdcs);
- return this;
- }
-
- /**
- * @see Vdcs#getVdc()
- */
- public Builder vdc(Reference vdc) {
- this.vdcs.add(checkNotNull(vdc, "vdc"));
- return this;
- }
-
- public Vdcs build() {
- return new Vdcs(vdcs);
- }
-
- public Builder fromVdcs(Vdcs in) {
- return vdcs(in.getVdcs());
- }
- }
-
- private Vdcs() {
- // For JAXB and builder use
- }
-
- private Vdcs(List vdcs) {
- this.vdcs = vdcs;
- }
-
-
- @XmlElement(name = "Vdc")
- protected List vdcs;
-
- /**
- * Gets the value of the vdc property.
- *
- *
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a set
method for the vdc property.
- *
- *
- * For example, to add a new item, do as follows:
- *
- * getVdc().add(newItem);
- *
- *
- *
- *
- * Objects of the following type(s) are allowed in the list
- * {@link Reference }
- *
- *
- */
- public List getVdcs() {
- if (vdcs == null) {
- vdcs = new ArrayList();
- }
- return this.vdcs;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o)
- return true;
- if (o == null || getClass() != o.getClass())
- return false;
- Vdcs that = Vdcs.class.cast(o);
- return equal(vdcs, that.vdcs);
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(vdcs);
- }
-
- @Override
- public String toString() {
- return string().toString();
- }
-
- public ToStringHelper string() {
- return Objects.toStringHelper("")
- .add("vdcs", vdcs);
- }
-
-}
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 659d53f85c..41a30749a4 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
@@ -68,6 +68,7 @@ import org.jclouds.vcloud.director.v1_5.domain.query.QueryResultRecordType;
import com.beust.jcommander.internal.Maps;
import com.google.common.base.Splitter;
+import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Iterables;
import com.google.common.net.InetAddresses;
@@ -110,11 +111,18 @@ public class Checks {
/**
* Assumes the validTypes to be vcloud-specific types.
*
- * @see checkReferenceType(ReferenceType, Collection)
+ * @see #checkReferenceType(Reference, Collection)
*/
public static void checkReferenceType(Reference reference) {
checkReferenceType(reference, VCloudDirectorMediaType.ALL);
}
+
+ /**
+ * @see #checkReferenceType(Reference, Collection)
+ */
+ public static void checkReferenceType(Reference reference, String type) {
+ checkReferenceType(reference, ImmutableSet.of(type));
+ }
public static void checkReferenceType(Reference reference, Collection validTypes) {
// Check required fields
@@ -283,41 +291,26 @@ public class Checks {
assertNotNull(org.getSettings(), String.format(NOT_NULL_OBJ_FIELD_FMT, "settings", "AdminOrg"));
// optional
- if (org.getGroups() != null) {
- checkGroupsList(org.getGroups());
+ for (Reference user : org.getUsers()) {
+ checkReferenceType(user, VCloudDirectorMediaType.ADMIN_USER);
}
- if (org.getCatalogs() != null) {
- checkCatalogsList(org.getCatalogs());
+ for (Reference group : org.getGroups()) {
+ checkReferenceType(group, VCloudDirectorMediaType.GROUP);
}
- if (org.getVdcs() != null) {
- checkVdcs(org.getVdcs());
+ for (Reference catalog : org.getCatalogs()) {
+ checkReferenceType(catalog, VCloudDirectorMediaType.ADMIN_CATALOG);
}
- if (org.getNetworks() != null) {
- checkNetworks(org.getNetworks());
+ for (Reference vdc : org.getVdcs()) {
+ checkReferenceType(vdc, VCloudDirectorMediaType.ADMIN_VDC);
+ }
+ for (Reference network : org.getNetworks()) {
+ checkReferenceType(network, VCloudDirectorMediaType.ADMIN_NETWORK);
}
// Check parent type
checkOrg(org);
}
- public static void checkCatalogsList(CatalogsList catalogList) {
- for (Reference catalogItem : catalogList.getCatalogItems()) {
- checkReferenceType(catalogItem);
- }
- }
-
- public static void checkVdcs(Vdcs vdcs) {
- for (Reference vdc : vdcs.getVdcs()) {
- checkReferenceType(vdc);
- }
- }
-
- public static void checkNetworks(Networks networks) {
- for (Reference network : networks.getNetwork()) {
- checkReferenceType(network);
- }
- }
-
public static void checkAdminCatalog(AdminCatalog catalog) {
// Check parent type
checkCatalogType(catalog);
@@ -327,11 +320,8 @@ public class Checks {
// Check optional elements/attributes
Owner owner = catalog.getOwner();
if (owner != null) checkOwner(owner);
- CatalogItems catalogItems = catalog.getCatalogItems();
- if (catalogItems != null) {
- for (Reference catalogItemReference : catalogItems.getCatalogItems()) {
- checkReferenceType(catalogItemReference);
- }
+ for (Reference catalogItemReference : catalog.getCatalogItems()) {
+ checkReferenceType(catalogItemReference, VCloudDirectorMediaType.CATALOG_ITEM);
}
// NOTE isPublished cannot be checked
@@ -695,16 +685,9 @@ public class Checks {
if (params.isSharedToEveryone()) {
assertNotNull(params.getEveryoneAccessLevel(), String.format(OBJ_FIELD_REQ, "ControlAccessParams", "EveryoneAccessLevel"));
} else {
- AccessSettings accessSettings = params.getAccessSettings();
- checkAccessSettings(accessSettings);
- }
- }
-
- public static void checkAccessSettings(AccessSettings accessSettings) {
- if (accessSettings != null && accessSettings.getAccessSettings() != null) {
- for (AccessSetting setting : accessSettings.getAccessSettings()) {
- checkAccessSetting(setting);
- }
+ for (AccessSetting setting : params.getAccessSettings()) {
+ checkAccessSetting(setting);
+ }
}
}
@@ -778,37 +761,19 @@ public class Checks {
checkResourceEntityType(media);
}
- public static void checkGroupsList(GroupsList groupsList) {
- // Check optional fields
- if (groupsList.getGroups() != null) {
- for (Reference group : groupsList.getGroups()) {
- checkReferenceType(group);
- }
- }
- }
-
public static void checkGroup(Group group) {
// Check optional fields
// NOTE nameInSource cannot be checked
- if (group.getUsersList() != null) {
- checkUsersList(group.getUsersList());
+ for (Reference user : group.getUsersList()) {
+ checkReferenceType(user, VCloudDirectorMediaType.USER);
}
if (group.getRole() != null) {
- checkReferenceType(group.getRole());
+ checkReferenceType(group.getRole(), VCloudDirectorMediaType.ROLE);
}
// parent type
checkEntityType(group);
}
-
- public static void checkUsersList(UsersList usersList) {
- // Check optional fields
- if (usersList.getUsers() != null) {
- for (Reference user : usersList.getUsers()) {
- checkReferenceType(user);
- }
- }
- }
public static void checkOrgSettings(OrgSettings settings) {
// Check optional fields
diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminCatalogClientExpectTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminCatalogClientExpectTest.java
index 9921d41933..3ce56c12fc 100644
--- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminCatalogClientExpectTest.java
+++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminCatalogClientExpectTest.java
@@ -25,7 +25,6 @@ import java.net.URI;
import org.jclouds.vcloud.director.v1_5.VCloudDirectorClient;
import org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType;
import org.jclouds.vcloud.director.v1_5.domain.AdminCatalog;
-import org.jclouds.vcloud.director.v1_5.domain.CatalogItems;
import org.jclouds.vcloud.director.v1_5.domain.Link;
import org.jclouds.vcloud.director.v1_5.domain.Owner;
import org.jclouds.vcloud.director.v1_5.domain.PublishCatalogParams;
@@ -37,7 +36,7 @@ import org.testng.annotations.Test;
import com.google.common.collect.ImmutableSet;
/**
- * Test the {@link CatalogClient} by observing its side effects.
+ * Test the {@link AdminCatalogClient} by observing its side effects.
*
* @author grkvlt@apache.org
*/
@@ -289,8 +288,6 @@ public class AdminCatalogClientExpectTest extends BaseVCloudDirectorRestClientEx
.build())
.build())
.build())
- .catalogItems(CatalogItems.builder()
- .build())
.isPublished(false)
.build();
}
@@ -337,27 +334,25 @@ public class AdminCatalogClientExpectTest extends BaseVCloudDirectorRestClientEx
.build())
.description("Testing")
.owner(owner())
- .catalogItems(CatalogItems.builder()
- .item(Reference.builder()
- .type("application/vnd.vmware.vcloud.catalogItem+xml")
- .name("image")
- .href(URI.create("https://vcloudbeta.bluelock.com/api/catalogItem/67a469a1-aafe-4b5b-bb31-a6202ad8961f"))
- .build())
- .item(Reference.builder()
- .type("application/vnd.vmware.vcloud.catalogItem+xml")
- .name("ubuntu10")
- .href(URI.create("https://vcloudbeta.bluelock.com/api/catalogItem/a36fdac9-b8c2-43e2-9a4c-2ffaf3ee13df"))
- .build())
- .item(Reference.builder()
- .type("application/vnd.vmware.vcloud.catalogItem+xml")
- .name("imageTesting")
- .href(URI.create("https://vcloudbeta.bluelock.com/api/catalogItem/a9e0afdb-a42b-4688-8409-2ac68cf22939"))
- .build())
- .item(Reference.builder()
- .type("application/vnd.vmware.vcloud.catalogItem+xml")
- .name("TestCase")
- .href(URI.create("https://vcloudbeta.bluelock.com/api/catalogItem/f7598606-aea4-41d7-8f67-2090e28e7876"))
- .build())
+ .item(Reference.builder()
+ .type("application/vnd.vmware.vcloud.catalogItem+xml")
+ .name("image")
+ .href(URI.create("https://vcloudbeta.bluelock.com/api/catalogItem/67a469a1-aafe-4b5b-bb31-a6202ad8961f"))
+ .build())
+ .item(Reference.builder()
+ .type("application/vnd.vmware.vcloud.catalogItem+xml")
+ .name("ubuntu10")
+ .href(URI.create("https://vcloudbeta.bluelock.com/api/catalogItem/a36fdac9-b8c2-43e2-9a4c-2ffaf3ee13df"))
+ .build())
+ .item(Reference.builder()
+ .type("application/vnd.vmware.vcloud.catalogItem+xml")
+ .name("imageTesting")
+ .href(URI.create("https://vcloudbeta.bluelock.com/api/catalogItem/a9e0afdb-a42b-4688-8409-2ac68cf22939"))
+ .build())
+ .item(Reference.builder()
+ .type("application/vnd.vmware.vcloud.catalogItem+xml")
+ .name("TestCase")
+ .href(URI.create("https://vcloudbeta.bluelock.com/api/catalogItem/f7598606-aea4-41d7-8f67-2090e28e7876"))
.build())
.isPublished(false)
.build();
diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminOrgClientExpectTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminOrgClientExpectTest.java
index f2cd65ddf8..a98e91110d 100644
--- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminOrgClientExpectTest.java
+++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminOrgClientExpectTest.java
@@ -25,10 +25,7 @@ import java.net.URI;
import org.jclouds.vcloud.director.v1_5.VCloudDirectorClient;
import org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType;
import org.jclouds.vcloud.director.v1_5.domain.AdminOrg;
-import org.jclouds.vcloud.director.v1_5.domain.CatalogsList;
-import org.jclouds.vcloud.director.v1_5.domain.GroupsList;
import org.jclouds.vcloud.director.v1_5.domain.Link;
-import org.jclouds.vcloud.director.v1_5.domain.Networks;
import org.jclouds.vcloud.director.v1_5.domain.OrgEmailSettings;
import org.jclouds.vcloud.director.v1_5.domain.OrgGeneralSettings;
import org.jclouds.vcloud.director.v1_5.domain.OrgLdapSettings;
@@ -38,13 +35,11 @@ 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.domain.UsersList;
-import org.jclouds.vcloud.director.v1_5.domain.Vdcs;
import org.jclouds.vcloud.director.v1_5.internal.BaseVCloudDirectorRestClientExpectTest;
import org.testng.annotations.Test;
/**
- * Test the {@link GroupClient} by observing its side effects.
+ * Test the {@link AdminOrgClient} by observing its side effects.
*
* @author danikov
*/
@@ -126,7 +121,6 @@ public class AdminOrgClientExpectTest extends BaseVCloudDirectorRestClientExpect
.fullName("JClouds")
.isEnabled(true)
.settings(settings())
- .users(UsersList.builder()
.user(Reference.builder()
.type("application/vnd.vmware.admin.user+xml")
.name("adam.lowe@cloudsoftcorp.com")
@@ -152,10 +146,6 @@ public class AdminOrgClientExpectTest extends BaseVCloudDirectorRestClientExpect
.name("adk@cloudsoftcorp.com")
.href(URI.create("https://vcloudbeta.bluelock.com/api/admin/user/e9eb1b29-0404-4c5e-8ef7-e584acc51da9"))
.build())
- .build())
- .groups(GroupsList.builder()
- .build())
- .catalogs(CatalogsList.builder()
.catalog(Reference.builder()
.type("application/vnd.vmware.admin.catalog+xml")
.name("QunyingTestCatalog")
@@ -176,15 +166,11 @@ public class AdminOrgClientExpectTest extends BaseVCloudDirectorRestClientExpect
.name("test")
.href(URI.create("https://vcloudbeta.bluelock.com/api/admin/catalog/b7289d54-4ca4-497f-9a93-2d4afc97e3da"))
.build())
- .build())
- .vdcs(Vdcs.builder()
.vdc(Reference.builder()
.type("application/vnd.vmware.vcloud.vdc+xml")
.name("Cluster01-JClouds")
.href(URI.create("https://vcloudbeta.bluelock.com/api/vdc/d16d333b-e3c0-4176-845d-a5ee6392df07"))
.build())
- .build())
- .networks(Networks.builder()
.network(Reference.builder()
.type("application/vnd.vmware.admin.network+xml")
.name("ilsolation01-Jclouds")
@@ -195,7 +181,6 @@ public class AdminOrgClientExpectTest extends BaseVCloudDirectorRestClientExpect
.name("internet01-Jclouds")
.href(URI.create("https://vcloudbeta.bluelock.com/api/admin/network/55a677cf-ab3f-48ae-b880-fab90421980c"))
.build())
- .build())
.build();
}
diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/CatalogClientExpectTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/CatalogClientExpectTest.java
index 2d202cdc6a..a1883fedbc 100644
--- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/CatalogClientExpectTest.java
+++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/CatalogClientExpectTest.java
@@ -27,7 +27,6 @@ import org.jclouds.http.HttpResponse;
import org.jclouds.vcloud.director.v1_5.VCloudDirectorClient;
import org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType;
import org.jclouds.vcloud.director.v1_5.domain.CatalogItem;
-import org.jclouds.vcloud.director.v1_5.domain.CatalogItems;
import org.jclouds.vcloud.director.v1_5.domain.CatalogType;
import org.jclouds.vcloud.director.v1_5.domain.Link;
import org.jclouds.vcloud.director.v1_5.domain.Metadata;
@@ -376,7 +375,6 @@ public class CatalogClientExpectTest extends BaseVCloudDirectorRestClientExpectT
assertEquals(client.getCatalogClient().getCatalogItemMetadataClient().deleteMetadataEntry(catalogItemURI, "KEY"), expected);
}
- @SuppressWarnings("unchecked")
public static final CatalogType catalog() {
return CatalogType.builder()
.name("QunyingTestCatalog")
@@ -398,18 +396,16 @@ public class CatalogClientExpectTest extends BaseVCloudDirectorRestClientExpectT
.type("application/vnd.vmware.vcloud.metadata+xml")
.href(URI.create("https://vcloudbeta.bluelock.com/api/catalog/7212e451-76e1-4631-b2de-ba1dfd8080e4/metadata"))
.build())
- .catalogItems(CatalogItems.builder()
- .item(Reference.builder()
- .type("application/vnd.vmware.vcloud.catalogItem+xml")
- .name("ubuntu10")
- .href(URI.create("https://vcloudbeta.bluelock.com/api/catalogItem/a36fdac9-b8c2-43e2-9a4c-2ffaf3ee13df"))
- .build())
- .item(Reference.builder()
- .type("application/vnd.vmware.vcloud.catalogItem+xml")
- .name("imageTesting")
- .href(URI.create("https://vcloudbeta.bluelock.com/api/catalogItem/a9e0afdb-a42b-4688-8409-2ac68cf22939"))
- .build())
- .build())
+ .item(Reference.builder()
+ .type("application/vnd.vmware.vcloud.catalogItem+xml")
+ .name("ubuntu10")
+ .href(URI.create("https://vcloudbeta.bluelock.com/api/catalogItem/a36fdac9-b8c2-43e2-9a4c-2ffaf3ee13df"))
+ .build())
+ .item(Reference.builder()
+ .type("application/vnd.vmware.vcloud.catalogItem+xml")
+ .name("imageTesting")
+ .href(URI.create("https://vcloudbeta.bluelock.com/api/catalogItem/a9e0afdb-a42b-4688-8409-2ac68cf22939"))
+ .build())
.description("Testing")
.isPublished(false)
.build();
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 f076865a66..dd8406b2b6 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
@@ -64,7 +64,6 @@ import java.util.concurrent.TimeUnit;
import org.jclouds.vcloud.director.v1_5.VCloudDirectorException;
import org.jclouds.vcloud.director.v1_5.domain.AccessSetting;
-import org.jclouds.vcloud.director.v1_5.domain.AccessSettings;
import org.jclouds.vcloud.director.v1_5.domain.Checks;
import org.jclouds.vcloud.director.v1_5.domain.ControlAccessParams;
import org.jclouds.vcloud.director.v1_5.domain.DeployVAppParams;
@@ -325,11 +324,9 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
public void testControlAccessUser() {
ControlAccessParams params = ControlAccessParams.builder()
.notSharedToEveryone()
- .accessSettings(AccessSettings.builder()
- .accessSetting(AccessSetting.builder()
- .subject(Reference.builder().href(userURI).type(ADMIN_USER).build())
- .accessLevel("ReadOnly")
- .build())
+ .accessSetting(AccessSetting.builder()
+ .subject(Reference.builder().href(userURI).type(ADMIN_USER).build())
+ .accessLevel("ReadOnly")
.build())
.build();