mirror of https://github.com/apache/jclouds.git
Issue 830: Fixes for AdminCatalog live tests
This commit is contained in:
parent
c0fdbdaa27
commit
24c26676fe
|
@ -209,7 +209,7 @@ public class VCloudDirectorMediaType {
|
||||||
NETWORK_CONNECTION_SECTION, OPERATING_SYSTEM_SECTION,
|
NETWORK_CONNECTION_SECTION, OPERATING_SYSTEM_SECTION,
|
||||||
PRODUCT_SECTION_LIST, STARTUP_SECTION, VIRTUAL_HARDWARE_SECTION,
|
PRODUCT_SECTION_LIST, STARTUP_SECTION, VIRTUAL_HARDWARE_SECTION,
|
||||||
RELOCATE_TEMPLATE, ENVELOPE, VM_PENDING_ANSWER, VM_PENDING_QUESTION,
|
RELOCATE_TEMPLATE, ENVELOPE, VM_PENDING_ANSWER, VM_PENDING_QUESTION,
|
||||||
OVF_RASD_ITEM, OVF_RASD_ITEMS_LIST, ADMIN_CATALOG,
|
OVF_RASD_ITEM, OVF_RASD_ITEMS_LIST, ADMIN_CATALOG, ADMIN_ORG,
|
||||||
PUBLISH_CATALOG_PARAMS, GROUP, ORG_VAPP_TEMPLATE_LEASE_SETTINGS,
|
PUBLISH_CATALOG_PARAMS, GROUP, ORG_VAPP_TEMPLATE_LEASE_SETTINGS,
|
||||||
ORG_LEASE_SETTINGS, ORG_PASSWORD_POLICY_SETTINGS, ORG_LDAP_SETTINGS,
|
ORG_LEASE_SETTINGS, ORG_PASSWORD_POLICY_SETTINGS, ORG_LDAP_SETTINGS,
|
||||||
ORG_GENERAL_SETTINGS, ORG_EMAIL_SETTINGS, ORG_SETTINGS, ADMIN_NETWORK,
|
ORG_GENERAL_SETTINGS, ORG_EMAIL_SETTINGS, ORG_SETTINGS, ADMIN_NETWORK,
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -45,6 +46,7 @@ import javax.xml.bind.annotation.XmlRootElement;
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@XmlRootElement(name = "AdminCatalog")
|
@XmlRootElement(name = "AdminCatalog")
|
||||||
|
@XmlType(name = "AdminCatalogType")
|
||||||
public class AdminCatalog extends CatalogType {
|
public class AdminCatalog extends CatalogType {
|
||||||
|
|
||||||
public static Builder<?> builder() {
|
public static Builder<?> builder() {
|
||||||
|
|
|
@ -28,6 +28,7 @@ import static org.testng.Assert.assertTrue;
|
||||||
import static org.testng.Assert.fail;
|
import static org.testng.Assert.fail;
|
||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
import org.jclouds.vcloud.director.v1_5.VCloudDirectorException;
|
import org.jclouds.vcloud.director.v1_5.VCloudDirectorException;
|
||||||
import org.jclouds.vcloud.director.v1_5.domain.AdminCatalog;
|
import org.jclouds.vcloud.director.v1_5.domain.AdminCatalog;
|
||||||
|
@ -61,6 +62,8 @@ public class AdminCatalogClientLiveTest extends BaseVCloudDirectorClientLiveTest
|
||||||
/*
|
/*
|
||||||
* Shared state between dependant tests.
|
* Shared state between dependant tests.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
private final Random random = new Random();
|
||||||
private Reference orgRef;
|
private Reference orgRef;
|
||||||
private AdminCatalog catalog;
|
private AdminCatalog catalog;
|
||||||
private Owner owner;
|
private Owner owner;
|
||||||
|
@ -75,7 +78,7 @@ public class AdminCatalogClientLiveTest extends BaseVCloudDirectorClientLiveTest
|
||||||
@Test(testName = "POST /admin/org/{id}/catalogs")
|
@Test(testName = "POST /admin/org/{id}/catalogs")
|
||||||
public void testCreateCatalog() {
|
public void testCreateCatalog() {
|
||||||
AdminCatalog newCatalog = AdminCatalog.builder()
|
AdminCatalog newCatalog = AdminCatalog.builder()
|
||||||
.name("Test Catalog")
|
.name("Test Catalog " + random.nextInt())
|
||||||
.description("created by testCreateCatalog()")
|
.description("created by testCreateCatalog()")
|
||||||
.build();
|
.build();
|
||||||
catalog = catalogClient.createCatalog(orgRef.getHref(), newCatalog);
|
catalog = catalogClient.createCatalog(orgRef.getHref(), newCatalog);
|
||||||
|
|
Loading…
Reference in New Issue