mirror of https://github.com/apache/jclouds.git
add missing media types and checks
This commit is contained in:
parent
69568bc285
commit
15a462264b
|
@ -129,6 +129,8 @@ public class VCloudDirectorMediaType {
|
|||
|
||||
public static final String ADMIN_CATALOG = "application/vnd.vmware.admin.catalog+xml";
|
||||
|
||||
public static final String ADMIN_ORGANIZATION = "application/vnd.vmware.admin.organization+xml";
|
||||
|
||||
/**
|
||||
*
|
||||
* All acceptable media types.
|
||||
|
@ -142,12 +144,10 @@ public class VCloudDirectorMediaType {
|
|||
MEDIA, OWNER, VDC, ADMIN_USER, V_APP, V_APP_TEMPLATE,
|
||||
CAPTURE_VAPP_PARAMS, CLONE_V_APP_PARAMS, CLONE_V_APP_TEMPLATE_PARAMS,
|
||||
COMPOSE_VAPP_PARAMS, INSTANTIATE_VAPP_TEMPLATE_PARAMS,
|
||||
UPLOAD_VAPP_TEMPLATE_PARAMS,
|
||||
UPLOAD_VAPP_TEMPLATE_PARAMS, ADMIN_CATALOG, ADMIN_ORGANIZATION,
|
||||
QUERY_RESULT_RECORDS, QUERY_RESULT_REFERENCES, QUERY_RESULT_ID_RECORDS,
|
||||
CONTROL_ACCESS,
|
||||
VAPP_TEMPLATE, CUSTOMIZATION_SECTION, GUEST_CUSTOMIZATION_SECTION, NETWORK_SECTION, NETWORK_CONFIG_SECTION, NETWORK_CONNECTION_SECTION,
|
||||
CLONE_MEDIA_PARAMS
|
||||
,
|
||||
LEASE_SETTINGS_SECTION, RELOCATE_TEMPLATE, ENVELOPE
|
||||
CONTROL_ACCESS, VAPP_TEMPLATE, CUSTOMIZATION_SECTION, GUEST_CUSTOMIZATION_SECTION,
|
||||
NETWORK_SECTION, NETWORK_CONFIG_SECTION, NETWORK_CONNECTION_SECTION,
|
||||
CLONE_MEDIA_PARAMS, LEASE_SETTINGS_SECTION, RELOCATE_TEMPLATE, ENVELOPE
|
||||
);
|
||||
}
|
||||
|
|
|
@ -236,8 +236,8 @@ public class Checks {
|
|||
|
||||
public static void checkCatalogType(CatalogType<?> catalog) {
|
||||
// Check optional elements/attributes
|
||||
Entity owner = catalog.getOwner();
|
||||
if (owner != null) checkEntityType(owner);
|
||||
Owner owner = catalog.getOwner();
|
||||
if (owner != null) checkOwner(owner);
|
||||
CatalogItems catalogItems = catalog.getCatalogItems();
|
||||
if (catalogItems != null) {
|
||||
for (Reference catalogItemReference : catalogItems.getCatalogItems()) {
|
||||
|
@ -250,6 +250,16 @@ public class Checks {
|
|||
checkEntityType(catalog);
|
||||
}
|
||||
|
||||
private static void checkOwner(Owner owner) {
|
||||
// Check optional elements/attributes
|
||||
if (owner.getUser() != null) {
|
||||
checkReferenceType(owner.getUser());
|
||||
}
|
||||
|
||||
// Check parent type
|
||||
checkResourceType(owner);
|
||||
}
|
||||
|
||||
public static void checkCatalogItem(CatalogItem catalogItem) {
|
||||
// Check parent type
|
||||
checkEntityType(catalogItem);
|
||||
|
|
Loading…
Reference in New Issue