diff --git a/bindings/java/api-bindings/pom.xml b/bindings/java/api-bindings/pom.xml index 4bf17ea4..2d768c85 100644 --- a/bindings/java/api-bindings/pom.xml +++ b/bindings/java/api-bindings/pom.xml @@ -5,7 +5,7 @@ com.vmware.vcloud vcd-api-schemas-parent - 9.1.1 + 10.3.0 ../../../pom.xml jar @@ -140,80 +140,132 @@ - org.jvnet.jaxb2.maven2 - maven-jaxb20-plugin + org.codehaus.mojo + jaxb2-maven-plugin + 2.5.0 + + + versions + + xjc + + + + ${unpacked.schema.dir}/etc/schemas/versioning/versions.xsd + + + ${unpacked.schema.dir}/etc/schemas/versioning/versions.xjb + + true + ${project.build.directory}/generated-sources/jaxb_common + ${project.build.directory}/generated-sources/jaxb_common/.staleFlag + + + + rest-api + + xjc + + + ${unpacked.schema.dir}/etc/schemas/external/catalog.xml + + ${unpacked.schema.dir}/etc/1.5/schemas/master/driver.xsd + ${unpacked.schema.dir}/etc/1.5/schemas/internal/internal.xsd + + + ${unpacked.schema.dir}/etc/1.5/schemas/vcloud/vcloud.xjb + ${unpacked.schema.dir}/etc/1.5/schemas/vcloud/ovf.xjb + ${unpacked.schema.dir}/etc/1.5/schemas/extension/vmwextensions.xjb + + ${project.build.directory}/generated-sources/jaxb_v15 + ${project.build.directory}/generated-sources/jaxb_v15/.staleFlag + true + + -Xrest-api + + + + + + + com.vmware.vcloud + vcd-xjc-plugins + ${version} + + + + + io.swagger + swagger-codegen-maven-plugin - common - generate-sources generate + generate-swagger-model-and-apis + generate-sources - ${unpacked.schema.dir}/etc/schemas - - versioning/versions.xsd - - - versioning/versions.xjb - - ${project.build.directory}/generated-sources/jaxb_common - true - - -Xrest-api - + jaxrs-cxf + ${unpacked.openapi.schema.dir}/schemas/vcloud-openapi-schemas.yaml + true + com.vmware.vcloud.rest.openapi.model + true + com.vmware.vcloud.rest.openapi.api + + src/main/java + ${project.groupId} + ${project.artifactId} + ${project.version} + www.vmware.com + deprecated-impl + legacy + + true + ${project.build.directory}/generated-sources/openapi + ${project.build.directory}/generated-sources/openapi/.staleFlag + + false + - version-1.5 generate + generate-swagger-models generate-sources - - - - ${unpacked.schema.dir}/etc/schemas/external - - catalog.xml - - - - - false - ${unpacked.schema.dir}/etc/1.5/schemas - - master/driver.xsd - internal/internal.xsd - - - vcloud/vcloud.xjb - vcloud/ovf.xjb - extension/vmwextensions.xjb - - ${project.build.directory}/generated-sources/jaxb_v15 - true - - -Xrest-api - + spring + ${unpacked.openapi.schema.dir}/schemas/vcloud-openapi-schemas.yaml + true + com.vmware.vcloud.rest.openapi.model + false + + src/main/java + ${project.groupId} + ${project.artifactId} + ${project.version} + www.vmware.com + deprecated-impl + legacy + + true + ${project.build.directory}/generated-sources/openapi + ${project.build.directory}/generated-sources/openapi/.staleFlag + + false + - - - - io.swagger - swagger-codegen-maven-plugin - generate - generate-swagger-model-and-apis + generate-swagger-model-and-apis-unimplemented generate-sources jaxrs-cxf - ${unpacked.openapi.schema.dir}/schemas/vcloud-openapi-schemas.yaml + ${unpacked.openapi.schema.dir}/schemas/unimplemented-openapi-schemas.yaml true com.vmware.vcloud.rest.openapi.model true @@ -227,8 +279,7 @@ deprecated-impl legacy - true - ${project.build.directory}/generated-sources/openapi + ${project.build.directory}/generated-sources/openapi ${project.build.directory}/generated-sources/openapi/.staleFlag false @@ -239,11 +290,11 @@ generate - generate-swagger-models + generate-swagger-models-unimplemented generate-sources spring - ${unpacked.openapi.schema.dir}/schemas/vcloud-openapi-schemas.yaml + ${unpacked.openapi.schema.dir}/schemas/unimplemented-openapi-schemas.yaml true com.vmware.vcloud.rest.openapi.model false @@ -256,7 +307,6 @@ deprecated-impl legacy - true ${project.build.directory}/generated-sources/openapi ${project.build.directory}/generated-sources/openapi/.staleFlag diff --git a/bindings/java/api-bindings/src/main/java/com/vmware/vcloud/api/rest/constants/ExtensionConstants.java b/bindings/java/api-bindings/src/main/java/com/vmware/vcloud/api/rest/constants/ExtensionConstants.java new file mode 100644 index 00000000..06cdeadf --- /dev/null +++ b/bindings/java/api-bindings/src/main/java/com/vmware/vcloud/api/rest/constants/ExtensionConstants.java @@ -0,0 +1,536 @@ +package com.vmware.vcloud.api.rest.constants; + +/*- + * #%L + * vcd-api-bindings-java :: vCloud Director REST API bindings + * %% + * Copyright (C) 2013 - 2021 VMware + * %% + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * #L% + */ + +import com.vmware.vcloud.api.rest.schema_v1_5.CertificateUpdateParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.TaskType; +import com.vmware.vcloud.api.rest.schema_v1_5.TrustStoreUpdateParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.VendorServicesType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.AclRuleType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.AdminApiDefinitionType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.AdminFileDescriptorType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.AdminServiceLinkType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.AdminServiceType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.AmqpSettingsTestType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.AmqpSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.ApiFilterType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.AuthorizationCheckParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.AuthorizationCheckResponseType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.BlockingTaskOperationParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.BlockingTaskSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.BlockingTaskType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.BlockingTaskUpdateProgressParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.BrandingSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.BundleUploadParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.BundleUploadSocketType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.CatalogSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.ComponentManagerSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.CpomSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.DatastoreType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.EmailSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.ExtensionServicesType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.GeneralSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.HostType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.ImportMediaParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.ImportVmAsVAppParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.ImportVmAsVAppTemplateParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.ImportVmIntoExistingVAppParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.ImportVmParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.KerberosSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.LdapSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.LicenseType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.LicensingReportListType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.LicensingReportType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.LookupServiceParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.LookupServiceSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.MigrateParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.NotificationsSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.NsxTManagerType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.NsxTManagersType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.ObjectExtensionType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.ObjectExtensionsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.OperationLimitsSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.PortGroupPoolType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.PrepareHostParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.ProviderVdcMergeParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.RegisterVimServerParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.ResourceClassActionType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.ResourceClassType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.ResourcePoolListType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.RightRefsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.ServiceResourceType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.ShieldManagerType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.StrandedItemType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.SystemPasswordPolicySettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.SystemSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.UberAdminSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.UpdateProviderVdcStorageProfilesParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.UpdateResourcePoolSetParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWDiscoveredResourcePoolType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWDiscoveredResourcePoolsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWExtensionType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWExternalNetworkReferencesType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWExternalNetworkType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWHostGroupType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWHostGroupsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWHostReferencesType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWNetworkPoolReferencesType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWNetworkPoolType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWProviderVdcParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWProviderVdcReferencesType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWProviderVdcResourcePoolSetType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWProviderVdcResourcePoolType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWProviderVdcStorageProfileType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWProviderVdcType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWStorageProfilesType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWVdcTemplateListType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWVdcTemplateType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWVdcTemplatesType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWVimServerReferencesType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWVmGroupType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWVmGroupsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWVmHostAffinityRuleType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWVmHostAffinityRulesType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VSphereWebClientUrlType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VcTrustStoreUpdateParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VcTrustStoreUploadSocketType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VimObjectRefType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VimObjectRefsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VimServerType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VlanPoolType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VmObjectRefType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VmObjectRefsListType; + +/** + * This class handles constants needed by {@code ExtensionHandler} + * @since 1.0 + * @version 1.0.0 + * + */ +public class ExtensionConstants { + public static final String EXTENSION_NAMESPACE_1_5 = "http://www.vmware.com/vcloud/extension/v1.5"; + + public static final String FILE_EXTENSION_ISO = "iso"; + public static final String FILE_EXTENSION_FLOPPY = "flp"; + + public static class Uri { + private Uri() { + }; + + public static final String HOST = "/host/"; + public static final String STRANDED_ITEM = "/strandedItem/"; + public static final String STRANDED_ITEMS = "/strandedItems"; + public static final String VIRTUAL_CENTER = "/vimServer/"; + public static final String NSXT_MANAGERS = "/nsxtManagers"; + public static final String PROVIDER_VDC = "/providervdc/"; + public static final String EXTERNAL_NET = "/externalnet/"; + public static final String ADD_PVDCS = "/providervdcs"; + public static final String ADD_PVDCS_PARAMS = "/providervdcsparams"; + public static final String ADD_EXTERNAL_NETS = "/externalnets"; + public static final String ADD_POOLS = "/networkPools"; + public static final String VMS_OBJECT_REFS_LIST = "/vmsList"; + public static final String IMPORT_VM_AS_VAPP = "/importVmAsVApp"; + public static final String IMPORT_VM = "/importVm"; + public static final String IMPORT_VM_AS_VAPP_TEMPLATE = "/importVmAsVAppTemplate"; + public static final String IMPORT_VM_INTO_EXISTING_VAPP = "/importVmIntoExistingVApp"; + public static final String IMPORT_MEDIA = "/importMedia"; + public static final String EXTENSION = "/admin/extension"; + public static final String RESOURCE_POOL_LIST = "/resourcePoolList"; + public static final String RESOURCE_POOL_VM_LIST = "/vmList"; + public static final String HOST_REFERENCES = "/hostReferences"; + public static final String NETWORK_REFERENCES = "/networks"; + public static final String PROVIDER_VDC_REFERENCES = "/providerVdcReferences"; + public static final String EXTERNAL_NETWORK_REFERENCES = "/externalNetworkReferences"; + public static final String NETWORK_POOL_REFERENCES = "/networkPoolReferences"; + public static final String VIM_SERVER_REFERENCES = "/vimServerReferences"; + public static final String HOST_GROUPS = "/hostGroups"; + public static final String HOST_GROUP = "/hostGroup"; + public static final String VM_HOST_AFFINITY_RULES = "/rules"; + public static final String VM_HOST_AFFINITY_RULE = "/rule"; + + public static final String VM_GROUP = "/vmGroup"; + public static final String VM_GROUPS = "/vmGroups"; + @Deprecated + public static final String LICENSING = "/licensing/"; + @Deprecated + public static final String LICENSING_REPORT_LIST = "reports"; + @Deprecated + public static final String LICENSING_REPORT = "report/"; + public static final String DATASTORE_LIST = "/datastores"; + public static final String DATASTORE = "/datastore/"; + public static final String ORG_NETWORKS_ALL = "/orgNetworks"; + public static final String VAPPS_ALL = "/vapps"; + public static final String ORG_VDCS = "/orgVdcs"; + public static final String SYSTEM_SETTINGS = "/settings"; + public static final String GENERAL_SETTINGS = "/general"; + public static final String AMQP_SETTINGS = "/amqp"; + public static final String NOTIFICATIONS_SETTINGS = "/notifications"; + public static final String SYSTEM_PASSWORD_POLICY_SETTINGS = "/passwordPolicy"; + public static final String BLOCKING_TASK_SETTINGS = "/blockingTask"; + public static final String BLOCKING_TASK_OPERATIONS = "/operations"; + public static final String BLOCKING_TASK = "/blockingTask/"; + public static final String BLOCKING_TASKS = "/blockingTasks/"; + public static final String UBER_ADMIN_SETTINGS = "/uberAdminSettings"; + public static final String PVDC_RESOURCE_POOLS = "/resourcePools"; + public static final String PVDC_RESOURCE_POOL = "/resourcePool/"; + public static final String DISCOVER_RESOURCE_POOLS = "/discoverResourcePools"; + public static final String ORGANIZATION_VDC_RESOURCE_POOLS = "/resourcePools"; + public static final String LDAP_SETTINGS = "/ldapSettings"; + public static final String BRANDING_SETTINGS = "/branding"; + public static final String LICENSE_SETTINGS = "/license"; + public static final String EMAIL_SETTINGS = "/email"; + public static final String VSPHERE_WEB_CLIENT_URL = "/vSphereWebClientUrl"; + public static final String LOOKUP_SERVICE_SETTINGS = "/lookupService"; + public static final String STORAGE_PROFILES = "/storageProfiles"; + public static final String CATALOG_SETTINGS = "/catalog"; + public static final String OPERATION_LIMITS_SETTINGS = "/operationLimitsSettings"; + public static final String CPOM_SETTINGS = "/cpom"; + + public static final String AVAILABLE_STORAGE_CLASSES = "/availableStorageProfiles"; + public static final String PVDC_STORAGE_PROFILE = "/pvdcStorageProfile"; + public static final String RESOURCE_POOL = "/resourcePool/"; + public static final String VSM = "/vsm"; + public static final String CONFIGURATION_SETTINGS = EXTENSION + "/configurationSettings"; + public static final String API_DEFINITION = RestConstants.Uri.API_DEFINITION; + public static final String API_DEFINITIONS = RestConstants.Uri.API_DEFINITIONS_LIST; + public static final String API_FILE_DESCRIPTORS = RestConstants.Uri.API_FILE_DESCRIPTORS_LIST; + public static final String API_FILE_DESCRIPTOR = "/file"; + public static final String SERVICE = RestConstants.Uri.EXTERNAL_SVC; + public static final String RIGHTS = "/rights"; + public static final String LINKS = "/links"; + public static final String LOCALIZATION_BUNDLES = "/localizationbundles"; + public static final String LINK = "/link"; + public static final String SERVICE_CONFIG = "/apifilter"; + public static final String SERVICE_CONFIGS = "/apifilters"; + public static final String SERVICE_ACL_RULE = "/aclrule"; + public static final String SERVICE_ACL_RULES = "/aclrules"; + public static final String RESOURCE_CLASS_ACTION = "/resourceclassaction"; + public static final String RESOURCE_CLASS_ACTIONS = "/resourceclassactions"; + public static final String SERVICE_RESOURCE = "/serviceresource"; + public static final String SERVICE_RESOURCES = "/serviceresources"; + public static final String RESOURCE_CLASS = "/resourceclass"; + public static final String RESOURCE_CLASSES = "/resourceclasses"; + public static final String AUTHORIZATION_CHECK = "/authorizationcheck"; + public static final String SERVICE_BASE_URI = EXTENSION + SERVICE; + public static final String VENDOR_SERVICES = "/vendorServices"; + + public static final String CONTENT_CATALOG = "/catalog"; + + public static final String VDC_TEMPLATE_EXTENSION = EXTENSION + "/vdcTemplate"; + public static final String VDC_TEMPLATE = "/vdcTemplate"; + public static final String VDC_TEMPLATES = "/vdcTemplates"; + public static final String VDC_TEMPLATE_REFS = "/vdcTemplateReferences"; + + public static final String OBJECT_EXTENSION = "/object"; + public static final String NAMED_VM_GROUP_REFS = "/namedVmGroupReferences"; + } + + /** + * Action URIs + */ + public static class ActionUri { + private ActionUri() { + }; + + public static final String HOST = "/host"; + public static final String PREPARE_HOST = "/action/prepare"; + public static final String UNPREPARE_HOST = "/action/unprepare"; + public static final String DISABLE = "/action/disable"; + public static final String ENABLE = "/action/enable"; + public static final String REPAIR = "/action/repair"; + public static final String SYNC = "/action/sync"; + public static final String REGISTER_VIM_SERVER = "/action/registervimserver"; + public static final String UNREGISTER_VIM_SERVER = "/action/unregister"; + public static final String FORCE_VIM_SERVER_RECONNECT = "/action/forcevimserverreconnect"; + public static final String FORCE_VIM_SERVER_DISCONNECT = "/action/forcevimserverdisconnect"; + public static final String PROVIDER_VDC_MERGE = "/action/merge"; + public static final String UPGRADE_HOST_AGENT = "/action/upgrade"; + public static final String TASK_EXTENSION_REQUEST_RESUME = "/action/resume"; + public static final String TASK_EXTENSION_REQUEST_ABORT = "/action/abort"; + public static final String TASK_EXTENSION_REQUEST_FAIL = "/action/fail"; + public static final String TASK_EXTENSION_REQUEST_UPDATE_PROGRESS = "/action/updateProgress"; + public static final String AMQP_TEST = "/action/test"; + public static final String UPDATE_PVDC_RESOURCE_POOLS = "/action/updateResourcePools"; + public static final String FORCE_DELETE_STRANDED_ITEM = "/action/forceDelete"; + public static final String ADD_RIGHTS = "/action/addRights"; + public static final String REFRESH_STORAGE_CLASSES = "/action/refreshStorageProfiles"; + public static final String REFRESH_VIRTUAL_CENTER = "/action/refresh"; + public static final String VM_MIGRATE = "/action/migrateVms"; + public static final String CLEAR_UNUSED_RIGHTS = "/action/clearunusedrights"; + public static final String CLEAR_UNUSED_BUNDLES = "/action/clearunusedlocalizationbundles"; + public static final String MANDATORY = "/action/makeMandatory"; + public static final String OPTIONAL = "/action/makeOptional"; + + public static final String AMQP_CERTIFICATE_UPDATE = "/action/updateAmqpCertificate"; + public static final String AMQP_CERTIFICATE_RESET = "/action/resetAmqpCertificate"; + public static final String AMQP_TRUSTSTORE_UPDATE = "/action/updateAmqpTruststore"; + public static final String AMQP_TRUSTSTORE_RESET = "/action/resetAmqpTruststore"; + public static final String VC_TRUSTSTORE_UPDATE = "/action/updateVcTrustsore"; + public static final String VC_TRUSTSTORE_RESET = "/action/resetVcTrustsore"; + // Note: the preceding part of the Paths includes word componentManager + public static final String REGISTER_CM = "/action/register"; + public static final String UNREGISTER_CM = "/action/unregister"; + + public static final String VM_GROUP_ADD_VMS = "/action/addVms"; + public static final String VM_GROUP_REMOVE_VMS = "/action/removeVms"; + + } + + public static class MediaType { + private MediaType() { + }; + + public static final String VMW_EXTENSIONM = VMWExtensionType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VMW_PROVIDER_VDC_REFERENCESM = VMWProviderVdcReferencesType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VMW_EXTERNAL_NETWORK_REFERENCESM = VMWExternalNetworkReferencesType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + // NETWORKEXT is used only in links + public static final String NETWORKEXT = "application/vnd.vmware.admin.extension.network" + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + // Points to VimObjectRefListType + public static final String VIM_SERVER_NETWORKS = "application/vnd.vmware.admin.vimServerNetworks" + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VMW_NETWORK_POOL_REFERENCESM = VMWNetworkPoolReferencesType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VMW_VIM_SERVER_REFERENCESM = VMWVimServerReferencesType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VMW_HOST_REFERENCESM = VMWHostReferencesType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String HOSTM = HostType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VIRTUAL_CENTERM = VimServerType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VMW_PROVIDER_VDCM = VMWProviderVdcType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VMW_PVDC_STORAGE_PROFILEM = VMWProviderVdcStorageProfileType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VMW_EXTERNAL_NETM = VMWExternalNetworkType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String PREPARE_HOST_PARAMSM = PrepareHostParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String REGISTER_VIM_SERVERM = RegisterVimServerParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String NSXT_MANAGERSM = NsxTManagersType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String NSXT_MANAGERM = NsxTManagerType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VMS_OBJECT_REFS_LISTM = VmObjectRefsListType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String IMPORT_VM_AS_VAPP_PARAMS = ImportVmAsVAppParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String IMPORT_VM_PARAMS = ImportVmParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String IMPORT_VM_AS_VAPP_TEMPLATE_PARAMS = ImportVmAsVAppTemplateParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String IMPORT_VM_INTO_EXISTING_VAPP_PARAMS = ImportVmIntoExistingVAppParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String IMPORT_MEDIA_PARAMS = ImportMediaParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String RESOURCE_POOL_LIST = ResourcePoolListType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VMW_HOST_GROUP = VMWHostGroupType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VMW_HOST_GROUPS = VMWHostGroupsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VMW_VM_HOST_AFFINITY_RULE = VMWVmHostAffinityRuleType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VMW_VM_HOST_AFFINITY_RULES = VMWVmHostAffinityRulesType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + + public static final String VMW_VM_GROUP = VMWVmGroupType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VMW_VM_GROUPS = VMWVmGroupsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + @Deprecated + public static final String LICENSING_REPORT = LicensingReportType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + @Deprecated + public static final String LICENSING_REPORT_LIST = LicensingReportListType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VMW_NETWORK_POOLM = VMWNetworkPoolType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String PORT_GROUP_POOLM = PortGroupPoolType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VLAN_POOLM = VlanPoolType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VIM_OBJECT_REFS = VimObjectRefsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VIM_OBJECT_REF = VimObjectRefType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VM_OBJECT_REF = VmObjectRefType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String DATASTOREM = DatastoreType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + // Used on ReferencesType + public static final String EDGE_GATEWAYM = "application/vnd.vmware.admin.edgeGateway" + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String DATASTORE_LISTM = "application/vnd.vmware.admin.datastoreList" + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String SYSTEM_SETTINGSM = SystemSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String GENERAL_SETTINGSM = GeneralSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String AMQP_SETTINGSM = AmqpSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String NOTIFICATIONS_SETTINGSM = NotificationsSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String SYSTEM_PASSWORD_POLICY_SETTINGSM = SystemPasswordPolicySettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String BLOCKING_TASK_SETTINGSM = BlockingTaskSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String BLOCKING_TASKM = BlockingTaskType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String MIGRATE_VM_PARAMS = MigrateParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + // Used on ReferencesType + public static final String BLOCKING_TASKSM = "application/vnd.vmware.admin.blockingTaskList" + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String BLOCKING_TASK_OPERATION_PARAMSM = BlockingTaskOperationParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String BLOCKING_TASK_UPDATE_PROGRESS_OPERATION_PARAMSM = BlockingTaskUpdateProgressParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String UBER_ADMIN_SETTINGS = UberAdminSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String AMQP_TESTM = AmqpSettingsTestType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VMW_PROVIDER_VDC_RESOURCE_POOL = VMWProviderVdcResourcePoolType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VMW_PROVIDER_VDC_RESOURCE_POOL_SET = VMWProviderVdcResourcePoolSetType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VMW_DISCOVERED_RESOURCE_POOLS = VMWDiscoveredResourcePoolsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VMW_DISCOVERED_RESOURCE_POOL = VMWDiscoveredResourcePoolType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VMW_PROVIDER_VDC_UPDATE_STORAGE_PROFILES = UpdateProviderVdcStorageProfilesParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String PROVIDER_RESOURCE_POOL_SET_UPDATE_PARAMSM = UpdateResourcePoolSetParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VMW_ORGANIZATION_VDC_RESOURCE_POOL_SET = "application/vnd.vmware.admin.OrganizationVdcResourcePoolSet" + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String LDAP_SETTINGSM = LdapSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String BRANDING_SETTINGSM = BrandingSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String LICENSE_SETTINGSM = LicenseType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String EMAIL_SETTINGSM = EmailSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VSPHERE_WEB_CLIENT_URL = VSphereWebClientUrlType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VSHIELD_MANAGERM = ShieldManagerType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VMW_PROVIDER_VDC_PARAMS = VMWProviderVdcParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String KERBEROS_SETTINGSM = KerberosSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String STRANDED_ITEMM = StrandedItemType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String EXTERNAL_SERVICEM = AdminServiceType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String EXTENSION_SERVICESM = ExtensionServicesType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String BUNDLE_UPLOAD_PARAMS_TYPEM = BundleUploadParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String BUNDLE_UPLOAD_SOCKET_TYPEM = BundleUploadSocketType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String EXTERNAL_LINKM = AdminServiceLinkType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String EXTERNAL_SERVICE_CONFIGM = ApiFilterType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String LOOKUP_SERVICE_SETTINGS = LookupServiceSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String LOOKUP_SERVICE_PARAMS = LookupServiceParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String CATALOG_SETTINGSM = CatalogSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String OPERATION_LIMITS_SETTINGS = OperationLimitsSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String CPOM_SETTINGS = CpomSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + + public static final String AUTHORIZATION_CHECK_PARAMSM = AuthorizationCheckParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String AUTHORIZATION_CHECK_RESPONSEM = AuthorizationCheckResponseType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String SERVICE_ACL_RULEM = AclRuleType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String SERVICE_RESOURCEM = ServiceResourceType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String RESOURCE_CLASS_ACTIONM = ResourceClassActionType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String RESOURCE_CLASSM = ResourceClassType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + + public static final String API_DEFINITIONM = AdminApiDefinitionType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String API_FILE_DESCRIPTORM = AdminFileDescriptorType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VMW_STORAGE_PROFILES = VMWStorageProfilesType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String RIGHTSM = RightRefsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String MERGE_PARAMSM = ProviderVdcMergeParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + + public static final String TRUSTSTORE_UPDATE_PARAMSM = TrustStoreUpdateParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String CERTIFICATE_UPDATE_PARAMSM = CertificateUpdateParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VC_TRUSTSTORE_UPDATE_PARAMSM = VcTrustStoreUpdateParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VC_TRUSTSTORE_UPLOAD_SOCKETM = VcTrustStoreUploadSocketType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VENDOR_SERVICES_TYPEM = VendorServicesType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String REGISTER_COMPONENT_MANAGER = ComponentManagerSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String UNREGISTER_COMPONENT_MANAGER = ComponentManagerSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String COMPONENT_MANAGER_SETTINGS = ComponentManagerSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + + public static final String VDC_TEMPLATE_REFSM = VMWVdcTemplateListType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VDC_TEMPLATESM = VMWVdcTemplatesType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VDC_TEMPLATEM = VMWVdcTemplateType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + + public static final String OBJECT_EXTENSION = ObjectExtensionType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String OBJECT_EXTENSIONS = ObjectExtensionsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String TASK = TaskType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + + public static final String VMW_EXTENSIONM_JSON = VMWExtensionType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VMW_PROVIDER_VDC_REFERENCESM_JSON = VMWProviderVdcReferencesType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VMW_EXTERNAL_NETWORK_REFERENCESM_JSON = VMWExternalNetworkReferencesType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String NETWORKEXT_JSON = "application/vnd.vmware.admin.extension.network" + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VIM_SERVER_NETWORKS_JSON = "application/vnd.vmware.admin.vimServerNetworks" + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VMW_NETWORK_POOL_REFERENCESM_JSON = VMWNetworkPoolReferencesType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VMW_VIM_SERVER_REFERENCESM_JSON = VMWVimServerReferencesType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VMW_HOST_REFERENCESM_JSON = VMWHostReferencesType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String HOSTM_JSON = HostType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VIRTUAL_CENTERM_JSON = VimServerType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String NSXT_MANAGERSM_JSON = NsxTManagersType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String NSXT_MANAGERM_JSON = NsxTManagerType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VMW_PROVIDER_VDCM_JSON = VMWProviderVdcType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VMW_PVDC_STORAGE_PROFILEM_JSON = VMWProviderVdcStorageProfileType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VMW_EXTERNAL_NETM_JSON = VMWExternalNetworkType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String PREPARE_HOST_PARAMSM_JSON = PrepareHostParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String REGISTER_VIM_SERVERM_JSON = RegisterVimServerParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VMS_OBJECT_REFS_LISTM_JSON = VmObjectRefsListType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String IMPORT_VM_AS_VAPP_PARAMS_JSON = ImportVmAsVAppParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String IMPORT_VM_PARAMS_JSON = ImportVmParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String IMPORT_VM_AS_VAPP_TEMPLATE_PARAMS_JSON = ImportVmAsVAppTemplateParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String IMPORT_VM_INTO_EXISTING_VAPP_PARAMS_JSON = ImportVmIntoExistingVAppParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String IMPORT_MEDIA_PARAMS_JSON = ImportMediaParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String RESOURCE_POOL_LIST_JSON = ResourcePoolListType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VMW_HOST_GROUP_JSON = VMWHostGroupType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VMW_HOST_GROUPS_JSON = VMWHostGroupsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VMW_VM_HOST_AFFINITY_RULE_JSON = VMWVmHostAffinityRuleType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VMW_VM_HOST_AFFINITY_RULES_JSON = VMWVmHostAffinityRulesType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VMW_VM_GROUP_JSON = VMWVmGroupType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VMW_VM_GROUPS_JSON = VMWVmGroupsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String LICENSING_REPORT_JSON = LicensingReportType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String LICENSING_REPORT_LIST_JSON = LicensingReportListType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VMW_NETWORK_POOLM_JSON = VMWNetworkPoolType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String PORT_GROUP_POOLM_JSON = PortGroupPoolType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VLAN_POOLM_JSON = VlanPoolType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VIM_OBJECT_REFS_JSON = VimObjectRefsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VIM_OBJECT_REF_JSON = VimObjectRefType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VM_OBJECT_REF_JSON = VmObjectRefType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String DATASTOREM_JSON = DatastoreType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String EDGE_GATEWAYM_JSON = "application/vnd.vmware.admin.edgeGateway" + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String DATASTORE_LISTM_JSON = "application/vnd.vmware.admin.datastoreList" + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String SYSTEM_SETTINGSM_JSON = SystemSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String GENERAL_SETTINGSM_JSON = GeneralSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String AMQP_SETTINGSM_JSON = AmqpSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String NOTIFICATIONS_SETTINGSM_JSON = NotificationsSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String SYSTEM_PASSWORD_POLICY_SETTINGSM_JSON = SystemPasswordPolicySettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String BLOCKING_TASK_SETTINGSM_JSON = BlockingTaskSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String BLOCKING_TASKM_JSON = BlockingTaskType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String MIGRATE_VM_PARAMS_JSON = MigrateParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String BLOCKING_TASKSM_JSON = "application/vnd.vmware.admin.blockingTaskList" + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String BLOCKING_TASK_OPERATION_PARAMSM_JSON = BlockingTaskOperationParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String BLOCKING_TASK_UPDATE_PROGRESS_OPERATION_PARAMSM_JSON = BlockingTaskUpdateProgressParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String UBER_ADMIN_SETTINGS_JSON = UberAdminSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String AMQP_TESTM_JSON = AmqpSettingsTestType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VMW_PROVIDER_VDC_RESOURCE_POOL_JSON = VMWProviderVdcResourcePoolType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VMW_PROVIDER_VDC_RESOURCE_POOL_SET_JSON = VMWProviderVdcResourcePoolSetType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VMW_DISCOVERED_RESOURCE_POOLS_JSON = VMWDiscoveredResourcePoolsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VMW_DISCOVERED_RESOURCE_POOL_JSON = VMWDiscoveredResourcePoolType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VMW_PROVIDER_VDC_UPDATE_STORAGE_PROFILES_JSON = UpdateProviderVdcStorageProfilesParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String PROVIDER_RESOURCE_POOL_SET_UPDATE_PARAMSM_JSON = UpdateResourcePoolSetParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VMW_ORGANIZATION_VDC_RESOURCE_POOL_SET_JSON = "application/vnd.vmware.admin.OrganizationVdcResourcePoolSet" + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String LDAP_SETTINGSM_JSON = LdapSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String BRANDING_SETTINGSM_JSON = BrandingSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String LICENSE_SETTINGSM_JSON = LicenseType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String EMAIL_SETTINGSM_JSON = EmailSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VSPHERE_WEB_CLIENT_URL_JSON = VSphereWebClientUrlType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VSHIELD_MANAGERM_JSON = ShieldManagerType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VMW_PROVIDER_VDC_PARAMS_JSON = VMWProviderVdcParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String KERBEROS_SETTINGSM_JSON = KerberosSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String STRANDED_ITEMM_JSON = StrandedItemType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String EXTERNAL_SERVICEM_JSON = AdminServiceType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String EXTENSION_SERVICESM_JSON = ExtensionServicesType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String BUNDLE_UPLOAD_PARAMS_TYPEM_JSON = BundleUploadParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String BUNDLE_UPLOAD_SOCKET_TYPEM_JSON = BundleUploadSocketType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String EXTERNAL_LINKM_JSON = AdminServiceLinkType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String EXTERNAL_SERVICE_CONFIGM_JSON = ApiFilterType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String LOOKUP_SERVICE_SETTINGS_JSON = LookupServiceSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String LOOKUP_SERVICE_PARAMS_JSON = LookupServiceParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String CATALOG_SETTINGSM_JSON = CatalogSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String OPERATION_LIMITS_SETTINGS_JSON = OperationLimitsSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String CPOM_SETTINGS_JSON = CpomSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String AUTHORIZATION_CHECK_PARAMSM_JSON = AuthorizationCheckParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String AUTHORIZATION_CHECK_RESPONSEM_JSON = AuthorizationCheckResponseType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String SERVICE_ACL_RULEM_JSON = AclRuleType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String SERVICE_RESOURCEM_JSON = ServiceResourceType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String RESOURCE_CLASS_ACTIONM_JSON = ResourceClassActionType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String RESOURCE_CLASSM_JSON = ResourceClassType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String API_DEFINITIONM_JSON = AdminApiDefinitionType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String API_FILE_DESCRIPTORM_JSON = AdminFileDescriptorType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VMW_STORAGE_PROFILES_JSON = VMWStorageProfilesType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String RIGHTSM_JSON = RightRefsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String MERGE_PARAMSM_JSON = ProviderVdcMergeParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VC_TRUSTSTORE_UPDATE_PARAMSM_JSON = VcTrustStoreUpdateParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VC_TRUSTSTORE_UPLOAD_SOCKETM_JSON = VcTrustStoreUploadSocketType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VENDOR_SERVICES_TYPEM_JSON = VendorServicesType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String REGISTER_COMPONENT_MANAGER_JSON = ComponentManagerSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String UNREGISTER_COMPONENT_MANAGER_JSON = ComponentManagerSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String COMPONENT_MANAGER_SETTINGS_JSON = ComponentManagerSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VDC_TEMPLATE_REFSM_JSON = VMWVdcTemplateListType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VDC_TEMPLATESM_JSON = VMWVdcTemplatesType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VDC_TEMPLATEM_JSON = VMWVdcTemplateType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String OBJECT_EXTENSION_JSON = ObjectExtensionType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String OBJECT_EXTENSIONS_JSON = ObjectExtensionsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String TASK_JSON = TaskType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + + public static final String EMPTY_MEDIA_TYPE = null; + } +} diff --git a/bindings/java/api-bindings/src/main/java/com/vmware/vcloud/api/rest/constants/RelationType.java b/bindings/java/api-bindings/src/main/java/com/vmware/vcloud/api/rest/constants/RelationType.java new file mode 100644 index 00000000..af56d0dc --- /dev/null +++ b/bindings/java/api-bindings/src/main/java/com/vmware/vcloud/api/rest/constants/RelationType.java @@ -0,0 +1,336 @@ + +package com.vmware.vcloud.api.rest.constants; + +/*- + * #%L + * vcd-api-bindings-java :: vCloud Director REST API bindings + * %% + * Copyright (C) 2013 - 2021 VMware + * %% + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * #L% + */ + +import java.lang.annotation.Annotation; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; + +import javax.ws.rs.DELETE; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.PUT; + +import com.vmware.vcloud.api.rest.links.LinkRelation; +import com.vmware.vcloud.api.rest.version.ApiVersion; + + + +/** + * Contains a relation(rel) which a link provide to a resource or operation. + * Each Relation type consist of (value, apiVersion) pair. The value is the presentation value for this rel; + * The version is the version in which this RelationType is introduced. + * + * + * + * @since 1.5 + * @version 1.0.0 + * + * @author miliev + */ +public enum RelationType implements LinkRelation { + + SELF("self", ApiVersion.VERSION_1_5, GET.class), + DOWN("down", ApiVersion.VERSION_1_5, GET.class), + ADD("add", ApiVersion.VERSION_1_5, POST.class), + UP("up", ApiVersion.VERSION_1_5, GET.class), + EDIT("edit", ApiVersion.VERSION_1_5, PUT.class), + REMOVE("remove", ApiVersion.VERSION_1_5, DELETE.class), + COPY("copy", ApiVersion.VERSION_1_5, POST.class), + MOVE("move", ApiVersion.VERSION_1_5, POST.class), + ALTERNATE("alternate", ApiVersion.VERSION_1_5, GET.class), + TASK_CANCEL("task:cancel", ApiVersion.VERSION_1_5, POST.class), + DEPLOY("deploy", ApiVersion.VERSION_1_5, POST.class), + UNDEPLOY("undeploy", ApiVersion.VERSION_1_5, POST.class), + DISCARD_STATE("discardState", ApiVersion.VERSION_1_5, POST.class), + POWER_POWER_ON("power:powerOn", ApiVersion.VERSION_1_5, POST.class), + POWER_POWER_OFF("power:powerOff", ApiVersion.VERSION_1_5, POST.class), + POWER_RESET("power:reset", ApiVersion.VERSION_1_5, POST.class), + POWER_REBOOT("power:reboot", ApiVersion.VERSION_1_5, POST.class), + POWER_SUSPEND("power:suspend", ApiVersion.VERSION_1_5, POST.class), + POWER_SHUTDOWN("power:shutdown",ApiVersion.VERSION_1_5, POST.class), + SCREEN_THUMBNAIL("screen:thumbnail", ApiVersion.VERSION_1_5, GET.class), + SCREEN_ACQUIRE_TICKET("screen:acquireTicket", ApiVersion.VERSION_1_5, GET.class), + MKS_ACQUIRE_TICKET("screen:acquireMksTicket", ApiVersion.VERSION_5_5, POST.class), + MEDIA_INSERT_MEDIA("media:insertMedia", ApiVersion.VERSION_1_5, POST.class), + MEDIA_EJECT_MEDIA("media:ejectMedia", ApiVersion.VERSION_1_5, POST.class), + DISK_ATTACH("disk:attach", ApiVersion.VERSION_5_1, POST.class), + DISK_DETACH("disk:detach", ApiVersion.VERSION_5_1, POST.class), + UPLOAD_DEFAULT("upload:default", ApiVersion.VERSION_1_5, PUT.class), + UPLOAD_ALTERNATE("upload:alternate", ApiVersion.VERSION_1_5), + DOWNLOAD_DEFAULT("download:default", ApiVersion.VERSION_1_5, GET.class), + DOWNLOAD_OVA_DEFAULT("download:ovaDefault", ApiVersion.VERSION_30_0, GET.class), + DOWNLOAD_ALTERNATE("download:alternate", ApiVersion.VERSION_1_5), + DOWNLOAD_IDENTITY("download:identity", ApiVersion.VERSION_5_1, GET.class), + DOWNLOAD_OVA_IDENTITY("download:ovaIdentity", ApiVersion.VERSION_30_0, GET.class), + + SNAPSHOT_CREATE("snapshot:create", ApiVersion.VERSION_5_1, POST.class), + SNAPSHOT_REVERT_TO_CURRENT("snapshot:revertToCurrent", ApiVersion.VERSION_5_1, POST.class), + SNAPSHOT_REMOVE_ALL("snapshot:removeAll", ApiVersion.VERSION_5_1, POST.class), + + OVF("ovf", ApiVersion.VERSION_1_5, GET.class), + OVA("ova", ApiVersion.VERSION_1_5), + CONTROL_ACCESS("controlAccess", ApiVersion.VERSION_1_5, POST.class), + PUBLISH("publish", ApiVersion.VERSION_1_5, POST.class), + PUBLISH_EXTERNAL("publishToExternalOrganizations", ApiVersion.VERSION_5_5, POST.class), + SUBSCRIBE_EXTERNAL("subscribeToExternalCatalog", ApiVersion.VERSION_5_5, POST.class), + + TENANTS("tenants", ApiVersion.VERSION_30_0, GET.class), + TENANTS_EDIT("tenants:edit", ApiVersion.VERSION_31_0, PUT.class), + PUBLISH_ALL("publish:all", ApiVersion.VERSION_30_0, POST.class), + UNPUBLISH("unpublish", ApiVersion.VERSION_30_0, POST.class), + UNPUBLISH_ALL("unpublish:all", ApiVersion.VERSION_30_0, POST.class), + + EXTENSION("extension", ApiVersion.VERSION_1_5), + ENABLE("enable", ApiVersion.VERSION_1_5, POST.class), + DISABLE("disable", ApiVersion.VERSION_1_5, POST.class), + MERGE("merge", ApiVersion.VERSION_5_1, POST.class), + CATALOG_ITEM("catalogItem", ApiVersion.VERSION_1_5, GET.class), + RECOMPOSE("recompose", ApiVersion.VERSION_1_5, POST.class), + REGISTER("register", ApiVersion.VERSION_1_5, POST.class), + UNREGISTER("unregister", ApiVersion.VERSION_1_5, POST.class), + REPAIR("repair", ApiVersion.VERSION_1_5, POST.class), + RECONNECT("reconnect", ApiVersion.VERSION_1_5, POST.class), + DISCONNECT("disconnect", ApiVersion.VERSION_5_5), + UPGRADE("upgrade", ApiVersion.VERSION_1_5, POST.class), + ANSWER("answer", ApiVersion.VERSION_1_5, POST.class), + ADD_ORGS("addOrgs", ApiVersion.VERSION_5_5), + REMOVE_ORGS("removeOrgs", ApiVersion.VERSION_5_5), + SYNC("sync", ApiVersion.VERSION_5_5, POST.class), + + VSPHERE_WEB_CLIENT_URL("vSphereWebClientUrl", ApiVersion.VERSION_5_1, GET.class), + VIM_SERVER_DVSWITCHES("vimServerDvSwitches", ApiVersion.VERSION_5_1), + + COLLABORATION_RESUME("resume", ApiVersion.VERSION_1_5, POST.class), + COLLABORATION_ABORT("abort", ApiVersion.VERSION_1_5, POST.class), + COLLABORATION_FAIL("fail", ApiVersion.VERSION_1_5, POST.class), + ENTER_MAINTENANCE_MODE("enterMaintenanceMode", ApiVersion.VERSION_1_5, POST.class), + EXIT_MAINTENANCE_MODE("exitMaintenanceMode", ApiVersion.VERSION_1_5, POST.class), + TASK("task", ApiVersion.VERSION_1_5, GET.class), + TASK_OWNER("task:owner", ApiVersion.VERSION_1_5, GET.class), + PREVIOUS_PAGE("previousPage", ApiVersion.VERSION_1_5, GET.class), + NEXT_PAGE("nextPage", ApiVersion.VERSION_1_5, GET.class), + FIRST_PAGE("firstPage",ApiVersion.VERSION_1_5, GET.class), + LAST_PAGE("lastPage", ApiVersion.VERSION_1_5, GET.class), + INSTALL_VMWARE_TOOLS("installVmwareTools", ApiVersion.VERSION_1_5, POST.class), + CONSOLIDATE("consolidate", ApiVersion.VERSION_1_5, POST.class), + ENTITY("entity", ApiVersion.VERSION_1_5, GET.class), + ENTITY_RESOLVER("entityResolver", ApiVersion.VERSION_1_5, GET.class), + RELOCATE("relocate", ApiVersion.VERSION_1_5, POST.class), + BLOCKING_TASKS("blockingTask", ApiVersion.VERSION_1_5, GET.class), + UPDATE_PROGRESS("updateProgress", ApiVersion.VERSION_1_5, POST.class), + SYNC_SYSLOG_SETTINGS("syncSyslogSettings" , ApiVersion.VERSION_1_5, POST.class), + TAKE_OWNERSHIP("takeOwnership", ApiVersion.VERSION_5_6, POST.class), + UNLOCK("unlock", ApiVersion.VERSION_1_5, POST.class), + SHADOW_VMS("shadowVms", ApiVersion.VERSION_1_5, GET.class), + TEST("test", ApiVersion.VERSION_1_5), + UPDATE_RESOURCE_POOLS("update:resourcePools", ApiVersion.VERSION_1_5, POST.class), + REMOVE_FORCE("remove:force", ApiVersion.VERSION_5_1, DELETE.class), + STORAGE_CLASS("storageProfile", ApiVersion.VERSION_5_1, GET.class), + REFRESH_STORAGE_CLASSES("refreshStorageProfiles", ApiVersion.VERSION_5_1, POST.class), + REFRESH_VIRTUAL_CENTER("refreshVirtualCenter", ApiVersion.VERSION_5_1, POST.class), + CHECK_COMPLIANCE("checkCompliance", ApiVersion.VERSION_5_1, POST.class), + FORCE_FULL_CUSTOMIZATION("customizeAtNextPowerOn", ApiVersion.VERSION_5_6, POST.class), + RELOAD_FROM_VC("reloadFromVc", ApiVersion.VERSION_5_6, POST.class), + METRICS_DAY_VIEW("interval:day", ApiVersion.VERSION_5_1), + METRICS_WEEK_VIEW("interval:week", ApiVersion.VERSION_5_1), + METRICS_MONTH_VIEW("interval:month", ApiVersion.VERSION_5_1), + METRICS_YEAR_VIEW("interval:year", ApiVersion.VERSION_5_1), + METRICS_PREVIOUS_RANGE("range:previous", ApiVersion.VERSION_5_1), + METRICS_NEXT_RANGE("range:next", ApiVersion.VERSION_5_1), + METRICS_LATEST_RANGE("range:latest", ApiVersion.VERSION_5_1), + MIGRATE_VMS("migrateVms", ApiVersion.VERSION_5_1, POST.class), + RP_VM_LIST("resourcePoolVmList", ApiVersion.VERSION_5_1, GET.class), + CREATE_EVENT("event:create", ApiVersion.VERSION_5_1, POST.class), + CREATE_TASK("task:create", ApiVersion.VERSION_5_1, POST.class), + UPLOAD_BUNDLE("bundle:upload", ApiVersion.VERSION_5_1, POST.class), + CLEANUP_BUNDLES("bundles:cleanup", ApiVersion.VERSION_5_1, POST.class), + AUTHORIZATION_CHECK("authorization:check", ApiVersion.VERSION_5_1, POST.class), + EDGEGATEWAY_REDEPLOY("edgeGateway:redeploy", ApiVersion.VERSION_5_1, POST.class), + EDGEGATEWAY_REAPPLY_SERVICES("edgeGateway:reapplyServices", ApiVersion.VERSION_5_1, POST.class), + EDGEGATEWAY_CONFIGURE_SERVICES("edgeGateway:configureServices", ApiVersion.VERSION_5_1, POST.class), + EDGEGATEWAY_CONFIGURE_SYSLOG("edgeGateway:configureSyslogServerSettings", ApiVersion.VERSION_5_11), + EDGEGATEWAY_UPDATE_PROPERTIES("edgeGateway:updateProperties", ApiVersion.VERSION_27_0), + EDGEGATEWAY_SYNC_SYSLOG_SETTINGS("edgeGateway:syncSyslogSettings", ApiVersion.VERSION_5_1, POST.class), + EDGEGATEWAY_UPGRADE("edgeGateway:upgrade", ApiVersion.VERSION_5_1, POST.class), + EDGEGATEWAY_UPGRADE_NETWORKING("edgeGateway:convertToAdvancedNetworking", ApiVersion.VERSION_7_0), + EDGEGATEWAY_CONVERT_TO_ADVANCED_GATEWAY("edgeGateway:convertToAdvancedGateway", ApiVersion.VERSION_27_0), + EDGEGATEWAY_ENABLE_DISTRIBUTED_ROUTING("edgeGateway:enableDistributedRouting", ApiVersion.VERSION_29_0), + EDGEGATEWAY_DISABLE_DISTRIBUTED_ROUTING("edgeGateway:disableDistributedRouting", ApiVersion.VERSION_29_0), + EDGEGATEWAY_SHOW_CONFIGURE_SERVICES_UI("edgeGateway:showConfigureServicesUI", ApiVersion.VERSION_27_0), + EDGEGATEWAY_MODIFY_FORM_FACTOR("edgeGateway:modifyFormFactor", ApiVersion.VERSION_11_0), + VDC_MANAGE_FIREWALL("manageFirewall", ApiVersion.VERSION_7_0), + + RIGHTS("rights", ApiVersion.VERSION_5_1, GET.class), + CLEANUP_RIGHTS("rights:cleanup", ApiVersion.VERSION_5_1, POST.class), + + ORGVDCNETWORK_CONVERT_TO_SUBINTERFACE("orgVdcNetwork:convertToSubInterface", ApiVersion.VERSION_27_0), + ORGVDCNETWORK_CONVERT_TO_INTERNAL_INTERFACE("orgVdcNetwork:convertToInternalInterface", ApiVersion.VERSION_29_0), + ORGVDCNETWORK_CONVERT_TO_DISTRIBUTED_INTERFACE("orgVdcNetwork:convertToDistributedInterface", ApiVersion.VERSION_29_0), + + CERTIFICATE_UPDATE("certificate:update", ApiVersion.VERSION_5_1, POST.class), + CERTIFICATE_RESET("certificate:reset", ApiVersion.VERSION_5_1, POST.class), + TRUSTSTORE_UPDATE("truststore:update", ApiVersion.VERSION_5_1, POST.class), + TRUSTSTORE_RESET("truststore:reset", ApiVersion.VERSION_5_1, POST.class), + KEY_STORE_UPDATE("keystore:update", ApiVersion.VERSION_5_1, POST.class), + KEY_STORE_RESET("keystore:reset", ApiVersion.VERSION_5_1, POST.class), + SSPI_KEYTAB_UPDATE("keytab:update", ApiVersion.VERSION_5_1, POST.class), + SSPI_KEYTAB_RESET("keytab:reset", ApiVersion.VERSION_5_1, POST.class), + + SERVICE_LINKS("down:serviceLinks", ApiVersion.VERSION_5_1, GET.class), + API_FILTERS("down:apiFilters", ApiVersion.VERSION_5_1, GET.class), + RESOURCE_CLASSES("down:resourceClasses", ApiVersion.VERSION_5_1, GET.class), + RESOURCE_CLASS_ACTIONS("down:resourceClassActions", ApiVersion.VERSION_5_1, GET.class), + SERVICES("down:services", ApiVersion.VERSION_5_1, GET.class), + ACL_RULES("down:aclRules", ApiVersion.VERSION_5_1, GET.class), + FILE_DESCRIPTORS("down:fileDescriptors", ApiVersion.VERSION_5_1, GET.class), + API_DEFINITIONS("down:apiDefinitions", ApiVersion.VERSION_5_1, GET.class), + SERVICE_RESOURCES("down:serviceResources", ApiVersion.VERSION_5_1, GET.class), + ORG_VDC_FULL_GATEWAY("fullEdgeGateway", ApiVersion.VERSION_29_0), + ORG_VDC_GATEWAYS("edgeGateways", ApiVersion.VERSION_5_1, GET.class), + ORG_VDC_NETWORKS("orgVdcNetworks", ApiVersion.VERSION_5_1, GET.class), + API_EXTENSIBILITY("down:extensibility", ApiVersion.VERSION_5_1, POST.class), + API_SERVICE_QRY("down:service", ApiVersion.VERSION_5_1, GET.class), + API_APIDEFINITIONS_QRY("down:apidefinitions", ApiVersion.VERSION_5_1, GET.class), + API_FILES_QRY("down:files", ApiVersion.VERSION_5_1, GET.class), + RECONFIGURE_VM("reconfigureVm", ApiVersion.VERSION_5_1, POST.class), + VM_REAPPLY_COMPUTE_POLICY("reapplyComputePolicy", ApiVersion.Alias.VM_REAPPLY_COMPUTE_POLICY.getMapping(), POST.class), + VM_CHECK_COMPUTE_POLICY_COMPLIANCE("checkComputePolicyCompliance", ApiVersion.Alias.VM_REAPPLY_COMPUTE_POLICY.getMapping(), POST.class), + + HYBRID("down:hybrid", ApiVersion.VERSION_5_6), + HYBRID_ACQUIRE_CONTROL_TICKET("hybrid:acquireControlTicket", ApiVersion.VERSION_5_6), + HYBRID_ACQUIRE_TICKET("hybrid:acquireTicket", ApiVersion.VERSION_5_6), + HYBRID_REFRESH_TUNNEL("hybrid:refresh", ApiVersion.VERSION_6_0), + + METRICS("metrics", ApiVersion.VERSION_5_6, POST.class), + + FEDERATION_REGENERATE_CERTIFICATE("federation:regenerateFederationCertificate", ApiVersion.VERSION_5_6), + TEMPLATE_INSTANTIATE("instantiate", ApiVersion.VERSION_5_7, POST.class), + ADD_VMS("addVms", ApiVersion.VERSION_27_0), + REMOVE_VMS("removeVms", ApiVersion.VERSION_27_0), + + MAKE_DEFAULT("makeDefault", ApiVersion.VERSION_35_0), + MAKE_MANDATORY("makeMandatory", ApiVersion.VERSION_27_0), + MAKE_OPTIONAL("makeOptional", ApiVersion.VERSION_27_0), + NSX("nsx", ApiVersion.VERSION_27_0), + EDGES("down:edges", ApiVersion.VERSION_27_0), + EDGE("down:edge", ApiVersion.VERSION_27_0), + DFW("down:dfwSection", ApiVersion.VERSION_27_0), + DFW_ENABLE("add:dfwEnable", ApiVersion.VERSION_27_0), + DFW_DISABLE("remove:dfwDisable", ApiVersion.VERSION_27_0), + OPENAPI("openapi", ApiVersion.VERSION_29_0), + ROLE_LINK("linkToTemplate", ApiVersion.VERSION_29_0), + ROLE_UNLINK("unlinkFromTemplate", ApiVersion.VERSION_29_0), + SITE("site", ApiVersion.Alias.MULTI_SITE.getMapping()), + FANOUT_SKIPPED("fanout:skipped", ApiVersion.VERSION_30_0), + FANOUT_FAILED("fanout:failed", ApiVersion.VERSION_30_0), + REGENERATE_KEY_PAIR("regenerateKeyPair", ApiVersion.Alias.MULTI_SITE.getMapping()), + WORKFLOWS_BROWSE("down:workflows", ApiVersion.Alias.VRO_WORKFLOW_SUPPORT.getMapping(), GET.class), + WORKFLOWS_PRESENT("action:present", ApiVersion.Alias.VRO_WORKFLOW_SUPPORT.getMapping(), POST.class), + WORKFLOWS_EXECUTE("action:execute", ApiVersion.Alias.VRO_WORKFLOW_SUPPORT.getMapping(), POST.class), + ORG_VDC_ROLLUP("rollup", ApiVersion.Alias.ORG_VDC_ROLLUP.getMapping(), GET.class), + VDC_GROUPS("networkZones", ApiVersion.Alias.MULTI_SITE_NETWORKING.getMapping(), GET.class), + IMPORT_NETWORK("import:network", ApiVersion.Alias.NSX_T_SUPPORT.getMapping(), POST.class), + IMPORTABLE_SWITCHES("down:importableSwitches", ApiVersion.Alias.NSX_T_SUPPORT.getMapping(), GET.class), + NETWORK_RESET("reset:network", ApiVersion.Alias.ORG_VDC_NETWORKING.getMapping(), POST.class), + VDC_NETWORK_PROFILE("down:vdcNetworkProfile", ApiVersion.Alias.EDGE_CLUSTER.getMapping(), GET.class), + FIREWALL_GROUP("down:firewallGroups", ApiVersion.Alias.NSXT_SERVICES.getMapping(), GET.class), + APP_PORT_PROFILE("down:appPortProfiles", ApiVersion.Alias.NSXT_SERVICES.getMapping(), GET.class), + GATEWAY_IMPORT("import", ApiVersion.Alias.NSXT_ROUTER_IMPORT.getMapping(), GET.class), + RESOURCE_POOL("down:resourcePools", ApiVersion.Alias.VC_RESOURCE_POOLS.getMapping(), GET.class), + CAPABILITIES("vdcCapabilities", ApiVersion.VERSION_32_0, GET.class), + VDC_MAX_COMPUTE_POLICY_CREATE("down:maxComputePolicy", ApiVersion.VERSION_33_0, PUT.class), + DOWN_ALL_TASK_OPERATIONS("down:allTaskOperations", ApiVersion.VERSION_33_0, GET.class), + ORIGINAL_LINKED_VAPP("linkedVApp:original", ApiVersion.VERSION_34_0, GET.class), + GENERATED_LINKED_VAPP("linkedVApp:generatedByMove", ApiVersion.VERSION_34_0, GET.class), + CONVERT_VAPP_TO_STAND_ALONE_VM("convertAllVAppVmsToStandAloneVms", ApiVersion.VERSION_35_0, POST.class), + CONVERT_STAND_ALONE_VM_TO_VAPP("convertStandAloneVmToVApp", ApiVersion.VERSION_35_0, POST.class), + + OPENID_PROVIDER_CONFIG("openIdProviderConfig", ApiVersion.Alias.OAUTH_PROVIDER_CONFIG.getMapping(), + POST.class), + + ENTITY_RESOLVE("entity:resolve", ApiVersion.VERSION_36_0, POST.class), + ; + + + private final String value; + private final ApiVersion apiVersion; + private Class impliedHTTPVerb; + private final static Map cachedValues; + + static { + Map cache = new HashMap<>(); + for (RelationType c: RelationType.values()) { + cache.put(c.value(), c); + } + cachedValues = Collections.unmodifiableMap(cache); + } + + + // TODO: collapse these two constructors once all the enums have a valid value for impliedHTTPVerb + RelationType(String value, ApiVersion apiVersion) { + this.value = value; + this.apiVersion = apiVersion; + this.impliedHTTPVerb = null; + } + + RelationType(String value, ApiVersion apiVersion, Class impliedHTTPVerb) { + this.value = value; + this.apiVersion = apiVersion; + this.impliedHTTPVerb = impliedHTTPVerb; + } + + @Override + public String value() { + return value; + } + + public ApiVersion apiVersion() { + return apiVersion; + } + + public Class impliedHTTPVerb() { + return impliedHTTPVerb; + } + + public static RelationType fromValue(String v) { + + RelationType rt = cachedValues.get(v); + if (rt == null) { + throw new IllegalArgumentException(v.toString()); + } + + return rt; + } + +} + diff --git a/bindings/java/api-bindings/src/main/java/com/vmware/vcloud/api/rest/constants/RestAdminConstants.java b/bindings/java/api-bindings/src/main/java/com/vmware/vcloud/api/rest/constants/RestAdminConstants.java new file mode 100644 index 00000000..106c3894 --- /dev/null +++ b/bindings/java/api-bindings/src/main/java/com/vmware/vcloud/api/rest/constants/RestAdminConstants.java @@ -0,0 +1,432 @@ + +package com.vmware.vcloud.api.rest.constants; + +/*- + * #%L + * vcd-api-bindings-java :: vCloud Director REST API bindings + * %% + * Copyright (C) 2013 - 2021 VMware + * %% + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * #L% + */ + +import com.vmware.vcloud.api.rest.schema_v1_5.AdminCatalogType; +import com.vmware.vcloud.api.rest.schema_v1_5.AdminFromCloudTunnelType; +import com.vmware.vcloud.api.rest.schema_v1_5.AdminOrgType; +import com.vmware.vcloud.api.rest.schema_v1_5.AdminToCloudTunnelType; +import com.vmware.vcloud.api.rest.schema_v1_5.AdminVdcStorageProfileType; +import com.vmware.vcloud.api.rest.schema_v1_5.AdminVdcType; +import com.vmware.vcloud.api.rest.schema_v1_5.AmqpBrokersType; +import com.vmware.vcloud.api.rest.schema_v1_5.AmqpComponentConfigurationType; +import com.vmware.vcloud.api.rest.schema_v1_5.AmqpComponentConfigurationsType; +import com.vmware.vcloud.api.rest.schema_v1_5.AmqpConfigurationType; +import com.vmware.vcloud.api.rest.schema_v1_5.CertificateUpdateParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.CertificateUploadSocketType; +import com.vmware.vcloud.api.rest.schema_v1_5.CreateVdcParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.EdgeGatewayFormFactorType; +import com.vmware.vcloud.api.rest.schema_v1_5.EventType; +import com.vmware.vcloud.api.rest.schema_v1_5.ExternalCatalogSubscriptionParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.FromCloudTunnelListenerCreateParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.FromCloudTunnelListenerListType; +import com.vmware.vcloud.api.rest.schema_v1_5.FromCloudTunnelListenerType; +import com.vmware.vcloud.api.rest.schema_v1_5.GatewayFeaturesType; +import com.vmware.vcloud.api.rest.schema_v1_5.GatewayType; +import com.vmware.vcloud.api.rest.schema_v1_5.GroupType; +import com.vmware.vcloud.api.rest.schema_v1_5.HybridSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.KeystoreUpdateParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.KeystoreUploadSocketType; +import com.vmware.vcloud.api.rest.schema_v1_5.OpenIdProviderConfigurationType; +import com.vmware.vcloud.api.rest.schema_v1_5.OpenIdProviderInfoType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrgAssociationType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrgAssociationsType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrgEmailSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrgFederationSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrgGeneralSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrgGuestPersonalizationSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrgLdapSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrgLeaseSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrgOAuthSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrgOperationLimitsSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrgPasswordPolicySettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrgSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrgVAppTemplateLeaseSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrgVdcNetworkType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrganizationRightsType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrgsType; +import com.vmware.vcloud.api.rest.schema_v1_5.ProviderVdcStorageProfileType; +import com.vmware.vcloud.api.rest.schema_v1_5.ProviderVdcType; +import com.vmware.vcloud.api.rest.schema_v1_5.PublishCatalogParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.PublishExternalCatalogParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.ReferencesType; +import com.vmware.vcloud.api.rest.schema_v1_5.RegisterVAppParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.RightType; +import com.vmware.vcloud.api.rest.schema_v1_5.RoleType; +import com.vmware.vcloud.api.rest.schema_v1_5.SelectorExtensionType; +import com.vmware.vcloud.api.rest.schema_v1_5.SelectorExtensionsType; +import com.vmware.vcloud.api.rest.schema_v1_5.SspiKeytabUpdateParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.SspiKeytabUploadSocketType; +import com.vmware.vcloud.api.rest.schema_v1_5.SyslogServerType; +import com.vmware.vcloud.api.rest.schema_v1_5.TaskOperationListType; +import com.vmware.vcloud.api.rest.schema_v1_5.TrustStoreUpdateParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.TrustStoreUploadSocketType; +import com.vmware.vcloud.api.rest.schema_v1_5.TunnelingApplicationListType; +import com.vmware.vcloud.api.rest.schema_v1_5.TunnelingApplicationRegisterParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.TunnelingApplicationType; +import com.vmware.vcloud.api.rest.schema_v1_5.UpdateVdcStorageProfilesType; +import com.vmware.vcloud.api.rest.schema_v1_5.UserType; +import com.vmware.vcloud.api.rest.schema_v1_5.VCloudType; +import com.vmware.vcloud.api.rest.schema_v1_5.VdcReferencesType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.DatastoreType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.EntityReferencesType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.LdapSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.ResourcePoolListType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.UserEntityRightsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWDiscoveredResourcePoolsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWProviderVdcType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWVdcTemplateListType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWVdcTemplateType; + +/** + * Constants used in the Admin API handlers. Has media types and uri paths. + * + * @author vjohnson + * + */ +public class RestAdminConstants { + + /* Not to be initialized */ + private RestAdminConstants() { + } + + public static class Uri { + private Uri() { + }; + + public static final String ADMIN_PREFIX = "/admin"; + public static final String ADMIN = ADMIN_PREFIX + "/"; + public static final String PROVIDER_VDC = "/providervdc/"; + public static final String PROVIDER_VDCS = "/providervdcs"; + public static final String VDC_REFERENCES = "/vdcReferences"; + public static final String ORG_VDC = "/vdcs"; + public static final String ADMIN_VDC = "/vdc/"; + public static final String ORGANIZATION = "/org/"; + public static final String USER = "/user/"; + public static final String GROUP = "/group/"; + public static final String RIGHT = "/right/"; + public static final String ROLE = "/role/"; + public static final String CATALOG = "/catalog/"; + public static final String CATALOGS = "/catalogs"; + public static final String NETWORK = "/network/"; + public static final String NETWORKS = "/networks"; + public static final String NETWORK_POOL = "/networkPool/"; + public static final String GATEWAY = "/edgeGateway/"; + public static final String GATEWAYS = "/edgeGateways"; + public static final String ADD_USERS_PATH = "/users"; + public static final String ADD_GROUPS_PATH = "/groups"; + public static final String ADD_CATALOGS_PATH = "/catalogs"; + public static final String ADD_ORGANIZATIONS_PATH = "orgs"; + public static final String ADD_VDCS_PATH = "/vdcs"; + public static final String ADD_VDCS_PARAMS_PATH = "/vdcsparams"; + public static final String ADD_ORG_NETWORKS_PATH = "/networks"; + public static final String ADD_ROLES_PATH = "roles"; + public static final String ORG_SETTINGS = "/settings"; + public static final String ORG_GENERAL_SETTINGS = "/general"; + public static final String ORG_FEDERATION_SETTINGS = "/federation"; + public static final String ORG_FEDERATION_SAML_ALIAS = "/alias/"; + public static final String ORG_OAUTH_SETTINGS = "/oauth"; + public static final String OPENID_PROVIDER_CONFIG = "/openIdProviderConfig"; + public static final String ORG_LDAP_SETTINGS = "/ldap"; + public static final String VAPP_TEMPLATE_LEASE_SETTINGS = "/vAppTemplateLeaseSettings"; + public static final String ORG_EMAIL_SETTINGS = "/email"; + public static final String ORG_PASSWORD_POLICY_SETTINGS = "/passwordPolicy"; + public static final String ORG_VAPP_LEASE_SETTINGS = "/vAppLeaseSettings"; + public static final String RIGHTS = "/rights"; + public static final String ROLES = "/roles"; + public static final String USERS = "/users"; + public static final String STRANDEDUSERS = "/strandedUsers"; + public static final String GROUPS = "/groups"; + public static final String VDC_TEMPLATE = "/vdcTemplate"; + public static final String VDC_TEMPLATES = "/vdcTemplates"; + public static final String VDCS = "/vdcs"; + public static final String ORGANIZATIONS = "/orgs"; + public static final String VDC_STORAGE_CLASS = "/vdcStorageProfile"; + public static final String VDC_STORAGE_CLASSES = "/vdcStorageProfiles"; + public static final String PVDC_STORAGE_CLASS = "/pvdcStorageProfile"; + public static final String AVAILABLE_STORAGE_PROFILES = "/availableStorageProfiles"; + public static final String EVENTS = "/events"; + public static final String ORG_GUEST_PERSONALIZATION_SETTINGS = "/guestPersonalizationSettings"; + public static final String ORG_OPERATION_LIMITS_SETTINGS = "/operationLimitsSettings"; + public static final String CBM_DATA = "/cbmData"; + public static final String TUNNELING_APPLICATION = "/hybrid/tunnelingApplication"; + public static final String HYBRID_SETTINGS = "/hybrid/settings"; + public static final String HYBRID_TO_CLOUD_TUNNEL = "/hybrid/toCloudTunnel"; + public static final String HYBRID_FROM_CLOUD_TUNNEL = "/hybrid/fromCloudTunnel"; + public static final String HYBRID_FROM_CLOUD_TUNNEL_LISTENER = "/hybrid/fromCloudTunnelListener"; + public static final String ORG_ASSOCIATIONS = "/associations"; + public static final String LOCAL_ASSOCIATION_DATA = "/localAssociationData"; + public static final String EVENT = "/event"; + public final static String AMQP = "/amqp"; + public final static String AMQP_BROKER = "/broker"; + public final static String AMQP_COMPONENT = "/component"; + public final static String EXTENSION = "/extension"; + public final static String OBJECT_EXTENSION = "/object"; + public final static String SELECTOR_EXTENSIONS = "/selectorExtensions"; + public final static String COMPUTE_POLICIES = "/computePolicies"; + public static final String EDGE_CLUSTERS = "/edgeClusters"; + public static final String VDC_GROUPS = "/vdcGroups"; + } + + public static class MediaType { + private MediaType() { + }; + + public static final String ADMIN_MEDIA_TYPE_PREFIX = "application/vnd.vmware.admin."; + public static final String VCLOUDM = VCloudType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String PROVIDER_VDCM = ProviderVdcType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VMW_PROVIDER_VDCM = VMWProviderVdcType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VDC_REFERENCESM = VdcReferencesType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String ADMIN_VDCM = AdminVdcType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String ORGANIZATIONM = AdminOrgType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + // SYSTEM_ORGANIZATIONM is used only in links + public static final String SYSTEM_ORGANIZATIONM = "application/vnd.vmware.admin.systemOrganization" + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String USERM = UserType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String GROUPM = GroupType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String ROLEM = RoleType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String RIGHTM = RightType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String RIGHT_REFERENCESM = "application/vnd.vmware.admin.rightReferences+xml"; + public static final String CATALOGM = AdminCatalogType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String ORGSM = OrgsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String ORGRIGHTSM = OrganizationRightsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + // ORG_NETWORKM "collides" with Constants.ORG_NETWORK + public static final String ORG_NETWORKM = "application/vnd.vmware.admin.orgNetwork" + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + // NETWORKM is used only in links + public static final String NETWORKM = "application/vnd.vmware.admin.network" + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String NETWORK_POOLM = "application/vnd.vmware.admin.networkPool" + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String GATEWAYM = GatewayType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String GATEWAY_SERVICESM = GatewayFeaturesType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String GATEWAY_SYSLOGSERVERSETTINGSM = SyslogServerType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String GATEWAY_FORM_FACTORM = EdgeGatewayFormFactorType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String ORG_VDC_NETWORKM = OrgVdcNetworkType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String PUBLISH_PARAMSM = PublishCatalogParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String PUBLISH_EXTERNAL_CATALOG_PARAMSM = PublishExternalCatalogParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String EXT_CATALOG_SUBSCRIPTION_PARAMSM = ExternalCatalogSubscriptionParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String ORG_SETTINGSM = OrgSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VAPP_TEMPLATE_LEASE_SETTINGS = OrgVAppTemplateLeaseSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String TASK_OPERATION_LISTM = TaskOperationListType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String ORGANIZATION_ASSOCIATIONM = OrgAssociationType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String ORGANIZATION_ASSOCIATIONSM = OrgAssociationsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String ORGANIZATION_GENERAL_SETTINGSM = OrgGeneralSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String ORGANIZATION_FEDERATION_SETTINGSM = OrgFederationSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + //approved MIME type for SAML v2.0 metadata (https://www.iana.org/assignments/media-types/application/samlmetadata+xml) + public static final String ORGANIZATION_FEDERATION_SAML_METADATA_TYPE = "application/samlmetadata+xml"; + public static final String ORGANIZATION_OAUTH_SETTINGSM = OrgOAuthSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String OPENID_PROVIDER_INFO = OpenIdProviderInfoType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String OPENID_PROVIDER_CONFIG = OpenIdProviderConfigurationType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String ORGANIZATION_LDAP_SETTINGSM = OrgLdapSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String LDAP_SETTINGSM = LdapSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String ORGANIZATION_EMAIL_SETTINGSM = OrgEmailSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String ORGANIZATION_PASSWORD_POLICY_SETTINGSM = OrgPasswordPolicySettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String ORGANIZATION_VAPP_LEASE_SETTINGSM = OrgLeaseSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String UPDATE_VDC_STORAGE_CLASSM = UpdateVdcStorageProfilesType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String EVENTM = EventType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String ORG_GUEST_PERSONALIZATION_SETTINGSM = OrgGuestPersonalizationSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String ORG_OPERATION_LIMITS_SETTINGSM = OrgOperationLimitsSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String CREATE_VDC_PARAMS = CreateVdcParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + // ENTITY_REFERENCESM is used to query user privileges over a set of entities + public static final String ENTITY_REFERENCESM = EntityReferencesType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + // USER_ENTITY_RIGHTS_LISTM is output to the above ENTITY_REFERENCESM query + public static final String USER_ENTITY_RIGHTS_LISTM = UserEntityRightsType.CONTENT_TYPE+ XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String REFERENCESM = ReferencesType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String REGISTER_VAPP_PARAMS = RegisterVAppParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VDC_STORAGE_CLASSM = AdminVdcStorageProfileType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String PVDC_STORAGE_CLASSM = ProviderVdcStorageProfileType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VDC_TEMPLATEM = VMWVdcTemplateType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VDC_TEMPLATE_LISTM = VMWVdcTemplateListType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + + public static final String TRUSTSTORE_UPDATE_PARAMSM = TrustStoreUpdateParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String TRUSTSTORE_UPLOAD_SOCKETM = TrustStoreUploadSocketType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String CERTIFICATE_UPDATE_PARAMSM = CertificateUpdateParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String CERTIFICATE_UPLOAD_SOCKETM = CertificateUploadSocketType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String KEY_STORE_UPDATE_PARAMSM = KeystoreUpdateParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String KEY_STORE_UPLOAD_SOCKETM = KeystoreUploadSocketType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String SSPI_KEYTAB_UPDATE_PARAMSM = SspiKeytabUpdateParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String SSPI_KEYTAB_UPLOAD_SOCKETM = SspiKeytabUploadSocketType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + + public static final String TUNNELING_APPLICATION_REGISTER_PARAMS = TunnelingApplicationRegisterParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String TUNNELING_APPLICATION = TunnelingApplicationType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String TUNNELING_APPLICATION_LIST = TunnelingApplicationListType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + + public static final String HYBRID_SETTINGS = HybridSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String TO_CLOUD_TUNNEL_TYPE = AdminToCloudTunnelType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String FROM_CLOUD_TUNNEL_TYPE = AdminFromCloudTunnelType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String FROM_CLOUD_TUNNEL_LISTENER_TYPE = FromCloudTunnelListenerType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String FROM_CLOUD_TUNNEL_LISTENER_CREATE_PARAMS_TYPE = FromCloudTunnelListenerCreateParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String FROM_CLOUD_TUNNEL_LISTENER_LIST_TYPE = FromCloudTunnelListenerListType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + + public static final String EVENT = EventType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + + public static final String AMQP_CONFIGM = AmqpConfigurationType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String AMQP_BROKERSM = AmqpBrokersType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String AMQP_COMPONENTSM = AmqpComponentConfigurationsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String AMQP_COMPONENTM = AmqpComponentConfigurationType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + + public static final String SELECTOR_EXTENSION = SelectorExtensionType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String SELECTOR_EXTENSIONS = SelectorExtensionsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + + public static final String DATASTORE = DatastoreType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + + public static final String DISCOVER_RP_TYPE = VMWDiscoveredResourcePoolsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + + public static final String EMPTY_MEDIA_TYPE = null; + + public static final String RESOURCE_POOL_LIST = ResourcePoolListType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + + public static final String VCLOUDM_JSON = VCloudType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String PROVIDER_VDCM_JSON = ProviderVdcType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VDC_REFERENCESM_JSON = VdcReferencesType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String ADMIN_VDCM_JSON = AdminVdcType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String ORGANIZATIONM_JSON = AdminOrgType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String SYSTEM_ORGANIZATIONM_JSON = "application/vnd.vmware.admin.systemOrganization" + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String USERM_JSON = UserType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String GROUPM_JSON = GroupType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String ROLEM_JSON = RoleType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String RIGHTM_JSON = RightType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String CATALOGM_JSON = AdminCatalogType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String ORGSM_JSON = OrgsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String ORGRIGHTSM_JSON = OrganizationRightsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String ORG_NETWORKM_JSON = "application/vnd.vmware.admin.orgNetwork" + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String NETWORKM_JSON = "application/vnd.vmware.admin.network" + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String NETWORK_POOLM_JSON = "application/vnd.vmware.admin.networkPool" + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String GATEWAYM_JSON = GatewayType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String GATEWAY_SERVICESM_JSON = GatewayFeaturesType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String GATEWAY_SYSLOGSERVERSETTINGSM_JSON = SyslogServerType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String GATEWAY_FORM_FACTORM_JSON = EdgeGatewayFormFactorType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String ORG_VDC_NETWORKM_JSON = OrgVdcNetworkType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String PUBLISH_PARAMSM_JSON = PublishCatalogParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String PUBLISH_EXTERNAL_CATALOG_PARAMSM_JSON = PublishExternalCatalogParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String EXT_CATALOG_SUBSCRIPTION_PARAMSM_JSON = ExternalCatalogSubscriptionParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String ORG_SETTINGSM_JSON = OrgSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VAPP_TEMPLATE_LEASE_SETTINGS_JSON = OrgVAppTemplateLeaseSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String TASK_OPERATION_LISTM_JSON = TaskOperationListType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String ORGANIZATION_ASSOCIATIONM_JSON = OrgAssociationType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String ORGANIZATION_ASSOCIATIONSM_JSON = OrgAssociationsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String ORGANIZATION_GENERAL_SETTINGSM_JSON = OrgGeneralSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String ORGANIZATION_FEDERATION_SETTINGSM_JSON = OrgFederationSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String ORGANIZATION_OAUTH_SETTINGSM_JSON = OrgOAuthSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String OPENID_PROVIDER_INFO_JSON = OpenIdProviderInfoType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String OPENID_PROVIDER_CONFIG_JSON = OpenIdProviderConfigurationType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String ORGANIZATION_LDAP_SETTINGSM_JSON = OrgLdapSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String LDAP_SETTINGSM_JSON = LdapSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String ORGANIZATION_EMAIL_SETTINGSM_JSON = OrgEmailSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String ORGANIZATION_PASSWORD_POLICY_SETTINGSM_JSON = OrgPasswordPolicySettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String ORGANIZATION_VAPP_LEASE_SETTINGSM_JSON = OrgLeaseSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String UPDATE_VDC_STORAGE_CLASSM_JSON = UpdateVdcStorageProfilesType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String EVENTM_JSON = EventType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String ORG_GUEST_PERSONALIZATION_SETTINGSM_JSON = OrgGuestPersonalizationSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String ORG_OPERATION_LIMITS_SETTINGSM_JSON = OrgOperationLimitsSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String CREATE_VDC_PARAMS_JSON = CreateVdcParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String ENTITY_REFERENCESM_JSON = EntityReferencesType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String USER_ENTITY_RIGHTS_LISTM_JSON = UserEntityRightsType.CONTENT_TYPE+ XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String REFERENCESM_JSON = ReferencesType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String REGISTER_VAPP_PARAMS_JSON = RegisterVAppParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VDC_STORAGE_CLASSM_JSON = AdminVdcStorageProfileType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String PVDC_STORAGE_CLASSM_JSON = ProviderVdcStorageProfileType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VDC_TEMPLATEM_JSON = VMWVdcTemplateType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VDC_TEMPLATE_LISTM_JSON = VMWVdcTemplateListType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String TRUSTSTORE_UPDATE_PARAMSM_JSON = TrustStoreUpdateParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String TRUSTSTORE_UPLOAD_SOCKETM_JSON = TrustStoreUploadSocketType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String CERTIFICATE_UPDATE_PARAMSM_JSON = CertificateUpdateParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String CERTIFICATE_UPLOAD_SOCKETM_JSON = CertificateUploadSocketType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String KEY_STORE_UPDATE_PARAMSM_JSON = KeystoreUpdateParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String KEY_STORE_UPLOAD_SOCKETM_JSON = KeystoreUploadSocketType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String SSPI_KEYTAB_UPDATE_PARAMSM_JSON = SspiKeytabUpdateParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String SSPI_KEYTAB_UPLOAD_SOCKETM_JSON = SspiKeytabUploadSocketType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String TUNNELING_APPLICATION_REGISTER_PARAMS_JSON = TunnelingApplicationRegisterParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String TUNNELING_APPLICATION_JSON = TunnelingApplicationType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String TUNNELING_APPLICATION_LIST_JSON = TunnelingApplicationListType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String HYBRID_SETTINGS_JSON = HybridSettingsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String TO_CLOUD_TUNNEL_TYPE_JSON = AdminToCloudTunnelType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String FROM_CLOUD_TUNNEL_TYPE_JSON = AdminFromCloudTunnelType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String FROM_CLOUD_TUNNEL_LISTENER_TYPE_JSON = FromCloudTunnelListenerType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String FROM_CLOUD_TUNNEL_LISTENER_CREATE_PARAMS_TYPE_JSON = FromCloudTunnelListenerCreateParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String FROM_CLOUD_TUNNEL_LISTENER_LIST_TYPE_JSON = FromCloudTunnelListenerListType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String EVENT_JSON = EventType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String AMQP_CONFIGM_JSON = AmqpConfigurationType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String AMQP_BROKERSM_JSON = AmqpBrokersType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String AMQP_COMPONENTSM_JSON = AmqpComponentConfigurationsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String AMQP_COMPONENTM_JSON = AmqpComponentConfigurationType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String SELECTOR_EXTENSION_JSON = SelectorExtensionType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String SELECTOR_EXTENSIONS_JSON = SelectorExtensionsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String DATASTORE_JSON = DatastoreType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String DISCOVER_RP_TYPE_JSON = VMWDiscoveredResourcePoolsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VCDNI_TO_VXLAN_MIGRATION_JSON = "application/vnd.vmware.admin.vdcnitovxlanmigration" + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String RESOURCE_POOL_LIST_JSON = ResourcePoolListType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + + } + + /** + * Action URIs + */ + public static class ActionUri { + public static final String ORG_ENABLE = "/action/enable"; + public static final String ORG_DISABLE = "/action/disable"; + public static final String ORG_RELOAD_STS_AUTH = "/action/reloadStsAuthSettings"; + public static final String ORG_FEDERATION_REGENERATE_CERTIFICATE = "/action/regenerateFederationCertificate"; + public static final String VDC_ENABLE = "/action/enable"; + public static final String VDC_DISABLE = "/action/disable"; + public static final String REGISTER_VAPP = "/action/registerVApp"; + public static final String UPDATE_RIGHTS = "/action/update"; + public static final String GATEWAY_REDEPLOY = "/action/redeploy"; + public static final String GATEWAY_REAPPLY_SERVICES = "/action/reapplyServices"; + public static final String GATEWAY_MODIFY_FORM_FACTOR = "/action/modifyFormFactor"; + public static final String GATEWAY_SYNC_SYSLOG = "/action/syncSyslogServerSettings"; + public static final String GATEWAY_UPGRADE_CONFIG = "/action/upgradeConfig"; + public static final String GATEWAY_CONFIGURE_SERVICES = "/action/configureServices"; + public static final String GATEWAY_UPDATE_PROPERTIES = "/action/updateProperties"; + public static final String GATEWAY_CONFIGURE_SYSLOGSERVER_SETTINGS = "/action/configureSyslogServerSettings"; + public static final String GATEWAY_UPGRADE_NETWORKING="/action/convertToAdvancedNetworking"; + public static final String GATEWAY_UPGRADE_TO_ADVANCED_GATEWAY ="/action/convertToAdvancedGateway"; + public static final String GATEWAY_ENABLE_DISTRIBUTED_ROUTING ="/action/enableDistributedRouting"; + public static final String GATEWAY_DISABLE_DISTRIBUTED_ROUTING ="/action/disableDistributedRouting"; + + public static final String HYBRID_REFRESH_TO_CLOUD_TUNNEL = "/action/refresh"; + + public static final String AMQP_CERTIFICATE_UPDATE = "/action/updateAmqpCertificate"; + public static final String AMQP_CERTIFICATE_RESET = "/action/resetAmqpCertificate"; + public static final String AMQP_TRUSTSTORE_UPDATE = "/action/updateAmqpTruststore"; + public static final String AMQP_TRUSTSTORE_RESET = "/action/resetAmqpTruststore"; + + public static final String VAPP_RUNTIME_LEASE_EXPIRE = "/action/expireVAppsRuntimeLease"; + public static final String VAPP_STORAGE_LEASE_EXPIRE = "/action/expireVAppsStorageLease"; + public static final String VAPPTEMPLATE_STORAGE_LEASE_EXPIRE = "/action/expireVAppTemplatesStorageLease"; + + // Role link/unlink template Deprecated in ApiVersion Alias RBAC_2 + @Deprecated + public final static String ROLE_RELINK_TO_TEMPLATE = "/action/relinkToTemplate"; + @Deprecated + public final static String ROLE_UNLINK_FROM_TEMPLATE = "/action/unlinkFromTemplate"; + + public static final String REGENERATE_KEY_PAIR = "/action/regenerateKeyPair"; + } +} + diff --git a/bindings/java/api-bindings/src/main/java/com/vmware/vcloud/api/rest/constants/RestConstants.java b/bindings/java/api-bindings/src/main/java/com/vmware/vcloud/api/rest/constants/RestConstants.java new file mode 100644 index 00000000..057c8ae4 --- /dev/null +++ b/bindings/java/api-bindings/src/main/java/com/vmware/vcloud/api/rest/constants/RestConstants.java @@ -0,0 +1,963 @@ + +package com.vmware.vcloud.api.rest.constants; + +/*- + * #%L + * vcd-api-bindings-java :: vCloud Director REST API bindings + * %% + * Copyright (C) 2013 - 2021 VMware + * %% + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * #L% + */ + +import com.vmware.vcloud.api.rest.schema_v1_5.AdminOrgType; +import com.vmware.vcloud.api.rest.schema_v1_5.AdminVdcType; +import com.vmware.vcloud.api.rest.schema_v1_5.AllocatedIpAddressesType; +import com.vmware.vcloud.api.rest.schema_v1_5.ApiDefinitionType; +import com.vmware.vcloud.api.rest.schema_v1_5.ApiExtensibilityType; +import com.vmware.vcloud.api.rest.schema_v1_5.BootOptionsType; +import com.vmware.vcloud.api.rest.schema_v1_5.CaptureVAppParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.CatalogItemType; +import com.vmware.vcloud.api.rest.schema_v1_5.CatalogType; +import com.vmware.vcloud.api.rest.schema_v1_5.CloneMediaParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.CloneVAppParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.CloneVAppTemplateParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.ComplianceResultType; +import com.vmware.vcloud.api.rest.schema_v1_5.ComposeVAppParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.ControlAccessParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.CopyOrMoveCatalogItemParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.CreateSnapshotParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.CreateVmParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.CurrentUsageSpecType; +import com.vmware.vcloud.api.rest.schema_v1_5.CurrentUsageType; +import com.vmware.vcloud.api.rest.schema_v1_5.CustomizationSectionType; +import com.vmware.vcloud.api.rest.schema_v1_5.DeployVAppParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.DiskAttachOrDetachParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.DiskCreateParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.DiskMoveParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.DiskType; +import com.vmware.vcloud.api.rest.schema_v1_5.EntityReferenceType; +import com.vmware.vcloud.api.rest.schema_v1_5.ErrorType; +import com.vmware.vcloud.api.rest.schema_v1_5.FromCloudTunnelCreateParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.FromCloudTunnelListenerListType; +import com.vmware.vcloud.api.rest.schema_v1_5.FromCloudTunnelType; +import com.vmware.vcloud.api.rest.schema_v1_5.GuestCustomizationSectionType; +import com.vmware.vcloud.api.rest.schema_v1_5.GuestCustomizationStatusSectionType; +import com.vmware.vcloud.api.rest.schema_v1_5.HistoricUsageSpecType; +import com.vmware.vcloud.api.rest.schema_v1_5.HistoricUsageType; +import com.vmware.vcloud.api.rest.schema_v1_5.HybridOrgType; +import com.vmware.vcloud.api.rest.schema_v1_5.HybridTicketType; +import com.vmware.vcloud.api.rest.schema_v1_5.InstantiateOvfParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.InstantiateVAppTemplateParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.InstantiateVdcTemplateParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.InstantiateVmTemplateParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.LeaseSettingsSectionType; +import com.vmware.vcloud.api.rest.schema_v1_5.MediaInsertOrEjectParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.MetadataType; +import com.vmware.vcloud.api.rest.schema_v1_5.MetadataValueType; +import com.vmware.vcloud.api.rest.schema_v1_5.MksTicketType; +import com.vmware.vcloud.api.rest.schema_v1_5.MoveVAppParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.MultisiteSessionUserInfoType; +import com.vmware.vcloud.api.rest.schema_v1_5.NetworkConfigSectionType; +import com.vmware.vcloud.api.rest.schema_v1_5.NetworkConnectionSectionType; +import com.vmware.vcloud.api.rest.schema_v1_5.NetworkType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrgAssociationType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrgAssociationsType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrgListType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrgNetworkType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrgType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrgVdcNetworkType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrgVdcRollupType; +import com.vmware.vcloud.api.rest.schema_v1_5.OwnerType; +import com.vmware.vcloud.api.rest.schema_v1_5.ProductSectionListType; +import com.vmware.vcloud.api.rest.schema_v1_5.ProviderVdcType; +import com.vmware.vcloud.api.rest.schema_v1_5.RasdItemsListType; +import com.vmware.vcloud.api.rest.schema_v1_5.RecomposeVAppParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.ReferencesType; +import com.vmware.vcloud.api.rest.schema_v1_5.RelocateParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.RemoteUriProbeResultType; +import com.vmware.vcloud.api.rest.schema_v1_5.RoleType; +import com.vmware.vcloud.api.rest.schema_v1_5.RuntimeInfoSectionType; +import com.vmware.vcloud.api.rest.schema_v1_5.ScreenTicketType; +import com.vmware.vcloud.api.rest.schema_v1_5.ServiceType; +import com.vmware.vcloud.api.rest.schema_v1_5.SessionType; +import com.vmware.vcloud.api.rest.schema_v1_5.SiteAssociationType; +import com.vmware.vcloud.api.rest.schema_v1_5.SiteAssociationsType; +import com.vmware.vcloud.api.rest.schema_v1_5.SiteStatusType; +import com.vmware.vcloud.api.rest.schema_v1_5.SiteType; +import com.vmware.vcloud.api.rest.schema_v1_5.SnapshotSectionType; +import com.vmware.vcloud.api.rest.schema_v1_5.SupportedOperatingSystemsInfoType; +import com.vmware.vcloud.api.rest.schema_v1_5.TaskPrototypeType; +import com.vmware.vcloud.api.rest.schema_v1_5.TaskType; +import com.vmware.vcloud.api.rest.schema_v1_5.TasksListType; +import com.vmware.vcloud.api.rest.schema_v1_5.ToCloudTunnelCreateParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.ToCloudTunnelType; +import com.vmware.vcloud.api.rest.schema_v1_5.TunnelingApplicationListType; +import com.vmware.vcloud.api.rest.schema_v1_5.UndeployVAppParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.UploadVAppTemplateParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.UserType; +import com.vmware.vcloud.api.rest.schema_v1_5.VAppNetworkType; +import com.vmware.vcloud.api.rest.schema_v1_5.VAppTemplateType; +import com.vmware.vcloud.api.rest.schema_v1_5.VAppType; +import com.vmware.vcloud.api.rest.schema_v1_5.VdcComputePolicyReferencesType; +import com.vmware.vcloud.api.rest.schema_v1_5.VdcStorageProfileType; +import com.vmware.vcloud.api.rest.schema_v1_5.VdcTemplateType; +import com.vmware.vcloud.api.rest.schema_v1_5.VdcTemplatesType; +import com.vmware.vcloud.api.rest.schema_v1_5.VdcType; +import com.vmware.vcloud.api.rest.schema_v1_5.VirtualHardwareVersionType; +import com.vmware.vcloud.api.rest.schema_v1_5.VmAffinityRuleType; +import com.vmware.vcloud.api.rest.schema_v1_5.VmAffinityRulesType; +import com.vmware.vcloud.api.rest.schema_v1_5.VmCapabilitiesType; +import com.vmware.vcloud.api.rest.schema_v1_5.VmCheckPGCType; +import com.vmware.vcloud.api.rest.schema_v1_5.VmPendingQuestionType; +import com.vmware.vcloud.api.rest.schema_v1_5.VmQuestionAnswerType; +import com.vmware.vcloud.api.rest.schema_v1_5.VmType; +import com.vmware.vcloud.api.rest.schema_v1_5.VmsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.PrepareHostParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.ShieldManagerType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.TenantMigrationParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWExtensionType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWExternalNetworkReferencesType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWHostGroupType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWHostGroupsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWHostReferencesType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWNamedVmGroupType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWProviderVdcReferencesType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWProviderVdcResourcePoolType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWStorageProfilesType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWVmGroupReferencesType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWVmGroupType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWVmGroupsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWVmHostAffinityRulesType; +import com.vmware.vcloud.api.rest.version.ApiVersion; + +/** + * A variety of vCloud REST API constants + */ +public interface RestConstants { + + public static final String VCLOUD_NAMESPACE_1_5 = "http://www.vmware.com/vcloud/v1.5"; + + public static final String ALPHA_ENABLED_CONFIG_KEY = "restapi.alpha.enabled"; + + /** + * URIs for entities + * + * TODO: The inconsistent use of trailing slashes needs to be investigated, but be warned that + * some Apache CXF / JAX-RS code is sensitive to its presence or lack of trailing slashes. + * (Presumably there's sensitivity in vCD code as well--e.g., in contexts where string + * concatentation is being done.) + */ + public static class Uri { + public final static String SERVER_STATUS = "/server_status"; + public final static String SCHEMA = "/schema/"; + public final static String VERSIONS = "/versions"; + public final static String LOGIN = "/login"; + public final static String LOGOUT = "/logout"; + public final static String SESSIONS = "/sessions"; + public final static String SESSION = "/session"; + public final static String FULL_GATEWAYS = "/fullEdgeGateways"; + public final static String ENTITY = "/entity/"; + public final static String ORGANIZATION = "/org/"; + public final static String VDC = "/vdc/"; + public final static String HARDWARE_VERSION = "/hwv/"; + public final static String VDC_TEMPLATE = "/vdcTemplate/"; + public final static String PROXY_CONFIGURATION = "/proxyConfiguration/"; + public final static String VDC_TEMPLATES = "/vdcTemplates"; + public final static String VAPP_TEMPLATE = "/vAppTemplate/"; + public final static String VAPP = "/vApp/"; + public final static String SHADOW_VM = "/shadowVm/"; + public final static String TASK = "/task/"; + public final static String OPERATIONS = "/operations/"; + public final static String TASKS_LIST = "/tasksList/"; + public final static String MEDIA = "/media/"; + public final static String NETWORK = "/network/"; + public final static String ADD_CATALOG_ITEMS_PATH = "/catalogItems"; + public final static String CATALOG = "/catalog/"; + public final static String CATALOG_ITEM = "/catalogItem/"; + public final static String ERROR = "/error/"; + public final static String CONTROL_ACCESS = "/controlAccess/"; + public final static String QUESTION = "/question"; + public final static String OWNER = "/owner"; + public final static String UNAUTHORIZED_ACCESS = "/unauthorizedAccess/"; + public final static String BAD_REQUEST = "/badRequest/"; + public final static String INTERNAL_ERROR = "/internalError/"; + public final static String GATEWAY_TIMEOUT_ERROR = "/timeoutError/"; + public final static String NOT_ACCEPTABLE_ERROR = "/notAcceptable/"; + public final static String QUERY = "/query"; + public static final String CATALOGS = "/catalogs"; + public static final String MEDIA_LIST = "/mediaList"; + public static final String VAPP_TEMPLATES = "/vAppTemplates"; + public static final String VAPPS = "/vApps"; + public static final String VMS_IN_LEASE = "/vms"; + public static final String SHADOW_VMS = "/shadowVms"; + public static final String METADATA = "/metadata"; + public static final String METADATA_KEY = "/metadata/"; + public final static String DISK = "/disk/"; + public static final String DISKS = "/disks"; + public static final String ATTACHED_VMS = "/attachedVms"; + public final static String VDC_STORAGE_CLASS = "/vdcStorageProfile/"; + public final static String ALLOCATED_IP_ADDRESS="/allocatedAddresses/"; + public final static String SUPPORTED_SYSTEMS_INFO="/supportedSystemsInfo/"; + public final static String VM_CAPABILITIES = "/vmCapabilities/"; + public final static String VM_BOOT_OPTIONS = "/bootOptions/"; + public final static String COMPLIANCE_RESULT = "/complianceResult"; + public final static String API_DEFINITION = "/apidefinition"; + public final static String API_DEFINITIONS_LIST = "/apidefinitions"; + public final static String API_FILE_DESCRIPTORS_LIST = "/files"; + public final static String EXTERNAL_SVC = "/service"; + public final static String EXTENSIBILITY = "/extensibility"; + public final static String VM_AFFINITY_RULE = "/vmAffinityRule/"; + public final static String VM_AFFINITY_RULES = "/vmAffinityRules/"; + public final static String ORG_VDC_ROLLUP = "/vdcRollup"; + public final static String TEST_EMAIL_SETTINGS = "/smtp/test"; + public final static String TEST_LDAP_SETTINGS = "/ldap/test"; + public final static String SYNC_LDAP = "/ldap/sync"; + + /* OVF sections */ + public final static String LEASE_SETTINGS_SECTION = "/leaseSettingsSection/"; + public final static String STARTUP_SECTION = "/startupSection/"; + public final static String NETWORK_SECTION = "/networkSection/"; + public static final String PRODUCT_SECTIONS = "/productSections/"; + public final static String NETWORK_CONFIG_SECTION = "/networkConfigSection/"; + public final static String NETWORK_CONNECTION_SECTION = "/networkConnectionSection/"; + public final static String OPERATING_SYSTEM_SECTION = "/operatingSystemSection/"; + public static final String GUEST_CUSTOMIZATION_SECTION = "/guestCustomizationSection/"; + public static final String CUSTOMIZATION_SECTION = "/customizationSection/"; + public final static String VIRTUAL_HARDWARE_SECTION = "/virtualHardwareSection/"; + public static final String VIRTUAL_HARDWARE_SECTION_CPU = "/cpu"; + public static final String VIRTUAL_HARDWARE_SECTION_MEMORY = "/memory"; + public static final String VIRTUAL_HARDWARE_SECTION_DISKS = "/disks"; + public static final String VIRTUAL_HARDWARE_SECTION_NETWORK_CARDS = "/networkCards"; + public static final String VIRTUAL_HARDWARE_SECTION_MEDIA_DRIVES = "/media"; + public static final String VIRTUAL_HARDWARE_SECTION_SERIAL_PORTS = "/serialPorts"; + public final static String RUNTIME_INFO_SECTION = "/runtimeInfoSection"; + public final static String SNAPSHOT_SECTION = "/snapshotSection"; + public final static String RECONFIGURE_VM = "/action/reconfigureVm"; + public final static String VM_REAPPLY_COMPUTE_POLICY = "/action/reapplyComputePolicy"; + public final static String GUEST_CUST_STATUS = "/guestcustomizationstatus/"; + public final static String GUEST_CUSTOMIZAION_CHECK_PGC = "/checkpostcustomizationscript/"; + + public final static String COMPUTE_POLICIES = "/computePolicies"; + public final static String VDC_COMPUTE_POLICIES = "/vdcComputePolicies"; + public final static String VM_SECURITY_TAGS = "/securityTags/vm"; + + + /* Metrics */ + public static final class Metrics { + public static final String BASE = "/metrics"; + public static final String CURRENT = "/current"; + public static final String HISTORIC = "/historic"; + public static final String[] METRIC_GROUP = {"/cpu", "/mem", "/disk"}; + public static final String CPU_USAGE_AVERAGE = "cpu.usage.average"; + public static final String CPU_USAGEMHZ_AVERAGE = "cpu.usagemhz.average"; + public static final String CPU_USAGE_MAXIMUM = "cpu.usage.maximum"; + public static final String MEM_USAGE_AVERAGE = "mem.usage.average"; + public static final String DISK_WRITE_AVERAGE = "disk.write.average"; + public static final String DISK_READ_AVERAGE = "disk.read.average"; + public static final String DISK_USED_LATEST = "disk.used.latest"; + public static final String DISK_PROVISIONED_LATEST = "disk.provisioned.latest"; + public static final String CPU_ALL_PATTERN = "cpu.*"; + public static final String MEM_ALL_PATTERN = "mem.*"; + public static final String DISK_ALL_PATTERN = "disk.*"; + public static final String PERCENT = "PERCENT"; + public static final String MEGAHERTZ = "MEGAHERTZ"; + public static final String KILOBYTE = "KILOBYTE"; + public static final String KILOBYTES_PER_SECOND = "KILOBYTES_PER_SECOND"; + } + + // Hybrid networking + public static final String HYBRID = "/hybrid"; + public static final String TO_CLOUD_TUNNEL = "/toCloudTunnel"; + public static final String FROM_CLOUD_TUNNEL = "/fromCloudTunnel"; + + //Networking proxy api + public static final String NETWORK_ROOT = "/network"; + public static final String EDGES = "/edges"; + public static final String EDGE = "/edge"; + public static final String NSX_MANAGERS = "/nsxmanagers"; + public static final String NSX_MANAGER_HEALTH = NSX_MANAGERS + "/health"; + public static final String IMPORT_NETWORK = "/orgvdcnetworks/import"; + public static final String IMPORTABLE_NETWORKS = "/orgvdcnetworks/importableswitches"; + + //Networking open api + public static final String VDC_NETWORK_PROFILE = "/networkProfile"; + public static final String FIREWALL_GROUPS = "/firewallGroups"; + public static final String APP_PORT_PROFILES = "/applicationPortProfiles"; + public static final String EDGE_GATEWAY = "/edgeGateways"; + + //Networking Multisite + public static final String MULTISITE_EGRESS_PREFIX = "/multisite/universalrouter/egresspoints"; + public static final String MULTISITE_EGRESS_CONFIGURE = MULTISITE_EGRESS_PREFIX + "/configure"; + public static final String MULTISITE_EGRESS_UNCONFIGURE = MULTISITE_EGRESS_PREFIX + "/unconfigure"; + public static final String MULTISITE_ROUTE_PREFIX = "/multisite/universalrouter/route"; + public static final String MULTISITE_ROUTE_EGRESS_CONFIGURE = MULTISITE_ROUTE_PREFIX + "/egress/configure"; + public static final String MULTISITE_ROUTE_EGRESS_UNCONFIGURE = MULTISITE_ROUTE_PREFIX + "/egress/unconfigure"; + public static final String MULTISITE_ROUTE_UDLR_CONFIGURE = MULTISITE_ROUTE_PREFIX + "/udlr/configure"; + public static final String MULTISITE_ROUTE_UDLR_UNCONFIGURE = MULTISITE_ROUTE_PREFIX + "/udlr/unconfigure"; + public static final String MULTISITE_CROSS_VDC_NETWORK_PREFIX = "/multisite/crossvdcnetworks"; + public static final String MULTISITE_CROSS_VDC_NETWORK_UPDATE = MULTISITE_CROSS_VDC_NETWORK_PREFIX + "/update"; + public static final String MULTISITE_CROSS_VDC_NETWORK_SHRINK = MULTISITE_CROSS_VDC_NETWORK_PREFIX + "/shrink"; + public static final String MULTISITE_CROSS_VDC_NETWORK_EXPAND = MULTISITE_CROSS_VDC_NETWORK_PREFIX + "/expand"; + + + // Multi-Site + public static final class MultiSite { + public static final String SITE = "/site"; + public static final String ASSOCIATIONS = "/associations"; + public static final String ASSOCIATION_DATA = "/associationData"; + public static final String SITE_ASSOCIATIONS = SITE + ASSOCIATIONS; + public static final String ORGANIZATIONS = "/organizations"; + public static final String STATUS = "/status"; + public static final String ID_PATTERN = "/{id}"; + public static final String LOCAL = "local"; + } + + // Compute policies + public static final String VDC_MAX_COMPUTE_POLICY = "/maxComputePolicy"; + } + + /** + * Content types for entities and parameters + */ + public static class MediaType { + public final static String ENTITY = com.vmware.vcloud.api.rest.schema_v1_5.EntityType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String ORGANIZATION = OrgType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String ADMIN_ORGANIZATION = AdminOrgType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String ORGANIZATION_LIST = OrgListType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String VDC = VdcType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String ADMIN_VDC = AdminVdcType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String VDC_TEMPLATE = VdcTemplateType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String VDC_TEMPLATE_LIST = VdcTemplatesType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String INSTANTIATE_VDC_TEMPLATE_PARAMS = InstantiateVdcTemplateParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String UPLOAD_VAPP_TEMPLATE_PARAMS = UploadVAppTemplateParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String INSTANTIATE_OVF_PARAMS = InstantiateOvfParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String INSTANTIATE_VAPP_TEMPLATE_PARAMS = InstantiateVAppTemplateParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String INSTANTIATE_VM_TEMPLATE_PARAMS = InstantiateVmTemplateParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String CLONE_VAPP_PARAMS = CloneVAppParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String MOVE_VAPP_PARAMS = MoveVAppParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String CLONE_VAPP_TEMPLATE_PARAMS = CloneVAppTemplateParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String COPY_OR_MOVE_CATALOG_ITEM_PARAMS = CopyOrMoveCatalogItemParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String CLONE_MEDIA_PARAMS = CloneMediaParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String DEPLOY_VAPP_PARAMS = DeployVAppParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String UNDEPLOY_VAPP_PARAMS = UndeployVAppParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String CAPTURE_VAPP_PARAMS = CaptureVAppParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String COMPOSE_VAPP_PARAMS = ComposeVAppParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String CREATE_VM_PARAM = CreateVmParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String VAPP_TEMPLATE = VAppTemplateType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String VAPP = VAppType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String VM = VmType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String SHADOW_VM = "application/vnd.vmware.vcloud.shadowvm" + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String VMS = VmsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String MEDIA = com.vmware.vcloud.api.rest.schema_v1_5.MediaType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String VAPP_NETWORK = VAppNetworkType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String ORG_NETWORK = OrgNetworkType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String ORG_VDC_NETWORK = OrgVdcNetworkType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String NETWORK = NetworkType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String TASK = TaskType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String TASKS_LIST = TasksListType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String TASK_PROTOTYPE = TaskPrototypeType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String CATALOG = CatalogType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String CATALOG_ITEM = CatalogItemType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String ERROR = ErrorType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String SCREEN_TICKET = ScreenTicketType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String MKS_TICKET = MksTicketType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String CONTROL_ACCESS = ControlAccessParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + @Deprecated + public final static String REMOTE_URI_PROBE_RESULT = RemoteUriProbeResultType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String MEDIA_INSERT_EJECT_PARAMS = MediaInsertOrEjectParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String QUESTION = VmPendingQuestionType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String ANSWER = VmQuestionAnswerType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String RECOMPOSE_VAPP_PARAMS = RecomposeVAppParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String RELOCATE_VM_PARAMS = RelocateParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String OWNER = OwnerType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String USER = UserType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String REFERENCES = ReferencesType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String QUERY_RESULTS_CONTENT_TYPE = "application/vnd.vmware.vcloud.query.records"; + public final static String RECORDS = QUERY_RESULTS_CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String IDRECORDS = "application/vnd.vmware.vcloud.query.idrecords" + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String QUERY_LIST = "application/vnd.vmware.vcloud.query.queryList" + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String SESSION = SessionType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String SHADOW_VMS = "application/vnd.vmware.vcloud.shadowVms" + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String METADATA = MetadataType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String METADATA_ITEM_VALUE = MetadataValueType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String ENTITY_REFERENCE = EntityReferenceType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String DISK = DiskType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String DISK_CREATE_PARAMS = DiskCreateParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String DISK_ATTACH_DETACH_PARAMS = DiskAttachOrDetachParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String DISK_MOVE_PARAMS = DiskMoveParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String VMW_STORAGE_PROFILES_TYPE_CLASS = VMWStorageProfilesType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String VDC_STORAGE_CLASS = VdcStorageProfileType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String ALLOCATED_NETWORK_IPS = AllocatedIpAddressesType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String SUPPORTED_SYSTEMS_INFOM = SupportedOperatingSystemsInfoType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String CREATE_SNAPSHOT_PARAMS = CreateSnapshotParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String API_DEFINITIONM = ApiDefinitionType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String EXTERNAL_SVCM = ServiceType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String API_EXTENSIBILITY = ApiExtensibilityType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VMW_EXTENSION = VMWExtensionType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VMW_PROVIDER_VDC = VMWProviderVdcReferencesType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String PROVIDER_VDC = ProviderVdcType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String ROLE = RoleType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VMW_EXTERNAL_NETWORK_REFERENCES = VMWExternalNetworkReferencesType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VMW_HOST_REFERENCES = VMWHostReferencesType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VMW_VMS_IN_VMGROUP = "application/vnd.vmware.vcloud.VmGroupVmsRecord" + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VMW_VM_GROUP = VMWVmGroupType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VMW_VM_GROUPS = VMWVmGroupsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VMW_NAMED_VM_GROUP = VMWNamedVmGroupType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VMW_VM_GROUP_REFERENCES = VMWVmGroupReferencesType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VMW_HOST_GROUP = VMWHostGroupType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VMW_HOST_GROUPS = VMWHostGroupsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VMW_RESOURCE_POOL = VMWProviderVdcResourcePoolType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String HARDWARE_VERSION = VirtualHardwareVersionType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String TENANT_MIGRATION_PARAMS = TenantMigrationParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VSM = ShieldManagerType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String ORG_VDC_ROLLUP = OrgVdcRollupType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + + /*OVF sections */ + public final static String LEASE_SETTINGS_SECTION = LeaseSettingsSectionType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String STARTUP_SECTION = "application/vnd.vmware.vcloud.startupSection" + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String NETWORK_SECTION = "application/vnd.vmware.vcloud.networkSection" + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String NETWORK_CONFIG_SECTION = NetworkConfigSectionType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String PRODUCT_SECTIONS = ProductSectionListType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String NETWORK_CONNECTION_SECTION = NetworkConnectionSectionType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String OPERATING_SYSTEM_SECTION = "application/vnd.vmware.vcloud.operatingSystemSection" + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String VIRTUAL_HARDWARE_SECTION = "application/vnd.vmware.vcloud.virtualHardwareSection" + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String RUNTIME_INFO_SECTION = RuntimeInfoSectionType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String GUEST_CUSTOMIZATION_SECTION = GuestCustomizationSectionType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String CUSTOMIZATION_SECTION = CustomizationSectionType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String SNAPSHOT_SECTION = SnapshotSectionType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + + public final static String RASD_ITEM = "application/vnd.vmware.vcloud.rasdItem" + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String RASD_ITEMS_LIST = RasdItemsListType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + + public final static String OVF = "text/xml"; + public final static String OVA = "application/binary"; + public final static String APPLICATION_XML = "application/*" + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VM_CAPABILITIESM = VmCapabilitiesType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String COMPLIANCE_RESULTM = ComplianceResultType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + + public static final String HYBRID_ORG = HybridOrgType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String HYBRID_TICKET = HybridTicketType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String TO_CLOUD_TUNNEL_CREATE_PARAMS_TYPE = ToCloudTunnelCreateParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String TO_CLOUD_TUNNEL_TYPE = ToCloudTunnelType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String FROM_CLOUD_TUNNEL_CREATE_PARAMS_TYPE = FromCloudTunnelCreateParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String FROM_CLOUD_TUNNEL_TYPE = FromCloudTunnelType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String TUNNELING_APPLICATION_LIST = TunnelingApplicationListType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String FROM_CLOUD_TUNNEL_LISTENER_LIST = FromCloudTunnelListenerListType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + + public static final String METRICS_CURRENT_SPEC_TYPE = CurrentUsageSpecType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String METRICS_CURRENT_TYPE = CurrentUsageType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String METRICS_HISTORIC_SPEC_TYPE = HistoricUsageSpecType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String METRICS_HISTORIC_TYPE = HistoricUsageType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + + public static final String PREPARE_HOST_PARAMS = PrepareHostParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + + public static final String EMPTY_MEDIA_TYPE = null; + public static final String GUEST_CUSTOMIZATION_STATUS_SECTION = GuestCustomizationStatusSectionType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String GUEST_CUSTOMIZAION_CHECK_PGC = VmCheckPGCType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + + // VM Affinity Rules + public static final String VM_AFFINITY_RULE = VmAffinityRuleType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VM_AFFINITY_RULES = VmAffinityRulesType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + + // VM host affinity + public static final String VMW_VM_HOST_AFFINITY_RULES = VMWVmHostAffinityRulesType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VM_BOOT_OPTIONS = BootOptionsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + + public static final String VDC_COMPUTE_POLICY_REFS = VdcComputePolicyReferencesType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String VDC_COMPUTE_POLICY = "application/vnd.vmware.vcloud.vdcComputePolicyType" + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + + // Open API + public final static String APPLICATION_JSON = "application/json"; + + // MultiSite + public static final String SITE = SiteType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String SITE_ASSOCIATIONS = SiteAssociationsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String SITE_ASSOCIATION = SiteAssociationType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String SITE_STATUS = SiteStatusType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String MULTISITE_USER_SESSION_INFO = MultisiteSessionUserInfoType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public final static String PROXY_CONFIGURATION = "application/vnd.vmware.admin.proxyConfiguration" + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + + public final static String ENTITY_JSON = com.vmware.vcloud.api.rest.schema_v1_5.EntityType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String ORGANIZATION_JSON = OrgType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String ADMIN_ORGANIZATION_JSON = AdminOrgType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String ORGANIZATION_LIST_JSON = OrgListType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String VDC_JSON = VdcType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String ADMIN_VDC_JSON = AdminVdcType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String VDC_TEMPLATE_JSON = VdcTemplateType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String VDC_TEMPLATE_LIST_JSON = VdcTemplatesType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String INSTANTIATE_VDC_TEMPLATE_PARAMS_JSON = InstantiateVdcTemplateParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String UPLOAD_VAPP_TEMPLATE_PARAMS_JSON = UploadVAppTemplateParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String INSTANTIATE_OVF_PARAMS_JSON = InstantiateOvfParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String INSTANTIATE_VAPP_TEMPLATE_PARAMS_JSON = InstantiateVAppTemplateParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String INSTANTIATE_VM_TEMPLATE_PARAMS_JSON = InstantiateVmTemplateParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String CLONE_VAPP_PARAMS_JSON = CloneVAppParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String MOVE_VAPP_PARAMS_JSON = MoveVAppParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String CLONE_VAPP_TEMPLATE_PARAMS_JSON = CloneVAppTemplateParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String COPY_OR_MOVE_CATALOG_ITEM_PARAMS_JSON = CopyOrMoveCatalogItemParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String CLONE_MEDIA_PARAMS_JSON = CloneMediaParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String DEPLOY_VAPP_PARAMS_JSON = DeployVAppParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String UNDEPLOY_VAPP_PARAMS_JSON = UndeployVAppParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String CAPTURE_VAPP_PARAMS_JSON = CaptureVAppParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String COMPOSE_VAPP_PARAMS_JSON = ComposeVAppParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String CREATE_VM_PARAM_JSON = CreateVmParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String VAPP_TEMPLATE_JSON = VAppTemplateType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String VAPP_JSON = VAppType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String VM_JSON = VmType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String SHADOW_VM_JSON = "application/vnd.vmware.vcloud.shadowvm" + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String VMS_JSON = VmsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String MEDIA_JSON = com.vmware.vcloud.api.rest.schema_v1_5.MediaType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String VAPP_NETWORK_JSON = VAppNetworkType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String ORG_NETWORK_JSON = OrgNetworkType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String ORG_VDC_NETWORK_JSON = OrgVdcNetworkType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String NETWORK_JSON = NetworkType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String TASK_JSON = TaskType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String TASKS_LIST_JSON = TasksListType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String TASK_PROTOTYPE_JSON = TaskPrototypeType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String CATALOG_JSON = CatalogType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String CATALOG_ITEM_JSON = CatalogItemType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String ERROR_JSON = ErrorType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String SCREEN_TICKET_JSON = ScreenTicketType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String MKS_TICKET_JSON = MksTicketType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String CONTROL_ACCESS_JSON = ControlAccessParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + @Deprecated + public final static String REMOTE_URI_PROBE_RESULT_JSON = RemoteUriProbeResultType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String MEDIA_INSERT_EJECT_PARAMS_JSON = MediaInsertOrEjectParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String QUESTION_JSON = VmPendingQuestionType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String ANSWER_JSON = VmQuestionAnswerType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String RECOMPOSE_VAPP_PARAMS_JSON = RecomposeVAppParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String RELOCATE_VM_PARAMS_JSON = RelocateParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String OWNER_JSON = OwnerType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String USER_JSON = UserType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String REFERENCES_JSON = ReferencesType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String RECORDS_JSON = QUERY_RESULTS_CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String IDRECORDS_JSON = "application/vnd.vmware.vcloud.query.idrecords" + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String QUERY_LIST_JSON = "application/vnd.vmware.vcloud.query.queryList" + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String SESSION_JSON = SessionType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String SHADOW_VMS_JSON = "application/vnd.vmware.vcloud.shadowVms" + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String METADATA_JSON = MetadataType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String METADATA_ITEM_VALUE_JSON = MetadataValueType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String ENTITY_REFERENCE_JSON = EntityReferenceType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String DISK_JSON = DiskType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String DISK_CREATE_PARAMS_JSON = DiskCreateParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String DISK_ATTACH_DETACH_PARAMS_JSON = DiskAttachOrDetachParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String DISK_MOVE_PARAMS_JSON = DiskMoveParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String VMW_STORAGE_PROFILES_TYPE_CLASS_JSON = VMWStorageProfilesType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String VDC_STORAGE_CLASS_JSON = VdcStorageProfileType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String ALLOCATED_NETWORK_IPS_JSON = AllocatedIpAddressesType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String SUPPORTED_SYSTEMS_INFOM_JSON = SupportedOperatingSystemsInfoType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String CREATE_SNAPSHOT_PARAMS_JSON = CreateSnapshotParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String API_DEFINITIONM_JSON = ApiDefinitionType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String EXTERNAL_SVCM_JSON = ServiceType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String API_EXTENSIBILITY_JSON = ApiExtensibilityType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VMW_EXTENSION_JSON = VMWExtensionType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VMW_PROVIDER_VDC_JSON = VMWProviderVdcReferencesType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String PROVIDER_VDC_JSON = ProviderVdcType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String ROLE_JSON = RoleType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VMW_EXTERNAL_NETWORK_REFERENCES_JSON = VMWExternalNetworkReferencesType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VMW_HOST_REFERENCES_JSON = VMWHostReferencesType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VMW_VMS_IN_VMGROUP_JSON = "application/vnd.vmware.vcloud.VmGroupVmsRecord" + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VMW_VM_GROUP_JSON = VMWVmGroupType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VMW_VM_GROUPS_JSON = VMWVmGroupsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VMW_NAMED_VM_GROUP_JSON = VMWNamedVmGroupType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VMW_VM_GROUP_REFERENCES_JSON = VMWVmGroupReferencesType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VMW_HOST_GROUP_JSON = VMWHostGroupType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VMW_HOST_GROUPS_JSON = VMWHostGroupsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VMW_RESOURCE_POOL_JSON = VMWProviderVdcResourcePoolType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String HARDWARE_VERSION_JSON = VirtualHardwareVersionType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String TENANT_MIGRATION_PARAMS_JSON = TenantMigrationParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String LEASE_SETTINGS_SECTION_JSON = LeaseSettingsSectionType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String STARTUP_SECTION_JSON = "application/vnd.vmware.vcloud.startupSection" + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String NETWORK_SECTION_JSON = "application/vnd.vmware.vcloud.networkSection" + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String NETWORK_CONFIG_SECTION_JSON = NetworkConfigSectionType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String PRODUCT_SECTIONS_JSON = ProductSectionListType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String NETWORK_CONNECTION_SECTION_JSON = NetworkConnectionSectionType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String OPERATING_SYSTEM_SECTION_JSON = "application/vnd.vmware.vcloud.operatingSystemSection" + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String VIRTUAL_HARDWARE_SECTION_JSON = "application/vnd.vmware.vcloud.virtualHardwareSection" + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String RUNTIME_INFO_SECTION_JSON = RuntimeInfoSectionType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String GUEST_CUSTOMIZATION_SECTION_JSON = GuestCustomizationSectionType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String CUSTOMIZATION_SECTION_JSON = CustomizationSectionType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String SNAPSHOT_SECTION_JSON = SnapshotSectionType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String RASD_ITEM_JSON = "application/vnd.vmware.vcloud.rasdItem" + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public final static String RASD_ITEMS_LIST_JSON = RasdItemsListType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VM_CAPABILITIESM_JSON = VmCapabilitiesType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String COMPLIANCE_RESULTM_JSON = ComplianceResultType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String HYBRID_ORG_JSON = HybridOrgType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String HYBRID_TICKET_JSON = HybridTicketType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String TO_CLOUD_TUNNEL_CREATE_PARAMS_TYPE_JSON = ToCloudTunnelCreateParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String TO_CLOUD_TUNNEL_TYPE_JSON = ToCloudTunnelType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String FROM_CLOUD_TUNNEL_CREATE_PARAMS_TYPE_JSON = FromCloudTunnelCreateParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String FROM_CLOUD_TUNNEL_TYPE_JSON = FromCloudTunnelType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String TUNNELING_APPLICATION_LIST_JSON = TunnelingApplicationListType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String FROM_CLOUD_TUNNEL_LISTENER_LIST_JSON = FromCloudTunnelListenerListType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String METRICS_CURRENT_SPEC_TYPE_JSON = CurrentUsageSpecType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String METRICS_CURRENT_TYPE_JSON = CurrentUsageType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String METRICS_HISTORIC_SPEC_TYPE_JSON = HistoricUsageSpecType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String METRICS_HISTORIC_TYPE_JSON = HistoricUsageType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String PREPARE_HOST_PARAMS_JSON = PrepareHostParamsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String GUEST_CUSTOMIZATION_STATUS_SECTION_JSON = GuestCustomizationStatusSectionType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String GUEST_CUSTOMIZAION_CHECK_PGC_JSON = VmCheckPGCType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VM_AFFINITY_RULE_JSON = VmAffinityRuleType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VM_AFFINITY_RULES_JSON = VmAffinityRulesType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VMW_VM_HOST_AFFINITY_RULES_JSON = VMWVmHostAffinityRulesType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VM_BOOT_OPTIONS_JSON = BootOptionsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String SITE_JSON = SiteType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String SITE_ASSOCIATIONS_JSON = SiteAssociationsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String SITE_ASSOCIATION_JSON = SiteAssociationType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String SITE_STATUS_JSON = SiteStatusType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String MULTISITE_USER_SESSION_INFO_JSON = MultisiteSessionUserInfoType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String ORG_ASSOCIATION = OrgAssociationType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String ORG_ASSOCIATION_JSON = OrgAssociationType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String ORG_ASSOCIATIONS = OrgAssociationsType.CONTENT_TYPE + XmlJsonTypeMatcher.XML_FORMAT_SUFFIX; + public static final String ORG_ASSOCIATIONS_JSON = OrgAssociationsType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String ORG_VDC_ROLLUP_JSON = OrgVdcRollupType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VDC_COMPUTE_POLICY_REFS_JSON = VdcComputePolicyReferencesType.CONTENT_TYPE + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + public static final String VDC_COMPUTE_POLICY_JSON = "application/vnd.vmware.vcloud.vdcComputePolicyType" + XmlJsonTypeMatcher.JSON_FORMAT_SUFFIX; + + public static final String APPLICATION_YAML = "application/yaml"; + } + + /** + * Action URIs + */ + public static class ActionUri { + //Content Library operations + public final static String CATALOG_ITEM_UPLOAD = "/action/upload"; + + //vdc upload operations + public final static String UPLOAD_VAPP_TEMPLATE = "/action/uploadVAppTemplate"; + public final static String INSTANTIATE_OVF = "/action/instantiateOvf"; + public final static String VDC_MEDIA = "/media"; + + public final static String CLONE_MEDIA = "/action/cloneMedia"; + public final static String CLONE_VAPP_TEMPLATE = "/action/cloneVAppTemplate"; + public final static String CATALOG_ITEM_COPY = "/action/copy"; + public final static String CATALOG_ITEM_MOVE = "/action/move"; + public final static String CATALOG_SYNC = "/action/sync"; + public final static String CATALOG_ITEM_SYNC = "/action/sync"; + + //vdc template operations + public final static String INSTANTIATE_TEMPLATE = "/action/instantiate"; + + //organization operations + public final static String MIGRATE_TENANT = "/action/migrateTenant"; + + //vdc vApp creation operations + public final static String INSTANTIATE_VAPP_TEMPLATE = "/action/instantiateVAppTemplate"; + public final static String CLONE_VAPP = "/action/cloneVApp"; + public final static String MOVE_VAPP = "/action/moveVApp"; + public final static String CAPTURE_VAPP = "/action/captureVApp"; + public final static String COMPOSE_VAPP = "/action/composeVApp"; + public final static String CREATE_VM = "/action/createVm"; + public final static String INSTANTIATE_VM_FROM_TEMPLATE = "/action/instantiateVmFromTemplate"; + + //vdc disk operations + public final static String CREATE_DISK = "/disk"; + public final static String MOVE_DISK = "/action/moveDisk"; + + public final static String VAPP_DISCARD_STATE = "/action/discardSuspendedState"; + + //VAppTemplate operations + public final static String ENABLE_DOWNLOAD = "/action/enableDownload"; + public final static String DISABLE_DOWNLOAD = "/action/disableDownload"; + + //VApp Power operations + public final static String VAPP_DEPLOY = "/action/deploy"; + public final static String VAPP_UNDEPLOY = "/action/undeploy"; + public final static String VAPP_POWER_ON = "/power/action/powerOn"; + public final static String VAPP_POWER_OFF = "/power/action/powerOff"; + public final static String VAPP_RESET = "/power/action/reset"; + public final static String VAPP_SUSPEND = "/power/action/suspend"; + public final static String VAPP_SHUTDOWN = "/power/action/shutdown"; + public final static String VAPP_REBOOT = "/power/action/reboot"; + //VApp operations + public final static String VAPP_SCREEN = "/screen"; + public final static String VAPP_ACQUIRE_TICKET = "/screen/action/acquireTicket"; + public final static String VAPP_ACQUIRE_MKS_TICKET = "/screen/action/acquireMksTicket"; + public final static String VAPP_INSERT_MEDIA = "/media/action/insertMedia"; + public final static String VAPP_EJECT_MEDIA = "/media/action/ejectMedia"; + public final static String VAPP_ATTACH_DISK = "/disk/action/attach"; + public final static String VAPP_DETACH_DISK = "/disk/action/detach"; + public final static String VAPP_QUESTION_ANSWER = "/question/action/answer"; + public final static String VAPP_ENTER_MAINTENANCE_MODE = "/action/enterMaintenanceMode"; + public final static String VAPP_EXIT_MAINTENANCE_MODE = "/action/exitMaintenanceMode"; + public final static String RECOMPOSE_VAPP = "/action/recomposeVApp"; + public final static String VM_INSTALL_VMWARE_TOOLS = "/action/installVMwareTools"; + public final static String VM_UPGRADE_HARDWARE_VERSION = "/action/upgradeHardwareVersion"; + public final static String VM_CONSOLIDATE = "/action/consolidate"; + public final static String VM_RELOCATE = "/action/relocate"; + public final static String VM_ENABLE_NESTED_HV="/action/enableNestedHypervisor"; + public final static String VM_DISABLE_NESTED_HV="/action/disableNestedHypervisor"; + public final static String VM_CHECK_COMPLIANCE="/action/checkCompliance"; + public final static String VM_FORCE_FULL_CUSTOMIZATION = "/action/customizeAtNextPowerOn"; + public final static String VM_RELOAD_FROM_VC = "/action/reloadFromVc"; + public final static String VM_BOOT_OPTIONS="/action/bootOptions"; + public final static String VM_CHECK_COMPUTE_POLICY_COMPLIANCE = "/action/checkComputePolicyCompliance"; + public final static String CONVERT_VAPP_TO_STAND_ALONE_VM = "/action/convertAllVAppVmsToStandAloneVms"; + public final static String CONVERT_STAND_ALONE_VM_TO_VAPP = "/action/convertStandAloneVmToVApp"; + + // Snapshot operations + public final static String SNAPSHOT_CREATE = "/action/createSnapshot"; + public final static String SNAPSHOT_REVERT_TO_CURRENT = "/action/revertToCurrentSnapshot"; + public final static String SNAPSHOT_REMOVE_ALL_SNAPSHOTS = "/action/removeAllSnapshots"; + + // Storage policy operations + public final static String MAKE_DEFAULT = "/action/makeDefault"; + + // User operations + public final static String USER_UNLOCK = "/action/unlock"; + public final static String USER_ENTITY_RIGHTS = "/entityRights"; + public final static String USER_GRANTED_RIGHTS = "/grantedRights"; + public final static String USER_TAKE_OWNERSHIP = "/action/takeOwnership"; + + // network operations + public final static String NETWORK_RESET = "/action/reset"; + public final static String NETWORK_SYNC_SYSLOG_SETTINGS = "/action/syncSyslogServerSettings"; + public final static String NETWORK_CONVERT_TO_SUB_INTERFACE = "/action/convertToSubInterface"; + public final static String NETWORK_CONVERT_TO_INTERNAL_INTERFACE = "/action/convertToInternalInterface"; + public final static String NETWORK_CONVERT_TO_DISTRIBUTED_INTERFACE = "/action/convertToDistributedInterface"; + + // ovf generation + public final static String OVF = "/ovf"; + + // Access control + public final static String CONTROL_ACCESS = "/action/controlAccess"; + public final static String CONTROL_ACCESS_VIEW = Uri.CONTROL_ACCESS; + + public final static String CANCEL_TASK = "/action/cancel"; + + public final static String PUBLISH = "/action/publish"; + + public final static String PUBLISH_TO_EXTERNAL_ORGANIZATIONS = "/action/publishToExternalOrganizations"; + public final static String SUBSCRIBE_TO_EXTERNAL_CATALOG= "/action/subscribeToExternalCatalog"; + @Deprecated + public final static String PROBE_REMOTE_LIBRARY = "/probeRemoteLibrary"; + + // Hybrid + public final static String HYBRID_ACQUIRE_CONTROL_TICKET = "/action/acquireControlTicket"; + public final static String HYBRID_ACQUIRE_TICKET = "/action/acquireTicket"; + } + + public static class QueryParams { + public static final String PAGE = "page"; + public static final String PAGE_SIZE = "pageSize"; + public static final int DEFAULT_PAGE = 1; + public static final int DEFAULT_PAGE_SIZE = 25; + public static final String OFFSET = "offset"; + public static final String FIELDS = "fields"; + public static final String FILTER = "filter"; + public static final String LINKS = "links"; + public static final String DEFAULT_LINKS = "false"; + public static final String SORT_ASC = "sortAsc"; + public static final String SORT_DESC = "sortDesc"; + public static final String TYPE = "type"; + public static final String QUERY_FIELDS_SEPARATOR = ","; + public static final String QUERY_PARAMS_SEPARATOR = "&"; + public static final String ASSOCIATION_OFFSETS = "assocOffsets"; + public static final String CURSOR = "cursor"; + public static final int MAX_PAGE_SIZE = 128; + } + + public static class AuditEventStatus { + public static final int SUCCESS = 2; + public static final int FAILURE = 3; + } + + public static class ApiVersionAttributes { + public static final String API_VERSION_ATTRIBUTE_1_5 = API_VERSION_ATTR + ApiVersion.VERSION_1_5.value(); + } + + public static class MinorErrorCodes { + public static final String INTERNAL_SERVER_ERROR = "INTERNAL_SERVER_ERROR"; + public static final String BAD_REQUEST = "BAD_REQUEST"; + public static final String RESOURCE_NOT_FOUND = "RESOURCE_NOT_FOUND"; + public static final String FORBIDDEN = "ACCESS_TO_RESOURCE_IS_FORBIDDEN"; + public static final String METHOD_NOT_ALLOWED = "METHOD_NOT_ALLOWED"; + public static final String CONFLICT = "CONFLICT"; + public static final String UNSUPPORTED_MEDIA_TYPE = "UNSUPPORTED_MEDIA_TYPE"; + public static final String NOT_ACCEPTABLE = "NOT_ACCEPTABLE"; + public static final String NEW_LOCATION = "NEW_LOCATION"; + public static final String BAD_GATEWAY = "BAD_GATEWAY"; + public static final String GATEWAY_TIMEOUT = "GATEWAY_TIMEOUT"; + public static final String UNAUTHORIZED = "UNAUTHORIZED"; + + public static final String UNKNOWN = "UNKNOWN"; + + public static final String INVALID_REFERENCE = "INVALID_REFERENCE"; + public static final String INVALID_STATE = "INVALID_STATE"; + public static final String INVENTORY_OBJECT_NOT_FOUND = "INVENTORY_OBJECT_NOT_FOUND"; + public static final String EULA_NOT_ACCEPTED = "EULA_NOT_ACCEPTED"; + + public static final String TUNNELING_APPLICATION_NOT_FOUND = "TUNNELING_APPLICATION_NOT_FOUND"; + + public static final String TOO_MANY_FROM_CLOUD_TUNNEL_PORTS_ALLOCATED = "TOO_MANY_FROM_CLOUD_TUNNEL_PORTS_ALLOCATED"; + + public static final String CANNOT_RESOLVE_TO_CLOUD_TUNNEL_DESTINATION_ID = "CANNOT_RESOLVE_TO_CLOUD_TUNNEL_DESTINATION_ID"; + + public static final String ERROR_CREATING_FROM_CLOUD_TUNNEL_HANDLERS = "ERROR_CREATING_FROM_CLOUD_TUNNEL_HANDLERS"; + + public static final String FROM_CLOUD_TUNNEL_LISTENER_FOR_TUNNEL_NOT_FOUND = "FROM_CLOUD_TUNNEL_LISTENER_FOR_TUNNEL_NOT_FOUND"; + + public static final String SERVICE_NOT_READY = "SERVICE_NOT_READY"; + + public static final String ORG_MEMBER_IMPORT = "ORG_MEMBER_IMPORT"; + + public static final String DUPLICATE_NAME = "DUPLICATE_NAME"; + public static final String BUSY_ENTITY = "BUSY_ENTITY"; + + public static final String INVALID_MULTISITE_QUERY_ARGS = "INVALID_MULTISITE_QUERY_ARGS"; + public static final String INVALID_MULTISITE_SCOPE = "INVALID_MULTISITE_SCOPE"; + } + + public static class HttpStatusCodes { + public static final int SC_OK = 200; + public static final int SC_CREATED = 201; + public static final int SC_ACCEPTED = 202; + public static final int SC_NO_CONTENT = 204; + public static final int SC_PARTIAL_CONTENT = 206; + public static final int SC_MOVED_PERMANENTLY = 301; + /** + * HTTP BAD REQUEST status code + */ + public static final int SC_BAD_REQUEST = 400; + + /** + * HTTP UNAUTHORIZED status code + */ + public static final int SC_UNAUTHORIZED = 401; + + /** + * HTTP Forbidden status code + */ + public static final int SC_FORBIDDEN = 403; + + /** + * HTTP NOT FOUND status code + */ + public static final int SC_NOT_FOUND = 404; + + /** + * HTTP Method not allowed status code + */ + public static final int SC_METHOD_NOT_ALLOWED = 405; + + /** + * HTTP Not Acceptable status code + */ + public static final int SC_NOT_ACCEPTABLE = 406; + + /** + * HTTP Conflict status code + */ + public static final int SC_CONFLICT = 409; + + /** + * HTTP Unsupported Media Type + */ + public static final int SC_UNSUPPORTED_MEDIA_TYPE = 415; + + /** + * HTTP Internal server error status code + */ + public static final int SC_INTERNAL_SERVER_ERROR = 500; + + public static final int SC_BAD_GATEWAY = 502; + + public static final int SC_SERVICE_NOT_AVAILABLE = 503; + + /** + * HTTP Gateway Timeout + */ + public static final int SC_GATEWAY_TIMEOUT_ERROR = 504; + } + + public static interface DeleteParameters { + + /** + * Forced deletion + */ + public static final String FORCE = "force"; + + /** + * Recursive deletion of child objects + */ + public static final String RECURSIVE = "recursive"; + } + + public static final String VCLOUD_AUTHENTICATION_HEADER = "x-vcloud-authorization"; + + public static final String VCLOUD_TENANT_CONTEXT_HEADER = "X-VMWARE-VCLOUD-TENANT-CONTEXT"; + + public static final String VCLOUD_CLIENT_REQUEST_ID_HEADER = "X-VMWARE-VCLOUD-CLIENT-REQUEST-ID"; + + public static final String VCLOUD_REQUEST_ID_HEADER = "X-VMWARE-VCLOUD-REQUEST-ID"; + + public static final String VCLOUD_TASK_ID_HEADER = "X-VMWARE-VCLOUD-TASK-ID"; + + public static final String VCLOUD_TASK_HREF_HEADER = "X-VMWARE-VCLOUD-TASK-HREF"; + + public static final String MULTISITE_QUERY_HEADER = "X-VMWARE-VCLOUD-MULTISITE-QUERY"; + + public static final String RESOLVED_OBJECT_TYPE_HEADER = "X-VMWARE-VCLOUD-OBJECT-TYPE"; + + public static final String VCLOUD_COOKIE_NAME = "vcloud-token"; + + public static final String SESSION_COOKIE_NAME = "vcloud_session_id"; + + public static final String JWT_COOKIE_NAME = "vcloud_jwt"; + + public static final String VCLOUD_AUTH_CONTEXT_HEADER = "X-VMWARE-VCLOUD-AUTH-CONTEXT"; + + public static final String VCLOUD_ACCESS_TOKEN_HEADER = "X-VMWARE-VCLOUD-ACCESS-TOKEN"; + + public static final String VCLOUD_TOKEN_TYPE_HEADER = "X-VMWARE-VCLOUD-TOKEN-TYPE"; + + public static final String VCLOUD_TASK_HEADER = "X-VMWARE-VCLOUD-TASK-LOCATION"; + + public static final String API_VERSION_5_7 = "5.7"; + + public static final String API_VERSION_ATTR = "version" + "="; + + public static final String MULTISITE_ATTR = "multisite" + "="; + + public static final String MULTISITE_ATTR_GLOBAL = "global"; + + public static final String MULTISITE_ATTR_LOCAL = "local"; + + public static final String MULTISITE_ATTR_SEPARATOR = ":"; + + public static final String OPENAPI_BASE_PATH = "/cloudapi"; + public static final String OPENAPI_DEFAULT_VERSION = "1.0.0"; + + public static final String OPENAPI_ENTITY_CONTEXT = "OPENAPI.ENTITYCONTEXT"; + + public static final String NETWORK_BASE_PATH = "/network"; + + public static final String MESSAGING_PATH = "/messaging"; + + public static final String MQTT_PATH = "/mqtt"; + + // API Defaults + public static final String UNSUPPORTED_ENUM_VALUE = "-"; +} + diff --git a/bindings/java/api-bindings/src/main/java/com/vmware/vcloud/api/rest/constants/VCloudMediaTypes.java b/bindings/java/api-bindings/src/main/java/com/vmware/vcloud/api/rest/constants/VCloudMediaTypes.java new file mode 100644 index 00000000..12885c22 --- /dev/null +++ b/bindings/java/api-bindings/src/main/java/com/vmware/vcloud/api/rest/constants/VCloudMediaTypes.java @@ -0,0 +1,682 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.2 +// See https://javaee.github.io/jaxb-v2/ +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2021.07.06 at 01:07:40 PM UTC +// + + +package com.vmware.vcloud.api.rest.constants; + +/*- + * #%L + * vcd-api-bindings-java :: vCloud Director REST API bindings + * %% + * Copyright (C) 2013 - 2021 VMware + * %% + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * #L% + */ + +import com.vmware.vcloud.api.rest.schema_v1_5.AdminCatalogType; +import com.vmware.vcloud.api.rest.schema_v1_5.AdminFromCloudTunnelType; +import com.vmware.vcloud.api.rest.schema_v1_5.AdminOrgType; +import com.vmware.vcloud.api.rest.schema_v1_5.AdminToCloudTunnelType; +import com.vmware.vcloud.api.rest.schema_v1_5.AdminVdcStorageProfileType; +import com.vmware.vcloud.api.rest.schema_v1_5.AdminVdcType; +import com.vmware.vcloud.api.rest.schema_v1_5.AffinityRuleType; +import com.vmware.vcloud.api.rest.schema_v1_5.AllocatedIpAddressesType; +import com.vmware.vcloud.api.rest.schema_v1_5.AmqpBrokerConfigurationType; +import com.vmware.vcloud.api.rest.schema_v1_5.AmqpBrokersType; +import com.vmware.vcloud.api.rest.schema_v1_5.AmqpComponentConfigurationType; +import com.vmware.vcloud.api.rest.schema_v1_5.AmqpComponentConfigurationsType; +import com.vmware.vcloud.api.rest.schema_v1_5.AmqpConfigEntryType; +import com.vmware.vcloud.api.rest.schema_v1_5.AmqpConfigListType; +import com.vmware.vcloud.api.rest.schema_v1_5.AmqpConfigurationType; +import com.vmware.vcloud.api.rest.schema_v1_5.ApiDefinitionType; +import com.vmware.vcloud.api.rest.schema_v1_5.ApiExtensibilityType; +import com.vmware.vcloud.api.rest.schema_v1_5.AuditEventType; +import com.vmware.vcloud.api.rest.schema_v1_5.AuthorizedLocationType; +import com.vmware.vcloud.api.rest.schema_v1_5.AuthorizedLocationsType; +import com.vmware.vcloud.api.rest.schema_v1_5.BootOptionsType; +import com.vmware.vcloud.api.rest.schema_v1_5.CaptureVAppParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.CaptureVmParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.CatalogItemType; +import com.vmware.vcloud.api.rest.schema_v1_5.CatalogStorageProfilesType; +import com.vmware.vcloud.api.rest.schema_v1_5.CatalogType; +import com.vmware.vcloud.api.rest.schema_v1_5.CertificateUpdateParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.CertificateUploadSocketType; +import com.vmware.vcloud.api.rest.schema_v1_5.CloneMediaParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.CloneVAppParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.CloneVAppTemplateParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.ComplianceResultType; +import com.vmware.vcloud.api.rest.schema_v1_5.ComposeVAppParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.ComputePolicyComplianceType; +import com.vmware.vcloud.api.rest.schema_v1_5.ComputePolicyType; +import com.vmware.vcloud.api.rest.schema_v1_5.ControlAccessParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.CopyOrMoveCatalogItemParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.CreateSnapshotParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.CreateVdcParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.CreateVmParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.CurrentUsageSpecType; +import com.vmware.vcloud.api.rest.schema_v1_5.CurrentUsageType; +import com.vmware.vcloud.api.rest.schema_v1_5.CustomizationSectionType; +import com.vmware.vcloud.api.rest.schema_v1_5.DeployVAppParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.DiskAttachOrDetachParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.DiskCreateParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.DiskMoveParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.DiskType; +import com.vmware.vcloud.api.rest.schema_v1_5.EdgeGatewayFormFactorType; +import com.vmware.vcloud.api.rest.schema_v1_5.EntityReferenceType; +import com.vmware.vcloud.api.rest.schema_v1_5.EntityType; +import com.vmware.vcloud.api.rest.schema_v1_5.ErrorType; +import com.vmware.vcloud.api.rest.schema_v1_5.EventType; +import com.vmware.vcloud.api.rest.schema_v1_5.ExternalCatalogSubscriptionParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.ExternalNatIpMapType; +import com.vmware.vcloud.api.rest.schema_v1_5.FileDescriptorType; +import com.vmware.vcloud.api.rest.schema_v1_5.FileUploadParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.FileUploadSocketType; +import com.vmware.vcloud.api.rest.schema_v1_5.FromCloudTunnelCreateParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.FromCloudTunnelListenerCreateParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.FromCloudTunnelListenerListType; +import com.vmware.vcloud.api.rest.schema_v1_5.FromCloudTunnelListenerType; +import com.vmware.vcloud.api.rest.schema_v1_5.FromCloudTunnelType; +import com.vmware.vcloud.api.rest.schema_v1_5.GatewayFeaturesType; +import com.vmware.vcloud.api.rest.schema_v1_5.GatewayType; +import com.vmware.vcloud.api.rest.schema_v1_5.GroupType; +import com.vmware.vcloud.api.rest.schema_v1_5.GuestCustomizationSectionType; +import com.vmware.vcloud.api.rest.schema_v1_5.GuestCustomizationStatusSectionType; +import com.vmware.vcloud.api.rest.schema_v1_5.HistoricUsageSpecType; +import com.vmware.vcloud.api.rest.schema_v1_5.HistoricUsageType; +import com.vmware.vcloud.api.rest.schema_v1_5.HybridOrgType; +import com.vmware.vcloud.api.rest.schema_v1_5.HybridSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.HybridTicketType; +import com.vmware.vcloud.api.rest.schema_v1_5.IdpGroupsType; +import com.vmware.vcloud.api.rest.schema_v1_5.IdpRecommendedRolesType; +import com.vmware.vcloud.api.rest.schema_v1_5.InstantiateOvfParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.InstantiateOvfPropertyType; +import com.vmware.vcloud.api.rest.schema_v1_5.InstantiateVAppTemplateParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.InstantiateVdcTemplateParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.InstantiateVmHardwareCustomizationParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.InstantiateVmParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.InstantiateVmTemplateParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.KeystoreUpdateParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.KeystoreUploadSocketType; +import com.vmware.vcloud.api.rest.schema_v1_5.LeaseSettingsSectionType; +import com.vmware.vcloud.api.rest.schema_v1_5.MediaInsertOrEjectParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.MediaType; +import com.vmware.vcloud.api.rest.schema_v1_5.MetadataType; +import com.vmware.vcloud.api.rest.schema_v1_5.MetadataValueType; +import com.vmware.vcloud.api.rest.schema_v1_5.MksTicketType; +import com.vmware.vcloud.api.rest.schema_v1_5.MoveVAppParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.MultisiteSessionUserInfoType; +import com.vmware.vcloud.api.rest.schema_v1_5.NetworkConfigSectionType; +import com.vmware.vcloud.api.rest.schema_v1_5.NetworkConnectionSectionType; +import com.vmware.vcloud.api.rest.schema_v1_5.NetworkMappingType; +import com.vmware.vcloud.api.rest.schema_v1_5.NetworkPoolType; +import com.vmware.vcloud.api.rest.schema_v1_5.NetworkType; +import com.vmware.vcloud.api.rest.schema_v1_5.NicIpMapType; +import com.vmware.vcloud.api.rest.schema_v1_5.OAuthKeyConfigurationType; +import com.vmware.vcloud.api.rest.schema_v1_5.OAuthKeyConfigurationsListType; +import com.vmware.vcloud.api.rest.schema_v1_5.OIDCAttributeMappingType; +import com.vmware.vcloud.api.rest.schema_v1_5.OpenIdProviderConfigurationType; +import com.vmware.vcloud.api.rest.schema_v1_5.OpenIdProviderInfoType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrgAssociationType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrgAssociationsType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrgEmailSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrgFederationSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrgGeneralSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrgGuestPersonalizationSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrgLdapSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrgLeaseSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrgListType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrgNetworkType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrgOAuthSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrgOperationLimitsSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrgPasswordPolicySettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrgSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrgType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrgVAppTemplateLeaseSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrgVdcNetworkType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrgVdcRollupType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrganizationRightsType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrganizationRolesType; +import com.vmware.vcloud.api.rest.schema_v1_5.OrgsType; +import com.vmware.vcloud.api.rest.schema_v1_5.OvfToVdcNetworkMapType; +import com.vmware.vcloud.api.rest.schema_v1_5.OwnerType; +import com.vmware.vcloud.api.rest.schema_v1_5.PhasesType; +import com.vmware.vcloud.api.rest.schema_v1_5.ProductSectionListType; +import com.vmware.vcloud.api.rest.schema_v1_5.ProviderVdcStorageProfileType; +import com.vmware.vcloud.api.rest.schema_v1_5.ProviderVdcType; +import com.vmware.vcloud.api.rest.schema_v1_5.PublishCatalogParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.PublishExternalCatalogParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.PvdcComputePoliciesType; +import com.vmware.vcloud.api.rest.schema_v1_5.PvdcComputePolicyType; +import com.vmware.vcloud.api.rest.schema_v1_5.RasdItemsListType; +import com.vmware.vcloud.api.rest.schema_v1_5.RecomposeVAppParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.ReferencesType; +import com.vmware.vcloud.api.rest.schema_v1_5.RegisterVAppParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.RelocateParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.RemoteUriProbeResultType; +import com.vmware.vcloud.api.rest.schema_v1_5.RightType; +import com.vmware.vcloud.api.rest.schema_v1_5.RoleType; +import com.vmware.vcloud.api.rest.schema_v1_5.RuntimeInfoSectionType; +import com.vmware.vcloud.api.rest.schema_v1_5.SamlAttributeMappingType; +import com.vmware.vcloud.api.rest.schema_v1_5.SamlSPKeyAndCertificateChainType; +import com.vmware.vcloud.api.rest.schema_v1_5.SchemaLinksType; +import com.vmware.vcloud.api.rest.schema_v1_5.ScreenTicketType; +import com.vmware.vcloud.api.rest.schema_v1_5.SelectorExtensionType; +import com.vmware.vcloud.api.rest.schema_v1_5.SelectorExtensionsType; +import com.vmware.vcloud.api.rest.schema_v1_5.ServiceType; +import com.vmware.vcloud.api.rest.schema_v1_5.SessionType; +import com.vmware.vcloud.api.rest.schema_v1_5.SiteAssociationType; +import com.vmware.vcloud.api.rest.schema_v1_5.SiteAssociationsType; +import com.vmware.vcloud.api.rest.schema_v1_5.SiteStatusType; +import com.vmware.vcloud.api.rest.schema_v1_5.SiteType; +import com.vmware.vcloud.api.rest.schema_v1_5.SnapshotSectionType; +import com.vmware.vcloud.api.rest.schema_v1_5.SnapshotType; +import com.vmware.vcloud.api.rest.schema_v1_5.SspiKeytabUpdateParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.SspiKeytabUploadSocketType; +import com.vmware.vcloud.api.rest.schema_v1_5.SubAllocationsType; +import com.vmware.vcloud.api.rest.schema_v1_5.SupportedOperatingSystemsInfoType; +import com.vmware.vcloud.api.rest.schema_v1_5.SyslogServerType; +import com.vmware.vcloud.api.rest.schema_v1_5.TaskOperationListType; +import com.vmware.vcloud.api.rest.schema_v1_5.TaskOperationType; +import com.vmware.vcloud.api.rest.schema_v1_5.TaskPrototypeType; +import com.vmware.vcloud.api.rest.schema_v1_5.TaskType; +import com.vmware.vcloud.api.rest.schema_v1_5.TasksListType; +import com.vmware.vcloud.api.rest.schema_v1_5.ToCloudTunnelCreateParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.ToCloudTunnelType; +import com.vmware.vcloud.api.rest.schema_v1_5.TrustStoreUpdateParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.TrustStoreUploadSocketType; +import com.vmware.vcloud.api.rest.schema_v1_5.TunnelingApplicationListType; +import com.vmware.vcloud.api.rest.schema_v1_5.TunnelingApplicationRegisterParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.TunnelingApplicationType; +import com.vmware.vcloud.api.rest.schema_v1_5.UndeployVAppParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.UpdateVdcStorageProfilesType; +import com.vmware.vcloud.api.rest.schema_v1_5.UploadVAppTemplateParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.UserType; +import com.vmware.vcloud.api.rest.schema_v1_5.VAppNetworkType; +import com.vmware.vcloud.api.rest.schema_v1_5.VAppTemplateType; +import com.vmware.vcloud.api.rest.schema_v1_5.VAppType; +import com.vmware.vcloud.api.rest.schema_v1_5.VCloudType; +import com.vmware.vcloud.api.rest.schema_v1_5.VdcComputePolicyReferencesType; +import com.vmware.vcloud.api.rest.schema_v1_5.VdcReferencesType; +import com.vmware.vcloud.api.rest.schema_v1_5.VdcStorageProfileParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.VdcStorageProfileType; +import com.vmware.vcloud.api.rest.schema_v1_5.VdcTemplateListType; +import com.vmware.vcloud.api.rest.schema_v1_5.VdcTemplateType; +import com.vmware.vcloud.api.rest.schema_v1_5.VdcTemplatesType; +import com.vmware.vcloud.api.rest.schema_v1_5.VdcType; +import com.vmware.vcloud.api.rest.schema_v1_5.VendorServicesType; +import com.vmware.vcloud.api.rest.schema_v1_5.VirtualHardwareVersionType; +import com.vmware.vcloud.api.rest.schema_v1_5.VmAffinityRuleType; +import com.vmware.vcloud.api.rest.schema_v1_5.VmAffinityRulesType; +import com.vmware.vcloud.api.rest.schema_v1_5.VmCapabilitiesType; +import com.vmware.vcloud.api.rest.schema_v1_5.VmCheckPGCType; +import com.vmware.vcloud.api.rest.schema_v1_5.VmPendingQuestionType; +import com.vmware.vcloud.api.rest.schema_v1_5.VmQuestionAnswerType; +import com.vmware.vcloud.api.rest.schema_v1_5.VmSpecSectionType; +import com.vmware.vcloud.api.rest.schema_v1_5.VmType; +import com.vmware.vcloud.api.rest.schema_v1_5.VmsType; +import com.vmware.vcloud.api.rest.schema_v1_5.VsToVmxMapType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.AclAccessType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.AclRuleType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.AdminApiDefinitionType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.AdminApiDefinitionsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.AdminFileDescriptorType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.AdminServiceLinkType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.AdminServiceType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.AmqpSettingsTestType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.AmqpSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.ApiFilterType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.ApiFiltersType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.AuthorizationCheckParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.AuthorizationCheckResponseType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.BlockingTaskOperationParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.BlockingTaskSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.BlockingTaskType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.BlockingTaskUpdateProgressParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.BrandingSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.BundleUploadParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.BundleUploadSocketType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.CatalogSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.ComponentManagerSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.CpomSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.DatastoreType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.DatastoresType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.DiskDatastoreType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.EmailSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.EntityReferencesType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.ExtensionServicesType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.FencePoolType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.GeneralSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.GenevePoolType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.HostType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.ImportMediaParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.ImportVmAsVAppParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.ImportVmAsVAppTemplateParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.ImportVmIntoExistingVAppParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.ImportVmParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.KerberosSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.LdapSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.LicenseType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.LicensingReportListType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.LicensingReportType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.LookupServiceParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.LookupServiceSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.MigrateParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.NotificationsSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.NsxTManagerType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.NsxTManagersType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.ObjectExtensionType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.ObjectExtensionsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.OperationLimitsSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.OrganizationResourcePoolSetType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.PortGroupPoolType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.PrepareHostParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.ProviderVdcMergeParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.RegisterVimServerParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.ResourceClassActionType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.ResourceClassType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.ResourcePoolListType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.RightRefsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.ServiceResourceType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.ShieldManagerType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.StrandedItemType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.StrandedItemVimObjectType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.StrandedItemVimObjectsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.SystemPasswordPolicySettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.SystemSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.TenantMigrationParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.UberAdminSettingsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.UpdateProviderVdcStorageProfilesParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.UpdateResourcePoolSetParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.UpdateRightsParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.UserEntityRightsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWDiscoveredResourcePoolType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWDiscoveredResourcePoolsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWExtensionType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWExternalNetworkReferencesType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWExternalNetworkType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWHostGroupType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWHostGroupsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWHostReferencesType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWNamedVmGroupType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWNetworkPoolReferencesType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWNetworkPoolType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWProviderVdcParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWProviderVdcReferencesType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWProviderVdcResourcePoolSetType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWProviderVdcResourcePoolType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWProviderVdcStorageProfileType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWProviderVdcType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWStorageProfilesType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWVdcTemplateListType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWVdcTemplateType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWVdcTemplatesType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWVimServerReferencesType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWVmGroupReferencesType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWVmGroupType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWVmGroupsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWVmHostAffinityRuleType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VMWVmHostAffinityRulesType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VSphereWebClientUrlType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VcTrustStoreUpdateParamsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VcTrustStoreUploadSocketType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VdsContextType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VimObjectRefsType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VimServerType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VlanPoolType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VmObjectRefType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VmObjectRefsListType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VmVimInfoType; +import com.vmware.vcloud.api.rest.schema_v1_5.extension.VxlanPoolType; + +public class VCloudMediaTypes + extends VCloudMediaTypesBase +{ + + + static { + mapContentTypeToClass(ProviderVdcStorageProfileType.CONTENT_TYPE, ProviderVdcStorageProfileType.class); + mapContentTypeToClass(VAppNetworkType.CONTENT_TYPE, VAppNetworkType.class); + mapContentTypeToClass(ObjectExtensionType.CONTENT_TYPE, ObjectExtensionType.class); + mapContentTypeToClass(StrandedItemType.CONTENT_TYPE, StrandedItemType.class); + mapContentTypeToClass(SelectorExtensionType.CONTENT_TYPE, SelectorExtensionType.class); + mapContentTypeToClass(ComposeVAppParamsType.CONTENT_TYPE, ComposeVAppParamsType.class); + mapContentTypeToClass(OrgOAuthSettingsType.CONTENT_TYPE, OrgOAuthSettingsType.class); + mapContentTypeToClass(LicensingReportType.CONTENT_TYPE, LicensingReportType.class); + mapContentTypeToClass(VMWProviderVdcResourcePoolSetType.CONTENT_TYPE, VMWProviderVdcResourcePoolSetType.class); + mapContentTypeToClass(SessionType.CONTENT_TYPE, SessionType.class); + mapContentTypeToClass(NetworkConfigSectionType.CONTENT_TYPE, NetworkConfigSectionType.class); + mapContentTypeToClass(SnapshotType.CONTENT_TYPE, SnapshotType.class); + mapContentTypeToClass(OrgListType.CONTENT_TYPE, OrgListType.class); + mapContentTypeToClass(SiteType.CONTENT_TYPE, SiteType.class); + mapContentTypeToClass(AdminToCloudTunnelType.CONTENT_TYPE, AdminToCloudTunnelType.class); + mapContentTypeToClass(KeystoreUploadSocketType.CONTENT_TYPE, KeystoreUploadSocketType.class); + mapContentTypeToClass(AuthorizedLocationType.CONTENT_TYPE, AuthorizedLocationType.class); + mapContentTypeToClass(BrandingSettingsType.CONTENT_TYPE, BrandingSettingsType.class); + mapContentTypeToClass(SiteAssociationType.CONTENT_TYPE, SiteAssociationType.class); + mapContentTypeToClass(VMWProviderVdcStorageProfileType.CONTENT_TYPE, VMWProviderVdcStorageProfileType.class); + mapContentTypeToClass(AuthorizedLocationsType.CONTENT_TYPE, AuthorizedLocationsType.class); + mapContentTypeToClass(VdcStorageProfileType.CONTENT_TYPE, VdcStorageProfileType.class); + mapContentTypeToClass(VAppTemplateType.CONTENT_TYPE, VAppTemplateType.class); + mapContentTypeToClass(AclRuleType.CONTENT_TYPE, AclRuleType.class); + mapContentTypeToClass(AdminFromCloudTunnelType.CONTENT_TYPE, AdminFromCloudTunnelType.class); + mapContentTypeToClass(FromCloudTunnelListenerCreateParamsType.CONTENT_TYPE, FromCloudTunnelListenerCreateParamsType.class); + mapContentTypeToClass(FileDescriptorType.CONTENT_TYPE, FileDescriptorType.class); + mapContentTypeToClass(DiskMoveParamsType.CONTENT_TYPE, DiskMoveParamsType.class); + mapContentTypeToClass(OperationLimitsSettingsType.CONTENT_TYPE, OperationLimitsSettingsType.class); + mapContentTypeToClass(OrgLeaseSettingsType.CONTENT_TYPE, OrgLeaseSettingsType.class); + mapContentTypeToClass(HybridTicketType.CONTENT_TYPE, HybridTicketType.class); + mapContentTypeToClass(CurrentUsageSpecType.CONTENT_TYPE, CurrentUsageSpecType.class); + mapContentTypeToClass(VSphereWebClientUrlType.CONTENT_TYPE, VSphereWebClientUrlType.class); + mapContentTypeToClass(RightRefsType.CONTENT_TYPE, RightRefsType.class); + mapContentTypeToClass(VdcComputePolicyReferencesType.CONTENT_TYPE, VdcComputePolicyReferencesType.class); + mapContentTypeToClass(OrgGeneralSettingsType.CONTENT_TYPE, OrgGeneralSettingsType.class); + mapContentTypeToClass(AmqpConfigListType.CONTENT_TYPE, AmqpConfigListType.class); + mapContentTypeToClass(VmPendingQuestionType.CONTENT_TYPE, VmPendingQuestionType.class); + mapContentTypeToClass(VdcReferencesType.CONTENT_TYPE, VdcReferencesType.class); + mapContentTypeToClass(CatalogSettingsType.CONTENT_TYPE, CatalogSettingsType.class); + mapContentTypeToClass(TaskPrototypeType.CONTENT_TYPE, TaskPrototypeType.class); + mapContentTypeToClass(OrgAssociationsType.CONTENT_TYPE, OrgAssociationsType.class); + mapContentTypeToClass(ToCloudTunnelType.CONTENT_TYPE, ToCloudTunnelType.class); + mapContentTypeToClass(RoleType.CONTENT_TYPE, RoleType.class); + mapContentTypeToClass(VMWNamedVmGroupType.CONTENT_TYPE, VMWNamedVmGroupType.class); + mapContentTypeToClass(TrustStoreUpdateParamsType.CONTENT_TYPE, TrustStoreUpdateParamsType.class); + mapContentTypeToClass(OrgVdcRollupType.CONTENT_TYPE, OrgVdcRollupType.class); + mapContentTypeToClass(GuestCustomizationSectionType.CONTENT_TYPE, GuestCustomizationSectionType.class); + mapContentTypeToClass(StrandedItemVimObjectsType.CONTENT_TYPE, StrandedItemVimObjectsType.class); + mapContentTypeToClass(VmType.CONTENT_TYPE, VmType.class); + mapContentTypeToClass(CertificateUploadSocketType.CONTENT_TYPE, CertificateUploadSocketType.class); + mapContentTypeToClass(NsxTManagerType.CONTENT_TYPE, NsxTManagerType.class); + mapContentTypeToClass(VMWVmGroupsType.CONTENT_TYPE, VMWVmGroupsType.class); + mapContentTypeToClass(SubAllocationsType.CONTENT_TYPE, SubAllocationsType.class); + mapContentTypeToClass(OrgsType.CONTENT_TYPE, OrgsType.class); + mapContentTypeToClass(NetworkMappingType.CONTENT_TYPE, NetworkMappingType.class); + mapContentTypeToClass(ImportVmParamsType.CONTENT_TYPE, ImportVmParamsType.class); + mapContentTypeToClass(VmObjectRefType.CONTENT_TYPE, VmObjectRefType.class); + mapContentTypeToClass(InstantiateOvfParamsType.CONTENT_TYPE, InstantiateOvfParamsType.class); + mapContentTypeToClass(com.vmware.vcloud.api.rest.schema_v1_5.extension.VimObjectRefType.CONTENT_TYPE, com.vmware.vcloud.api.rest.schema_v1_5.extension.VimObjectRefType.class); + mapContentTypeToClass(NetworkConnectionSectionType.CONTENT_TYPE, NetworkConnectionSectionType.class); + mapContentTypeToClass(OwnerType.CONTENT_TYPE, OwnerType.class); + mapContentTypeToClass(AdminVdcStorageProfileType.CONTENT_TYPE, AdminVdcStorageProfileType.class); + mapContentTypeToClass(OvfToVdcNetworkMapType.CONTENT_TYPE, OvfToVdcNetworkMapType.class); + mapContentTypeToClass(OrgVAppTemplateLeaseSettingsType.CONTENT_TYPE, OrgVAppTemplateLeaseSettingsType.class); + mapContentTypeToClass(GeneralSettingsType.CONTENT_TYPE, GeneralSettingsType.class); + mapContentTypeToClass(DiskType.CONTENT_TYPE, DiskType.class); + mapContentTypeToClass(SelectorExtensionsType.CONTENT_TYPE, SelectorExtensionsType.class); + mapContentTypeToClass(RasdItemsListType.CONTENT_TYPE, RasdItemsListType.class); + mapContentTypeToClass(FromCloudTunnelListenerType.CONTENT_TYPE, FromCloudTunnelListenerType.class); + mapContentTypeToClass(ErrorType.CONTENT_TYPE, ErrorType.class); + mapContentTypeToClass(VMWDiscoveredResourcePoolType.CONTENT_TYPE, VMWDiscoveredResourcePoolType.class); + mapContentTypeToClass(UpdateVdcStorageProfilesType.CONTENT_TYPE, UpdateVdcStorageProfilesType.class); + mapContentTypeToClass(AllocatedIpAddressesType.CONTENT_TYPE, AllocatedIpAddressesType.class); + mapContentTypeToClass(ObjectExtensionsType.CONTENT_TYPE, ObjectExtensionsType.class); + mapContentTypeToClass(LdapSettingsType.CONTENT_TYPE, LdapSettingsType.class); + mapContentTypeToClass(SystemPasswordPolicySettingsType.CONTENT_TYPE, SystemPasswordPolicySettingsType.class); + mapContentTypeToClass(ApiExtensibilityType.CONTENT_TYPE, ApiExtensibilityType.class); + mapContentTypeToClass(OrgLdapSettingsType.CONTENT_TYPE, OrgLdapSettingsType.class); + mapContentTypeToClass(AdminCatalogType.CONTENT_TYPE, AdminCatalogType.class); + mapContentTypeToClass(UpdateProviderVdcStorageProfilesParamsType.CONTENT_TYPE, UpdateProviderVdcStorageProfilesParamsType.class); + mapContentTypeToClass(CloneVAppTemplateParamsType.CONTENT_TYPE, CloneVAppTemplateParamsType.class); + mapContentTypeToClass(OrgNetworkType.CONTENT_TYPE, OrgNetworkType.class); + mapContentTypeToClass(SyslogServerType.CONTENT_TYPE, SyslogServerType.class); + mapContentTypeToClass(PortGroupPoolType.CONTENT_TYPE, PortGroupPoolType.class); + mapContentTypeToClass(FromCloudTunnelListenerListType.CONTENT_TYPE, FromCloudTunnelListenerListType.class); + mapContentTypeToClass(EntityType.CONTENT_TYPE, EntityType.class); + mapContentTypeToClass(SchemaLinksType.CONTENT_TYPE, SchemaLinksType.class); + mapContentTypeToClass(AuditEventType.CONTENT_TYPE, AuditEventType.class); + mapContentTypeToClass(OAuthKeyConfigurationsListType.CONTENT_TYPE, OAuthKeyConfigurationsListType.class); + mapContentTypeToClass(GenevePoolType.CONTENT_TYPE, GenevePoolType.class); + mapContentTypeToClass(MetadataType.CONTENT_TYPE, MetadataType.class); + mapContentTypeToClass(VMWVmGroupReferencesType.CONTENT_TYPE, VMWVmGroupReferencesType.class); + mapContentTypeToClass(CaptureVAppParamsType.CONTENT_TYPE, CaptureVAppParamsType.class); + mapContentTypeToClass(TunnelingApplicationType.CONTENT_TYPE, TunnelingApplicationType.class); + mapContentTypeToClass(ImportVmAsVAppTemplateParamsType.CONTENT_TYPE, ImportVmAsVAppTemplateParamsType.class); + mapContentTypeToClass(VmSpecSectionType.CONTENT_TYPE, VmSpecSectionType.class); + mapContentTypeToClass(RuntimeInfoSectionType.CONTENT_TYPE, RuntimeInfoSectionType.class); + mapContentTypeToClass(AmqpSettingsTestType.CONTENT_TYPE, AmqpSettingsTestType.class); + mapContentTypeToClass(HybridSettingsType.CONTENT_TYPE, HybridSettingsType.class); + mapContentTypeToClass(RecomposeVAppParamsType.CONTENT_TYPE, RecomposeVAppParamsType.class); + mapContentTypeToClass(UserEntityRightsType.CONTENT_TYPE, UserEntityRightsType.class); + mapContentTypeToClass(ComplianceResultType.CONTENT_TYPE, ComplianceResultType.class); + mapContentTypeToClass(LicensingReportListType.CONTENT_TYPE, LicensingReportListType.class); + mapContentTypeToClass(ServiceResourceType.CONTENT_TYPE, ServiceResourceType.class); + mapContentTypeToClass(VendorServicesType.CONTENT_TYPE, VendorServicesType.class); + mapContentTypeToClass(VMWVdcTemplatesType.CONTENT_TYPE, VMWVdcTemplatesType.class); + mapContentTypeToClass(ProductSectionListType.CONTENT_TYPE, ProductSectionListType.class); + mapContentTypeToClass(HistoricUsageType.CONTENT_TYPE, HistoricUsageType.class); + mapContentTypeToClass(DiskAttachOrDetachParamsType.CONTENT_TYPE, DiskAttachOrDetachParamsType.class); + mapContentTypeToClass(DatastoresType.CONTENT_TYPE, DatastoresType.class); + mapContentTypeToClass(MetadataValueType.CONTENT_TYPE, MetadataValueType.class); + mapContentTypeToClass(SiteAssociationsType.CONTENT_TYPE, SiteAssociationsType.class); + mapContentTypeToClass(GatewayType.CONTENT_TYPE, GatewayType.class); + mapContentTypeToClass(StrandedItemVimObjectType.CONTENT_TYPE, StrandedItemVimObjectType.class); + mapContentTypeToClass(UploadVAppTemplateParamsType.CONTENT_TYPE, UploadVAppTemplateParamsType.class); + mapContentTypeToClass(KerberosSettingsType.CONTENT_TYPE, KerberosSettingsType.class); + mapContentTypeToClass(BlockingTaskUpdateProgressParamsType.CONTENT_TYPE, BlockingTaskUpdateProgressParamsType.class); + mapContentTypeToClass(VMWExtensionType.CONTENT_TYPE, VMWExtensionType.class); + mapContentTypeToClass(KeystoreUpdateParamsType.CONTENT_TYPE, KeystoreUpdateParamsType.class); + mapContentTypeToClass(VMWStorageProfilesType.CONTENT_TYPE, VMWStorageProfilesType.class); + mapContentTypeToClass(ExternalCatalogSubscriptionParamsType.CONTENT_TYPE, ExternalCatalogSubscriptionParamsType.class); + mapContentTypeToClass(AmqpSettingsType.CONTENT_TYPE, AmqpSettingsType.class); + mapContentTypeToClass(CloneVAppParamsType.CONTENT_TYPE, CloneVAppParamsType.class); + mapContentTypeToClass(OrgSettingsType.CONTENT_TYPE, OrgSettingsType.class); + mapContentTypeToClass(VmQuestionAnswerType.CONTENT_TYPE, VmQuestionAnswerType.class); + mapContentTypeToClass(DiskCreateParamsType.CONTENT_TYPE, DiskCreateParamsType.class); + mapContentTypeToClass(OrgPasswordPolicySettingsType.CONTENT_TYPE, OrgPasswordPolicySettingsType.class); + mapContentTypeToClass(ComponentManagerSettingsType.CONTENT_TYPE, ComponentManagerSettingsType.class); + mapContentTypeToClass(VMWHostReferencesType.CONTENT_TYPE, VMWHostReferencesType.class); + mapContentTypeToClass(UpdateResourcePoolSetParamsType.CONTENT_TYPE, UpdateResourcePoolSetParamsType.class); + mapContentTypeToClass(VMWExternalNetworkType.CONTENT_TYPE, VMWExternalNetworkType.class); + mapContentTypeToClass(AuthorizationCheckResponseType.CONTENT_TYPE, AuthorizationCheckResponseType.class); + mapContentTypeToClass(SiteStatusType.CONTENT_TYPE, SiteStatusType.class); + mapContentTypeToClass(ExternalNatIpMapType.CONTENT_TYPE, ExternalNatIpMapType.class); + mapContentTypeToClass(OrgType.CONTENT_TYPE, OrgType.class); + mapContentTypeToClass(LookupServiceParamsType.CONTENT_TYPE, LookupServiceParamsType.class); + mapContentTypeToClass(ResourcePoolListType.CONTENT_TYPE, ResourcePoolListType.class); + mapContentTypeToClass(GroupType.CONTENT_TYPE, GroupType.class); + mapContentTypeToClass(AdminApiDefinitionType.CONTENT_TYPE, AdminApiDefinitionType.class); + mapContentTypeToClass(com.vmware.vcloud.api.rest.schema_v1_5.VimObjectRefType.CONTENT_TYPE, com.vmware.vcloud.api.rest.schema_v1_5.VimObjectRefType.class); + mapContentTypeToClass(VmCheckPGCType.CONTENT_TYPE, VmCheckPGCType.class); + mapContentTypeToClass(AdminOrgType.CONTENT_TYPE, AdminOrgType.class); + mapContentTypeToClass(CatalogItemType.CONTENT_TYPE, CatalogItemType.class); + mapContentTypeToClass(VirtualHardwareVersionType.CONTENT_TYPE, VirtualHardwareVersionType.class); + mapContentTypeToClass(ScreenTicketType.CONTENT_TYPE, ScreenTicketType.class); + mapContentTypeToClass(VAppType.CONTENT_TYPE, VAppType.class); + mapContentTypeToClass(AdminServiceLinkType.CONTENT_TYPE, AdminServiceLinkType.class); + mapContentTypeToClass(RegisterVAppParamsType.CONTENT_TYPE, RegisterVAppParamsType.class); + mapContentTypeToClass(PvdcComputePoliciesType.CONTENT_TYPE, PvdcComputePoliciesType.class); + mapContentTypeToClass(AmqpConfigEntryType.CONTENT_TYPE, AmqpConfigEntryType.class); + mapContentTypeToClass(TaskOperationType.CONTENT_TYPE, TaskOperationType.class); + mapContentTypeToClass(VMWVmHostAffinityRulesType.CONTENT_TYPE, VMWVmHostAffinityRulesType.class); + mapContentTypeToClass(FromCloudTunnelCreateParamsType.CONTENT_TYPE, FromCloudTunnelCreateParamsType.class); + mapContentTypeToClass(OIDCAttributeMappingType.CONTENT_TYPE, OIDCAttributeMappingType.class); + mapContentTypeToClass(VMWExternalNetworkReferencesType.CONTENT_TYPE, VMWExternalNetworkReferencesType.class); + mapContentTypeToClass(NicIpMapType.CONTENT_TYPE, NicIpMapType.class); + mapContentTypeToClass(VmObjectRefsListType.CONTENT_TYPE, VmObjectRefsListType.class); + mapContentTypeToClass(CpomSettingsType.CONTENT_TYPE, CpomSettingsType.class); + mapContentTypeToClass(OrgOperationLimitsSettingsType.CONTENT_TYPE, OrgOperationLimitsSettingsType.class); + mapContentTypeToClass(VMWVdcTemplateListType.CONTENT_TYPE, VMWVdcTemplateListType.class); + mapContentTypeToClass(AuthorizationCheckParamsType.CONTENT_TYPE, AuthorizationCheckParamsType.class); + mapContentTypeToClass(VMWNetworkPoolReferencesType.CONTENT_TYPE, VMWNetworkPoolReferencesType.class); + mapContentTypeToClass(VlanPoolType.CONTENT_TYPE, VlanPoolType.class); + mapContentTypeToClass(SspiKeytabUploadSocketType.CONTENT_TYPE, SspiKeytabUploadSocketType.class); + mapContentTypeToClass(UndeployVAppParamsType.CONTENT_TYPE, UndeployVAppParamsType.class); + mapContentTypeToClass(TunnelingApplicationListType.CONTENT_TYPE, TunnelingApplicationListType.class); + mapContentTypeToClass(VMWProviderVdcReferencesType.CONTENT_TYPE, VMWProviderVdcReferencesType.class); + mapContentTypeToClass(AdminApiDefinitionsType.CONTENT_TYPE, AdminApiDefinitionsType.class); + mapContentTypeToClass(UserType.CONTENT_TYPE, UserType.class); + mapContentTypeToClass(FencePoolType.CONTENT_TYPE, FencePoolType.class); + mapContentTypeToClass(VMWHostGroupType.CONTENT_TYPE, VMWHostGroupType.class); + mapContentTypeToClass(CurrentUsageType.CONTENT_TYPE, CurrentUsageType.class); + mapContentTypeToClass(InstantiateOvfPropertyType.CONTENT_TYPE, InstantiateOvfPropertyType.class); + mapContentTypeToClass(VmVimInfoType.CONTENT_TYPE, VmVimInfoType.class); + mapContentTypeToClass(VMWProviderVdcType.CONTENT_TYPE, VMWProviderVdcType.class); + mapContentTypeToClass(OrgAssociationType.CONTENT_TYPE, OrgAssociationType.class); + mapContentTypeToClass(VimObjectRefsType.CONTENT_TYPE, VimObjectRefsType.class); + mapContentTypeToClass(LeaseSettingsSectionType.CONTENT_TYPE, LeaseSettingsSectionType.class); + mapContentTypeToClass(VmAffinityRulesType.CONTENT_TYPE, VmAffinityRulesType.class); + mapContentTypeToClass(GuestCustomizationStatusSectionType.CONTENT_TYPE, GuestCustomizationStatusSectionType.class); + mapContentTypeToClass(BootOptionsType.CONTENT_TYPE, BootOptionsType.class); + mapContentTypeToClass(VxlanPoolType.CONTENT_TYPE, VxlanPoolType.class); + mapContentTypeToClass(ServiceType.CONTENT_TYPE, ServiceType.class); + mapContentTypeToClass(VdcTemplateListType.CONTENT_TYPE, VdcTemplateListType.class); + mapContentTypeToClass(TaskOperationListType.CONTENT_TYPE, TaskOperationListType.class); + mapContentTypeToClass(ExtensionServicesType.CONTENT_TYPE, ExtensionServicesType.class); + mapContentTypeToClass(VMWVmGroupType.CONTENT_TYPE, VMWVmGroupType.class); + mapContentTypeToClass(NotificationsSettingsType.CONTENT_TYPE, NotificationsSettingsType.class); + mapContentTypeToClass(OAuthKeyConfigurationType.CONTENT_TYPE, OAuthKeyConfigurationType.class); + mapContentTypeToClass(SamlAttributeMappingType.CONTENT_TYPE, SamlAttributeMappingType.class); + mapContentTypeToClass(CertificateUpdateParamsType.CONTENT_TYPE, CertificateUpdateParamsType.class); + mapContentTypeToClass(ApiFiltersType.CONTENT_TYPE, ApiFiltersType.class); + mapContentTypeToClass(ResourceClassActionType.CONTENT_TYPE, ResourceClassActionType.class); + mapContentTypeToClass(CreateVdcParamsType.CONTENT_TYPE, CreateVdcParamsType.class); + mapContentTypeToClass(ShieldManagerType.CONTENT_TYPE, ShieldManagerType.class); + mapContentTypeToClass(VMWVdcTemplateType.CONTENT_TYPE, VMWVdcTemplateType.class); + mapContentTypeToClass(MultisiteSessionUserInfoType.CONTENT_TYPE, MultisiteSessionUserInfoType.class); + mapContentTypeToClass(BlockingTaskSettingsType.CONTENT_TYPE, BlockingTaskSettingsType.class); + mapContentTypeToClass(AmqpComponentConfigurationType.CONTENT_TYPE, AmqpComponentConfigurationType.class); + mapContentTypeToClass(VMWVimServerReferencesType.CONTENT_TYPE, VMWVimServerReferencesType.class); + mapContentTypeToClass(OpenIdProviderConfigurationType.CONTENT_TYPE, OpenIdProviderConfigurationType.class); + mapContentTypeToClass(EventType.CONTENT_TYPE, EventType.class); + mapContentTypeToClass(TrustStoreUploadSocketType.CONTENT_TYPE, TrustStoreUploadSocketType.class); + mapContentTypeToClass(AdminServiceType.CONTENT_TYPE, AdminServiceType.class); + mapContentTypeToClass(BlockingTaskOperationParamsType.CONTENT_TYPE, BlockingTaskOperationParamsType.class); + mapContentTypeToClass(RightType.CONTENT_TYPE, RightType.class); + mapContentTypeToClass(LookupServiceSettingsType.CONTENT_TYPE, LookupServiceSettingsType.class); + mapContentTypeToClass(ApiFilterType.CONTENT_TYPE, ApiFilterType.class); + mapContentTypeToClass(BundleUploadParamsType.CONTENT_TYPE, BundleUploadParamsType.class); + mapContentTypeToClass(NetworkPoolType.CONTENT_TYPE, NetworkPoolType.class); + mapContentTypeToClass(PhasesType.CONTENT_TYPE, PhasesType.class); + mapContentTypeToClass(GatewayFeaturesType.CONTENT_TYPE, GatewayFeaturesType.class); + mapContentTypeToClass(OrgGuestPersonalizationSettingsType.CONTENT_TYPE, OrgGuestPersonalizationSettingsType.class); + mapContentTypeToClass(AmqpBrokerConfigurationType.CONTENT_TYPE, AmqpBrokerConfigurationType.class); + mapContentTypeToClass(InstantiateVmTemplateParamsType.CONTENT_TYPE, InstantiateVmTemplateParamsType.class); + mapContentTypeToClass(OpenIdProviderInfoType.CONTENT_TYPE, OpenIdProviderInfoType.class); + mapContentTypeToClass(VmsType.CONTENT_TYPE, VmsType.class); + mapContentTypeToClass(VmAffinityRuleType.CONTENT_TYPE, VmAffinityRuleType.class); + mapContentTypeToClass(TaskType.CONTENT_TYPE, TaskType.class); + mapContentTypeToClass(RemoteUriProbeResultType.CONTENT_TYPE, RemoteUriProbeResultType.class); + mapContentTypeToClass(ResourceClassType.CONTENT_TYPE, ResourceClassType.class); + mapContentTypeToClass(ImportMediaParamsType.CONTENT_TYPE, ImportMediaParamsType.class); + mapContentTypeToClass(VimServerType.CONTENT_TYPE, VimServerType.class); + mapContentTypeToClass(ImportVmIntoExistingVAppParamsType.CONTENT_TYPE, ImportVmIntoExistingVAppParamsType.class); + mapContentTypeToClass(CatalogStorageProfilesType.CONTENT_TYPE, CatalogStorageProfilesType.class); + mapContentTypeToClass(SspiKeytabUpdateParamsType.CONTENT_TYPE, SspiKeytabUpdateParamsType.class); + mapContentTypeToClass(VdcTemplatesType.CONTENT_TYPE, VdcTemplatesType.class); + mapContentTypeToClass(AdminFileDescriptorType.CONTENT_TYPE, AdminFileDescriptorType.class); + mapContentTypeToClass(AdminVdcType.CONTENT_TYPE, AdminVdcType.class); + mapContentTypeToClass(FileUploadParamsType.CONTENT_TYPE, FileUploadParamsType.class); + mapContentTypeToClass(DeployVAppParamsType.CONTENT_TYPE, DeployVAppParamsType.class); + mapContentTypeToClass(SamlSPKeyAndCertificateChainType.CONTENT_TYPE, SamlSPKeyAndCertificateChainType.class); + mapContentTypeToClass(VMWVmHostAffinityRuleType.CONTENT_TYPE, VMWVmHostAffinityRuleType.class); + mapContentTypeToClass(EntityReferenceType.CONTENT_TYPE, EntityReferenceType.class); + mapContentTypeToClass(MksTicketType.CONTENT_TYPE, MksTicketType.class); + mapContentTypeToClass(IdpRecommendedRolesType.CONTENT_TYPE, IdpRecommendedRolesType.class); + mapContentTypeToClass(VdcStorageProfileParamsType.CONTENT_TYPE, VdcStorageProfileParamsType.class); + mapContentTypeToClass(VMWDiscoveredResourcePoolsType.CONTENT_TYPE, VMWDiscoveredResourcePoolsType.class); + mapContentTypeToClass(RegisterVimServerParamsType.CONTENT_TYPE, RegisterVimServerParamsType.class); + mapContentTypeToClass(VMWHostGroupsType.CONTENT_TYPE, VMWHostGroupsType.class); + mapContentTypeToClass(ToCloudTunnelCreateParamsType.CONTENT_TYPE, ToCloudTunnelCreateParamsType.class); + mapContentTypeToClass(InstantiateVmHardwareCustomizationParamsType.CONTENT_TYPE, InstantiateVmHardwareCustomizationParamsType.class); + mapContentTypeToClass(CaptureVmParamsType.CONTENT_TYPE, CaptureVmParamsType.class); + mapContentTypeToClass(PrepareHostParamsType.CONTENT_TYPE, PrepareHostParamsType.class); + mapContentTypeToClass(AmqpBrokersType.CONTENT_TYPE, AmqpBrokersType.class); + mapContentTypeToClass(InstantiateVdcTemplateParamsType.CONTENT_TYPE, InstantiateVdcTemplateParamsType.class); + mapContentTypeToClass(FromCloudTunnelType.CONTENT_TYPE, FromCloudTunnelType.class); + mapContentTypeToClass(FileUploadSocketType.CONTENT_TYPE, FileUploadSocketType.class); + mapContentTypeToClass(CreateSnapshotParamsType.CONTENT_TYPE, CreateSnapshotParamsType.class); + mapContentTypeToClass(ProviderVdcType.CONTENT_TYPE, ProviderVdcType.class); + mapContentTypeToClass(HostType.CONTENT_TYPE, HostType.class); + mapContentTypeToClass(MediaInsertOrEjectParamsType.CONTENT_TYPE, MediaInsertOrEjectParamsType.class); + mapContentTypeToClass(SystemSettingsType.CONTENT_TYPE, SystemSettingsType.class); + mapContentTypeToClass(LicenseType.CONTENT_TYPE, LicenseType.class); + mapContentTypeToClass(CloneMediaParamsType.CONTENT_TYPE, CloneMediaParamsType.class); + mapContentTypeToClass(OrgFederationSettingsType.CONTENT_TYPE, OrgFederationSettingsType.class); + mapContentTypeToClass(HistoricUsageSpecType.CONTENT_TYPE, HistoricUsageSpecType.class); + mapContentTypeToClass(BlockingTaskType.CONTENT_TYPE, BlockingTaskType.class); + mapContentTypeToClass(CreateVmParamsType.CONTENT_TYPE, CreateVmParamsType.class); + mapContentTypeToClass(MoveVAppParamsType.CONTENT_TYPE, MoveVAppParamsType.class); + mapContentTypeToClass(DatastoreType.CONTENT_TYPE, DatastoreType.class); + mapContentTypeToClass(ImportVmAsVAppParamsType.CONTENT_TYPE, ImportVmAsVAppParamsType.class); + mapContentTypeToClass(InstantiateVmParamsType.CONTENT_TYPE, InstantiateVmParamsType.class); + mapContentTypeToClass(VMWProviderVdcResourcePoolType.CONTENT_TYPE, VMWProviderVdcResourcePoolType.class); + mapContentTypeToClass(VmCapabilitiesType.CONTENT_TYPE, VmCapabilitiesType.class); + mapContentTypeToClass(AmqpConfigurationType.CONTENT_TYPE, AmqpConfigurationType.class); + mapContentTypeToClass(TenantMigrationParamsType.CONTENT_TYPE, TenantMigrationParamsType.class); + mapContentTypeToClass(ComputePolicyType.CONTENT_TYPE, ComputePolicyType.class); + mapContentTypeToClass(NsxTManagersType.CONTENT_TYPE, NsxTManagersType.class); + mapContentTypeToClass(VsToVmxMapType.CONTENT_TYPE, VsToVmxMapType.class); + mapContentTypeToClass(VdsContextType.CONTENT_TYPE, VdsContextType.class); + mapContentTypeToClass(EmailSettingsType.CONTENT_TYPE, EmailSettingsType.class); + mapContentTypeToClass(IdpGroupsType.CONTENT_TYPE, IdpGroupsType.class); + mapContentTypeToClass(OrganizationResourcePoolSetType.CONTENT_TYPE, OrganizationResourcePoolSetType.class); + mapContentTypeToClass(OrgVdcNetworkType.CONTENT_TYPE, OrgVdcNetworkType.class); + mapContentTypeToClass(VcTrustStoreUpdateParamsType.CONTENT_TYPE, VcTrustStoreUpdateParamsType.class); + mapContentTypeToClass(EntityReferencesType.CONTENT_TYPE, EntityReferencesType.class); + mapContentTypeToClass(AffinityRuleType.CONTENT_TYPE, AffinityRuleType.class); + mapContentTypeToClass(PublishExternalCatalogParamsType.CONTENT_TYPE, PublishExternalCatalogParamsType.class); + mapContentTypeToClass(ComputePolicyComplianceType.CONTENT_TYPE, ComputePolicyComplianceType.class); + mapContentTypeToClass(MigrateParamsType.CONTENT_TYPE, MigrateParamsType.class); + mapContentTypeToClass(CatalogType.CONTENT_TYPE, CatalogType.class); + mapContentTypeToClass(ProviderVdcMergeParamsType.CONTENT_TYPE, ProviderVdcMergeParamsType.class); + mapContentTypeToClass(SnapshotSectionType.CONTENT_TYPE, SnapshotSectionType.class); + mapContentTypeToClass(RelocateParamsType.CONTENT_TYPE, RelocateParamsType.class); + mapContentTypeToClass(CopyOrMoveCatalogItemParamsType.CONTENT_TYPE, CopyOrMoveCatalogItemParamsType.class); + mapContentTypeToClass(ReferencesType.CONTENT_TYPE, ReferencesType.class); + mapContentTypeToClass(UpdateRightsParamsType.CONTENT_TYPE, UpdateRightsParamsType.class); + mapContentTypeToClass(OrganizationRolesType.CONTENT_TYPE, OrganizationRolesType.class); + mapContentTypeToClass(NetworkType.CONTENT_TYPE, NetworkType.class); + mapContentTypeToClass(OrganizationRightsType.CONTENT_TYPE, OrganizationRightsType.class); + mapContentTypeToClass(CustomizationSectionType.CONTENT_TYPE, CustomizationSectionType.class); + mapContentTypeToClass(BundleUploadSocketType.CONTENT_TYPE, BundleUploadSocketType.class); + mapContentTypeToClass(DiskDatastoreType.CONTENT_TYPE, DiskDatastoreType.class); + mapContentTypeToClass(VMWNetworkPoolType.CONTENT_TYPE, VMWNetworkPoolType.class); + mapContentTypeToClass(ApiDefinitionType.CONTENT_TYPE, ApiDefinitionType.class); + mapContentTypeToClass(VCloudType.CONTENT_TYPE, VCloudType.class); + mapContentTypeToClass(TasksListType.CONTENT_TYPE, TasksListType.class); + mapContentTypeToClass(OrgEmailSettingsType.CONTENT_TYPE, OrgEmailSettingsType.class); + mapContentTypeToClass(InstantiateVAppTemplateParamsType.CONTENT_TYPE, InstantiateVAppTemplateParamsType.class); + mapContentTypeToClass(AmqpComponentConfigurationsType.CONTENT_TYPE, AmqpComponentConfigurationsType.class); + mapContentTypeToClass(UberAdminSettingsType.CONTENT_TYPE, UberAdminSettingsType.class); + mapContentTypeToClass(SupportedOperatingSystemsInfoType.CONTENT_TYPE, SupportedOperatingSystemsInfoType.class); + mapContentTypeToClass(PvdcComputePolicyType.CONTENT_TYPE, PvdcComputePolicyType.class); + mapContentTypeToClass(HybridOrgType.CONTENT_TYPE, HybridOrgType.class); + mapContentTypeToClass(PublishCatalogParamsType.CONTENT_TYPE, PublishCatalogParamsType.class); + mapContentTypeToClass(AclAccessType.CONTENT_TYPE, AclAccessType.class); + mapContentTypeToClass(VdcType.CONTENT_TYPE, VdcType.class); + mapContentTypeToClass(VcTrustStoreUploadSocketType.CONTENT_TYPE, VcTrustStoreUploadSocketType.class); + mapContentTypeToClass(EdgeGatewayFormFactorType.CONTENT_TYPE, EdgeGatewayFormFactorType.class); + mapContentTypeToClass(MediaType.CONTENT_TYPE, MediaType.class); + mapContentTypeToClass(TunnelingApplicationRegisterParamsType.CONTENT_TYPE, TunnelingApplicationRegisterParamsType.class); + mapContentTypeToClass(ControlAccessParamsType.CONTENT_TYPE, ControlAccessParamsType.class); + mapContentTypeToClass(VdcTemplateType.CONTENT_TYPE, VdcTemplateType.class); + mapContentTypeToClass(VMWProviderVdcParamsType.CONTENT_TYPE, VMWProviderVdcParamsType.class); + } + + public VCloudMediaTypes() { + } + +} diff --git a/bindings/java/api-bindings/src/main/java/com/vmware/vcloud/api/rest/constants/VCloudMediaTypesBase.java b/bindings/java/api-bindings/src/main/java/com/vmware/vcloud/api/rest/constants/VCloudMediaTypesBase.java new file mode 100644 index 00000000..82d72522 --- /dev/null +++ b/bindings/java/api-bindings/src/main/java/com/vmware/vcloud/api/rest/constants/VCloudMediaTypesBase.java @@ -0,0 +1,225 @@ + +package com.vmware.vcloud.api.rest.constants; + +/*- + * #%L + * vcd-api-bindings-java :: vCloud Director REST API bindings + * %% + * Copyright (C) 2013 - 2021 VMware + * %% + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * #L% + */ + +import java.util.HashMap; +import java.util.Map; +import java.util.Optional; + +import javax.ws.rs.core.MediaType; + +/** + * Maintains mapping of types for xml <-> json {@link MediaType}s and their corresponding Java types + *

+ * This class provides the core functionality for managing all the information. The information + * itself is populated by a compile-time generated class, that extends this class and supplies all + * the information that will be populated. The public methods in this class serve as access to that + * information through the generated class + *

+ * Important implementation notes: The generated class will be in the same package as this class + * allowing access to all package-private or more visible components of this class. This allows us + * to avoid having to generate complex logic via code generation, thus restricting code-generation + * to a simplified implementation of compile time generation of data that get populated into this + * class. + */ +abstract class VCloudMediaTypesBase { + static final Map XML_JSON_MAP = new HashMap<>(); + static final Map JSON_XML_MAP = new HashMap<>(); + static final Map> CONTENT_TYPE_CLASS_MAP = new HashMap<>(); + static final Map, String> CLASS_CONTENT_TYPE_MAP = new HashMap<>(); + + static final String XML_FORMAT_SUFFIX = "+xml"; + static final String JSON_FORMAT_SUFFIX = "+json"; + + + protected static void mapContentTypeToClass(String contentType, Class clazz) { + XML_JSON_MAP.put(contentType + XML_FORMAT_SUFFIX, contentType + JSON_FORMAT_SUFFIX); + JSON_XML_MAP.put(contentType + JSON_FORMAT_SUFFIX, contentType + XML_FORMAT_SUFFIX); + if (CONTENT_TYPE_CLASS_MAP.containsKey(contentType.toLowerCase())) { + System.err.printf("duplicate %s: existing: %s, new: %s\n", contentType, + CONTENT_TYPE_CLASS_MAP.get(contentType.toLowerCase()).toString(), clazz.toString()); + } + CONTENT_TYPE_CLASS_MAP.put(contentType.toLowerCase(), clazz); + CLASS_CONTENT_TYPE_MAP.put(clazz, contentType); + } + + /** + * Looks up the corresponding {@code xml} serialized {@link MediaType} for the specified + * {@code json} serialized one. + *

+ * e.g. {@code application/vnd.vmware.vm+json} would return + * {@code application/vnd.vmware.vm+xml} + * + * @param jsonType + * media type specifying {@code json} serialization + * @return corresponding media type specifying {@code xml} serialization or {@code null} if + * none found + */ + public final String getXmlTypeFor(final String jsonType) { + return JSON_XML_MAP.get(jsonType); + } + + /** + * Looks up the corresponding {@code json} serialized {@link MediaType} for the specified + * {@code xml} serialized one. + *

+ * e.g. {@code application/vnd.vmware.vm+xml} would return + * {@code application/vnd.vmware.vm+json} + * + * @param xmlType + * media type specifying {@code xml} serialization + * @return corresponding media type specifying {@code json} serialization or {@code null} if + * none found + */ + public final String getJsonTypeFor(final String xmlType) { + return XML_JSON_MAP.get(xmlType); + } + + /** + * Returns the {@link Class} object for the generated type identified by the specified + * {@link MediaType} + *

+ * Note: The {@code content-type} specified as argument must match the + * {@code } value specified in xsd files and correspondingly present in + * generated java files as the {@code CONTENT_TYPE} field. The value may, optionally, be + * suffixed with either {@value VCloudMediaTypesBase#XML_FORMAT_SUFFIX} or + * {@value #JSON_FORMAT_SUFFIX}
+ * e.g. following are legal values: + *

    + *
  • {@code application/vnd.vmware.vm}
  • + *
  • {@code application/vnd.vmware.vm+xml}
  • + *
  • {@code application/vnd.vmware.vm+json}
  • + *
+ *

+ * If you have a full media type value with header parameters, use + * {@link #getClassFor(MediaType)} version of this method instead. + *
e.g. following values will result in lookup failures and {@code null} will be returned: + *

    + *
  • {@code application/*+xml} + *
  • {@code application/*+json} + *
  • {@code application/*+xml;version=x.0} + *
  • {@code application/*+json;version=x.0} + *
  • {@code application/vnd.vmware.vm+xml;version=x.0}
  • + *
  • {@code application/vnd.vmware.vm+json;version=x.0}
  • + *
+ * + * @see #getClassFor(MediaType) + * @param contentType + * content-type as described above + * @return {@link Class} for the corresponding generated Java type. + */ + public final Class getClassFor(final String contentType) { + final String baseContentType = contentType.replaceAll("\\+((xml)|(json))$", ""); + return CONTENT_TYPE_CLASS_MAP.get(baseContentType.toLowerCase()); + } + + /** + * Returns the {@link Class} object for the generated type identified by the specified + * {@link MediaType} + *

+ * Media type can be all valid non-wildcard values as used in API calls. Header + * parameters may be present. They {type}/{subtype} portion of the specified + * argument will used for lookup. This value must match the {@code } value + * specified in xsd files and correspondingly present in generated java files as the + * {@code CONTENT_TYPE} field.
+ * e.g. following are legal values when used to construct a {@link MediaType} object: + *

    + *
  • {@code application/vnd.vmware.vm}
  • + *
  • {@code application/vnd.vmware.vm+xml}
  • + *
  • {@code application/vnd.vmware.vm+json}
  • + *
  • {@code application/vnd.vmware.vm+xml;version=x.0}
  • + *
  • {@code application/vnd.vmware.vm+json;version=x.0}
  • + *
+ *

+ * Wild-card values are useless for any lookups. Thus, following values will result in lookup + * failures and {@code null} will be returned: + *

    + *
  • {@code application/*+xml} + *
  • {@code application/*+json} + *
  • {@code application/*+xml;version=x.0} + *
  • {@code application/*+json;version=x.0} + *
+ * + * @see #getClassFor(String) + * @see MediaType#valueOf(String) + * + * @param contentType + * {@link MediaType} representing the content-type whose Java {@link Class} must be + * looked up + * @return {@link Class} for the corresponding generated Java type. + */ + public final Class getClassFor(final MediaType mediaType) { + return getClassFor(String.format("%s/%s", mediaType.getType(), mediaType.getSubtype())); + } + + /** + * Returns media type (type/subtype) as a {@link String} for the specified + * {@link Class} + *

+ * It is assumed that the parameter is one of the generated types from the .xsd schema. + * + * @param clazz + * {@link Class} representing one of the generated types + * @return {@link String} representing the {@code MediaType} for the content-type using + * {@code xml} serialization for the specified {@link Class} must be looked up + * @throws IllegalArgumentException + * if the specified {@link Class} is null or not one of the generated + * types + */ + public final String getXmlMediaTypeFor(final Class clazz) throws IllegalArgumentException { + return getSuffixedMediaTypeFor(clazz, XML_FORMAT_SUFFIX); + } + + /** + * Returns media type (type/subtype) as a {@link String} for the specified + * {@link Class} + *

+ * It is assumed that the parameter is one of the generated types from the .xsd schema. + * + * @param clazz + * {@link Class} representing one of the generated types + * @return {@link String} representing the {@code MediaType} for the content-type using + * {@code json} serialization for the specified {@link Class} must be looked up + * @throws IllegalArgumentException + * if the specified {@link Class} is null or not one of the generated + * types + */ + public final String getJsonMediaTypeFor(final Class clazz) throws IllegalArgumentException { + return getSuffixedMediaTypeFor(clazz, JSON_FORMAT_SUFFIX); + } + + private String getSuffixedMediaTypeFor(final Class clazz, final String suffix) throws IllegalArgumentException { + return Optional.of(clazz).map(CLASS_CONTENT_TYPE_MAP::get).map(s -> s + suffix) + .orElseThrow(() -> new IllegalArgumentException( + String.format("Class: %s is null or not a type generated from vcd .xsd schema", clazz))); + } +} + diff --git a/bindings/java/api-bindings/src/main/java/com/vmware/vcloud/api/rest/constants/XmlJsonTypeMatcher.java b/bindings/java/api-bindings/src/main/java/com/vmware/vcloud/api/rest/constants/XmlJsonTypeMatcher.java new file mode 100644 index 00000000..8a2b0cbc --- /dev/null +++ b/bindings/java/api-bindings/src/main/java/com/vmware/vcloud/api/rest/constants/XmlJsonTypeMatcher.java @@ -0,0 +1,123 @@ + +package com.vmware.vcloud.api.rest.constants; + +/*- + * #%L + * vcd-api-bindings-java :: vCloud Director REST API bindings + * %% + * Copyright (C) 2013 - 2021 VMware + * %% + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * #L% + */ + +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + * Maintains mapping of types for xml <-> json lookups + * + */ +public class XmlJsonTypeMatcher { + + private static final Map XML_JSON_MAP = new HashMap<>(); + private static final Map JSON_XML_MAP = new HashMap<>(); + + private static final int PUBLIC_STATIC_FINAL = Modifier.PUBLIC | Modifier.STATIC | Modifier.FINAL; + + public static final String XML_FORMAT_SUFFIX = "+xml"; + public static final String JSON_FORMAT_SUFFIX = "+json"; + + static { + initializeMaps(); + } + + private static void initializeMaps() { + loadTypes(RestConstants.MediaType.class); + loadTypes(RestAdminConstants.MediaType.class); + loadTypes(ExtensionConstants.MediaType.class); + } + + private static Collection loadTypes(Class clazz) { + final Field[] declaredFields = clazz.getDeclaredFields(); + Arrays.stream(declaredFields) + .map(XmlJsonTypeMatcher::extractFieldValue) + .filter(Objects::nonNull) + .forEach(XmlJsonTypeMatcher::putInMaps); + + return null; + } + + private static final String extractFieldValue(Field field) { + if (!isPublicStaticFinalString(field)) { + return null; + } + + try { + return (String) field.get(null); + } catch (IllegalArgumentException | IllegalAccessException e) { + throw new AssertionError(e); + } + } + + private static final boolean isPublicStaticFinalString(Field field) { + final int modifiers = field.getModifiers(); + return ((PUBLIC_STATIC_FINAL & modifiers) == PUBLIC_STATIC_FINAL) + && String.class.equals(field.getType()); + } + + private static final void putInMaps(String value) { + final String xmlTypeValue; + final String jsonTypeValue; + + if (value.endsWith(XML_FORMAT_SUFFIX)) { + xmlTypeValue = value; + jsonTypeValue = value.replaceFirst("\\" + XML_FORMAT_SUFFIX + "$", JSON_FORMAT_SUFFIX); + + XML_JSON_MAP.put(xmlTypeValue, JSON_XML_MAP.containsKey(jsonTypeValue) ? jsonTypeValue : null); + JSON_XML_MAP.replace(jsonTypeValue, xmlTypeValue); + } else if (value.endsWith(JSON_FORMAT_SUFFIX)) { + jsonTypeValue = value; + xmlTypeValue = value.replaceFirst("\\" + JSON_FORMAT_SUFFIX + "$", XML_FORMAT_SUFFIX); + + JSON_XML_MAP.put(jsonTypeValue, XML_JSON_MAP.containsKey(xmlTypeValue) ? xmlTypeValue : null); + XML_JSON_MAP.replace(xmlTypeValue, jsonTypeValue); + } else { + // types that don't end with xml or json (e.g. image/*), there isn't much to do. + return; + } + } + + public static final String getXmlTypeFor(final String jsonType) { + return JSON_XML_MAP.get(jsonType); + } + + public static final String getJsonTypeFor(final String xmlType) { + return XML_JSON_MAP.get(xmlType); + } +} + diff --git a/bindings/java/api-bindings/src/main/java/com/vmware/vcloud/api/rest/links/LinkRelation.java b/bindings/java/api-bindings/src/main/java/com/vmware/vcloud/api/rest/links/LinkRelation.java new file mode 100644 index 00000000..0c00942a --- /dev/null +++ b/bindings/java/api-bindings/src/main/java/com/vmware/vcloud/api/rest/links/LinkRelation.java @@ -0,0 +1,44 @@ +package com.vmware.vcloud.api.rest.links; + +/*- + * #%L + * vcd-api-bindings-java :: vCloud Director REST API bindings + * %% + * Copyright (C) 2013 - 2021 VMware + * %% + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * #L% + */ + +import com.vmware.vcloud.api.rest.schema_v1_5.LinkType; + +/** + * Represents relation of a link in representational state of a resource to that resource. + */ +public interface LinkRelation { + + /** + * @return the value of {@code rel} attribute of {@link LinkType} element. + */ + String value(); +} + diff --git a/bindings/java/extensibility-bindings/pom.xml b/bindings/java/extensibility-bindings/pom.xml index 77b7ccbb..47487554 100644 --- a/bindings/java/extensibility-bindings/pom.xml +++ b/bindings/java/extensibility-bindings/pom.xml @@ -5,7 +5,7 @@ com.vmware.vcloud vcd-api-schemas-parent - 9.1.1 + 10.3.0 ../../../pom.xml jar diff --git a/bindings/python/api-bindings/pom.xml b/bindings/python/api-bindings/pom.xml new file mode 100644 index 00000000..ce118504 --- /dev/null +++ b/bindings/python/api-bindings/pom.xml @@ -0,0 +1,144 @@ + + + 4.0.0 + com.vmware.vcloud + vcd-api-bindings-python + + com.vmware.vcloud + vcd-api-schemas-parent + 10.3.0 + ../../../pom.xml + + jar + + + com.vmware.vcloud + vcd-api-bindings-java + + + + + + maven-compiler-plugin + + true + + + + maven-source-plugin + + true + + + + maven-javadoc-plugin + + true + + + + maven-dependency-plugin + + + unpack-schemas + generate-sources + + unpack + + + + + com.vmware.vcloud + vcd-openapi-schemas + ${project.version} + jar + ${project.build.directory}/openapi-schemas + META-INF/** + + + + + + + + exec-maven-plugin + org.codehaus.mojo + + + sed-command-execution + generate-sources + + exec + + + + + ${project.basedir}/sed-command-exec.sh + + + + com.vmware.vcloud + vcd-bindings-maven-plugin + + + generate-sources + + generate-python + + + + + Merge + ${project.build.directory}/generated-python-bindings + + com.vmware.vcloud.api.rest.schema.ovf + com.vmware.vcloud.api.rest.schema.ovf.environment + com.vmware.vcloud.api.rest.schema.ovf.vmware + com.vmware.vcloud.api.rest.schema.versioning + com.vmware.vcloud.api.rest.schema_v1_5 + com.vmware.vcloud.api.rest.schema_v1_5.extension + + + + + com.vmware.vcloud + vcd-api-bindings-java + ${project.version} + + + javax.xml.bind + jaxb-api + 2.3.1 + + + + + io.swagger + swagger-codegen-maven-plugin + 2.2.3 + + + generate-sources + + generate + + + + + ${project.build.directory}/generated-python-bindings + ${project.build.directory}/openapi-schemas/schemas/vcloud-openapi-schemas.yaml + python + true + false + false + true + + + original + vcloud/rest/openapi + + + + + + diff --git a/bindings/python/api-bindings/sed-command-exec.sh b/bindings/python/api-bindings/sed-command-exec.sh new file mode 100755 index 00000000..5a88f328 --- /dev/null +++ b/bindings/python/api-bindings/sed-command-exec.sh @@ -0,0 +1,3 @@ +#!/bin/bash +cd "$(dirname "$0")" +sed -i 's/\/1.0.0\/sessions\/{.*}/\/1.0.0\/sessions\/{id}/g' target/openapi-schemas/schemas/vcloud-openapi-schemas.yaml diff --git a/bindings/typescript/api-bindings/package-lock.json b/bindings/typescript/api-bindings/package-lock.json index d417b39f..a9224ef9 100644 --- a/bindings/typescript/api-bindings/package-lock.json +++ b/bindings/typescript/api-bindings/package-lock.json @@ -1,6 +1,6 @@ { "name": "@vcd/bindings", - "version": "9.1.0", + "version": "9.1.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/bindings/typescript/api-bindings/pom.xml b/bindings/typescript/api-bindings/pom.xml index 26cf0404..3fb1c423 100644 --- a/bindings/typescript/api-bindings/pom.xml +++ b/bindings/typescript/api-bindings/pom.xml @@ -6,7 +6,7 @@ com.vmware.vcloud vcd-api-schemas-parent - 9.1.1 + 10.3.0 ../../../pom.xml jar @@ -123,4 +123,4 @@ - \ No newline at end of file + diff --git a/build-resources/AUTHORS b/build-resources/AUTHORS new file mode 100644 index 00000000..66dcd4c5 --- /dev/null +++ b/build-resources/AUTHORS @@ -0,0 +1,5 @@ +Jeff Moroski +Jeff Moroski +Rajesh Kumar +VMware GitHub Bot +dbyard-vmware <35938562+dbyard-vmware@users.noreply.github.com> diff --git a/build-resources/ChangeLog b/build-resources/ChangeLog new file mode 100644 index 00000000..9b8552f9 --- /dev/null +++ b/build-resources/ChangeLog @@ -0,0 +1,35 @@ +CHANGES +======= + +* Added support for python + +v9.1.1 +------ + +* Consume new version of bindings libraries. (#9) + +v9.1.0 +------ + +* Update package.json +* Update .travis.yml +* Update .travis.yml +* Update .travis.yml +* Publish the @vcd/bindings npm package +* Fix npm use in Maven release profile. (#8) +* Update README.md +* Add support for publishing to NPM (#7) +* Fix deploy issues to Sonatype staging repository. (#6) +* Add GPG artifact signing to TravisCI deploy process. (#3) +* Enable proper file header checking in CI builds. (#2) +* Add DCO text +* Add DCO information +* Update README.md +* Enable Travis CI on repository. (#1) +* Update README.md +* Update README.md +* Create LICENSE +* Add vCD 9.1 schemas and bindings +* Adding .gitignore template +* Add CONTRIBUTING template +* Add README template diff --git a/build-resources/LICENSE b/build-resources/LICENSE new file mode 100644 index 00000000..c68868f2 --- /dev/null +++ b/build-resources/LICENSE @@ -0,0 +1,30 @@ +VMware vCloud API Schemas Type + +Copyright (c) 2020 VMware, Inc. All rights reserved. + +The BSD-2 license (the "License") set forth below applies to all parts of the +vCloud Director API Tools project. You may not use this file except in +compliance with the License. + +BSD-2 License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/build-resources/README.md b/build-resources/README.md new file mode 100644 index 00000000..6fd06640 --- /dev/null +++ b/build-resources/README.md @@ -0,0 +1,13 @@ +[![Build Status](https://travis-ci.com/vmware/vcd-api-schemas.svg?branch=master)](https://travis-ci.com/vmware/vcd-api-schemas) + +# vCloud Director API Schemas + +## Overview +This includes the Python schema type (pojo) for the schemas that represent all public interfacing into vCloud Director, including the XSD-based REST API at `/api`, the new OpenAPI endpoints at `/cloudapi`, and the object extensibility schemas for communication with specific phases of vCloud Director operations. + +## Try it out +In general, `vcd_api_schemas_type` can be installed with the command `shell $ pip install vcd_api_schemas_type`. + +## Contributing + +The vcd-api-schemas project team welcomes contributions from the community. Before you start working with vcd-api-schemas, please read our [Developer Certificate of Origin](https://cla.vmware.com/dco). All contributions to this repository must be signed as described on that page. Your signature certifies that you wrote the patch or have the right to pass it on as an open-source patch. For more detailed information, refer to [CONTRIBUTING.md](CONTRIBUTING.md). diff --git a/build-resources/publish.sh b/build-resources/publish.sh new file mode 100755 index 00000000..42d06a94 --- /dev/null +++ b/build-resources/publish.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +python setup.py develop +python setup.py sdist bdist_wheel +twine upload dist \ No newline at end of file diff --git a/build-resources/setup.cfg b/build-resources/setup.cfg new file mode 100644 index 00000000..6f73709f --- /dev/null +++ b/build-resources/setup.cfg @@ -0,0 +1,41 @@ +# VMware vCloud Python API schemas type +# Copyright (c) 2020 VMware, Inc. All Rights Reserved. +# +# Licensed 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. + +[metadata] +name = vcd-api-schemas-type +summary = VMware vCloud Director Python API Schemas Type +description-file = + +author = Rajesh Kumar +author_email = rajeshk@vmware.com +url = https://github.com/vmware/vcd-api-schemas +license = BSD-2 + +classifier = + Environment :: Console + Intended Audience :: System Administrators + Intended Audience :: Developers + Operating System :: POSIX :: Linux + Operating System :: MacOS :: MacOS X + Operating System :: Microsoft :: Windows + Programming Language :: Python + Programming Language :: Python :: 3 + +requires-python = >=3 +version = 9.1.2 +[files] +packages = + vcloud +data_files = diff --git a/build-resources/setup.py b/build-resources/setup.py new file mode 100755 index 00000000..c798750e --- /dev/null +++ b/build-resources/setup.py @@ -0,0 +1,52 @@ +#!/usr/bin/env python + +# VMware vCloud Python API Schemas Type +#Copyright (c) 2020 VMware, Inc. All rights reserved. +# +#The BSD-2 license (the "License") set forth below applies to all parts of the +#vCloud Director API Tools project. You may not use this file except in +#compliance with the License. +# +#BSD-2 License +# +#Redistribution and use in source and binary forms, with or without +#modification, are permitted provided that the following conditions are met: + +# Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. + +# Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. + + +from setuptools import setup, find_packages +import os + +def package_files(path): + curr_dir = os.getcwd() + print('Current Dir..'+curr_dir) + target_dir = curr_dir + '/vcloud' + try: + os.system('rm -rf '+target_dir) + except BaseException as e: + pass + + swagger_dir = swagger_init_path.replace('.','/') + swagger_dirs = swagger_dir.split('/')[1:] + path_temp = path + 'vcloud/' + for dir in swagger_dirs: + path_temp = path_temp + dir +'/' + with open(os.path.join(path_temp, '__init__.py'), 'w'): + pass + os.system('cp '+ path + swagger_init_path + '/models/__init__.py' + path+swagger_dir+'/models') + os.system('cp -r ' + path + 'vcloud/' +' '+curr_dir) + +swagger_init_path = 'vcloud.rest.openapi' +package_files('../bindings/python/api-bindings/target/generated-python-bindings/') + + +setup( + setup_requires=['pbr>=1.9', 'setuptools>=17.1'], + pbr=True, +) \ No newline at end of file diff --git a/pom.xml b/pom.xml index 8e7b8a92..245e29ef 100644 --- a/pom.xml +++ b/pom.xml @@ -1,14 +1,9 @@ - 4.0.0 com.vmware.vcloud vcd-api-schemas-parent - 9.1.1 + 10.3.0 pom ${project.artifactId} :: vCloud Director API Schema parent Parent for projects related to exposing vCloud Director schemas and producing language-specific bindings for those schemas @@ -24,7 +19,8 @@ schemas/extensibility bindings/java/api-bindings bindings/java/extensibility-bindings - bindings/typescript/api-bindings + bindings/python/api-bindings + @@ -50,7 +46,7 @@ UTF-8 1.8 - 0.9.2 + ${project.version} 3.1.11 4.3.13.RELEASE 1.5.13 @@ -126,7 +122,7 @@ com.fasterxml.jackson.core jackson-databind - 2.8.10 + 2.12.3 org.apache.cxf diff --git a/schemas/extensibility/pom.xml b/schemas/extensibility/pom.xml index 5f763734..179d6f07 100644 --- a/schemas/extensibility/pom.xml +++ b/schemas/extensibility/pom.xml @@ -5,7 +5,7 @@ com.vmware.vcloud vcd-api-schemas-parent - 9.1.1 + 10.3.0 ../../pom.xml jar diff --git a/schemas/extensibility/src/main/resources/schemas/external/objectExtensibility/extensibility-core.xsd b/schemas/extensibility/src/main/resources/schemas/external/objectExtensibility/extensibility-core.xsd index 725e6c75..429fecdc 100644 --- a/schemas/extensibility/src/main/resources/schemas/external/objectExtensibility/extensibility-core.xsd +++ b/schemas/extensibility/src/main/resources/schemas/external/objectExtensibility/extensibility-core.xsd @@ -3,7 +3,7 @@ #%L vcd-extensibility-schemas :: Object Extensibility API schemas %% - Copyright (C) 2016 - 2018 VMware + Copyright (C) 2016 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -32,8 +32,8 @@ xmlns="http://www.vmware.com/vcloud/extensibility/v1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - xmlns:json="http://www.vmware.com/vcloud/plugin/json" - jaxb:extensionBindingPrefixes="json" + xmlns:meta="http://www.vmware.com/vcloud/plugin/json" + jaxb:extensionBindingPrefixes="meta" elementFormDefault="qualified" targetNamespace="http://www.vmware.com/vcloud/extensibility/v1.0" version="1.0"> @@ -200,7 +200,7 @@ - + @@ -215,7 +215,7 @@ - + @@ -234,7 +234,7 @@ - + @@ -247,7 +247,7 @@ - + @@ -260,7 +260,7 @@ - + diff --git a/schemas/extensibility/src/main/resources/schemas/external/objectExtensibility/master.xjb b/schemas/extensibility/src/main/resources/schemas/external/objectExtensibility/master.xjb index d572b86b..19257426 100644 --- a/schemas/extensibility/src/main/resources/schemas/external/objectExtensibility/master.xjb +++ b/schemas/extensibility/src/main/resources/schemas/external/objectExtensibility/master.xjb @@ -2,8 +2,9 @@ xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:jxb="http://java.sun.com/xml/ns/jaxb" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" + xmlns:meta="http://www.vmware.com/vcloud/plugin/json" xmlns:inheritance="http://jaxb2-commons.dev.java.net/basic/inheritance" - jxb:extensionBindingPrefixes="inheritance" + jxb:extensionBindingPrefixes="meta inheritance" jxb:version="2.0"> diff --git a/schemas/extensibility/src/main/resources/schemas/external/objectExtensibility/master.xsd b/schemas/extensibility/src/main/resources/schemas/external/objectExtensibility/master.xsd index 7f508c2a..c52680cf 100644 --- a/schemas/extensibility/src/main/resources/schemas/external/objectExtensibility/master.xsd +++ b/schemas/extensibility/src/main/resources/schemas/external/objectExtensibility/master.xsd @@ -3,7 +3,7 @@ #%L vcd-extensibility-schemas :: Object Extensibility API schemas %% - Copyright (C) 2016 - 2018 VMware + Copyright (C) 2016 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -32,6 +32,8 @@ xmlns="http://www.vmware.com/vcloud/extensibility/v1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" + xmlns:meta="http://www.vmware.com/vcloud/plugin/json" + jaxb:extensionBindingPrefixes="meta" elementFormDefault="qualified" targetNamespace="http://www.vmware.com/vcloud/extensibility/v1.0" version="1.0"> diff --git a/schemas/extensibility/src/main/resources/schemas/external/objectExtensibility/network.xsd b/schemas/extensibility/src/main/resources/schemas/external/objectExtensibility/network.xsd index dd9f8049..bde620e1 100644 --- a/schemas/extensibility/src/main/resources/schemas/external/objectExtensibility/network.xsd +++ b/schemas/extensibility/src/main/resources/schemas/external/objectExtensibility/network.xsd @@ -3,7 +3,7 @@ #%L vcd-extensibility-schemas :: Object Extensibility API schemas %% - Copyright (C) 2016 - 2018 VMware + Copyright (C) 2016 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -30,7 +30,8 @@ diff --git a/schemas/extensibility/src/main/resources/schemas/external/objectExtensibility/placement.xsd b/schemas/extensibility/src/main/resources/schemas/external/objectExtensibility/placement.xsd index 7e030e14..f2c143a5 100644 --- a/schemas/extensibility/src/main/resources/schemas/external/objectExtensibility/placement.xsd +++ b/schemas/extensibility/src/main/resources/schemas/external/objectExtensibility/placement.xsd @@ -3,7 +3,7 @@ #%L vcd-extensibility-schemas :: Object Extensibility API schemas %% - Copyright (C) 2016 - 2018 VMware + Copyright (C) 2016 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -32,8 +32,8 @@ xmlns="http://www.vmware.com/vcloud/extensibility/v1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - xmlns:json="http://www.vmware.com/vcloud/plugin/json" - jaxb:extensionBindingPrefixes="json" + xmlns:meta="http://www.vmware.com/vcloud/plugin/json" + jaxb:extensionBindingPrefixes="meta" elementFormDefault="qualified" targetNamespace="http://www.vmware.com/vcloud/extensibility/v1.0" version="1.0"> @@ -144,7 +144,7 @@ - + diff --git a/schemas/extensibility/src/main/resources/schemas/external/objectExtensibility/provisioning.xsd b/schemas/extensibility/src/main/resources/schemas/external/objectExtensibility/provisioning.xsd index 79fb1ae3..f0da0f14 100644 --- a/schemas/extensibility/src/main/resources/schemas/external/objectExtensibility/provisioning.xsd +++ b/schemas/extensibility/src/main/resources/schemas/external/objectExtensibility/provisioning.xsd @@ -3,7 +3,7 @@ #%L vcd-extensibility-schemas :: Object Extensibility API schemas %% - Copyright (C) 2016 - 2018 VMware + Copyright (C) 2016 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -32,6 +32,8 @@ xmlns="http://www.vmware.com/vcloud/extensibility/v1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" + xmlns:meta="http://www.vmware.com/vcloud/plugin/json" + jaxb:extensionBindingPrefixes="meta" elementFormDefault="qualified" targetNamespace="http://www.vmware.com/vcloud/extensibility/v1.0" version="1.0"> diff --git a/schemas/openapi/pom.xml b/schemas/openapi/pom.xml index 92b32254..0e9a4ebb 100644 --- a/schemas/openapi/pom.xml +++ b/schemas/openapi/pom.xml @@ -5,12 +5,32 @@ com.vmware.vcloud vcd-api-schemas-parent - 9.1.1 + 10.3.0 ../../pom.xml jar ${project.artifactId} :: vCloud Director OpenAPI Definitions vCloud Director OpenAPI Definitions + + + io.swagger + swagger-core + 1.6.2 + test + + + javax.ws.rs + javax.ws.rs-api + 2.1.1 + test + + + org.testng + testng + 7.4.0 + test + + @@ -45,6 +65,14 @@ + + maven-surefire-plugin + + + src/test/resources/testng.xml + + + diff --git a/schemas/openapi/src/main/resources/schemas/access-control/accessControl.yaml b/schemas/openapi/src/main/resources/schemas/access-control/accessControl.yaml new file mode 100644 index 00000000..52e6426f --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/access-control/accessControl.yaml @@ -0,0 +1,141 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2019-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The vCloud Director Access Control API for managing access-control entries + on vCD entities. An access-control entry grants a user a level of + access to a vCD entity. Levels of access are 'READ', "READ_WRITE' and + 'FULL_CONTROL'. + version: "1.0" + title: vCloud Director Access Control API + +paths: + membership-access-controls: + get: + tags: + - membershipAccessControlGrant_Dummy + summary: Get all membership based access control grants + operationId: getMembershipAccessControlGrant + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/MembershipAccessControlGrant' + 404: + description: Not Found + + right-access-controls: + get: + tags: + - rightAccessControlGrant_Dummy + summary: Get all Right based access control grants + operationId: getRightAccessControlGrant + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/RightAccessControlGrant' + 404: + description: Not Found + +definitions: + + AccessControlGrant: + type: object + x-vcloud-added-in: "35.0" + discriminator: grantType + properties: + id: + type: string + description: | + VcloudId URN identifier for ACL grant + readOnly: true + tenant: + $ref: "../common/entity.yaml#/definitions/EntityReference" + description: | + The tenant this grant applies in. This is managed by the system and depends on the organization the requester operates in at the time of creation and the + actual principal type. + grantType: + type: string + description: | + Indicates whether this access control grant is based on + user memberships or entitlements + objectId: + type: string + maxLength: 128 + description: | + The object that this access control grant applies to + readOnly: true + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + accessLevelId: + type: string + maxLength: 128 + description: | + The ID of the level of access which the subject will be granted. + example: urn:vcloud:accessLevel:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + x-vcloud-property-annotations: + tenant: + x-vcloud-added-in: "35.2" + x-vcloud-constraints: + - constraint: ReadOnly + required: + - grantType + - accessLevelId + + MembershipAccessControlGrant: + x-vcloud-added-in: "35.0" + allOf: + - $ref: './access-control/accessControl.yaml#/definitions/AccessControlGrant' + - type: object + properties: + memberId: + type: string + description: | + VCloudId URN identifier for the membership + required: + - memberId + + RightAccessControlGrant: + x-vcloud-added-in: "35.0" + allOf: + - $ref: './access-control/accessControl.yaml#/definitions/AccessControlGrant' + - type: object + properties: + rightId: + type: string + description: | + VcloudId URN identifier for the right + required: + - rightId + + AccessControlGrants: + x-vcloud-added-in: "35.0" + description: | + A pageable list of access-control grants. + allOf: + - $ref: '#/definitions/Page' + - type: object + properties: + values: + type: array + description: The current page of access-control entries. + items: + $ref: './access-control/accessControl.yaml#/definitions/AccessControlGrant' + + Page: + $ref: "./common/query.yaml#/definitions/Page" + diff --git a/schemas/openapi/src/main/resources/schemas/access-levels/accessLevels.yaml b/schemas/openapi/src/main/resources/schemas/access-levels/accessLevels.yaml new file mode 100644 index 00000000..736893fe --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/access-levels/accessLevels.yaml @@ -0,0 +1,98 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2019-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The vCloud Director Access Levels API allows users to view grantable + access levels for access controllable objects. + Access levels are READ(read-only access), READ_WRITE(read/write access) and + FULL_CONTROL(full-control of object can delete/transfer ownership). + version: "1.0" + title: vCloud Director Access Levels API + +paths: + accessLevels: + get: + tags: + - accessLevels + summary: Get all access levels. + description: | + Get all access levels. + operationId: queryAccessLevels + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + x-vcloud-added-in: "35.0" + x-vcloud-default-sort: + default-sort-field: name + sort-ascending: true + responses: + 200: + description: OK + schema: + $ref: '#/definitions/AccessLevels' + + accessLevel: + parameters: + - name: accessLevelUrn + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: accessLevel + get: + tags: + - accessLevels + summary: Get the specified access level. + description: | + Get the specified access level. + operationId: getAccessLevel + x-vcloud-added-in: "35.0" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/AccessLevel' + +definitions: + AccessLevels: + allOf: + - $ref: '#/definitions/Page' + - type: object + properties: + values: + type: array + description: All access levels. + items: + $ref: '#/definitions/AccessLevel' + + AccessLevel: + type: object + allOf: + - $ref: "./rbac/rights.yaml#/definitions/RightsMapping" + - type: object + properties: + id: + type: string + maxLength: 128 + x-vcloud-constraints: + - constraint: Urn + args: + - arg: accessLevel + + Page: + $ref: "./common/query.yaml#/definitions/Page" + diff --git a/schemas/openapi/src/main/resources/schemas/advisories/advisories.yaml b/schemas/openapi/src/main/resources/schemas/advisories/advisories.yaml new file mode 100644 index 00000000..eaa40a16 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/advisories/advisories.yaml @@ -0,0 +1,302 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2020-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The vCloud Director Advisories API + version: "1.0" + title: vCloud Director Advisories API + +paths: + advisory-definitions: + get: + tags: + - Advisory + summary: Get a list of all advisory definitions. + x-vcloud-added-in: "35.0" + x-vcloud-multisite: true + x-vcloud-default-sort: + default-sort-field: priority + sort-ascending: false + description: | + Get a list of all advisory definitions. + operationId: queryAdvisoryDefinitions + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/AdvisoryDefinitions' + post: + tags: + - Advisory + summary: Create a new advisory definition. + x-vcloud-added-in: "35.0" + x-vcloud-event: com/vmware/vcloud/event/advisoryDefinition/create + operationId: createAdvisoryDefinition + consumes: + - application/json + parameters: + - name: newAdvisoryDefinition + in: body + required: true + schema: + $ref: "#/definitions/AdvisoryDefinition" + produces: + - application/json + responses: + 201: + description: Created + schema: + $ref: "#/definitions/AdvisoryDefinition" + + advisory-definition: + parameters: + - name: advisoryId + in: path + description: advisory URN + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: advisoryDefinition + get: + tags: + - Advisory + summary: Get the advisory definition with the specified id. + x-vcloud-added-in: "35.0" + operationId: getAdvisoryDefinition + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/AdvisoryDefinition" + delete: + tags: + - Advisory + summary: Delete the advisory with the associated specified id. + x-vcloud-added-in: "35.0" + operationId: deleteAdvisoryDefinition + responses: + 204: + description: No Content + + advisories: + get: + tags: + - Advisory + summary: Get a list of all advisories accessible to the user. + x-vcloud-added-in: "35.0" + x-vcloud-multisite: true + x-vcloud-default-sort: + default-sort-field: priority + sort-ascending: false + description: | + Get a list of all advisories accessible to the user. + operationId: queryAdvisories + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/Advisories' + + advisory: + parameters: + - name: advisoryId + in: path + description: advisory URN + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: advisory + get: + tags: + - Advisory + summary: Get the advisory with the specified id. + x-vcloud-added-in: "35.0" + operationId: getAdvisory + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/Advisory" + put: + tags: + - Advisory + summary: Updates an advisory. + x-vcloud-added-in: "35.0" + description: | + Updates an advisory for the active session using a specified id. + Advisories that have a MANDATORY priority may not be updated. + operationId: updateAdvisory + consumes: + - application/json + parameters: + - name: modifiedAdvisory + in: body + required: true + schema: + $ref: "#/definitions/Advisory" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/Advisory" + +definitions: + Advisory: + x-vcloud-added-in: "35.0" + description: | + A message specified by a system administrator org administrator. It + is to be displayed to users to alert them to general conditions that + may affect them. + type: object + properties: + id: + type: string + description: A unique identifier for the advisory (read-only). + targetId: + type: string + description: The id reference to the target entity this advisory is for. + message: + type: string + description: A localized message for this advisory. + maxLength: 512 + priority: + type: string + description: | + Priority for an advisory that indicates the level of urgency. These + priorities are listed in ascending sort order. +

    +
  • + MANDATORY: A mandatory message which is always displayed; + these advisories cannot be snoozed or dismissed (see documentation + on displayStart and displayEnd) +
  • +
  • + CRITICAL: A high priority, potentially actionable message which can be + snoozed or dismissed +
  • +
  • + IMPORTANT: A potentially actionable message which can be snoozed or dismissed +
  • +
  • + NOTICE: An informational message which can be dismissed (but not snoozed) +
  • +
+ default: 'NOTICE' + displayStart: + type: string + format: date-time + description: | + The ISO-8601 timestamp from which this advisory is applicable. Defaults to + the server's current time if unspecified. If permissible, users may update this value + to a time in the future to snooze this advisory. + displayEnd: + type: string + format: date-time + description: | + The ISO-8601 timestamp representing when this advisory is no longer applicable. + If permissible, users may update this value to a time in the past to dismiss + this advisory. The displayEnd timestamp must be >= displayStart. + source: + type: string + description: | + Represents where the advisory is being generated from. This is a read-only field. + Can be of type USER or INTERNAL. + required: + - targetId + - message + - displayEnd + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: Urn + args: + - arg: advisory + - constraint: NonSortable + - constraint: ReadOnly + targetId: + x-vcloud-constraints: + - constraint: Urn + args: + - arg: org + - arg: site + message: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + source: + x-vcloud-constraints: + - constraint: ReadOnly + + Advisories: + x-vcloud-added-in: "35.0" + description: | + A list of Advisories. + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + description: The current page of advisories. + items: + $ref: '#/definitions/Advisory' + + AdvisoryDefinition: + x-vcloud-added-in: "35.0" + type: object + allOf: + - $ref: '#/definitions/Advisory' + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: Urn + args: + - arg: advisoryDefinition + - constraint: NonSortable + - constraint: ReadOnly + + AdvisoryDefinitions: + x-vcloud-added-in: "35.0" + description: | + A list of Advisories definitions. + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + description: The current page of advisory definitions. + items: + $ref: '#/definitions/AdvisoryDefinition' + diff --git a/schemas/openapi/src/main/resources/schemas/audit-trail/audit-trail-event.yaml b/schemas/openapi/src/main/resources/schemas/audit-trail/audit-trail-event.yaml new file mode 100644 index 00000000..91637199 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/audit-trail/audit-trail-event.yaml @@ -0,0 +1,82 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2019-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" + +info: + title: AuditTrailEvent YAML + description: AuditTrailEvent + version: "1.0" + + +definitions: + + AuditTrailEvent: + description: | + AuditTrailEvent + type: object + properties: + eventId: + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: audit + - constraint: NonSortable + description: + type: string + operatingOrg: + $ref: "#/definitions/EntityReference" + user: + $ref: "#/definitions/EntityReference" + eventEntity: + $ref: "#/definitions/EntityReference" + taskId: + type: string + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + taskCellId: + type: string + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + x-vcloud-restricted: Visible to provider users only + cellId: + type: string + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + x-vcloud-restricted: Visible to provider users only + eventType: + type: string + serviceNamespace: + type: string + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + eventStatus: + type: string + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + timestamp: + type: string + format: date-time + external: + type: boolean + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + additionalProperties: + type: object + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + x-vcloud-restricted: Visible to users with the 'Perform Administrator Queries' right + + EntityReference: + $ref: "./common/entity.yaml#/definitions/EntityReference" diff --git a/schemas/openapi/src/main/resources/schemas/audit-trail/audit-trail.yaml b/schemas/openapi/src/main/resources/schemas/audit-trail/audit-trail.yaml new file mode 100644 index 00000000..a5e568c1 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/audit-trail/audit-trail.yaml @@ -0,0 +1,76 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2019-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: AuditTrail types + version: "1.0" + title: AuditTrail YAML + +paths: + auditTrail: + get: + tags: + - auditTrail + summary: Get list of audit trail events + description: | + Get list of audit trail events + operationId: queryAuditTrail + x-vcloud-added-in: "33.0" + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/AuditTrailEvents' + + audit-trail-event-id: + parameters: + - name: id + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: auditTrailEvent + get: + tags: + - auditTrailUnimplemented + summary: Retrieve an individual audit trail event. + description: Retrieves the requested audit trail event by id. + operationId: getAuditTrailEvent + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/AuditTrailEvent' + +definitions: + AuditTrailEvents: + description: | + A list of audit trail events. + allOf: + - $ref: '#/definitions/Page' + - type: object + properties: + values: + type: array + description: The current page of audit trail events. + items: + $ref: './audit-trail/audit-trail-event.yaml#/definitions/AuditTrailEvent' + + Page: + $ref: "./common/query.yaml#/definitions/Page" diff --git a/schemas/openapi/src/main/resources/schemas/auth/accessiblelocation.yaml b/schemas/openapi/src/main/resources/schemas/auth/accessiblelocation.yaml new file mode 100644 index 00000000..ef88c822 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/auth/accessiblelocation.yaml @@ -0,0 +1,44 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2019-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" + +info: + title: Accessible Location YAML + description: Accesible Location Object in VCD + version: "1.0" + +definitions: + AccessibleLocation: + description: | + A location accessible to this session. + type: object + x-vcloud-added-in: "33.0" + properties: + locationId: + type: string + x-vcloud-constraints: + - constraint: ReadOnly + site: + $ref: '#/definitions/EntityReference' + org: + $ref: '#/definitions/EntityReference' + restApiEndpoint: + type: string + x-vcloud-constraints: + - constraint: ReadOnly + uiEndpoint: + type: string + x-vcloud-constraints: + - constraint: ReadOnly + apiVersion: + type: string + x-vcloud-constraints: + - constraint: ReadOnly + + EntityReference: + $ref: './common/entity.yaml#/definitions/EntityReference' + diff --git a/schemas/openapi/src/main/resources/schemas/auth/sessions.yaml b/schemas/openapi/src/main/resources/schemas/auth/sessions.yaml new file mode 100644 index 00000000..4a58bc7d --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/auth/sessions.yaml @@ -0,0 +1,278 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2019-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The vCloud Director Sessions API + version: "1.0" + title: vCloud Director Sessions API + +paths: + sessions: + get: + tags: + - sessions + summary: List all sessions for current user + x-vcloud-added-in: "33.0" + description: | + List all sessions for current user + operationId: getCurrentSessions + parameters: + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/Sessions' + + post: + tags: + - sessions + summary: Logs in a user + x-vcloud-added-in: "33.0" + description: | + Logs in a user + operationId: login + produces: + - application/json + parameters: + - name: Authorization + in: header + required: true + responses: + 200: + description: OK + schema: + $ref: '#/definitions/Session' + 401: + description: Unauthorized + + session: + parameters: + - name: id + in: path + required: false + type: string + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: Urn + args: + - arg: session + get: + tags: + - sessions + summary: Returns the specified session for current user + x-vcloud-added-in: "33.0" + description: | + Returns the specified session for current user + operationId: getSession + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/Session' + + delete: + tags: + - sessions + summary: Logs out the current user + x-vcloud-added-in: "33.0" + x-vcloud-multisite: true + description: | + Logs out the current user + operationId: logout + responses: + 204: + description: No Content + + currentSession: + get: + tags: + - sessions + summary: Returns the current session identified by credentials supplied using the Authorization header + x-vcloud-added-in: "34.0" + description: | + Returns the specified session for the authorization token + operationId: getCurrentSession + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/Session' + delete: + tags: + - sessions + summary: Logout current session + x-vcloud-added-in: "36.0" + x-vcloud-multisite: true + description: | + Logs out and terminates the current session identified by credentials supplied using the Authorization header + operationId: logoutCurrentSession + responses: + 204: + description: No Content + + provider: + post: + tags: + - sessions + summary: Logs in a user (Provider only) + x-vcloud-added-in: "33.0" + description: | + Logs in a user (Provider only) + operationId: providerLogin + produces: + - application/json + parameters: + - name: Authorization + in: header + required: true + responses: + 200: + description: OK + schema: + $ref: '#/definitions/Session' + 401: + description: Unauthorized + + accessibleLocations: + get: + tags: + - sessions + summary: Get locations accessible to this session. + x-vcloud-added-in: "33.0" + description: | + Gets locations accessible to this session. + operationId: getAccessibleLocations + produces: + - application/json + parameters: + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + responses: + 200: + description: OK + schema: + $ref: '#/definitions/AccessibleLocations' + + token: + parameters: + - name: id + in: path + required: false + type: string + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: Urn + args: + - arg: session + get: + tags: + - sessions + summary: Get token associated with this session. + x-vcloud-added-in: "33.0" + description: | + Gets token associated with this session. + operationId: getToken + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "./auth/tokens.yaml#/definitions/Token" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + +definitions: + Sessions: + description: | + A list of sessions. + allOf: + - $ref: '#/definitions/Page' + - type: object + properties: + values: + type: array + description: The current page of sessions. + items: + $ref: '#/definitions/Session' + + Session: + description: | + Session + type: object + x-vcloud-added-in: "33.0" + properties: + id: + type: string + description: ID of session + example: urn:vcloud:session:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + maxLength: 128 + x-vcloud-constraints: + - constraint: Urn + args: + - arg: session + - constraint: ReadOnly + user: + description: User of this session + $ref: '#/definitions/EntityReference' + org: + description: Organization user is logged into for this session + $ref: '#/definitions/EntityReference' + location: + description: The accessible location this session is valid for + type: string + roles: + type: array + description: User's roles for this session + items: + type: string + x-vcloud-deprecated-in: "35.0" + x-vcloud-deprecated-alternative: roleRefs + roleRefs: + type: array + description: References to user's roles + items: + $ref: '#/definitions/EntityReference' + x-vcloud-added-in: "35.0" + sessionIdleTimeoutMinutes: + type: integer + description: The session idle timeout in minutes + x-vcloud-added-in: "35.0" + + AccessibleLocations: + description: | + A list of locations accessible to this session. + allOf: + - $ref: '#/definitions/Page' + - type: object + properties: + values: + type: array + description: The current page of accessible locations. + items: + $ref: './auth/accessiblelocation.yaml#/definitions/AccessibleLocation' + + EntityReferences: + $ref: './common/entity.yaml#/definitions/EntityReferences' + EntityReference: + $ref: './common/entity.yaml#/definitions/EntityReference' + + Page: + $ref: './common/query.yaml#/definitions/Page' + + diff --git a/schemas/openapi/src/main/resources/schemas/auth/tokens.yaml b/schemas/openapi/src/main/resources/schemas/auth/tokens.yaml new file mode 100644 index 00000000..b0773a99 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/auth/tokens.yaml @@ -0,0 +1,227 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2020-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The vCloud Director Tokens API + version: "1.0" + title: vCloud Director Tokens API + +paths: + tokens: + get: + tags: + - token + summary: Retrieve tokens + x-vcloud-added-in: "33.0" + operationId: getTokens + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/Tokens" + post: + tags: + - token + summary: Creates a new token of the specified type + x-vcloud-added-in: "33.0" + description: | + Creates a new token. Proxy tokens are tied to the current user and can be used to access the set + of proxies available to the user. + operationId: createToken + consumes: + - application/json + parameters: + - name: tokenParameters + in: body + required: false + schema: + $ref: "#/definitions/TokenParameters" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/Token" + + token: + parameters: + - name: id + description: Token ID URN + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: token + + get: + tags: + - token + summary: Retrieves a specific token + x-vcloud-added-in: "33.0" + operationId: getToken + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/Token" + + delete: + tags: + - token + summary: | + Delete a specific token. Use this to revoke the current token in case of a leak. + x-vcloud-added-in: "33.0" + operationId: deleteToken + responses: + 204: + description: No Content + +definitions: + Tokens: + x-vcloud-added-in: "33.0" + description: | + A paginated list of user specific tokens used for accessing proxies. + allOf: + - $ref: './common/query.yaml#/definitions/Page' + - type: object + properties: + values: + type: array + items: + $ref: '#/definitions/Token' + + Token: + x-vcloud-added-in: "33.0" + description: | + Specifies a user, the user's organization, and the user assigned token that can be used to + access proxies as well as the expiration timestamp of the token (in UTC). Parameters cannot + be edited once a token is created. + type: object + properties: + id: + type: string + description: ID of this token. Sorting on this field is not supported. + x-vcloud-constraints: + - constraint: NonSortable + - constraint: ReadOnly + - constraint: Urn + args: + - arg: token + name: + type: string + description: Name of the token + x-vcloud-added-in: "35.0" + x-vcloud-constraints: + - constraint: ReadOnly + token: + type: string + description: User specific token that can be used to access proxies. Sorting on this field is not supported. + x-vcloud-restricted: Proxy tokens are visible only to the owner of the token. Extension tokens are visible only on creation. + x-vcloud-constraints: + - constraint: NonSortable + - constraint: ReadOnly + expirationTimeUtc: + type: string + format: date-time + description: Time stamp representing when the token will expire (in UTC). + x-vcloud-constraints: + - constraint: ReadOnly + owner: + $ref: '#/definitions/EntityReference' + description: Owner of the token. Either a user or an extension + username: + type: string + description: Name of the user that this token is assigned to. + x-vcloud-constraints: + - constraint: ReadOnly + x-vcloud-added-in: "33.0" + x-vcloud-removed-in: "35.0" + x-vcloud-deprecated-in: "35.0" + x-vcloud-deprecated-alternative: owner.name + userId: + type: string + description: | + ID of the user that this token is assigned to. Sorting on this field is not supported. + Can not be updated. + x-vcloud-constraints: + - constraint: NonSortable + - constraint: ReadOnly + - constraint: Urn + args: + - arg: user + x-vcloud-added-in: "33.0" + x-vcloud-removed-in: "35.0" + x-vcloud-deprecated-in: "35.0" + x-vcloud-deprecated-alternative: owner.id + orgName: + type: string + description: Name of the organization that the assigned user belongs to. Sorting and filtering on this field is not supported. + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSortable + - constraint: NonSearchable + x-vcloud-added-in: "33.0" + x-vcloud-removed-in: "35.0" + x-vcloud-deprecated-in: "35.0" + x-vcloud-deprecated-alternative: org.name + org: + $ref: '#/definitions/EntityReference' + type: + type: string + description: Type of the token. Can be of type PROXY or EXTENSION + x-vcloud-constraints: + - constraint: ReadOnly + x-vcloud-added-in: "35.0" + required: + - id + - name + x-vcloud-property-annotations: + org: + x-vcloud-added-in: "35.0" + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSortable + - constraint: NonSearchable + owner: + x-vcloud-added-in: "35.0" + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSortable + + TokenParameters: + x-vcloud-added-in: "35.0" + description: | + Information for the token to be created. Required for API v35.0+ + type: object + properties: + name: + type: string + description: Name of the token to create + type: + type: string + description: The type of token to be created. Valid types are ["PROXY", "EXTENSION"] + extensionId: + type: string + description: The urn id of the extension to get a token for + + EntityReference: + $ref: './common/entity.yaml#/definitions/EntityReference' + diff --git a/schemas/openapi/src/main/resources/schemas/branding/branding.yaml b/schemas/openapi/src/main/resources/schemas/branding/branding.yaml index f2cee595..67e8c3cb 100644 --- a/schemas/openapi/src/main/resources/schemas/branding/branding.yaml +++ b/schemas/openapi/src/main/resources/schemas/branding/branding.yaml @@ -1,8 +1,9 @@ # ****************************************************************************** # * api-extension-template-vcloud-director -# * Copyright 2011-2018 VMware, Inc. All rights reserved. * +# * Copyright 2011-2021 VMware, Inc. All rights reserved. * # * SPDX-License-Identifier: BSD-2-Clause # ****************************************************************************** + swagger: "2.0" info: description: | @@ -21,6 +22,7 @@ paths: tags: - branding summary: Gets the system level logo + x-vcloud-added-in: "30.0" description: | Get the system level logo as raw image data suitable for use in an image tag's src attribute. @@ -33,6 +35,8 @@ paths: - image/jpeg - image/svg+xml responses: + 406: + description: Not Acceptable 200: description: OK schema: @@ -42,6 +46,7 @@ paths: tags: - branding summary: Sets the system level logo + x-vcloud-added-in: "30.0" description: | Set the system logo data. operationId: putSystemLogo @@ -68,6 +73,7 @@ paths: tags: - branding summary: Delete system level logo + x-vcloud-added-in: "30.0" description: | Delete the system level logo, forcing the get method to return the vCloud Director default logo. @@ -76,6 +82,210 @@ paths: 204: description: No Content + icon: + get: + tags: + - branding + summary: Gets the system level browser icon + x-vcloud-added-in: "32.0" + description: | + Get the system level icon as raw image data suitable for use in + an image tag's src attribute. + + If a custom icon is not set then the vCloud Director default icon is + sent. + operationId: getSystemIcon + produces: + - image/png + - image/x-icon + responses: + 406: + description: Not Acceptable + 200: + description: OK + schema: + type: string + format: binary + put: + tags: + - branding + summary: Sets the system level icon + x-vcloud-added-in: "32.0" + description: | + Set the system icon data. + operationId: putSystemIcon + consumes: + - image/png + - image/x-icon + parameters: + - name: Content-Type + in: header + required: true + - name: body + in: body + required: true + schema: + type: string + format: binary + responses: + 204: + description: No Content + 415: + description: Unsupported Media Type + delete: + tags: + - branding + summary: Delete system level icon + x-vcloud-added-in: "32.0" + description: | + Delete the system level icon, forcing the get method to return the + vCloud Director default icon. + operationId: deleteSystemIcon + responses: + 204: + description: No Content + + org-logo: + parameters: + - name: org + in: path + required: true + type: string + description: Organization for whom branding is being set + get: + tags: + - branding + summary: Gets the org-specific logo + x-vcloud-added-in: "32.0" + description: | + Get the org-specific logo as raw image data suitable for use in + an image tag's src attribute. If an org-specific logo is not set, + get the default system logo. + + If a custom logo is not set then the vCloud Director default logo is + sent. + operationId: getTenantLogo + produces: + - image/png + - image/jpeg + - image/svg+xml + responses: + 406: + description: Not Acceptable + 200: + description: OK + schema: + type: string + format: binary + put: + tags: + - branding + summary: Sets the org-specific logo + x-vcloud-added-in: "32.0" + description: | + Set the org-specific data. + operationId: putTenantLogo + consumes: + - image/png + - image/jpeg + - image/svg+xml + parameters: + - name: Content-Type + in: header + required: true + - name: body + in: body + required: true + schema: + type: string + format: binary + responses: + 204: + description: No Content + 415: + description: Unsupported Media Type + delete: + tags: + - branding + summary: Delete the org-specific logo + x-vcloud-added-in: "32.0" + description: | + Delete the org-specific logo, forcing the get method to return the + system default logo. + operationId: deleteTenantLogo + responses: + 204: + description: No Content + + org-icon: + parameters: + - name: org + in: path + required: true + type: string + description: Organization for whom branding is being set + get: + tags: + - branding + summary: Gets the system level browser icon + x-vcloud-added-in: "32.0" + description: | + Get the system level icon as raw image data suitable for use in + an image tag's src attribute. + + If a custom icon is not set then the vCloud Director default icon is + sent. + operationId: getTenantIcon + produces: + - image/png + - image/x-icon + responses: + 406: + description: Not Acceptable + 200: + description: OK + schema: + type: string + format: binary + put: + tags: + - branding + summary: Sets the system level icon + x-vcloud-added-in: "32.0" + description: | + Set the system icon data. + operationId: putTenantIcon + consumes: + - image/png + - image/x-icon + parameters: + - name: Content-Type + in: header + required: true + - name: body + in: body + required: true + schema: + type: string + format: binary + responses: + 204: + description: No Content + 415: + description: Unsupported Media Type + delete: + tags: + - branding + summary: Delete system level icon + x-vcloud-added-in: "32.0" + description: | + Delete the system level icon, forcing the get method to return the + vCloud Director default icon. + operationId: deleteTenantIcon + responses: + 204: + description: No Content + themes: get: tags: @@ -96,11 +306,162 @@ paths: items: $ref: "#/definitions/UiTheme" + post: + tags: + - branding + summary: Create a new custom theme + description: | + Create a new custom theme, uniquely identified by name. + + This can be used to set the theme in "/branding". + operationId: createBrandingTheme + consumes: + - application/json + parameters: + - name: newTheme + in: body + required: true + schema: + $ref: "#/definitions/UiTheme" + produces: + - application/json + responses: + 201: + description: Created + schema: + $ref: "#/definitions/UiTheme" + + theme-name: + parameters: + - name: name + in: path + required: true + type: string + get: + tags: + - branding + summary: Retrieve a specified theme identified by name + description: | + Update an existing theme, uniquely identified by name. + operationId: getBrandingTheme + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/UiTheme" + 404: + description: Not Found + + put: + tags: + - branding + summary: Update an existing custom theme + description: | + Update an existing custom theme, uniquely identified by name. + + This can be used to set the theme in "/branding". + operationId: updateBrandingTheme + consumes: + - application/json + parameters: + - name: updatedTheme + in: body + required: true + schema: + $ref: "#/definitions/UiTheme" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/UiTheme" + 404: + description: Not Found + + delete: + tags: + - branding + summary: Delete an existing custom theme + description: | + Delete a custom theme + operationId: deleteBrandingTheme + responses: + 204: + description: No Content + 404: + description: Not Found + + theme-name-css: + parameters: + - name: name + in: path + required: true + type: string + + get: + tags: + - branding + summary: Retrieve the custom CSS for this theme, if any + description: | + Retrieve the CSS for this theme if it has been set + operationId: getBrandingThemeCss + produces: + - text/css + responses: + 200: + description: OK + schema: + type: string + 404: + description: No CSS Found For theme + + theme-name-contents: + parameters: + - name: name + in: path + required: true + type: string + + post: + tags: + - branding + summary: Upload the contents for this theme + description: | + Update an existing custom theme's contents, uniquely identified by name. + Currently, this is limited to a single CSS file. + operationId: uploadBrandingThemeContents + consumes: + - application/json + parameters: + - name: pluginUploadSpec + in: body + required: true + schema: + $ref: './common/upload.yaml#/definitions/UploadSpec' + responses: + 204: + description: No Content + + delete: + tags: + - branding + summary: Delete an existing custom theme's contents + description: | + Delete a custom theme's contents + operationId: deleteBrandingThemeContents + responses: + 204: + description: No Content + branding: get: tags: - branding summary: Gets the system level branding + x-vcloud-added-in: "30.0" description: | Get the system level branding information including the portal name, portal color, selected theme and custom URLs. @@ -115,10 +476,11 @@ paths: put: tags: - branding - summary: Sets the system level branding + summary: Sets default branding + x-vcloud-added-in: "30.0" description: | - Sets the system level branding information including the portal name, - portal color, selected theme and custom URLs. + Sets the branding information including the portal name, portal color, + selected theme and custom URLs for a specific org or system default. operationId: putSystemBranding consumes: - application/json @@ -136,22 +498,91 @@ paths: schema: $ref: "#/definitions/UiBranding" + org-branding: + parameters: + - name: org + in: path + required: true + type: string + description: Organization for whom branding is being set + get: + tags: + - branding + summary: Gets org-specific branding + x-vcloud-added-in: "32.0" + description: | + Get org-specific branding information including the portal name, + portal color, selected theme and custom URLs. If no org branding + has been specified, retrieve the default system branding. + operationId: getTenantBranding + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/UiBranding" + put: + tags: + - branding + summary: Sets org-specific branding + x-vcloud-added-in: "32.0" + description: | + Sets the branding information including the portal name, portal color, + selected theme and custom URLs for a specific org. + operationId: putTenantBranding + consumes: + - application/json + produces: + - application/json + parameters: + - name: body + in: body + required: true + schema: + $ref: "#/definitions/UiBranding" + responses: + 200: + description: OK + schema: + $ref: "#/definitions/UiBranding" + delete: + tags: + - branding + summary: Remove org-specific branding + x-vcloud-added-in: "32.0" + description: | + Removes org-specific branding information if specified + operationId: removeTenantBranding + responses: + 204: + description: No Content + definitions: - UiBrandingLink: + UiBrandingMenuItem: description: | - A link which can be customized and used in the application. + An ordered list of menu items which can be customized and used in the application. Can be defined as a + link, + override (well known links that can be overridden, Default values are About, Help, VMRC), + section, + separator(section without a name) of the drop down menu. type: object + x-vcloud-added-in: "32.0" properties: - key: + name: type: string + menuItemType: + type: string + enum: [link, section, override, separator] url: type: string + required: + - menuItemType UiTheme: description: | A theme supported by vCloud Director. type: object - discriminator: themeType properties: themeType: type: string @@ -179,4 +610,8 @@ definitions: customLinks: type: array items: - $ref: "#/definitions/UiBrandingLink" + $ref: "#/definitions/UiBrandingMenuItem" + required: + - portalName + - customLinks + diff --git a/schemas/openapi/src/main/resources/schemas/cell/cell.yaml b/schemas/openapi/src/main/resources/schemas/cell/cell.yaml new file mode 100644 index 00000000..4899d08d --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/cell/cell.yaml @@ -0,0 +1,147 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2019-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The Cell API allows for basic CRUD operations of a Cell. + title: Cell API + +paths: + + cells: + get: + x-vcloud-added-in: "33.0" + tags: + - Cell + summary: Get cells. + description: | + Retrieve a list of cells + operationId: queryCells + x-vcloud-multisite: true + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/Cells" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + + cell: + get: + x-vcloud-added-in: "33.0" + tags: + - Cell + summary: Get cell. + description: | + Retrieve a cell. Read only. + operationId: getCell + x-vcloud-multisite: true + parameters: + - name: cellUrn + in: path + description: cellUrn + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: cell + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/Cell" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + + delete: + x-vcloud-added-in: "33.0" + tags: + - Cell + summary: Deletes a specified cell. + operationId: deleteCell + parameters: + - name: cellUrn + in: path + description: cellUrn + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: cell + responses: + 204: + description: No Content + +definitions: + + Cell: + x-vcloud-added-in: "33.0" + description: | + A vCloud Director cell. + type: object + properties: + id: + type: string + description: The unique id of the cell. + x-vcloud-constraints: + - constraint: NonSortable + - constraint: Urn + args: + - arg: cell + - constraint: ReadOnly + productBuildDate: + type: string + format: date-time + description: The build date for the version of the product installed on this cell. + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: ReadOnly + isActive: + type: boolean + description: Cell active state. + x-vcloud-constraints: + - constraint: ReadOnly + name: + type: string + description: The name of the cell. + x-vcloud-constraints: + - constraint: ReadOnly + primaryIP: + type: string + description: The primary ip address of the cell. + x-vcloud-constraints: + - constraint: ReadOnly + productVersion: + type: string + description: The product version of the cell. + x-vcloud-constraints: + - constraint: ReadOnly + Cells: + x-vcloud-added-in: "33.0" + description: | + A paginated list of vCloud Director cells. + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: "./cell/cell.yaml#/definitions/Cell" + diff --git a/schemas/openapi/src/main/resources/schemas/common/browse.yaml b/schemas/openapi/src/main/resources/schemas/common/browse.yaml index 65faaa58..472b63b0 100644 --- a/schemas/openapi/src/main/resources/schemas/common/browse.yaml +++ b/schemas/openapi/src/main/resources/schemas/common/browse.yaml @@ -1,8 +1,9 @@ # ****************************************************************************** # * api-extension-template-vcloud-director -# * Copyright 2017-2018 VMware, Inc. All rights reserved. * +# * Copyright 2017-2021 VMware, Inc. All rights reserved. * # * SPDX-License-Identifier: BSD-2-Clause # ****************************************************************************** + swagger: "2.0" info: @@ -94,4 +95,4 @@ definitions: description: How many results there are in total (i.e., considering all pages). pageCount: type: integer - description: How many pages there are in total. \ No newline at end of file + description: How many pages there are in total. diff --git a/schemas/openapi/src/main/resources/schemas/common/capability.yaml b/schemas/openapi/src/main/resources/schemas/common/capability.yaml new file mode 100644 index 00000000..f59c97ee --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/common/capability.yaml @@ -0,0 +1,74 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +definitions: + Capabilities: + x-vcloud-added-in: "32.0" + description: | + List of read-only capabilities. + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: './common/capability.yaml#/definitions/Capability' + + Capability: + x-vcloud-added-in: "32.0" + description: | + Describes a capability of an entity. + type: object + properties: + name: + type: string + description: The name of the capability. + readOnly: true + description: + type: string + description: Description of the capability as it relates to the entity. + readOnly: true + value: + type: object + description: The value of the capability. + readOnly: true + type: + $ref: '#/definitions/CapabilityValueType' + description: The type of the value. + readOnly: true + category: + $ref: '#/definitions/CapabilityCategory' + description: The category of the capabilities listed. + readOnly: true + + CapabilityCategory: + x-vcloud-added-in: "32.0" + description: | + Describes the category of the capability. + type: string + enum: + - EdgeGateway + - VAppNetwork + - OrgVdcNetwork + - Infra + - Security + - StoragePolicy + - QuotaPolicy + - VdcGroup + - NamedDisk + - VirtualMachine + + CapabilityValueType: + x-vcloud-added-in: "32.0" + description: | + Describes the object type of the capability value. + type: string + enum: + - Boolean + - String + - List + diff --git a/schemas/openapi/src/main/resources/schemas/common/delete.yaml b/schemas/openapi/src/main/resources/schemas/common/delete.yaml new file mode 100644 index 00000000..5bae8a40 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/common/delete.yaml @@ -0,0 +1,36 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2018-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" + +info: + title: Force delete parameter YAML + description: Common definitions for force deletion endpoints + version: "1.0" + +parameters: + recursiveDelete: + in: query + name: recursive + required: false + type: boolean + default: false + description: | + Value "true" means to remove an object that contains other objects as long as those objects are in a state that normally allows removal. + The default is "false", which means that an exception will be thrown if any of those objects are in a state that does not allow removal. + Invalid value (not true or false) are ignored. + forceDelete: + in: query + name: force + required: false + type: boolean + default: false + description: | + Value "true" means to forcefully delete the object that contains other objects even if those objects are in a state that does not allow removal. + The default is "false"; therefore, objects are not removed if they are not in a state that normally allows removal. Force also implies + recursive delete where other contained objects are removed. Errors may be ignored. Invalid value (not true or false) are ignored. + + diff --git a/schemas/openapi/src/main/resources/schemas/common/entity.yaml b/schemas/openapi/src/main/resources/schemas/common/entity.yaml index c2e4abd8..460c81a0 100644 --- a/schemas/openapi/src/main/resources/schemas/common/entity.yaml +++ b/schemas/openapi/src/main/resources/schemas/common/entity.yaml @@ -1,8 +1,9 @@ -# ************************************************************************* +# ****************************************************************************** # * api-extension-template-vcloud-director -# * Copyright 2017-2018 VMware, Inc. All rights reserved. * +# * Copyright 2017-2021 VMware, Inc. All rights reserved. * # * SPDX-License-Identifier: BSD-2-Clause -# ************************************************************************* +# ****************************************************************************** + swagger: "2.0" info: @@ -12,6 +13,20 @@ info: definitions: + + EntityReferences: + description: | + A list of entity references. + allOf: + - $ref: '#/definitions/Page' + - type: object + properties: + values: + type: array + description: The current page of entity references. + items: + $ref: '#/definitions/EntityReference' + EntityReference: description: | Entity reference used to describe VCD entities @@ -21,3 +36,7 @@ definitions: type: string id: type: string + + Page: + $ref: "./query.yaml#/definitions/Page" + diff --git a/schemas/openapi/src/main/resources/schemas/common/error.yaml b/schemas/openapi/src/main/resources/schemas/common/error.yaml index 59046032..3a30f65a 100644 --- a/schemas/openapi/src/main/resources/schemas/common/error.yaml +++ b/schemas/openapi/src/main/resources/schemas/common/error.yaml @@ -1,8 +1,9 @@ # ****************************************************************************** # * api-extension-template-vcloud-director -# * Copyright 2017-2018 VMware, Inc. All rights reserved. * +# * Copyright 2017-2021 VMware, Inc. All rights reserved. * # * SPDX-License-Identifier: BSD-2-Clause # ****************************************************************************** + swagger: "2.0" info: @@ -26,3 +27,4 @@ definitions: required: - minorErrorCode - message + diff --git a/schemas/openapi/src/main/resources/schemas/common/metadata.yaml b/schemas/openapi/src/main/resources/schemas/common/metadata.yaml new file mode 100644 index 00000000..08524f05 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/common/metadata.yaml @@ -0,0 +1,112 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2021-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: Metadata API resource definitions + version: "1.0" + title: Metadata API + +definitions: + KeyValue: + x-vcloud-added-in: "ALPHA" + description: Containins core metadata entry data. + properties: + domain: + type: string + default: "TENANT" + description: | + Only meaningful for providers. Allows them to share entries with their tenants. Currently accepted values are: 'TENANT', 'PROVIDER', where that is the ascending sort order of the enumeration. + x-vcloud-constraints: + - constraint: NonSearchable + namespace: + type: string + x-vcloud-constraints: + - constraint: NonSearchable + key: + type: string + value: + $ref: "./typed-value.yaml#/definitions/TypedValue" + required: + - domain + - key + - value + x-vcloud-property-annotations: + value: + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + MetadataEntry: + x-vcloud-added-in: "ALPHA" + description: Metadata entry + type: object + properties: + id: + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: metadata + - constraint: ReadOnly + persistent: + type: boolean + default: false + description: | + Persistent entries can be copied over on some entity operation, for example: | + Creating a copy of an Org VDC | + Capturing a vApp to a template | + Instantiating a catalog item as a VM + x-vcloud-constraints: + - constraint: NonSearchable + readOnly: + type: boolean + default: false + description: | + The kind of level of access organizations of the entry's domain have + x-vcloud-constraints: + - constraint: NonSearchable + keyValue: + $ref: "#/definitions/KeyValue" + required: + - keyValue + + MetadataEntries: + x-vcloud-added-in: "ALPHA" + description: | + A list of key value entries. + allOf: + - $ref: '#/definitions/Page' + - type: object + properties: + values: + type: array + description: The current page of key value entries. + items: + $ref: '#/definitions/MetadataEntry' + +parameters: + entityUrn: + name: id # this name has to be the same as the url path parameter of the entity + description: the URN of the entity the entry is attached to. + in: path + type: string + pattern: "^urn:vcloud:.+$" + entry: + name: entry + in: body + required: true + schema: + $ref: "#/definitions/MetadataEntry" + metadataId: + name: metadataId + description: a metadata vcloud id urn + in: path + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: metadata + diff --git a/schemas/openapi/src/main/resources/schemas/common/query.yaml b/schemas/openapi/src/main/resources/schemas/common/query.yaml index 6e902edf..c31aec68 100644 --- a/schemas/openapi/src/main/resources/schemas/common/query.yaml +++ b/schemas/openapi/src/main/resources/schemas/common/query.yaml @@ -1,8 +1,9 @@ # ****************************************************************************** # * api-extension-template-vcloud-director -# * Copyright 2017-2018 VMware, Inc. All rights reserved. * +# * Copyright 2017-2021 VMware, Inc. All rights reserved. * # * SPDX-License-Identifier: BSD-2-Clause # ****************************************************************************** + swagger: "2.0" info: @@ -10,6 +11,22 @@ info: description: Base definitions for query endpoints version: "1.0" +paths: + page-placeholder: + get: + tags: + - codegenPlaceholder + summary: This endpoint will not produce results. It is a placeholder to enforce code generation of Page. + description: This endpoint will not produce results. It is a placeholder to enforce code generation of Page. + operationId: getQueryResult + produces: + - application/json + responses: + '200': + description: The request is successful + schema: + $ref: '#/definitions/Page' + parameters: queryFilter: in: query @@ -36,6 +53,7 @@ parameters: in: query name: page required: true + minimum: 1 default: 1 type: integer description: Page to fetch, zero offset. @@ -43,57 +61,58 @@ parameters: in: query name: pageSize required: true - default: 10 + minimum: 0 + maximum: 128 + default: 25 type: integer description: Results per page to fetch. + queryCursor: + in: query + name: cursor + required: false + type: string + description: | + Field used for getting next page of records. The value is supplied by the current result page. If not set, the first page is retrieved. + If cursor is set, then all other pagination query parameters such as pageSize, sortDesc, sortAsc, queryFilter are ignored. definitions: - QueryDetails: + Page: description: | - Details about a query that was executed. + Collection of paging-related metadata to be included by composition via allOf. This type + should be included in pageable responses to avoid duplicating these common properties. It + is intended to be included by composition rather than inheritance. Because of this, it has + no discriminator and should be embedded via allOf. See QueryResults for a reference usage. type: object properties: - filter: - type: string - description: The filter used for this query. FIQL format. - sortAsc: - type: string - description: Field used for ascending sort. - sortDesc: - type: string - description: Field used for descending sort. + resultTotal: + type: integer + description: How many results there are in total (i.e., considering all pages). + pageCount: + type: integer + description: How many pages there are in total. page: type: integer - description: The page that was fetched, zero-indexed. + description: The page that was fetched, 1-indexed. pageSize: type: integer - description: Result count per page that was fetched. - QueryResult: - description: | - Base query result, just providing a type discriminator. - discriminator: resultType - properties: - resultType: - type: string - description: The type of this result. - value: - type: object - description: A single matching result of the query - QueryResults: + description: Result count for page that was fetched. + associations: + x-vcloud-added-in: "33.0" + type: array + required: false + description: Association info for each result. + items: + $ref: '#/definitions/Association' + + Association: description: | - Base query results, encapsulating page information and the query. + Site association information for an entity type: object properties: - query: - $ref: "#/definitions/QueryDetails" - results: - type: array - description: The returned objects from this query. - items: - $ref: "#/definitions/QueryResult" - resultTotal: - type: integer - description: How many results there are in total (i.e., considering all pages). - pageCount: - type: integer - description: How many pages there are in total. \ No newline at end of file + entityId: + type: string + description: ID of the entity. + associationId: + type: string + description: ID of the association. + diff --git a/schemas/openapi/src/main/resources/schemas/common/response.yaml b/schemas/openapi/src/main/resources/schemas/common/response.yaml new file mode 100644 index 00000000..2ffd05a1 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/common/response.yaml @@ -0,0 +1,27 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2018-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" + +info: + title: User YAML + description: Common generic API responses + version: "1.0" + + +components: + responses: + Accepted: + description: The request have been accepted and the task to monitor the request is in the Location header. + BadRequest: + description: Invalid configuration. + schema: + $ref: "./common/error.yaml#/definitions/Error" + NotFound: + description: The specified resource was not found + schema: + $ref: "./common/error.yaml#/definitions/Error" + diff --git a/schemas/openapi/src/main/resources/schemas/common/typed-value.yaml b/schemas/openapi/src/main/resources/schemas/common/typed-value.yaml new file mode 100644 index 00000000..cf2fe0ef --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/common/typed-value.yaml @@ -0,0 +1,105 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2021-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + + +swagger: "2.0" + +info: + title: Typed Value YAML + description: Value that includes type information + version: "1.0" + + +definitions: + + TypedValue: + x-vcloud-added-in: "36.0" + description: | + Value with type information + type: object + discriminator: type + properties: + value: + type: object + description: This object's value. + type: + type: string + description: The data type of the value, Valid values are StringEntry, NumberEntry, and BoolEntry. + required: + - value + - type + + StringEntry: + x-vcloud-added-in: "36.0" + allOf: + - $ref: '#/definitions/TypedValue' + - type: object + properties: + value: + type: string + x-vcloud-constraints: + - constraint: NonSearchable + + NumberEntry: + x-vcloud-added-in: "36.0" + allOf: + - $ref: '#/definitions/TypedValue' + - type: object + properties: + value: + type: integer + format: int64 + x-vcloud-constraints: + - constraint: NonSearchable + + BoolEntry: + x-vcloud-added-in: "36.0" + allOf: + - $ref: '#/definitions/TypedValue' + - type: object + properties: + value: + type: boolean + x-vcloud-constraints: + - constraint: NonSearchable + +### PATH INFO ONLY TO ENSURE SWAGGER GENERATES ALL ENTRY TYPES ### + +paths: + + dummy: + get: + x-vcloud-added-in: "36.0" + tags: + - Dummy + summary: Swagger is bad and should feel bad. + operationId: getDummy + produces: + - application/json + consumes: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/TypedValue" + parameters: + - name: stringEntry + in: body + required: true + schema: + $ref: "#/definitions/StringEntry" + - name: boolEntry + in: body + required: true + schema: + $ref: "#/definitions/BoolEntry" + - name: numberEntry + in: body + required: true + schema: + $ref: "#/definitions/NumberEntry" + diff --git a/schemas/openapi/src/main/resources/schemas/common/upload.yaml b/schemas/openapi/src/main/resources/schemas/common/upload.yaml new file mode 100644 index 00000000..580125b6 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/common/upload.yaml @@ -0,0 +1,53 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2018-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + Collection of common API components for uploading content to vCloud Director + version: "1.0" + title: Upload API Enablement + +definitions: + UploadMetadataResponse: + type: object + description: | + Description of an upload (in progress or complete) + allOf: + - type: object + properties: + id: + type: string + plugin_status: + type: string + enum: + - unavailable + - ready + resourcePath: + type: string + + UploadSpec: + type: object + description: | + Information about upload + properties: + fileName: + type: string + size: + type: integer + format: int64 + checksum: + type: string + checksumAlgo: + type: string + default: sha1 + enum: + - sha1 + - sha256 + required: + - fileName + - size + diff --git a/schemas/openapi/src/main/resources/schemas/common/url.yaml b/schemas/openapi/src/main/resources/schemas/common/url.yaml new file mode 100644 index 00000000..249d022a --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/common/url.yaml @@ -0,0 +1,26 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2018-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" + +info: + title: Url YAML + description: Url Spec Object + version: "1.0" + + +definitions: + Url: + type: object + properties: + host: + type: string + port: + type: integer + minimum: 0 + maximum: 65535 + ssl: + type: boolean diff --git a/schemas/openapi/src/main/resources/schemas/common/user.yaml b/schemas/openapi/src/main/resources/schemas/common/user.yaml new file mode 100644 index 00000000..64dcd59d --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/common/user.yaml @@ -0,0 +1,130 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2018-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" + +info: + title: User YAML + description: User Spec Object in VCD. + version: "1.0" + + +definitions: + VcdUser: + x-vcloud-added-in: "35.0" + description: | + User Spec object. + type: + object + properties: + username: + type: + string + description: "Immutable user name of the user." + fullName: + type: + string + default: "" + description: "Full name (display name) of the user." + description: + type: + string + default: "" + description: "Description of the user." + id: + type: + string + description: "Unique id for the user." + x-vcloud-constraints: + - constraint: NonSortable + - constraint: ReadOnly + - constraint: Urn + args: + - arg: user + roleEntityRefs: + type: array + items: + $ref: "./entity.yaml#/definitions/EntityReference" + description: "The role(s) of the user. If isGroupRole is true, this user inherits their role(s) from group membership(s)" + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + orgEntityRef: + $ref: "./entity.yaml#/definitions/EntityReference" + description: "Organization that the user belongs to." + x-vcloud-constraints: + - constraint: ReadOnly + password: + type: + string + description: "Password for the user. Must be null for external users." + x-vcloud-password: true + x-vcloud-restricted: Restricted field, requires right "View Group / User" to access this field. + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + deployedVmQuota: + type: integer + description: "The deployed VM quota for this user. Defaults to 0 which means unlimited. This property is deprecated in 35.0. Use user quotas API." + format: int32 + x-vcloud-restricted: Restricted field, requires right "View Group / User" to access this field. + x-vcloud-deprecated-in: "35.0" + x-vcloud-deprecated-alternative: Use user quotas API + storedVmQuota: + type: integer + description: "The stored VM quota for this user. Defaults to 0 which means unlimited. This property is deprecated in 35.0. Use user quotas API." + format: int32 + x-vcloud-restricted: Restricted field, requires right "View Group / User" to access this field. + x-vcloud-deprecated-in: "35.0" + x-vcloud-deprecated-alternative: Use user quotas API + email: + type: + string + format: email + description: "A user's email address. Based on org email preferences, notifications can be sent to the user via email." + x-vcloud-constraints: + - constraint: Email + x-vcloud-restricted: Restricted field, requires right "View Group / User" to access this field. + nameInSource: + type: + string + description: "Name of the user in its source." + x-vcloud-restricted: Restricted field, requires right "View Group / User" to access this field. + x-vcloud-constraints: + - constraint: ReadOnly + enabled: + type: boolean + description: "Enabled state of the user. Defaults to true." + x-vcloud-restricted: Restricted field, requires right "View Group / User" to access this field. + isGroupRole: + type: boolean + description: "Determines if this user's role is inherited from a group. Defaults to false." + x-vcloud-restricted: Restricted field, requires right "View Group / User" to access this field. + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + providerType: + type: string + x-vcloud-restricted: Restricted field, requires right "View Group / User" to access this field. + description: "Provider type of the user. It is immutable and must be one of: LOCAL, LDAP, SAML, OAUTH." + required: + - username + - roleEntityRefs + + VcdUsers: + x-vcloud-added-in: "35.0" + description: | + A list of Users of an organization. + allOf: + - $ref: "query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + description: The current page of users. + items: + $ref: '#/definitions/VcdUser' diff --git a/schemas/openapi/src/main/resources/schemas/compute-policy/compute-policy-2.0.0.yaml b/schemas/openapi/src/main/resources/schemas/compute-policy/compute-policy-2.0.0.yaml new file mode 100644 index 00000000..c81eca43 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/compute-policy/compute-policy-2.0.0.yaml @@ -0,0 +1,1407 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2020-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The vCloud Director compute policy API allows to create and view compute policies in vDC and provider vDC. + version: "2.0" + title: vCloud Director compute policy API + +paths: + vdc-compute-policies: + get: + x-vcloud-multisite: true + tags: + - vdcComputePolicies2 + summary: Get list of organization VDC compute policies. + description: | + Get list of organization VDC compute policy. +
+ Results can be filtered by: +
    +
  • id +
  • name +
  • pvdcId +
  • isSizingOnly +
  • policyType +
  • vdc.id +
  • pvdcComputePolicy.id +
  • publishableToVdc +
  • pvdc +
  • isAutoGenerated +
  • _context +
      +
      + Supported contexts are: + Org VDC Urn ID (_context==orgVdcUrn) - | +
      + Returns all the VDC compute policies which are available to a specific Org VDC. + x-vcloud-added-in: "35.0" + operationId: queryVdcComputePolicies + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/VdcComputePolicies2" + + post: + tags: + - vdcComputePolicies2 + summary: Creates a new organization VDC compute policy + description: | + Creates a new VDC compute policy. if PolicyType is VdcKubernetesPolicy, + then the response is a 202 with task URL in location header. For + VdcVmPolicy type, the response is 201 with created policy in response body. + x-vcloud-added-in: "35.0" + operationId: createVdcComputePolicy + consumes: + - application/json + parameters: + - name: newVdcComputePolicyParams + in: body + required: true + schema: + $ref: "#/definitions/VdcComputePolicy2" + produces: + - application/json + responses: + 201: + description: Created + schema: + $ref: "#/definitions/VdcComputePolicy2" + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + + vdc-compute-policy: + parameters: + - name: vdcComputePolicyId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: vdcComputePolicy + get: + tags: + - vdcComputePolicies2 + summary: Get specified organization VDC compute policy + x-vcloud-added-in: "35.0" + operationId: getVdcComputePolicy + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/VdcComputePolicy2" + 404: + description: Not Found + put: + tags: + - vdcComputePolicies2 + summary: Update specified organization VDC compute policy + description: | + Updates vDC compute policy. if PolicyType is VdcKubernetesPolicy, + then the response is a 202 with task URL in location header. For + VdcVmPolicy type, the response is 200 with updated policy in response body. + x-vcloud-added-in: "35.0" + operationId: updateVdcComputePolicy + consumes: + - application/json + parameters: + - name: updateVdcComputePolicyParams + in: body + required: true + schema: + $ref: "#/definitions/VdcComputePolicy2" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/VdcComputePolicy2" + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + delete: + tags: + - vdcComputePolicies2 + summary: Delete specified organization VDC compute policy. + description: | + Deletes vDC compute policy. if PolicyType is VdcKubernetesPolicy, + then the response is a 202 with task URL in location header, else + 204 is returned. + x-vcloud-added-in: "35.0" + operationId: deleteVdcComputePolicy + responses: + 204: + description: No Content + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + + vdc-compute-policy-metrics: + parameters: + - name: vdcComputePolicyId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: vdcComputePolicy + get: + tags: + - vdcComputePolicies2 + summary: Get specified organization VDC compute policy metrics. + description: | + Returns metrics for the given compute policy. Returns 400 if + the policyType does not support metrics. For example, if type of + the policy is VdcVmPolicy, then this API returns a 400 BadRequest response. + x-vcloud-added-in: "35.0" + operationId: getVdcComputePolicyMetrics + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/VdcComputePolicyMetrics" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + + virtual-machine-classes-vdc-policy: + parameters: + - name: vdcComputePolicyId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: vdcComputePolicy + get: + tags: + - vdcComputePolicies2 + summary: Get a list of Virtual Machine Classes associated with this policy. + description: | + Get a list of Virtual Machine Classes associated with this policy. + Returns 400 if policy type is anything but VdcKubernetesPolicy. + x-vcloud-added-in: "35.0" + operationId: queryVirtualMachineClasses + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/VirtualMachineClasses" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + + virtual-machine-classes-pvdc-policy: + parameters: + - name: pvdcComputePolicyId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: pvdcComputePolicy + get: + tags: + - pvdcComputePolicies2 + summary: Get a list of Virtual Machine Classes associated with this policy. + description: | + Get a list of Virtual Machine Classes associated with this policy. + Returns 400 if policy type is anything but PvdcKubernetesPolicy. + x-vcloud-added-in: "35.0" + operationId: queryVirtualMachineClasses + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/VirtualMachineClasses" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + + vdc-refs: + parameters: + - name: vdcComputePolicyId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: vdcComputePolicy + + post: + tags: + - vdcComputePolicies2 + summary: Assign this organization VDC compute policy to list of VDCs. + x-vcloud-added-in: "35.0" + operationId: addVdcComputePolicyToVdcs + consumes: + - application/json + parameters: + - name: vdcRefs + in: body + required: true + schema: + type: array + items: + $ref: "#/definitions/EntityReference" + produces: + - application/json + responses: + 200: + description: OK + schema: + type: array + items: + $ref: '#/definitions/EntityReference' + get: + tags: + - vdcComputePolicies2 + summary: Get orgatization VDCs this VDC compute policy has been assigned/published to + x-vcloud-added-in: "35.0" + operationId: getVdcComputePolicyVdcs + produces: + - application/json + responses: + 200: + description: OK + schema: + type: array + items: + $ref: '#/definitions/EntityReference' + 404: + description: Not Found + + pvdc-compute-policies: + get: + tags: + - pvdcComputePolicies2 + summary: Get list of provider vDC compute policies. + description: | + Get list of provider vDC compute policies. Only filtering by provider vDC compute policy name is supported. + x-vcloud-added-in: "35.0" + operationId: queryPvdcComputePolicies + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/PvdcComputePolicies2" + post: + tags: + - pvdcComputePolicies2 + summary: Creates a new provider vDC compute policy + description: | + Creates a new pVDC compute policy + x-vcloud-added-in: "35.0" + operationId: createPvdcComputePolicy + consumes: + - application/json + parameters: + - name: pvdcComputePolicy + in: body + required: true + schema: + $ref: "./compute-policy/compute-policy-2.0.0.yaml#/definitions/PvdcComputePolicy2" + produces: + - application/json + responses: + 201: + description: Created + schema: + $ref: "#/definitions/PvdcComputePolicy2" + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + + pvdc-compute-policy: + parameters: + - name: pvdcComputePolicyId + in: path + description: ID of provider vDC Compute Policy + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: pvdcComputePolicy + get: + tags: + - pvdcComputePolicies2 + summary: Get specified provider vDC compute policy + x-vcloud-added-in: "35.0" + operationId: getPvdcComputePolicy + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/PvdcComputePolicy2" + 404: + description: Not Found + put: + tags: + - pvdcComputePolicies2 + summary: Update specified provider vDC compute policy + x-vcloud-added-in: "35.0" + operationId: updatePvdcComputePolicy + consumes: + - application/json + parameters: + - name: pvdcComputePolicyId + in: path + description: ID of provider vDC Compute Policy + required: true + type: string + - name: pvdcComputePolicy + in: body + required: true + schema: + $ref: "#/definitions/PvdcComputePolicy2" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/PvdcComputePolicy2" + delete: + tags: + - pvdcComputePolicies2 + summary: Delete specified provider vDC compute policy. + x-vcloud-added-in: "35.0" + operationId: deletePvdcComputePolicy + responses: + 204: + description: No Content + + pvdc-compute-policy-metrics: + parameters: + - name: pvdcComputePolicyId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: pvdcComputePolicy + get: + tags: + - pvdcComputePolicies2_Dummy + summary: Get specified provider vDC compute policy metrics + description: | + Returns metrics for the given compute policy. Returns 400 if + the policyType does not support metrics. For example, if type of + the policy is PvdcVmPolicy, then this API returns a 400 BadRequest response. + x-vcloud-added-in: "35.0" + operationId: getPvdcComputePolicyMetrics + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/PvdcComputePolicyMetrics" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + + pvdc-vm-policies: + get: + tags: + - pvdcComputePolicies2_Dummy + summary: Get all VMs associated with this pVDC compute policy + operationId: getPvdcComputePolicyVms + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/PvdcVmPolicy' + 404: + description: Not Found + + pvdc-tkg-policies: + get: + tags: + - pvdcComputePolicies2_Dummy + summary: Get all VMs associated with this pVDC compute policy + operationId: getPvdcComputePolicyVms + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/PvdcKubernetesPolicy' + 404: + description: Not Found + + pvdc-policy-metrics: + get: + tags: + - pvdcComputePolicies2_Dummy + summary: Get Provider vDC Kubernetes policy metrics + operationId: getPvdcComputePolicyMetrics + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/PvdcKubernetesPolicyMetrics' + 404: + description: Not Found + + vdc-vm-policies: + get: + tags: + - vdcComputePolicies2_Dummy + summary: Get all VMs associated with this vDC compute policy + operationId: getVdcComputePolicyVms + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/VdcVmPolicy' + 404: + description: Not Found + + vdc-tkg-policies: + get: + tags: + - vdcComputePolicies2_Dummy + summary: Get all VMs associated with this vDC compute policy + operationId: getVdcComputePolicyVms + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/VdcKubernetesPolicy' + 404: + description: Not Found + + vdc-policy-metrics: + get: + tags: + - vdcComputePolicies2_Dummy + summary: Get Vdc Kubernetes policy metrics + operationId: getVdcKubernetesPolicyMetrics + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/VdcKubernetesPolicyMetrics' + 404: + description: Not Found + + supported-kubernetes-versions: + parameters: + - name: vdcComputePolicyId + in: path + required: true + type: string + + get: + tags: + - vdcComputePolicies2NonPublic + summary: Get the supported Kubernetes Versions for a particular compute policy + operationId: getSupportedKubernetesVersions + x-vcloud-added-in: "35.0" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/SupportedKubernetesVersions' + +definitions: + + VdcComputePolicy2: + type: object + x-vcloud-added-in: "35.0" + discriminator: policyType + description: | + vDC compute policy that contains vDC specific configuration for workloads. (Version 2.0.0) + properties: + id: + type: string + description: | + UUID for vDC compute policy. This is immutable. + description: + type: string + minLength: 1 + maxLength: 256 + default: "A vDC compute policy." + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + policyType: + type: string + description: | + The discriminator type is used to differentiate among various sub policy types. + name: + type: string + minLength: 1 + maxLength: 128 + required: true + description: | + Display name. + pvdcComputePolicy: + description: | + This field cannot be updated and is a read-only field in the client after creation. + x-vcloud-constraints: + - constraint: NonSortable + $ref: '#/definitions/EntityReference' + compatibleVdcTypes: + type: array + x-vcloud-restricted: | + Restricted field, requires 'View Alternate Admin version of Compute Policies for an Organization vDC' right to access this field. + description: A list of read-only compatible vDC types for this policy. + items: + type: string + isSizingOnly: + type: boolean + readOnly: true + description: | + This field cannot be updated and is a read-only field in the client after creation. It defines whether + the policy is SIZING_ONLY or if it also contains affinity information. + pvdcId: + type: string + x-vcloud-restricted: | + Restricted field, requires 'View Alternate Admin version of Compute Policies for an Organization vDC' right to access this field. + description: | + URN for Provider vDC. + x-vcloud-constraints: + - constraint: NonSortable + - constraint: Urn + args: + - arg: providervdc + isAutoGenerated: + type: boolean + x-vcloud-constraints: + - constraint: ReadOnly + description: | + It is a read-only field. It indicates whether the policy is auto-generated. + x-vcloud-cross-references: + - cross-reference: + x-vcloud-added-in: "36.0" + alias: publishableToVdc + description: | + A filter to look up compute policies that are available to publish to the VDC. + Supported filters: + publishableToVdc==urn:vcloud:vdc:${UUID} + - cross-reference: + x-vcloud-added-in: "35.2" + alias: pvdc + description: | + A filter to look up vDC compute policies that refer to a global placement policy + (PvdcComputePolicy) belonging to the given PVDC. + Supported filters: + pvdc==urn:vcloud:providervdc:${UUID} + required: + - name + - policyType + example: + description: | + This is an example payload to create a policy of type VdcKubernetesPolicy. + Follow /1.0.0/vdcComputePolicies example to know payload to create a VdcVmPolicy type + of compute policy. Note that policyType field will have to be added to the payload taken + from /1.0.0/vdcComputePolicies example, if you are using /2.0.0/vdcComputePolicies. + policyType: VdcKubernetesPolicy + name: myPolicy + pvdcComputePolicy: + name: nameOfPvdcPolicy + id: urn:vcloud:pvdcComputePolicy:494f4a50-09ce-4ba7-913b-3fde593bc7ef + kubernetesConfig: + storageClasses: + - storageClass: gold + limit: 20480 + - storageClass: silver + limit: 10240 + virtualMachineClasses: + - best-effort-xsmall + - best-effort-small + namespaceResourceSpec: + cpuLimit: 1000 + memoryLimit: 1024 + memoryReservationGuarantee: 1.0 + cpuReservationGuarantee: 1.0 + vdc: + name: vdc1 + id: urn:vcloud:vdc:f8dfe02d-47e5-4e3c-ba71-f0d67810d0ef + x-vcloud-property-annotations: + pvdcComputePolicy: + x-vcloud-added-in: "35.0" + x-vcloud-restricted: | + Restricted field, requires 'View Alternate Admin version of Compute Policies for an Organization vDC' right to access this field. + + VdcVmPolicy: + x-vcloud-added-in: "35.0" + description: | + Policy configuration that is applicable to virtual machines. + allOf: + - $ref: "./compute-policy/compute-policy-2.0.0.yaml#/definitions/VdcComputePolicy2" + - type: object + properties: + cpuSpeed: + type: integer + format: int64 + description: | + The CPU speed in MHz of this VM. This is optional. When provided, + VMs with this policy cannot have more than CPU speed defined by this field. + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + memory: + type: integer + format: int64 + description: | + The maximum memory in MB allowed for a VM. This is optional. When provided, VMs with + this policy cannot have configured memory more than defined by this field. + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + cpuCount: + type: integer + format: int32 + description: | + The maximum number of CPUs allowed for a VM. This is optional. When provided, + VMs with this policy cannot have more than number of CPUs defined by this field. + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + coresPerSocket: + type: integer + format: int32 + description: | + The cores per socket to be configured for the VM where this policy is applied. + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + memoryReservationGuarantee: + type: number + x-vcloud-restricted: | + Restricted field, requires 'View Alternate Admin version of Compute Policies for an Organization vDC' right to access this field. + format: double + minimum: 0 + exclusiveMinimum: false + maximum: 1 + exclusiveMaximum: false + description: | + The factor of the configured memory reserved for the VM on which this policy is applied. + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + cpuReservationGuarantee: + type: number + x-vcloud-restricted: | + Restricted field, requires 'View Alternate Admin version of Compute Policies for an Organization vDC' right to access this field. + format: double + minimum: 0 + exclusiveMinimum: false + maximum: 1 + exlusiveMaximum: false + description: | + The factor of the configured CPU reserved for the VM on which this policy is applied. + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + cpuLimit: + type: integer + x-vcloud-restricted: | + Restricted field, requires 'View Alternate Admin version of Compute Policies for an Organization vDC' right to access this field. + format: int64 + description: | + The limit of CPU in MHz for the VM on which this policy is applied. -1 means unlimited. This + is optional. If not provided, limit would be equal to the vCPUSpeed multiplied by numCPU. + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + memoryLimit: + type: integer + x-vcloud-restricted: | + Restricted field, requires 'View Alternate Admin version of Compute Policies for an Organization vDC' right to access this field. + format: int64 + description: | + The limit of memory in MB for the VM on which this policy is applied. -1 means unlimited. This + is optional. If not provided, limit would be equal to the configured memory of the VM. + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + cpuShares: + type: integer + x-vcloud-restricted: | + Restricted field, requires 'View Alternate Admin version of Compute Policies for an Organization vDC' right to access this field. + format: int32 + description: | + The number of CPU shares for the VM on which this policy is applied. This is optional. If + not provided, Normal shares would be applied to the VM. + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + memoryShares: + type: integer + x-vcloud-restricted: | + Restricted field, requires 'View Alternate Admin version of Compute Policies for an Organization vDC' right to access this field. + format: int32 + description: | + The number of memory shares for the VM on which this policy is applied. This is optional. If + not provided, Normal shares would be applied to the VM. + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + extraConfigs: + type: object + x-vcloud-restricted: | + Restricted field, requires 'View Alternate Admin version of Compute Policies for an Organization vDC' right to access this field. + description: | + Map of extra configs to be set on the VM with this policy. + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + additionalProperties: + type: string + namedVmGroups: + type: array + x-vcloud-deprecated-in: "35.2" + x-vcloud-deprecated-alternative: pvdcNamedVmGroupsMap + x-vcloud-restricted: | + Restricted field, requires 'View Alternate Admin version of Compute Policies for an Organization vDC' right to access this field. + items: + type: array + items: + $ref: '#/definitions/EntityReference' + description: | + List of list of vmGroups grouped together in a meaningful manner. + A group of vmGroups would consist of one functionally equal vmGroup picked from each cluster of the provider vDC. + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + pvdcNamedVmGroupsMap: + type: array + x-vcloud-restricted: | + Restricted field, requires 'View Alternate Admin version of Compute Policies for an Organization vDC' right to access this field. + x-vcloud-added-in: "35.2" + items: + type: object + properties: + pvdc: + description: | + EntityReference of provider vDC. + $ref: '#/definitions/EntityReference' + namedVmGroups: + type: array + items: + type: array + items: + $ref: '#/definitions/EntityReference' + description: | + Map of pvdcIds to its vmGroups grouped together in a meaningful manner. + A group of vmGroups would consist of one functionally equal vmGroup picked from each cluster of the provider vDC. + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + logicalVmGroupReferences: + type: array + x-vcloud-deprecated-in: "35.2" + x-vcloud-deprecated-alternative: pvdcLogicalVmGroupsMap + x-vcloud-restricted: | + Restricted field, requires 'View Alternate Admin version of Compute Policies for an Organization vDC' right to access this field. + description: | + List of logical vm group references. This value is set at creation time and cannot be edited later. + items: + $ref: '#/definitions/EntityReference' + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + pvdcLogicalVmGroupsMap: + type: array + x-vcloud-restricted: | + Restricted field, requires 'View Alternate Admin version of Compute Policies for an Organization vDC' right to access this field. + x-vcloud-added-in: "35.2" + items: + type: object + properties: + pvdc: + description: | + EntityReference of provider vDC. + $ref: '#/definitions/EntityReference' + logicalVmGroups: + type: array + items: + $ref: '#/definitions/EntityReference' + description: | + Map of pvdcIds to its logical vmGroups. + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + + VdcKubernetesPolicy: + x-vcloud-added-in: "35.0" + description: | + Policy configuration that is applicable to Kubernetes clusters. + allOf: + - $ref: "./compute-policy/compute-policy-2.0.0.yaml#/definitions/VdcComputePolicy2" + - type: object + properties: + supervisorNamespaceName: + type: string + description: | + The supervisor namespace name. + kubernetesConfig: + $ref: "./compute-policy/compute-policy-2.0.0.yaml#/definitions/KubernetesConfig" + vdc: + description: | + EntityReference of vDC to which this policy needs to be scoped. This policy + is automatically published to this vDC and cannot be published to any other + vDC. This field cannot be updated after policy creation. + x-vcloud-constraints: + - constraint: NonSortable + $ref: '#/definitions/EntityReference' + required: + - vdc + x-vcloud-property-annotations: + supervisorNamespaceName: + x-vcloud-added-in: "35.2" + x-vcloud-restricted: | + Restricted field, requires 'View Alternate Admin version of Compute Policies for an Organization vDC' right to access this field. + + + VdcComputePolicies2: + description: | + A list of vDC compute policies. (Version 2.0.0) + allOf: + - $ref: '#/definitions/Page' + - type: object + properties: + values: + type: array + description: The current page of vDC compute policies. + items: + $ref: '#/definitions/VdcComputePolicy2' + + PvdcComputePolicy2: + type: object + x-vcloud-added-in: "35.0" + discriminator: policyType + description: | + Pvdc compute policy that contains PVDC specific configuration for workloads. (Version 2.0.0) + properties: + id: + type: string + description: | + UUID for pVDC compute policy. This is immutable. + name: + type: string + minLength: 1 + maxLength: 128 + description: | + Display name. + policyType: + type: string + description: | + The discriminator type is used to differentiate among various sub policy types. + description: + type: string + default: "" + minLength: 1 + maxLength: 256 + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + pvdcId: + type: string + description: | + URN for Provider vDC. If not provided, then this policy + is considered Global. + x-vcloud-constraints: + - constraint: Urn + args: + - arg: providervdc + x-vcloud-cross-references: + - cross-reference: + x-vcloud-added-in: "35.2" + alias: pvdc + description: | + A filter to look up PVDC compute policies belonging to the given PVDC. + An empty global policy belongs to all PVDCs and hence will be returned + by this filter too. + Supported filters: + pvdc==urn:vcloud:providervdc:${UUID} + required: + - name + - policyType + example: + description: | + This is an example payload to create a policy of type PvdcKubernetesPolicy. + Follow /1.0.0/pvdcComputePolicies example to know payload to create a PvdcVmPolicy type + of compute policy. Note that policyType field will have to be added to the payload taken + from /1.0.0/pvdcComputePolicies example, if you are using /2.0.0/pvdcComputePolicies. + policyType: PvdcKubernetesPolicy + name: myPolicy + pvdcId: urn:vcloud:providervdc:d1c4cc73-f111-4bc2-a361-e91839c061c9 + supervisorCluster: + moref: domain-c8 + name: test-cluster + kubernetesConfig: + storageClasses: + - storageClass: gold + limit: 20480 + - storageClass: silver + limit: 10240 + virtualMachineClasses: + - best-effort-xsmall + - best-effort-small + namespaceResourceSpec: + cpuLimit: 1000 + memoryLimit: 1024 + memoryReservationGuarantee: 1.0 + cpuReservationGuarantee: 1.0 + + PvdcVmPolicy: + x-vcloud-added-in: "35.0" + description: | + Policy configuration that is applicable to virtual machines. + allOf: + - $ref: "./compute-policy/compute-policy-2.0.0.yaml#/definitions/PvdcComputePolicy2" + - type: object + properties: + namedVmGroups: + type: array + x-vcloud-deprecated-in: "35.2" + x-vcloud-deprecated-alternative: pvdcNamedVmGroupsMap + items: + type: array + items: + $ref: '#/definitions/EntityReference' + description: | + List of vmGroups grouped together in a meaningful manner. + A group of vmGroups would consist of one functionally equal vmGroup picked from each cluster of the provider vDC. + pvdcNamedVmGroupsMap: + type: array + x-vcloud-added-in: "35.2" + items: + type: object + properties: + pvdc: + description: | + EntityReference of provider vDC. + $ref: '#/definitions/EntityReference' + namedVmGroups: + type: array + items: + type: array + items: + $ref: '#/definitions/EntityReference' + description: | + Map of pvdcIds to its vmGroups grouped together in a meaningful manner. + A group of vmGroups would consist of one functionally equal vmGroup picked from each cluster of the provider vDC. + logicalVmGroupReferences: + type: array + x-vcloud-deprecated-in: "35.2" + x-vcloud-deprecated-alternative: pvdcLogicalVmGroupsMap + description: | + This field cannot be updated and is a read-only field after creation. + items: + $ref: '#/definitions/EntityReference' + pvdcLogicalVmGroupsMap: + type: array + x-vcloud-added-in: "35.2" + items: + type: object + properties: + pvdc: + description: | + EntityReference of provider vDC. + $ref: '#/definitions/EntityReference' + logicalVmGroups: + type: array + items: + $ref: '#/definitions/EntityReference' + description: | + Map of pvdcIds to its logical vmGroups. + x-vcloud-property-annotations: + namedVmGroups: + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + pvdcNamedVmGroupsMap: + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + logicalVmGroupReferences: + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + pvdcLogicalVmGroupsMap: + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + + PvdcKubernetesPolicy: + x-vcloud-added-in: "35.0" + description: | + Policy configuration that is applicable to Kubernetes clusters. + allOf: + - $ref: "./compute-policy/compute-policy-2.0.0.yaml#/definitions/PvdcComputePolicy2" + - type: object + properties: + supervisorCluster: + type: object + description: | + Supervisor cluster. This field cannot be changed after creation. + properties: + moref: + type: string + description: | + Moref of the supervisor cluster. + name: + type: string + x-vcloud-constraints: + - constraint: ReadOnly + description: | + Name of the supervisor cluster. This is a read-only field. + required: + - moref + kubernetesConfig: + $ref: "./compute-policy/compute-policy-2.0.0.yaml#/definitions/KubernetesConfig" + required: + - supervisorClusterMoref + + KubernetesConfig: + type: object + x-vcloud-added-in: "35.0" + description: | + Kubernetes config needed to create TKG clusters. + properties: + storageClasses: + type: array + description: | + Storage classses and their limits to be used in supervisor namespace created from + this policy. + items: + type: object + properties: + storageClass: + type: string + description: | + Name of the storage class. + limit: + type: integer + format: int64 + description: | + Default limit of storage from this storage class. + virtualMachineClasses: + type: array + description: | + Virtual machine classses to be used in supervisor namespace created from + this policy. + items: + type: string + namespaceResourceSpec: + type: object + description: | + Various resource spec values to be used in supervisor namespace created from + this policy. + properties: + cpuLimit: + type: integer + format: int64 + description: | + CPU limit in MHz for the underlying namespace created from this policy. + Unlimited if left empty. + memoryLimit: + type: integer + format: int64 + description: | + Memory limit in MB for the underlying namespace created from this policy. + Unlimited if left empty. + memoryReservationGuarantee: + type: number + format: double + minimum: 0 + exclusiveMinimum: false + maximum: 1 + exclusiveMaximum: false + description: | + The factor of the configured memory reserved. + cpuReservationGuarantee: + type: number + format: double + minimum: 0 + exclusiveMinimum: false + maximum: 1 + exclusiveMaximum: false + description: | + The factor of the configured CPU reserved for the VM on which this policy is applied. + required: + - virtualMachineClasses + - storageClasses + + PvdcComputePolicies2: + description: | + A list of provider vDC compute policies. (Version 2.0.0) + allOf: + - $ref: '#/definitions/Page' + - type: object + properties: + values: + type: array + description: The current page of provider vDC compute policies. + items: + $ref: '#/definitions/PvdcComputePolicy2' + + PvdcComputePolicyMetrics: + type: object + x-vcloud-added-in: "35.0" + discriminator: policyMetricsType + description: | + Metrics for Pvdc compute policy + properties: + policyMetricsType: + type: string + description: | + The discriminator type is used to differentiate among various sub policy metrics types. + required: + - policyMetricsType + + PvdcKubernetesPolicyMetrics: + x-vcloud-added-in: "35.0" + description: | + Metrics for PvdcKubernetesPolicy + allOf: + - $ref: "./compute-policy/compute-policy-2.0.0.yaml#/definitions/PvdcComputePolicyMetrics" + - $ref: "./compute-policy/compute-policy-2.0.0.yaml#/definitions/KubernetesPolicyMetrics" + + KubernetesPolicyMetrics: + x-vcloud-added-in: "35.0" + description: | + Metrics for KubernetesPolicy + type: object + properties: + cpuMetrics: + type: object + properties: + totalCpuMHz: + type: integer + format: int64 + description: | + Total CPU available in MHz. + cpuUsedMHz: + type: integer + format: int64 + description: | + Total CPU used in MHz. + totalCpuReservationMHz: + type: integer + format: int64 + description: | + Total CPU reservation available in MHz. + cpuReservationUsedMHz: + type: integer + format: int64 + description: | + Total CPU reservation used in MHz. + memoryMetrics: + type: object + properties: + totalMemoryMB: + type: integer + format: int64 + description: | + Total Memory available in MB. + memoryUsedMB: + type: integer + format: int64 + description: | + Total memory used in MB. + totalMemoryReservationMB: + type: integer + format: int64 + description: | + Total Memory reservation available in MB. + memoryReservationUsedMB: + type: integer + format: int64 + description: | + Total Memory reservation used in MB. + storageMetrics: + type: array + items: + type: object + properties: + storageClassName: + type: string + description: | + Name of the storage class. + totalStorageMB: + type: integer + format: int64 + description: | + Total Storage available in MB. + storageUsedMB: + type: integer + format: int64 + description: | + Storage used in MB. + + VdcComputePolicyMetrics: + type: object + x-vcloud-added-in: "35.0" + discriminator: policyMetricsType + description: | + Metrics for Vdc compute policy + properties: + policyMetricsType: + type: string + description: | + The discriminator type is used to differentiate among various sub policy type metrics. + required: + - policyMetricsType + + VdcKubernetesPolicyMetrics: + x-vcloud-added-in: "35.0" + description: | + Metrics for VdcKubernetesPolicy + allOf: + - $ref: "./compute-policy/compute-policy-2.0.0.yaml#/definitions/VdcComputePolicyMetrics" + - $ref: "./compute-policy/compute-policy-2.0.0.yaml#/definitions/KubernetesPolicyMetrics" + + VirtualMachineClass: + type: object + x-vcloud-added-in: "35.0" + description: | + In a Tanzu Kubernetes cluster Virtual Machine Classes reserve a set of resources for the VM including cpu, memory, and storage. + properties: + name: + type: string + description: | + Name of the Virtual Machine Class. + x-vcloud-constraints: + - constraint: ReadOnly + cpuReservationRequestedMHz: + type: integer + format: int64 + description: | + CPU in MHz that a node reserves when this VirtualMachineClass is applied to the node of a Kubernetes cluster. + x-vcloud-constraints: + - constraint: ReadOnly + memoryReservationRequestedMB: + type: integer + format: int64 + description: | + Memory in MB that a node reserves when this VirtualMachineClass is applied to the node of a Kubernetes cluster. + x-vcloud-constraints: + - constraint: ReadOnly + cpuCount: + type: integer + format: int32 + description: | + Number of CPUs that a node gets when this VirtualMachineClass is applied to the node of a Kubernetes cluster. + x-vcloud-constraints: + - constraint: ReadOnly + memoryMB: + type: integer + format: int64 + description: | + Memory in MB that a node gets when this VirtualMachineClass is applied to the node of a Kubernetes cluster. + x-vcloud-constraints: + - constraint: ReadOnly + isFullyReserved: + type: boolean + description: | + This read-only field conveys whether CPU and memory resources are fully reserved or not when this VirtualMachineClass is applied to the node of the Kubernetes cluster. + x-vcloud-constraints: + - constraint: ReadOnly + + VirtualMachineClasses: + x-vcloud-added-in: "35.0" + description: | + A list of Virtual Machine Classes. + allOf: + - $ref: '#/definitions/Page' + - type: object + properties: + values: + type: array + description: The current page Virtual Machine Classes. + items: + $ref: './compute-policy/compute-policy-2.0.0.yaml#/definitions/VirtualMachineClass' + + SupportedKubernetesVersions: + x-vcloud-added-in: "35.0" + description: | + The supported Kubernetes versions + properties: + supportedVersions: + type: array + items: + type: string + description: | + The supported Kubernetes versions in the form of a comma separated list, e.g: w,x,y,z + x-vcloud-property-annotations: + supportedVersions: + x-vcloud-constraints: + - constraint: ReadOnly + + + EntityReferences: + $ref: "./common/entity.yaml#/definitions/EntityReferences" + EntityReference: + $ref: "./common/entity.yaml#/definitions/EntityReference" + diff --git a/schemas/openapi/src/main/resources/schemas/compute-policy/compute-policy.yaml b/schemas/openapi/src/main/resources/schemas/compute-policy/compute-policy.yaml new file mode 100644 index 00000000..67751480 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/compute-policy/compute-policy.yaml @@ -0,0 +1,630 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2018-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The vCloud Director compute policy API allows to create and view compute policies in vDC and pVdc. + version: "1.0" + title: vCloud Director compute policy API + +paths: + vdc-compute-policies: + get: + x-vcloud-multisite: true + tags: + - vdcComputePolicies + summary: Get list of organization vDC compute policies. + description: | + Get list of organization vDC compute policy. + Results can be filtered by id, pvdcId, isSizingOnly and _context. + Supported contexts are: + Org vDC Urn ID (_context==orgVdcUrn) - | + Returns all the vDC compute policies which are available to a specific Org vDC. + x-vcloud-deprecated-in: "35.0" + x-vcloud-deprecated-alternative: 2.0.0 version of API + operationId: queryVdcComputePolicies + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/VdcComputePolicies" + + post: + tags: + - vdcComputePolicies + summary: Creates a new organization vDC compute policy + description: | + Creates a new vDC compute policy + x-vcloud-deprecated-in: "35.0" + x-vcloud-deprecated-alternative: 2.0.0 version of API + operationId: createVdcComputePolicy + consumes: + - application/json + parameters: + - name: newVdcComputePolicyParams + in: body + required: true + schema: + $ref: "#/definitions/VdcComputePolicy" + produces: + - application/json + responses: + 201: + description: Created + schema: + $ref: "#/definitions/VdcComputePolicy" + + vdc-compute-policy: + parameters: + - name: vdcComputePolicyId + in: path + required: true + type: string + get: + tags: + - vdcComputePolicies + summary: Get specified organization vDC compute policy + x-vcloud-deprecated-in: "35.0" + x-vcloud-deprecated-alternative: 2.0.0 version of API + operationId: getVdcComputePolicy + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/VdcComputePolicy" + 404: + description: Not Found + put: + tags: + - vdcComputePolicies + summary: Update specified organization vDC compute policy + x-vcloud-deprecated-in: "35.0" + x-vcloud-deprecated-alternative: 2.0.0 version of API + operationId: updateVdcComputePolicy + consumes: + - application/json + parameters: + - name: updateVdcComputePolicyParams + in: body + required: true + schema: + $ref: "#/definitions/VdcComputePolicy" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/VdcComputePolicy" + delete: + tags: + - vdcComputePolicies + summary: Delete specified organization vDC compute policy. + x-vcloud-deprecated-in: "35.0" + x-vcloud-deprecated-alternative: 2.0.0 version of API + operationId: deleteVdcComputePolicy + responses: + 204: + description: No Content + + vdc-compute-policy-vm-refs: + parameters: + - name: vdcComputePolicyId + in: path + required: true + type: string + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + get: + tags: + - vdcComputePolicies + summary: Get all VMs associated with this vDC compute policy + operationId: getVdcComputePolicyVms + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EntityReferences' + 404: + description: Not Found + + vdc-refs: + parameters: + - name: vdcComputePolicyId + in: path + required: true + type: string + + post: + tags: + - vdcComputePolicies + summary: Assign this organization vDC compute policy to list of vDCs. + x-vcloud-deprecated-in: "35.0" + x-vcloud-deprecated-alternative: 2.0.0 version of API + operationId: addVdcComputePolicyToVdcs + consumes: + - application/json + parameters: + - name: vdcRefs + in: body + required: true + schema: + type: array + items: + $ref: "#/definitions/EntityReference" + produces: + - application/json + responses: + 200: + description: OK + schema: + type: array + items: + $ref: '#/definitions/EntityReference' + get: + tags: + - vdcComputePolicies + summary: Get organization vDCs associated with this vDC compute policy + x-vcloud-deprecated-in: "35.0" + x-vcloud-deprecated-alternative: 2.0.0 version of API + operationId: getVdcComputePolicyVdcs + produces: + - application/json + responses: + 200: + description: OK + schema: + type: array + items: + $ref: '#/definitions/EntityReference' + 404: + description: Not Found + + pvdc-compute-policies: + get: + tags: + - pvdcComputePolicies + summary: Get list of provider vDC compute policies. + description: | + Get list of provider vDC compute policies. Only filtering by pvdc compute policy name is supported. + x-vcloud-deprecated-in: "35.0" + x-vcloud-deprecated-alternative: 2.0.0 version of API + operationId: queryPvdcComputePolicies + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/PvdcComputePolicies" + post: + tags: + - pvdcComputePolicies + summary: Creates a new provider vDC compute policy + description: | + Creates a new pVDC compute policy + x-vcloud-deprecated-in: "35.0" + x-vcloud-deprecated-alternative: 2.0.0 version of API + operationId: createPvdcComputePolicy + consumes: + - application/json + parameters: + - name: pvdcComputePolicy + in: body + required: true + schema: + $ref: "#/definitions/PvdcComputePolicy" + produces: + - application/json + responses: + 201: + description: Created + schema: + $ref: "#/definitions/PvdcComputePolicy" + + pvdc-compute-policy: + parameters: + - name: pvdcComputePolicyId + in: path + description: ID of provider VDC Compute Policy + required: true + type: string + get: + tags: + - pvdcComputePolicies + summary: Get specified provider vDC compute policy + x-vcloud-deprecated-in: "35.0" + x-vcloud-deprecated-alternative: 2.0.0 version of API + operationId: getPvdcComputePolicy + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/PvdcComputePolicy" + 404: + description: Not Found + put: + tags: + - pvdcComputePolicies + summary: Update specified provider vDC compute policy + x-vcloud-deprecated-in: "35.0" + x-vcloud-deprecated-alternative: 2.0.0 version of API + operationId: updatePvdcComputePolicy + consumes: + - application/json + parameters: + - name: pvdcComputePolicyId + in: path + description: ID of provider VDC Compute Policy + required: true + type: string + - name: pvdcComputePolicy + in: body + required: true + schema: + $ref: "#/definitions/PvdcComputePolicy" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/PvdcComputePolicy" + delete: + tags: + - pvdcComputePolicies + summary: Delete specified provider vDC compute policy. + x-vcloud-deprecated-in: "35.0" + x-vcloud-deprecated-alternative: 2.0.0 version of API + operationId: deletePvdcComputePolicy + responses: + 204: + description: No Content + + pvdc-compute-policy-vm-refs: + parameters: + - name: pvdcComputePolicyId + in: path + description: ID of provider VDC Compute Policy + required: true + type: string + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + get: + tags: + - pvdcComputePolicies + summary: Get all VMs associated with this pVDC compute policy + operationId: getPvdcComputePolicyVms + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EntityReferences' + 404: + description: Not Found + +definitions: + + VdcComputePolicy: + type: object + properties: + id: + type: string + description: | + UUID for vDC compute policy. This is immutable. + description: + type: string + minLength: 1 + maxLength: 256 + default: "A vDC compute policy." + x-vcloud-constraints: + - constraint: NonSortable + name: + type: string + minLength: 1 + maxLength: 128 + required: true + description: | + Display name. + cpuSpeed: + type: integer + x-vcloud-added-in: "32.0" + format: int64 + description: | + The CPU speed in MHz of this VM. This is optional. When provided, + VMs with this policy cannot have more than CPU speed defined by this field. + memory: + type: integer + x-vcloud-added-in: "32.0" + format: int64 + description: | + The maximum memory in MB allowed for a VM. This is optional. When provided, VMs with + this policy cannot have configured memory more than defined by this field. + cpuCount: + type: integer + x-vcloud-added-in: "32.0" + format: int32 + description: | + The maximum number of CPUs allowed for a VM. This is optional. When provided, + VMs with this policy cannot have more than number of CPUs defined by this field. + coresPerSocket: + type: integer + x-vcloud-added-in: "32.0" + format: int32 + description: | + The cores per socket to be configured for the VM where this policy is applied. + memoryReservationGuarantee: + type: number + x-vcloud-added-in: "32.0" + x-vcloud-restricted: | + Restricted field, requires 'View Alternate Admin version of Compute Policies for an Organization VDC' right to access this field. + format: double + minimum: 0 + exclusiveMinimum: false + maximum: 1 + exclusiveMaximum: false + description: | + The factor of the configured memory reserved for the VM on which this policy is applied. + cpuReservationGuarantee: + type: number + x-vcloud-added-in: "32.0" + x-vcloud-restricted: | + Restricted field, requires 'View Alternate Admin version of Compute Policies for an Organization VDC' right to access this field. + format: double + minimum: 0 + exclusiveMinimum: false + maximum: 1 + exlusiveMaximum: false + description: | + The factor of the configured CPU reserved for the VM on which this policy is applied. + cpuLimit: + type: integer + x-vcloud-added-in: "32.0" + x-vcloud-restricted: | + Restricted field, requires 'View Alternate Admin version of Compute Policies for an Organization VDC' right to access this field. + format: int64 + description: | + The limit of CPU in MHz for the VM on which this policy is applied. -1 means unlimited. This + is optional. If not provided, limit would be equal to the vCPUSpeed multiplied by numCPU. + memoryLimit: + type: integer + x-vcloud-added-in: "32.0" + x-vcloud-restricted: | + Restricted field, requires 'View Alternate Admin version of Compute Policies for an Organization VDC' right to access this field. + format: int64 + description: | + The limit of memory in MB for the VM on which this policy is applied. -1 means unlimited. This + is optional. If not provided, limit would be equal to the configured memory of the VM. + cpuShares: + type: integer + x-vcloud-added-in: "32.0" + x-vcloud-restricted: | + Restricted field, requires 'View Alternate Admin version of Compute Policies for an Organization VDC' right to access this field. + format: int32 + description: | + The number of CPU shares for the VM on which this policy is applied. This is optional. If + not provided, Normal shares would be applied to the VM. + memoryShares: + type: integer + x-vcloud-added-in: "32.0" + x-vcloud-restricted: | + Restricted field, requires 'View Alternate Admin version of Compute Policies for an Organization VDC' right to access this field. + format: int32 + description: | + The number of memory shares for the VM on which this policy is applied. This is optional. If + not provided, Normal shares would be applied to the VM. + extraConfigs: + type: object + x-vcloud-added-in: "32.0" + x-vcloud-restricted: | + Restricted field, requires 'View Alternate Admin version of Compute Policies for an Organization VDC' right to access this field. + description: | + Map of extra configs to be set on the VM with this policy. + x-vcloud-constraints: + - constraint: NonSortable + additionalProperties: + type: string + pvdcComputePolicyRef: + description: | + Deprecated in Api 32.0, this property will be removed in future release. + x-vcloud-constraints: + - constraint: NonSortable + $ref: '#/definitions/EntityReference' + pvdcComputePolicy: + x-vcloud-added-in: "32.0" + description: | + This field cannot be updated and is a read-only field in the client after creation. + x-vcloud-constraints: + - constraint: NonSortable + $ref: '#/definitions/EntityReference' + compatibleVdcTypes: + type: array + x-vcloud-added-in: "32.0" + x-vcloud-restricted: | + Restricted field, requires 'View Alternate Admin version of Compute Policies for an Organization VDC' right to access this field. + description: A list of read-only compatible vDC types for this policy. + items: + type: string + isSizingOnly: + type: boolean + readOnly: true + x-vcloud-added-in: "33.0" + description: | + This field cannot be updated and is a read-only field in the client after creation. It defines whether + the policy is SIZING_ONLY or if it also contains affinity information. + pvdcId: + type: string + x-vcloud-restricted: | + Restricted field, requires 'View Alternate Admin version of Compute Policies for an Organization VDC' right to access this field. + x-vcloud-added-in: "33.0" + description: | + URN for Provider VDC. + x-vcloud-constraints: + - constraint: NonSortable + - constraint: Urn + args: + - arg: providervdc + namedVmGroups: + type: array + x-vcloud-restricted: | + Restricted field, requires 'View Alternate Admin version of Compute Policies for an Organization VDC' right to access this field. + items: + type: array + items: + $ref: '#/definitions/EntityReference' + x-vcloud-added-in: "33.0" + description: | + List of list of vmGroups grouped together in a meaningful manner. + A group of vmGroups would consist of one functionally equal vmGroup picked from each cluster of the pvdc. + logicalVmGroupReferences: + type: array + x-vcloud-restricted: | + Restricted field, requires 'View Alternate Admin version of Compute Policies for an Organization VDC' right to access this field. + description: | + List of logical vm group references. This value is set at creation time and cannot be edited later. + x-vcloud-added-in: "33.0" + items: + $ref: '#/definitions/EntityReference' + isAutoGenerated: + type: boolean + x-vcloud-constraints: + - constraint: ReadOnly + x-vcloud-added-in: "33.0" + description: | + This field cannot be updated and is a read-only field in the client. It defines if the policy + is auto-generated. + required: + - name + + x-vcloud-property-annotations: + pvdcComputePolicyRef: + x-vcloud-added-in: "31.0" + x-vcloud-deprecated-in: "32.0" + x-vcloud-deprecated-alternative: pvdcComputePolicy + x-vcloud-removed-in: "32.0" + x-vcloud-restricted: | + Restricted field, requires 'View Alternate Admin version of Compute Policies for an Organization VDC' right to access this field. + + pvdcComputePolicy: + x-vcloud-added-in: "32.0" + x-vcloud-restricted: | + Restricted field, requires 'View Alternate Admin version of Compute Policies for an Organization VDC' right to access this field. + + VdcComputePolicies: + description: | + A list of VDC compute policies. + allOf: + - $ref: '#/definitions/Page' + - type: object + properties: + values: + type: array + description: The current page of VDC compute policies. + items: + $ref: '#/definitions/VdcComputePolicy' + + PvdcComputePolicy: + type: object + properties: + id: + type: string + description: | + UUID for pVDC compute policy. This is immutable. + name: + type: string + minLength: 1 + maxLength: 128 + description: | + Display name. + description: + type: string + default: "" + minLength: 1 + maxLength: 256 + pvdcId: + type: string + description: | + URN for Provider VDC. If not provided, then this policy + is considered Global. + x-vcloud-constraints: + - constraint: Urn + args: + - arg: providervdc + namedVmGroupReferences: + type: array + x-vcloud-added-in: "31.0" + x-vcloud-deprecated-in: "33.0" + x-vcloud-deprecated-alternative: namedVmGroups + x-vcloud-removed-in: "33.0" + description: | + This field cannot be updated and is a read-only field in the client after creation. + Deprecated in Api 33.0, this property will be removed in future release. + items: + $ref: '#/definitions/EntityReference' + namedVmGroups: + type: array + items: + type: array + items: + $ref: '#/definitions/EntityReference' + x-vcloud-added-in: "33.0" + description: | + List of list of vmGroups grouped together in a meaningful manner. + A group of vmGroups would consist of one functionally equal vmGroup picked from each cluster of the pvdc. + logicalVmGroupReferences: + type: array + description: | + This field cannot be updated and is a read-only field after creation. + x-vcloud-added-in: "32.0" + items: + $ref: '#/definitions/EntityReference' + required: + - name + + PvdcComputePolicies: + description: | + A list of provider VDC compute policies. + allOf: + - $ref: '#/definitions/Page' + - type: object + properties: + values: + type: array + description: The current page of provider VDC compute policies. + items: + $ref: '#/definitions/PvdcComputePolicy' + + EntityReferences: + $ref: "./common/entity.yaml#/definitions/EntityReferences" + EntityReference: + $ref: "./common/entity.yaml#/definitions/EntityReference" diff --git a/schemas/openapi/src/main/resources/schemas/compute-policy/logical-vm-group.yaml b/schemas/openapi/src/main/resources/schemas/compute-policy/logical-vm-group.yaml new file mode 100644 index 00000000..75928dfe --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/compute-policy/logical-vm-group.yaml @@ -0,0 +1,245 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2018-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The vCloud Director logical vm group API allows to create and view logical vm groups that can be added to policies. + version: "1.0" + title: vCloud Director logical vm group API + +paths: + logical-vm-groups: + get: + tags: + - logicalVmGroups + summary: Get list of logical vm groups. + x-vcloud-added-in: "32.0" + description: | + Get list of logical vm groups. + operationId: queryLogicalVmGroups + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/LogicalVmGroups" + + post: + tags: + - logicalVmGroups + summary: Creates a new logical vm group + x-vcloud-added-in: "32.0" + description: | + Creates a new logical vm group + operationId: createLogicalVmGroup + consumes: + - application/json + parameters: + - name: newLogicalVmGroupParams + in: body + required: true + schema: + $ref: "#/definitions/LogicalVmGroup" + produces: + - application/json + responses: + 201: + description: Created + schema: + $ref: "#/definitions/LogicalVmGroup" + + logical-vm-group: + parameters: + - name: logicalVmGroupId + in: path + required: true + type: string + get: + tags: + - logicalVmGroups + summary: Get specified logical vm group + x-vcloud-added-in: "32.0" + operationId: getLogicalVmGroup + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/LogicalVmGroup" + 404: + description: Not Found + put: + tags: + - logicalVmGroups + summary: Update specified logical vm group + x-vcloud-added-in: "32.0" + operationId: updateLogicalVmGroup + consumes: + - application/json + parameters: + - name: updateLogicalVmGroupParams + in: body + required: true + schema: + $ref: "#/definitions/LogicalVmGroup" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/LogicalVmGroup" + delete: + tags: + - logicalVmGroups + summary: Delete specified logical vm group. + x-vcloud-added-in: "32.0" + operationId: deleteLogicalVmGroup + responses: + 204: + description: No Content + + logical-vm-group-pvdc-policy-refs: + parameters: + - name: logicalVmGroupId + in: path + required: true + type: string + get: + tags: + - logicalVmGroups + summary: Get all pvdc policies associated with logical vm group + x-vcloud-added-in: "32.0" + operationId: getPvdcPoliciesForLogicalVmGroup + parameters: + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EntityReferences' + 404: + description: Not Found + + logical-vm-group-named-vm-group-refs: + parameters: + - name: logicalVmGroupId + in: path + required: true + type: string + get: + tags: + - logicalVmGroups + summary: Get all named vm groups associated with logical vm group + x-vcloud-added-in: "32.0" + operationId: getLogicalVmGroupNamedVmGroups + parameters: + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EntityReferences' + 404: + description: Not Found + post: + tags: + - logicalVmGroups + summary: Assign named vm groups to logical vm group. + x-vcloud-added-in: "32.0" + operationId: addNamedVmGroupsToLogicalVmGroup + consumes: + - application/json + parameters: + - name: namedVmGroupRefs + in: body + required: true + schema: + type: array + items: + $ref: "#/definitions/EntityReference" + produces: + - application/json + responses: + 200: + description: OK + schema: + type: array + items: + $ref: '#/definitions/EntityReference' + +definitions: + + LogicalVmGroup: + type: object + x-vcloud-added-in: "32.0" + properties: + id: + type: string + description: | + UUID for LogicalVmGroup. This is immutable. + description: + type: string + default: "" + name: + type: string + description: | + Display name. + namedVmGroupReferences: + type: array + description: | + List of named vm groups associated with logical vm group. + items: + $ref: '#/definitions/EntityReference' + pvdcId: + x-vcloud-added-in: "33.0" + type: string + description: | + URN for Provider vDC. + x-vcloud-constraints: + - constraint: Urn + args: + - arg: providervdc + required: + - name + + LogicalVmGroups: + description: | + A list of LogicalVmGroups. + x-vcloud-added-in: "32.0" + allOf: + - $ref: '#/definitions/Page' + - type: object + properties: + values: + type: array + description: The current page of LogicalVmGroups. + items: + $ref: '#/definitions/LogicalVmGroup' + + EntityReferences: + $ref: "./common/entity.yaml#/definitions/EntityReferences" + EntityReference: + $ref: "./common/entity.yaml#/definitions/EntityReference" diff --git a/schemas/openapi/src/main/resources/schemas/cpom/cpomObjects.yaml b/schemas/openapi/src/main/resources/schemas/cpom/cpomObjects.yaml new file mode 100644 index 00000000..643ecde6 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/cpom/cpomObjects.yaml @@ -0,0 +1,481 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2018-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" + +info: + title: Common schema objects for Centralized Point of Management + description: Common schema objects that are used across CPOM API + version: "1.0" + +definitions: + + OverallStatus: + x-vcloud-added-in: "32.0" + description: Overall status of the entity + type: string + enum: + - GRAY + - RED + - YELLOW + - GREEN + + Sddcs: + x-vcloud-added-in: "32.0" + description: | + A paginated list of software-defined data centers + allOf: + - $ref: './common/query.yaml#/definitions/Page' + - type: object + properties: + values: + type: array + items: + $ref: '#/definitions/Sddc' + + Sddc: + x-vcloud-added-in: "32.0" + description: | + Software-defined data center + type: object + properties: + name: + type: string + example: SDDC Sample Name + id: + type: string + x-vcloud-constraints: + - constraint: NonSortable + - constraint: ReadOnly + - constraint: Urn + args: + - arg: sddc + description: + type: string + example: SDDC Sample Description + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + default: "" + enabled: + type: boolean + default: false + vcId: + type: string + description: URN of the associated vCenter. This is not editable once the SDDC has been created. + example: urn:vcloud:vimserver:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + x-vcloud-constraints: + - constraint: NonSortable + version: + type: string + description: Version of the associated vCenter. This is not editable. + example: 6.7.0 + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + - constraint: ReadOnly + overallStatus: + $ref: '#/definitions/OverallStatus' + description: Overall status of the associated vCenter. This is not editable. + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + - constraint: ReadOnly + stats: + $ref: '#/definitions/SddcStats' + description: Associated read-only statistics. + x-vcloud-constraints: + - constraint: ReadOnly + defaultProxy: + $ref: '#/definitions/SddcProxy' + description: | + Default proxy for the SDDC. This field is read-only. To set a new default, edit the proxy + you wish to make the new default by modifying its defaultProxy flag. + Deprecated in Api 34.0. + defaultEndpoint: + x-vcloud-added-in: "33.0" + $ref: '#/definitions/SddcEndpoint' + description: | + Default endpoint for the SDDC. There is an endpoint available for an SDDC even if there are + no proxies configured for the SDDC. This indicates that an endpoint is available that doesn't + require proxying, either because it is publicly accessible or because it assumes an established + VPM connection. The field is read-only. + x-vcloud-constraints: + - constraint: ReadOnly + required: + - name + - vcId + x-vcloud-property-annotations: + defaultProxy: + x-vcloud-deprecated-in: "34.0" + x-vcloud-deprecated-alternative: defaultEndpoint + x-vcloud-constraints: + - constraint: ReadOnly + + SddcEndpoints: + x-vcloud-added-in: "35.0" + description: | + A paginated list of SDDC endpoints + allOf: + - $ref: './common/query.yaml#/definitions/Page' + - type: object + properties: + values: + type: array + items: + $ref: '#/definitions/SddcEndpoint' + + SddcEndpoint: + x-vcloud-added-in: "33.0" + description: An available network connections exposed by the SDDC + type: object + properties: + name: + type: string + example: SDDC Endpoint Sample Name + description: This is a required property. + id: + type: string + endpoint: + type: string + format: uri + description: A network endpoint that the SDDC exposes for communication.Deprecated in Api 35.0. + proxyId: + type: string + description: | + An optional identifier to a Proxy that can be used to establish a connection to the endpoint. + Deprecated in Api 35.0 and replaced by proxy. + targetUrl: + type: string + default: "" + format: uri + example: https://sampleVc.vmware.com/ui + description: | + The URL target of the SDDC endpoint. This is the URL that the browser tab + will be pointed to when the endpoint is launched via the H5 UI of VCD. This is a required property. + proxy: + description: A reference to an optional Proxy that can be used to establish a connection to the endpoint + $ref: '#/definitions/EntityReference' + sddc: + description: The EntityReference of the parent SDDC entity. This is a required property to create the endpoint and once set cannot be edited. + $ref: '#/definitions/EntityReference' + isDefault: + type: boolean + description: | + True if this is the default endpoint for the parent SDDC. An endpoint being the default for the + SDDC means that this endpoint's target will be launched when the SDDC tile is clicked in the + H5 Tenant UI of VCD. + default: false + x-vcloud-property-annotations: + endpoint: + x-vcloud-deprecated-in: "35.0" + x-vcloud-deprecated-alternative: targetUrl + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSortable + - constraint: NonSearchable + proxyId: + x-vcloud-deprecated-in: "35.0" + x-vcloud-deprecated-alternative: proxy + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSortable + - constraint: NonSearchable + - constraint: Urn + args: + - arg: proxy + targetUrl: + x-vcloud-added-in: "35.0" + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + name: + x-vcloud-added-in: "35.0" + id: + x-vcloud-added-in: "35.0" + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + - constraint: Urn + args: + - arg: sddcEndpoint + proxy: + x-vcloud-added-in: "35.0" + sddc: + x-vcloud-added-in: "35.0" + isDefault: + x-vcloud-added-in: "35.0" + x-vcloud-constraints: + - constraint: NonSortable + + SddcStats: + x-vcloud-added-in: "32.0" + description: | + A read-only list of resource allocations for the associated SDDC + type: object + properties: + totalVMs: + type: integer + description: Number of VMs within the SDDC. + poweredOnVMs: + type: integer + description: Number of powered on VMs within the SDDC. + cpu: + $ref: '#/definitions/SddcStat' + description: CPUs statistics of the SDDC (values in MHz). + memory: + $ref: '#/definitions/SddcStat' + description: Memory statistics of the SDDC (values in MB). + storage: + $ref: '#/definitions/SddcStat' + description: Storage statistics of the SDDC (values in MB). + + SddcStat: + x-vcloud-added-in: "32.0" + description: | + A collection of measurements for the SDDC resource + type: object + properties: + numTotal: + type: integer + format: int64 + minimum: 0 + description: Total resource allocation. + numUsed: + type: integer + format: int64 + minimum: 0 + description: Used resource allocation. + numReserved: + type: integer + format: int64 + minimum: 0 + description: Reserved resource allocation. + + SddcProxies: + x-vcloud-added-in: "32.0" + x-vcloud-deprecated-in: "34.0" + x-vcloud-deprecated-alternative: Proxies + description: | + A paginated list of SDDC proxies + allOf: + - $ref: './common/query.yaml#/definitions/Page' + - type: object + properties: + values: + type: array + items: + $ref: '#/definitions/SddcProxy' + + SddcProxy: + x-vcloud-added-in: "32.0" + x-vcloud-deprecated-in: "34.0" + x-vcloud-deprecated-alternative: Proxy + description: | + SDDC proxy configuration + type: object + properties: + name: + type: string + pattern: '.*[\S].*' + example: SDDC Proxy Sample Name + id: + type: string + x-vcloud-constraints: + - constraint: NonSortable + - constraint: ReadOnly + - constraint: Urn + args: + - arg: sddcProxy + sddcId: + type: string + description: URN of the parent SDDC. This is not editable once the proxy has been created. + example: urn:vcloud:sddc:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + x-vcloud-constraints: + - constraint: Urn + args: + - arg: sddc + enabled: + type: boolean + default: true + description: | + True if the proxy is enabled. Proxy can only be enabled/disabled by privileged users. + A disabled proxy cannot be activated and thus, cannot be used. + When a proxy is disabled, all active sessions are terminated. + tenantVisible: + type: boolean + description: Whether this proxy has been published to tenants. + default: false + targetHost: + type: string + description: | + IP address or FQDN of the host being proxied. Lower case formatting will be applied to the value of the property. + This is not editable once the proxy has been created. + x-vcloud-constraints: + - constraint: DomainName + example: sampleVc.vmware.com + active: + type: boolean + description: | + True if the proxy is currently active for the user session associated with the + request made to get the proxy. An inactive proxy cannot be used. + default: false + x-vcloud-constraints: + - constraint: NonSortable + token: + description: | + The generated read-only token that should be used as the password when using this proxy. + To generate a new token, activate the proxy. The token is tied to the user session that activated the proxy. + If the proxy is inactive, this value will be null. + type: string + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + - constraint: ReadOnly + defaultProxy: + type: boolean + description: | + True if this is the default proxy for the parent SDDC. A proxy being the default for the + SDDC means that this proxy's UI will be launched when the SDDC tile is clicked in the + H5 Tenant UI of VCD. If no default proxy is set, clicking the SDDC tile will be a no-op. + default: false + parentProxyId: + type: string + description: | + The URN of the parent proxy. If a proxy has a parent, the proxy is activated along with + its parent and shares the token with its parent. Each proxy may only have one parent. + A parent proxy cannot have a parent of its own. + example: urn:vcloud:sddcProxy:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + x-vcloud-constraints: + - constraint: NonSortable + - constraint: Urn + args: + - arg: sddcProxy + uiUrl: + type: string + default: "" + format: uri + example: https://sampleVc.vmware.com + description: | + The URL of the proxied component's UI endpoint. This is the URL that the browser tab + will be pointed to when the proxy is launched via the H5 UI of VCD. + required: + - name + - sddcId + - targetHost + + Proxies: + x-vcloud-added-in: "34.0" + description: | + A paginated list of proxies + allOf: + - $ref: './common/query.yaml#/definitions/Page' + - type: object + properties: + values: + type: array + items: + $ref: '#/definitions/Proxy' + + Proxy: + x-vcloud-added-in: "34.0" + description: | + proxy configuration. This configures the vCD proxying capability for one specific server within the vSphere/NSX/ESX estate known to vCD. + type: object + properties: + name: + type: string + pattern: '.*[\S].*' + example: Proxy Sample Name + id: + type: string + x-vcloud-constraints: + - constraint: NonSortable + - constraint: ReadOnly + - constraint: Urn + args: + - arg: proxy + parent: + description: The EntityReference of the parent entity (e.g. vCenter Server, SDDC) . This is not editable once the proxy has been created. + $ref: '#/definitions/EntityReference' + proxyType: + type: + string + enum: [VC, SSO, NSX, ESX, GENERIC] + enabled: + type: boolean + default: true + description: | + True if the proxy is enabled. Proxy can only be enabled/disabled by privileged users. + A disabled proxy cannot be activated and thus, cannot be used. + When a proxy is disabled, all active sessions are terminated. + tenantVisible: + type: boolean + description: Whether this proxy has been published to tenants. + default: false + active: + type: boolean + description: | + True if the proxy is currently active for the user session associated with the + request made to get the proxy. An inactive proxy cannot be used. + default: false + x-vcloud-constraints: + - constraint: NonSortable + token: + description: | + The generated read-only token that should be used as the password when using this proxy. + To generate a new token, activate the proxy. The token is tied to the user session that activated the proxy. + If the proxy is inactive, this value will be null. + type: string + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + - constraint: ReadOnly + parentProxy: + description: | + The EntityReference of the parent proxy. If a proxy has a parent, the proxy is activated along with + its parent and shares the token with its parent. Each proxy may only have one parent. + A parent proxy cannot have a parent of its own. + $ref: '#/definitions/EntityReference' + targetHost: + type: string + description: | + IP address or FQDN of the host being proxied. Lower case formatting will be applied to the value of the property. + This is not editable once the proxy has been created. + x-vcloud-constraints: + - constraint: DomainName + example: sampleVc.vmware.com + uiUrl: + type: string + default: "" + format: uri + example: https://sampleVc.vmware.com + description: | + The URL of the proxied component's UI endpoint. This is the URL that the browser tab + will be pointed to when the proxy is launched via the H5 UI of VCD. + required: + - name + - parent + - targetHost + - proxyType + + ThumbprintAndAlgorithm: + x-vcloud-added-in: "34.0" + description: | + Specifies a SSL certificate thumbprint and the algorithm used for calculation. + type: object + properties: + thumbprint: + type: string + description: The SDDC Proxy SSL certificate thumbprint. + example: 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 + algorithm: + type: string + description: Algorithm used for the thumbprint calculation. + example: SHA-256 + + EntityReference: + $ref: './common/entity.yaml#/definitions/EntityReference' diff --git a/schemas/openapi/src/main/resources/schemas/cpom/proxy.yaml b/schemas/openapi/src/main/resources/schemas/cpom/proxy.yaml new file mode 100644 index 00000000..696a88c0 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/cpom/proxy.yaml @@ -0,0 +1,587 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2018-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The SDDC Proxy API allows for management of proxies owned by software-defined data centers. + title: SDDC Proxy API + version: "1.0" + +paths: + anonymousPacFile: + parameters: + - name: id + description: identifier for the pac file configured for your organization + in: path + required: true + type: string + get: + tags: + - proxy + summary: Gets the tenant-specific .pac file listing proxies accessible to the tenant. + description: | + Gets the tenant-specific .pac file listing proxies accessible to the tenant. + operationId: getProxiesPacFileForTenant + produces: + - application/x-ns-proxy-autoconfig + responses: + 200: + description: a PAC file + content: + application/x-ns-proxy-autoconfig + schema: + type: string + format: binary + description: The tenant-specific .pac file listing proxies accessible to the tenant. + example: function FindProxyForURL(url, host) { + var proxiedHosts = []; + proxiedHosts.push("sampleVc.vmware.com"); + if (proxiedHosts.includes(host)) { + return "HTTPS sampleVCDHost:8443"; + } else { + return "DIRECT"; + } + } + 204: + description: no proxies configured + + pacFile: + get: + tags: + - sddcProxy + summary: Gets the .pac file for the user's accessible proxies. + x-vcloud-added-in: "32.0" + x-vcloud-deprecated-in: "34.0" + x-vcloud-deprecated-alternative: anonymousPacFile + description: | + Gets the .pac file for the user's accessible proxies. + operationId: getSddcProxiesPacFile + produces: + - application/x-ns-proxy-autoconfig + responses: + 200: + description: OK + schema: + type: string + description: The .pac file for the user's accessible proxies. + example: function FindProxyForURL(url, host) { + var proxiedHosts = []; + proxiedHosts.push("sampleVc.vmware.com"); + if (proxiedHosts.includes(host)) { + return "HTTPS sampleVCDHost:8443"; + } else { + return "DIRECT"; + } + } + 204: + description: no proxies configured + + sddcProxies: + get: + tags: + - sddcProxy + summary: Gets a paged list of SDDC proxies for a tenant. + x-vcloud-added-in: "32.0" + x-vcloud-deprecated-in: "34.0" + x-vcloud-deprecated-alternative: proxies + description: | + Gets a paged list of SDDC proxies for a tenant. + operationId: getSddcProxies + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "./cpom/cpomObjects.yaml#/definitions/SddcProxies" + post: + tags: + - sddcProxy + summary: Creates an SDDC proxy. + x-vcloud-added-in: "32.0" + x-vcloud-deprecated-in: "34.0" + x-vcloud-deprecated-alternative: proxies + description: | + Creates an SDDC proxy. + operationId: createSddcProxy + parameters: + - name: proxy + description: The new SDDC proxy model. + in: body + required: true + schema: + $ref: "./cpom/cpomObjects.yaml#/definitions/SddcProxy" + consumes: + - application/json + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + + sddcProxy: + parameters: + - name: id + description: SDDC Proxy ID URN + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: sddcProxy + + get: + tags: + - sddcProxy + summary: Retrieves a specific SDDC proxy. + x-vcloud-added-in: "32.0" + x-vcloud-deprecated-in: "34.0" + x-vcloud-deprecated-alternative: proxy + operationId: getSddcProxy + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "./cpom/cpomObjects.yaml#/definitions/SddcProxy" + + put: + tags: + - sddcProxy + summary: Update a specific SDDC proxy. + x-vcloud-added-in: "32.0" + x-vcloud-deprecated-in: "34.0" + x-vcloud-deprecated-alternative: proxy + operationId: updateSddcProxy + consumes: + - application/json + parameters: + - name: updatedSddcProxy + description: The updated SDDC proxy model. + in: body + required: true + schema: + $ref: "./cpom/cpomObjects.yaml#/definitions/SddcProxy" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "./cpom/cpomObjects.yaml#/definitions/SddcProxy" + + delete: + tags: + - sddcProxy + summary: Delete a specific SDDC proxy. Will not delete an enabled proxy unless force is specified. + x-vcloud-added-in: "32.0" + x-vcloud-deprecated-in: "34.0" + x-vcloud-deprecated-alternative: proxy + operationId: deleteSddcProxy + parameters: + - name: "force" + in: "query" + description: "If true, will delete proxy regardless of proxy state." + required: false + type: boolean + responses: + 204: + description: No Content + + sddc-proxy-cert: + parameters: + - name: id + description: SDDC Proxy ID URN + in: path + required: true + type: string + + get: + tags: + - sddcProxy + summary: Retrieve a SDDC proxy SSL certificate chain in PEM format. + x-vcloud-added-in: "32.0" + x-vcloud-deprecated-in: "34.0" + x-vcloud-deprecated-alternative: proxy-cert + operationId: getSddcProxyCertificate + produces: + - application/x-x509-ca-cert + - application/x-pem-file + responses: + 200: + description: OK + schema: + type: string + description: The certificate chain in PEM format. + example: -----BEGIN CERTIFICATE----- + + -----END CERTIFICATE----- + + put: + tags: + - sddcProxy + summary: Update a SDDC proxy certificate chain in PEM format. + x-vcloud-added-in: "32.0" + x-vcloud-deprecated-in: "34.0" + x-vcloud-deprecated-alternative: proxy-cert + operationId: updateSddcProxyCertificate + consumes: + - application/x-x509-ca-cert + - application/x-pem-file + produces: + - application/x-x509-ca-cert + - application/x-pem-file + parameters: + - name: proxyTrustAnchor + description: The updated SDDC proxy certificate chain in PEM format. + in: body + required: true + x-vcloud-constraints: + - constraint: Certificate + schema: + type: string + example: -----BEGIN CERTIFICATE----- + + -----END CERTIFICATE----- + responses: + 200: + description: OK + schema: + type: string + description: The certificate chain in PEM format. + example: -----BEGIN CERTIFICATE----- + + -----END CERTIFICATE----- + + sddc-proxy-crl: + parameters: + - name: id + in: path + required: true + type: string + + get: + tags: + - sddcProxy + x-vcloud-added-in: "33.0" + x-vcloud-deprecated-in: "34.0" + x-vcloud-deprecated-alternative: proxy-crl + summary: Retrieve a SDDC proxy certificate revocation list in PEM format. + operationId: getSddcProxyCRL + produces: + - application/x-pkcs7-crl + responses: + 200: + description: OK + schema: + type: string + + put: + tags: + - sddcProxy + x-vcloud-added-in: "33.0" + x-vcloud-deprecated-in: "34.0" + x-vcloud-deprecated-alternative: proxy-crl + summary: Update a SDDC proxy certificate revocation list in PEM format. + operationId: updateSddcProxyCRL + consumes: + - application/x-pkcs7-crl + produces: + - application/x-pkcs7-crl + parameters: + - name: proxyCRL + in: body + required: true + x-vcloud-constraints: + - constraint: CRL + schema: + type: string + responses: + 200: + description: OK + schema: + type: string + + sddc-proxy-thumbprint: + parameters: + - name: id + description: SDDC Proxy ID URN + in: path + required: true + type: string + + get: + tags: + - sddcProxy + summary: Retrieve a SDDC Proxy SSL certificate thumbprint. The thumbprint is the SHA-1 hash of the DER encoding of the certificate. + x-vcloud-added-in: "32.0" + x-vcloud-deprecated-in: "34.0" + x-vcloud-deprecated-alternative: See GET /cloudapi/1.0.0/proxies/{id}/cert + x-vcloud-removed-in: "36.0" + operationId: getSddcProxyCertificateThumbprint + produces: + - text/plain + responses: + 200: + description: OK + schema: + type: string + description: The SDDC Proxy SSL certificate thumbprint. + example: 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 + + proxies: + get: + tags: + - proxy + summary: Gets a paged list of proxies for a tenant. + x-vcloud-added-in: "34.0" + description: | + Gets a paged list of proxies for a tenant. + operationId: getProxies + x-vcloud-multisite: true + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "./cpom/cpomObjects.yaml#/definitions/Proxies" + post: + tags: + - proxy + summary: Creates a proxy. + x-vcloud-added-in: "34.0" + description: | + Creates a proxy. + operationId: createProxy + parameters: + - name: proxy + description: The new proxy model. + in: body + required: true + schema: + $ref: "./cpom/cpomObjects.yaml#/definitions/Proxy" + consumes: + - application/json + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + + proxy: + parameters: + - name: id + description: Proxy ID URN + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: proxy + + get: + tags: + - proxy + summary: Retrieves a specific proxy. + x-vcloud-added-in: "34.0" + operationId: getProxy + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "./cpom/cpomObjects.yaml#/definitions/Proxy" + + put: + tags: + - proxy + summary: Update a specific proxy. + x-vcloud-added-in: "34.0" + operationId: updateProxy + consumes: + - application/json + parameters: + - name: updatedProxy + description: The updated proxy model. + in: body + required: true + schema: + $ref: "./cpom/cpomObjects.yaml#/definitions/Proxy" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "./cpom/cpomObjects.yaml#/definitions/Proxy" + + delete: + tags: + - proxy + summary: Delete a specific proxy. Will not delete an enabled proxy unless force is specified. + x-vcloud-added-in: "34.0" + operationId: deleteProxy + parameters: + - name: "force" + in: "query" + description: "If true, will delete proxy regardless of proxy state." + required: false + type: boolean + responses: + 204: + description: No Content + + proxy-cert: + parameters: + - name: id + description: Proxy ID URN + in: path + required: true + type: string + + get: + tags: + - proxy + summary: Retrieve a proxy SSL certificate chain in PEM format. + x-vcloud-added-in: "34.0" + operationId: getProxyCertificate + produces: + - application/x-x509-ca-cert + - application/x-pem-file + responses: + 200: + description: OK + schema: + type: string + description: The certificate chain in PEM format. + example: -----BEGIN CERTIFICATE----- + + -----END CERTIFICATE----- + + put: + tags: + - proxy + summary: Update a proxy certificate chain in PEM format. + x-vcloud-added-in: "34.0" + operationId: updateProxyCertificate + consumes: + - application/x-x509-ca-cert + - application/x-pem-file + produces: + - application/x-x509-ca-cert + - application/x-pem-file + parameters: + - name: proxyTrustAnchor + description: The updated proxy certificate chain in PEM format. + in: body + required: true + x-vcloud-constraints: + - constraint: Certificate + schema: + type: string + example: -----BEGIN CERTIFICATE----- + + -----END CERTIFICATE----- + responses: + 200: + description: OK + schema: + type: string + description: The certificate chain in PEM format. + example: -----BEGIN CERTIFICATE----- + + -----END CERTIFICATE----- + + proxy-crl: + parameters: + - name: id + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: proxy + + get: + tags: + - proxy + x-vcloud-added-in: "34.0" + summary: Retrieve a proxy certificate revocation list in PEM format. + operationId: getProxyCRL + produces: + - application/x-pkcs7-crl + responses: + 200: + description: OK + schema: + type: string + + put: + tags: + - proxy + x-vcloud-added-in: "34.0" + summary: Update a proxy certificate revocation list in PEM format. + operationId: updateProxyCRL + consumes: + - application/x-pkcs7-crl + produces: + - application/x-pkcs7-crl + parameters: + - name: proxyCRL + in: body + required: true + x-vcloud-constraints: + - constraint: CRL + schema: + type: string + responses: + 200: + description: OK + schema: + type: string + + proxy-thumbprint: + parameters: + - name: id + description: Proxy ID URN + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: proxy + + get: + tags: + - proxy + summary: Retrieve a Proxy SSL certificate thumbprint and algorithm used for calculation. Only SHA-256 is supported. + x-vcloud-added-in: "34.0" + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: See GET /cloudapi/1.0.0/proxies/{id}/cert + operationId: getProxyCertificateThumbprint + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "./cpom/cpomObjects.yaml#/definitions/ThumbprintAndAlgorithm" diff --git a/schemas/openapi/src/main/resources/schemas/cpom/sddc.yaml b/schemas/openapi/src/main/resources/schemas/cpom/sddc.yaml new file mode 100644 index 00000000..334f4f82 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/cpom/sddc.yaml @@ -0,0 +1,481 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2018-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The SDDC API allows for management of dedicated VC resources within a tenant. + title: Sddc API + version: "1.0" + +paths: + + sddcs: + get: + tags: + - sddcs + summary: Get the list of Software-Defined Datacenters accessible to the user. + x-vcloud-added-in: "32.0" + description: | + Get the list of Software-Defined Datacenters accessible to the user. + operationId: getSddcs + x-vcloud-multisite: true + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: './cpom/cpomObjects.yaml#/definitions/Sddcs' + + post: + tags: + - sddcs + summary: Create a Software-Defined Datacenter. + x-vcloud-added-in: "32.0" + description: | + Create a Software-Defined Datacenter. + operationId: createSddc + consumes: + - application/json + parameters: + - name: newSddc + description: The new SDDC model. + in: body + required: true + schema: + $ref: "./cpom/cpomObjects.yaml#/definitions/Sddc" + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + + sddc: + parameters: + - name: id + description: SDDC ID URN + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: sddc + + get: + tags: + - sddcs + summary: Retrieve a specific Software-Defined Datacenter. + x-vcloud-added-in: "32.0" + description: | + Retrieve a specific Software-Defined Datacenter. + operationId: getSddc + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "./cpom/cpomObjects.yaml#/definitions/Sddc" + + put: + tags: + - sddcs + summary: Update a specific Software-Defined Datacenter. + x-vcloud-added-in: "32.0" + description: | + Update a specific Software-Defined Datacenter. + operationId: updateSddc + consumes: + - application/json + parameters: + - name: updatedSddc + description: The updated SDDC model. + in: body + required: true + schema: + $ref: "./cpom/cpomObjects.yaml#/definitions/Sddc" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "./cpom/cpomObjects.yaml#/definitions/Sddc" + + delete: + tags: + - sddcs + summary: | + Delete a specific Software-Defined Datacenter. Unless force is specified, SDDC & its + proxies must be disabled before they can be deleted. + x-vcloud-added-in: "32.0" + operationId: deleteSddc + parameters: + - name: "force" + in: "query" + description: | + If true, will delete SDDC regardless of the state of the SDDC or any of its proxies. + required: false + type: boolean + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + + sddc-proxies: + parameters: + - name: id + description: SDDC ID URN + in: path + required: true + type: string + + get: + tags: + - sddcs + summary: Retrieve the proxies for the Software-Defined Datacenter. + x-vcloud-added-in: "32.0" + x-vcloud-deprecated-in: "34.0" + x-vcloud-deprecated-alternative: proxies + description: | + Retrieve the proxies for the Software-Defined Datacenter. + operationId: getProxiesForSddc + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "./common/entity.yaml#/definitions/EntityReferences" + + sddc-endpoints: + get: + tags: + - sddcs + summary: Retrieve the endpoints for the SDDC. + x-vcloud-added-in: "35.0" + description: | + Retrieve the endpoints for the SDDC. + operationId: getEndpointsForSddc + x-vcloud-multisite: true + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "./cpom/cpomObjects.yaml#/definitions/SddcEndpoints" + + post: + tags: + - sddcs + summary: Creates an SDDC endpoint. + x-vcloud-added-in: "35.0" + description: | + Creates an SDDC endpoint. + operationId: createSddcEndpoint + parameters: + - name: endpoint + description: The new SDDC endpoint model. + in: body + required: true + schema: + $ref: "./cpom/cpomObjects.yaml#/definitions/SddcEndpoint" + consumes: + - application/json + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "./cpom/cpomObjects.yaml#/definitions/SddcEndpoint" + + sddc-endpoint: + parameters: + - name: id + description: SDDC Endpoint ID URN + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: sddcEndpoint + + get: + tags: + - sddcs + summary: Retrieves a specific SDDC endpoint. + x-vcloud-added-in: "35.0" + operationId: getSddcEndpoint + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "./cpom/cpomObjects.yaml#/definitions/SddcEndpoint" + + put: + tags: + - sddcs + summary: Update a specific SDDC endpoint. + x-vcloud-added-in: "35.0" + operationId: updateSddcEndpoint + consumes: + - application/json + parameters: + - name: updatedSddcEndpoint + description: The updated SDDC endpoint model. + in: body + required: true + schema: + $ref: "./cpom/cpomObjects.yaml#/definitions/SddcEndpoint" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "./cpom/cpomObjects.yaml#/definitions/SddcEndpoint" + + delete: + tags: + - sddcs + summary: Delete a specific SDDC endpoint. Will not delete a default endpoint. + x-vcloud-added-in: "35.0" + operationId: deleteSddcEndpoint + responses: + 204: + description: No Content + + proxies: + parameters: + - name: id + description: proxy ID URN + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: proxy + + get: + tags: + - proxy + summary: Retrieve the proxies for the Software-Defined Datacenter. + x-vcloud-added-in: "33.0" + description: | + Retrieve the proxies for the Software-Defined Datacenter. + operationId: getProxies + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "./common/entity.yaml#/definitions/EntityReferences" + + sddc-owner: + parameters: + - name: id + description: SDDC ID URN + in: path + required: true + type: string + + get: + tags: + - sddcs + summary: Retrieve the owner of the Software-Defined Datacenter. + x-vcloud-added-in: "32.0" + description: | + Retrieve the owner of the Software-Defined Datacenter. + operationId: getSddcOwner + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "./common/entity.yaml#/definitions/EntityReference" + + put: + tags: + - sddcs + summary: Update the owner of the Software-Defined Datacenter. + x-vcloud-added-in: "32.0" + description: | + Update the owner of the Software-Defined Datacenter. + operationId: setSddcOwner + consumes: + - application/json + produces: + - application/json + parameters: + - name: newOwner + description: The EntityReference to the owner of the SDDC. + in: body + required: true + schema: + $ref: "./common/entity.yaml#/definitions/EntityReference" + + responses: + 200: + description: OK + schema: + $ref: "./common/entity.yaml#/definitions/EntityReference" + + sddc-tenants: + parameters: + - name: id + description: SDDC ID URN + in: path + required: true + type: string + + get: + tags: + - sddcs + summary: Retrieve the list of tenants a Software-Defined Datacenter is published to. + x-vcloud-added-in: "32.0" + description: | + Retrieve the list of tenants a Software-Defined Datacenter is published to. + operationId: querySddcTenants + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "./common/entity.yaml#/definitions/EntityReferences" + + put: + tags: + - sddcs + summary: Reset the list of tenants a Software-Defined Datacenter is published to. + x-vcloud-added-in: "32.0" + description: | + Reset the list of tenants a Software-Defined Datacenter is published to. + operationId: setSddcTenants + consumes: + - application/json + produces: + - application/json + parameters: + - name: publishTenantsBody + description: The list of tenant EntityReferences that a Software-Defined Datacenter should be published to. + in: body + required: true + schema: + type: array + items: + $ref: "./common/entity.yaml#/definitions/EntityReference" + + responses: + 200: + description: OK + schema: + $ref: "./common/entity.yaml#/definitions/EntityReferences" + + sddc-tenants-publish: + parameters: + - name: id + description: SDDC ID URN + in: path + required: true + type: string + post: + tags: + - sddcs + summary: Publish a Software-Defined Datacenter to the given tenants. + x-vcloud-added-in: "32.0" + description: | + Publish a Software-Defined Datacenter to the tenants. + operationId: sddcPublishToTenants + consumes: + - application/json + produces: + - application/json + parameters: + - name: publishTenantsBody + description: The list of tenant EntityReferences that a Software-Defined Datacenter should be published to. + in: body + required: true + schema: + type: array + items: + $ref: "./common/entity.yaml#/definitions/EntityReference" + responses: + 200: + description: OK + schema: + $ref: "./common/entity.yaml#/definitions/EntityReferences" + + sddc-tenants-unpublish: + parameters: + - name: id + description: SDDC ID URN + in: path + required: true + type: string + post: + tags: + - sddcs + summary: Revoke publication of the Software-Defined Datacenter for the tenants. + x-vcloud-added-in: "32.0" + description: | + Revoke publication of the Software-Defined Datacenter for the tenants. + operationId: sddcUnpublishFromTenants + consumes: + - application/json + produces: + - application/json + parameters: + - name: unpublishTenantsBody + description: The list of tenant EntityReferences that a Software-Defined Datacenter should be unpublished from. + in: body + required: true + schema: + type: array + items: + $ref: "./common/entity.yaml#/definitions/EntityReference" + responses: + 200: + description: OK + schema: + $ref: "./common/entity.yaml#/definitions/EntityReferences" diff --git a/schemas/openapi/src/main/resources/schemas/email-settings/emailSettings.yaml b/schemas/openapi/src/main/resources/schemas/email-settings/emailSettings.yaml new file mode 100644 index 00000000..11fc7991 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/email-settings/emailSettings.yaml @@ -0,0 +1,89 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2018-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" + +info: + title: Email Settings YAML + description: Email Settings Object in VCD + version: "1.0" + + +definitions: + EmailSettings: + description: | + Email related settings for a system + type: + object + properties: + defaultSmtpServer: + type: boolean + description: | + Flag indicating if the smtp server settings are system default (true) or a particular organization (false) + defaultOrgEmail: + type: boolean + description: | + Flag indicating if the email settings are system default (true) or for a particular organization (false) + smtpServer: + $ref: "#/definitions/SmtpServerSpec" + senderEmailAddress: + type: string + description: | + Sender email address in an email notification or alert + defaultEmailSubjectPrefix: + type: string + description: | + The prefix used in the email subject line for all email notifications and alerts from the system + alertEmailToAllAdmins: + type: boolean + description: | + A flag to indicate the choice between sending alert emails to all system + administrators in the system and designated list of email recipients + alertEmailTo: + type: string + description: | + A comma separated email addresses to send all alert messages to + + SmtpServerSpec: + description: | + Represent the settings of an SMTP Server which the system uses to send email notifications and alerts + type: + object + properties: + useAuthentication: + type: boolean + description: | + A flag to indicate if the SMTP requires login authentication. If this + flag is set to true, caller must provide user name and password + secureMode: + type: string + description: | + Security mode used to connect to the SMTP server + enum: [NONE, START_TLS, SSL] + # Following properties are inherited from ServerSpec (when switching to Swagger 3.0 make SmtpServerSpec actually inherit these) + url: + $ref: "../common/url.yaml#/definitions/Url" + sslTrustStore: + type: string + description: | + The custom ssl trust certs if ssl is enabled + userName: + type: string + description: | + Username to login to server + password: + type: string + description: | + Password to login to the server + # Following properties are inherited from EntitySpec + description: + type: string + description: | + A human readable description of the entity + name: + type: string + description: | + A human readable name of the entity diff --git a/schemas/openapi/src/main/resources/schemas/email-settings/testEmailSettings.yaml b/schemas/openapi/src/main/resources/schemas/email-settings/testEmailSettings.yaml new file mode 100644 index 00000000..8f050fb5 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/email-settings/testEmailSettings.yaml @@ -0,0 +1,43 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2018-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" + +info: + title: Test Email Settings YAML + description: API Access to Test Email Settings in VCD + version: "1.0" + +paths: + testEmailSettings: + post: + tags: + - EmailSettings + summary: Tests Email Settings and Connection + description: | + Tests that Email SMTP Settings are valid + operationId: testEmailSettings + parameters: + - in: body + name: testEmailRequest + description: Email Settings and destination email address for Email Test call + required: true + schema: + $ref: "#/definitions/TestEmailRequest" + consumes: + - application/json + responses: + 204: + description: OK + +definitions: + TestEmailRequest: + type: object + properties: + emailSettings: + $ref: "./emailSettings.yaml#/definitions/EmailSettings" + destination: + type: string diff --git a/schemas/openapi/src/main/resources/schemas/entity-resolver/entityResolver.yaml b/schemas/openapi/src/main/resources/schemas/entity-resolver/entityResolver.yaml new file mode 100644 index 00000000..b04070a8 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/entity-resolver/entityResolver.yaml @@ -0,0 +1,39 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2019-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" + +info: + title: Entity Resolver API + description: Entity Resolver API for resolving entities by URN + version: "1.0" + + +paths: + entity-resolver: + get: + tags: + - entity + summary: Get specified entity object + operationId: resolveEntity + produces: + - application/json + parameters: + - in: path + name: id + description: the URN of the entity to be resolved + required: true + responses: + 200: + description: OK + schema: + type: object + 303: + description: See Other + 403: + description: Not Authorized + 400: + description: Bad Request diff --git a/schemas/openapi/src/main/resources/schemas/extensibility/behavior.yaml b/schemas/openapi/src/main/resources/schemas/extensibility/behavior.yaml new file mode 100644 index 00000000..c46db2f1 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/extensibility/behavior.yaml @@ -0,0 +1,132 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2020-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" + +info: + title: Definitions of Defined Entity Behaviors + description: Defined Entity Behaviors can be executed on selected Defined Entities + version: "1.0" + +definitions: + Behaviors: + x-vcloud-added-in: "35.0" + description: | + An array ofs Defined Entity Behaviors + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: '#/definitions/Behavior' + + Behavior: + x-vcloud-added-in: "35.0" + description: | + The descriptor of a Defined Entity Behavior + type: object + properties: + name: + type: string + example: addNode + id: + description: The Behavior ID is generated and is an output-only property + type: string + example: urn:vcloud:behavior-type:addNode:vendorA:pksContainerCluster:1.0.0:vendorA:containerCluster:1.0.0 + x-vcloud-constraints: + - constraint: NonSortable + - constraint: ReadOnly + - constraint: NonSearchable + ref: + description: The Behavior invocation reference to be used for polymorphic behavior invocations. It is generated and is an output-only property + type: string + example: urn:vcloud:behavior-interface:testNode:vendorA:containerCluster:1.0.0 + x-vcloud-constraints: + - constraint: NonSortable + - constraint: ReadOnly + - constraint: NonSearchable + description: + description: A description specifying the contract of the Behavior + type: string + example: | + Adds a node to the cluster. + Parameters: + clusterId: the ID of the cluster + node: The node address + x-vcloud-constraints: + - constraint: NonSortable + - constraint: ReadOnly + - constraint: NonSearchable + execution: + description: The Behavior execution mechanism. Can be defined both in an Interface and in a Defined Entity Type as an override. + type: object + additionalProperties: + type: object + x-vcloud-constraints: + - constraint: NonSortable + - constraint: ReadOnly + - constraint: NonSearchable + + BehaviorInvocation: + x-vcloud-added-in: "35.0" + description: | + An invocation of a Behavior on a Defined Entity instance. + Currently the Behavior interfaces are key-value maps specified in the Behavior description. + type: object + properties: + arguments: + description: The arguments to be passed to the invoked Behavior + type: object + additionalProperties: true + example: | + { "node": "server-242.company.com", ... } + metadata: + description: Metadata to be passed to the invoked Behavior + type: object + additionalProperties: true + example: | + { "operationId": "event35262", ... } + + BehaviorAccess: + x-vcloud-added-in: "35.0" + description: | + A definition of an access control configuration of a Behavior. + type: object + properties: + behaviorId: + description: The ID of the Behavior. It can be both a behavior-interface or an overriden behavior-type ID. + type: string + example: urn:vcloud:behavior-interface:testNode:vendorA:containerCluster:1.0.0 + x-vcloud-constraints: + - constraint: NonSortable + - constraint: ReadOnly + - constraint: NonSearchable + accessLevelId: + description: The ID of an AccessLevel. + type: string + example: urn:vcloud:accessLevel:ReadOnly + x-vcloud-constraints: + - constraint: NonSortable + - constraint: ReadOnly + - constraint: NonSearchable + + BehaviorAccesses: + x-vcloud-added-in: "35.0" + description: | + The access control configuration of all Defined Enitty Type's Behaviors. + allOf: + - $ref: '#/definitions/Page' + - type: object + properties: + values: + type: array + description: The current page of behavior access entries + items: + $ref: '#/definitions/BehaviorAccess' + + diff --git a/schemas/openapi/src/main/resources/schemas/extensibility/definedEntity.yaml b/schemas/openapi/src/main/resources/schemas/extensibility/definedEntity.yaml new file mode 100644 index 00000000..bd468542 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/extensibility/definedEntity.yaml @@ -0,0 +1,541 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2020-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" + +info: + title: Defined Entities + description: Defined Entities management + version: "1.0" + +paths: + defined-entities: + get: + tags: + - definedEntity + x-vcloud-added-in: "35.0" + x-vcloud-multisite: true + summary: Gets all defined entities the user has access to. + description: | + Gets all defined entities the user has access to. A "_context" filter with defined + interface ids can be provided if you want to filter the entities based on an interface. + operationId: getDefinedEntities + produces: + - application/json + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + responses: + 200: + description: Ok + schema: + $ref: "#/definitions/DefinedEntities" + + defined-entity: + parameters: + - name: id + in: path + required: true + type: string + example: urn:vcloud:entity:vmware.vspheresddc:1.0.0:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + get: + x-vcloud-added-in: "35.0" + tags: + - definedEntity + summary: Gets the defined entity with the unique identifier (URN) + description: Gets the defined entity with the unique identifier (URN) + operationId: getDefinedEntity + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/DefinedEntity" + delete: + tags: + - definedEntity + x-vcloud-added-in: "35.0" + summary: Deletes the defined entity with the unique identifier (URN) + description: Deletes the defined entity with the unique identifier (URN) + operationId: deleteDefinedEntity + parameters: + - name: invokeHooks + in: query + x-vcloud-added-in: "36.0" + summary: Specify whether the update hooks of the Entity Type should be invoked + description: | + Only users with Admin FullControl access to the Entity Type can pass this parameter. + The default value is 'true'. + required: false + schema: + type: string + responses: + 202: + description: Task tracking the execution in the location header + $ref: "./common/response.yaml#/components/responses/Accepted" + 204: + description: No Content + put: + tags: + - definedEntity + x-vcloud-added-in: "35.0" + summary: Updates the defined entity with the unique identifier (URN) + description: Update the defined entity with the unique identifier (URN) + operationId: updateDefinedEntity + consumes: + - application/json + produces: + - application/json + parameters: + - name: entity + in: body + required: true + schema: + $ref: "#/definitions/DefinedEntity" + - name: invokeHooks + in: query + x-vcloud-added-in: "36.0" + summary: Specify whether the update hooks of the Entity Type should be invoked + description: | + Only users with Admin FullControl access to the Entity Type can pass this parameter. + The default value is 'true'. + required: false + schema: + type: string + responses: + 200: + description: Ok + schema: + $ref: "#/definitions/DefinedEntity" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + defined-entity-resolve: + parameters: + - name: id + in: path + required: true + type: string + example: urn:vcloud:entity:vmware.vspheresddc:1.0.0:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + post: + x-vcloud-added-in: "35.0" + tags: + - definedEntity + summary: Validates the defined entity against the entity type schema. + description: | + Validates the defined entity against the entity type schema. If the validation is + successful, the entity will transition to a "RESOLVED" state. Otherwise, it will + transition to an "ERROR" state. + operationId: resolveDefinedEntity + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/EntityState" + defined-entities-by-type: + parameters: + - name: vendor + in: path + required: true + type: string + minLength: 1 + example: vmware + x-vcloud-constraints: + - constraint: DefinedEntityString + - name: nss + in: path + required: true + type: string + minLength: 1 + example: vspheresddc + x-vcloud-constraints: + - constraint: DefinedEntityString +# TODO: Add validation for version in VACE-2495 + - name: version + in: path + required: true + type: string + minLength: 1 + example: 1.0.0 + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + get: + x-vcloud-added-in: "35.0" + x-vcloud-multisite: true + tags: + - definedEntity + summary: Gets the collection of defined entities for the vCD-defined type with the specified vendor, nss and version. + description: | + Gets the collection of defined entities for the vCD-defined type with the specified vendor, nss and version. + The version can act as a wildcard. If only '1' is specified as the version, + all entity types with a major version of '1' will be matched (e.g. 1.0.0, 1.1.2). + If '1.0' is specified, all entity types with a major version of '1' and a minor version + of '0' will be included (e.g. 1.0.0, 1.0.1). If the full semver is specified, then no + search will be performed. + operationId: getDefinedEntitiesByEntityType + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/DefinedEntities" + defined-entities-by-interface: + parameters: + - name: vendor + in: path + required: true + type: string + minLength: 1 + example: vmware + x-vcloud-constraints: + - constraint: DefinedEntityString + - name: nss + in: path + required: true + type: string + minLength: 1 + example: vspheresddc + x-vcloud-constraints: + - constraint: DefinedEntityString + - name: version + in: path + required: true + type: string + minLength: 1 + example: 1.0.0 + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + get: + x-vcloud-added-in: "35.0" + x-vcloud-multisite: true + tags: + - definedEntity + summary: Gets the collection of defined entities for the vCD-defined interface with the specified vendor, nss and version + description: | + Gets the collection of defined entities for the vCD-defined interface with the specified vendor, nss and version. + The version can act as a wildcard. If only '1' is specified as the version, + all entity types with a major version of '1' will be matched (e.g. 1.0.0, 1.1.2). + If '1.0' is specified, all entity types with a major version of '1' and a minor version + of '0' will be included (e.g. 1.0.0, 1.0.1). If the full semver is specified, then no + search will be performed. + operationId: getDefinedEntitiesByInterface + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/DefinedEntities" + + defined-entity-behaviors: + parameters: + - name: id + in: path + required: true + type: string + example: urn:vcloud:entity:vmware.vspheresddc:1.0.0:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + - name: behaviorId + in: path + required: true + type: string + post: + x-vcloud-added-in: "35.0" + tags: + - definedInterfaceBehaviors + summary: Invokes a behavior on a defined entity + description: | + Invokes a behavior on a defined entity. The contract of the behavior is specified in the behavior description. + If an Activity behavior is invoked with an 'operationId' in the invocation metadata, then another invocation of the behavior + with the same 'operationId' will be ignored within the next 1 hour. + operationId: invokeDefinedEntityBehavior + consumes: + - application/json + parameters: + - name: invocation + in: body + required: false + schema: + $ref: "./extensibility/behavior.yaml#/definitions/BehaviorInvocation" + example: | + { "arguments": { "node": "bos1-vcd-sp-static-198-241.eng.vmware.com", ... } } + responses: + 202: + description: Task tracking the execution in the location header + $ref: "./common/response.yaml#/components/responses/Accepted" + + defined-entity-accessControls: + post: + tags: + - accessControls + summary: Creates an access-control grant + x-vcloud-added-in: "35.0" + description: | + Creates an access-control grant, giving the user the level of access for the vCD entity. + operationId: createEntityAccessControlGrant + consumes: + - application/json + parameters: + - name: objectId + in: path + required: true + type: string + - name: accessControlGrant + in: body + required: true + schema: + $ref: './access-control/accessControl.yaml#/definitions/AccessControlGrant' + produces: + - application/json + responses: + 201: + description: Created + schema: + $ref: './access-control/accessControl.yaml#/definitions/AccessControlGrant' + get: + tags: + - accessControls + summary: Get the access-control list for the specified vCD entity. + x-vcloud-added-in: "35.0" + description: | + Get the access-control list for the specified vCD entity. + operationId: queryEntityAccessControlGrants + produces: + - application/json + parameters: + - name: objectId + in: path + required: true + type: string + readOnly: true + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + responses: + 200: + description: Ok + schema: + $ref: './access-control/accessControl.yaml#/definitions/AccessControlGrants' + + defined-entity-accessControl: + get: + parameters: + - name: objectId + in: path + required: true + type: string + - name: accessControlId + in: path + required: true + type: string + readOnly: true + tags: + - accessControls + summary: Get the specified access-control grant. + x-vcloud-added-in: "35.0" + description: | + Get the specified access-control grant. + operationId: getEntityAccessControlGrant + produces: + - application/json + responses: + 200: + description: Ok + schema: + $ref: './access-control/accessControl.yaml#/definitions/AccessControlGrant' + put: + tags: + - accessControls + summary: Updates the specified access-control grant. + x-vcloud-added-in: "35.0" + description: | + Updates the specified access-control grant. + operationId: updateEntityAccessControlGrant + consumes: + - application/json + parameters: + - name: objectId + in: path + required: true + type: string + readOnly: true + - name: accessControlId + in: path + required: true + type: string + - name: accessControlGrant + in: body + required: true + schema: + $ref: './access-control/accessControl.yaml#/definitions/AccessControlGrant' + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "./access-control/accessControl.yaml#/definitions/AccessControlGrant" + delete: + tags: + - accessControls + summary: Removes the specified access-control grant from the vCD entities access-control list. + x-vcloud-added-in: "35.0" + description: | + Removes the specified access-control grant from the vCD entities access-control list. + operationId: removeEntityAccessControlGrant + parameters: + - name: objectId + in: path + required: true + type: string + readOnly: true + - name: accessControlId + in: path + required: true + type: string + responses: + 204: + description: No Content + +definitions: + DefinedEntity: + x-vcloud-added-in: "35.0" + description: | + Describes what a defined entity should look like. + type: object + properties: + id: + type: string + example: urn:vcloud:entity:vmware.vspheresddc:1.0.0:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + description: | + The id of the defined entity in URN format. + x-vcloud-constraints: + - constraint: NonSortable + - constraint: ReadOnly + entityType: + type: string + example: urn:vcloud:type:vmware.vspheresddc:1.0.0 + description: | + The URN ID of the defined entity type that the entity is an instance of. This is a read-only field. + x-vcloud-constraints: + - constraint: NonSortable + - constraint: ReadOnly + name: + type: string + description: | + The name of the defined entity. + example: vspheresddc1 + externalId: + type: string + example: 123 + description: | + An external entity's id that this entity may have a relation to. + x-vcloud-constraints: + - constraint: NonSortable + entity: + type: object + description: | + A JSON value representation. The JSON will be validated against the schema of the entityType that the entity is an instance of. + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + additionalProperties: + type: object + state: + type: string + x-vcloud-constraints: + - constraint: ReadOnly + description: | + Every entity is created in the "PRE_CREATED" state. Once an entity is ready to be + validated against its schema, it will transition in another state - RESOLVED, if the + entity is valid according to the schema, or RESOLUTION_ERROR otherwise. If an entity in + an "RESOLUTION_ERROR" state is updated, it will transition to the inital "PRE_CREATED" + state without performing any validation. If its in the "RESOLVED" state, then it will + be validated against the entity type schema and throw an exception if its invalid. + enum: [PRE_CREATED, RESOLVED, RESOLUTION_ERROR] + owner: + $ref: '#/definitions/EntityReference' + description: The owner of the defined entity. + org: + $ref: '#/definitions/EntityReference' + description: The organization of the defined entity. + required: + - name + - entity + x-vcloud-property-annotations: + owner: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSortable + org: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSortable + + EntityState: + x-vcloud-added-in: "35.0" + description: | + Describes what the current state of the entity is. + type: object + properties: + id: + type: string + example: urn:vcloud:entity:vmware.vspheresddc:1.0.0:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + description: | + The id of the defined entity in URN format. + x-vcloud-constraints: + - constraint: NonSortable + - constraint: ReadOnly + entity: + type: object + description: | + A JSON entity. This entity will be validated against the provided entityType. + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + additionalProperties: + type: object + state: + type: string + x-vcloud-constraints: + - constraint: ReadOnly + description: | + The current state of the entity + enum: [RESOLVED, RESOLUTION_ERROR] + message: + type: string + x-vcloud-constraints: + - constraint: ReadOnly + description: | + The error message(s), if the entity could not be resolved. + + DefinedEntities: + x-vcloud-added-in: "35.0" + description: | + A list of defined entities. + allOf: + - $ref: '#/definitions/Page' + - type: object + properties: + values: + type: array + description: The current page of defined entities. + items: + $ref: '#/definitions/DefinedEntity' + + EntityReference: + $ref: './common/entity.yaml#/definitions/EntityReference' + diff --git a/schemas/openapi/src/main/resources/schemas/extensibility/definedEntityType.yaml b/schemas/openapi/src/main/resources/schemas/extensibility/definedEntityType.yaml new file mode 100644 index 00000000..502db350 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/extensibility/definedEntityType.yaml @@ -0,0 +1,564 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2020-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" + +info: + title: Defined Entity Types + description: Types for defined entities are used for classification and json schema definition. + version: "1.0" + +paths: + defined-entity-types: + get: + tags: + - definedEntityType + x-vcloud-added-in: "35.0" + x-vcloud-multisite: true + summary: Gets the collection of entity types defined in the vCD instance. Allows collection refinement through traditional FIQL-based filtering + description: Gets the collection of entity types defined in the vCD instance. Allows collection refinement through traditional FIQL-based filtering + operationId: getDefinedEntityTypes + produces: + - application/json + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + responses: + 200: + description: Ok + schema: + $ref: "#/definitions/DefinedEntityTypes" + post: + tags: + - definedEntityType + x-vcloud-added-in: "35.0" + summary: Creates a defined entity type. + description: Creates a defined entity type. + operationId: createDefinedEntityType + consumes: + - application/json + produces: + - application/json + parameters: + - name: definition + in: body + required: true + schema: + $ref: "#/definitions/DefinedEntityType" + responses: + 201: + description: Created + schema: + $ref: "#/definitions/DefinedEntityType" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + + defined-entity-type: + parameters: + - name: id + in: path + required: true + type: string + example: urn:vcloud:type:vmware:vspheresddc:1.0.0 + get: + x-vcloud-added-in: "35.0" + tags: + - definedEntityType + summary: Gets the entity type with the unique identifier (URN) + description: Gets the entity type with the unique identifier (URN) + operationId: getDefinedEntityType + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/DefinedEntityType" + delete: + tags: + - definedEntityType + x-vcloud-added-in: "35.0" + summary: Deletes the entity type with the unique identifier (URN) + description: Deletes the entity type with the unique identifier (URN) + operationId: deleteDefinedEntityType + responses: + 204: + description: No Content + put: + tags: + - definedEntityType + x-vcloud-added-in: "35.0" + summary: Updates the entity type with the unique identifier (URN) + description: Updates the entity type with the unique identifier (URN) + operationId: updateDefinedEntityType + consumes: + - application/json + produces: + - application/json + parameters: + - name: definition + in: body + required: true + schema: + $ref: "#/definitions/DefinedEntityType" + responses: + 200: + description: Ok + schema: + $ref: "#/definitions/DefinedEntityType" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + post: + tags: + - definedEntity + x-vcloud-added-in: "35.0" + summary: Creates a defined entity based on the entity type (URN). + description: Creates a defined entity based on the entity type (URN). + operationId: createDefinedEntity + consumes: + - application/json + parameters: + - name: entity + in: body + required: true + schema: + $ref: "./extensibility/definedEntity.yaml#/definitions/DefinedEntity" + - name: invokeHooks + in: query + x-vcloud-added-in: "36.0" + summary: Specify whether the update hooks of the Entity Type should be invoked + description: | + Only users with Admin FullControl access to the Entity Type can pass this parameter. + The default value is 'true'. + required: false + schema: + type: string + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + + behaviors: + parameters: + - name: id + in: path + required: true + type: string + get: + tags: + - definedInterfaceBehaviors + summary: Get the Behaviors of the Defined Entity Type. + x-vcloud-added-in: "35.0" + description: | + Retrieve the Behaviors of the specified Defined Entity Type. + operationId: getDefinedEntityTypeBehaviors + parameters: + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: './extensibility/behavior.yaml#/definitions/Behaviors' + + behavior: + parameters: + - name: id + in: path + required: true + type: string + - name: behaviorId + in: path + required: true + type: string + get: + tags: + - definedInterfaceBehaviors + summary: Get a Behavior in the Defined Type + x-vcloud-added-in: "35.0" + description: | + Retrieve a specific Behavior in the Defined Type. + The Behavior must be specified by ID. + operationId: getTypeBehavior + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: './extensibility/behavior.yaml#/definitions/Behavior' + put: + tags: + - definedInterfaceBehaviors + summary: Update the execution of the specified Behavior in the Defined Entity Type + x-vcloud-added-in: "35.0" + description: | + Override the execution of the specified Behavior in the Defined Entity Type. + The Behavior must be specified by ID. + operationId: updateTypeBehavior + consumes: + - application/json + produces: + - application/json + parameters: + - name: behavior + in: body + required: true + schema: + $ref: './extensibility/behavior.yaml#/definitions/Behavior' + responses: + 200: + description: OK + schema: + $ref: './extensibility/behavior.yaml#/definitions/Behavior' + delete: + tags: + - definedInterfaceBehaviors + summary: Remove a Behavior override from the Defined Entity Type. + x-vcloud-added-in: "35.0" + description: | + Remove a Behavior override in the Defined Entity Type. + The Behavior must be specified by ID. + operationId: removeBehaviorOverride + responses: + 204: + description: No Content + + defined-entity-type-behavior-access: + parameters: + - name: id + in: path + required: true + type: string + example: urn:vcloud:type:vmware:vspheresddc:1.0.0 + get: + x-vcloud-added-in: "35.0" + tags: + - definedInterfaceBehaviors + summary: Gets the access control configuration of the entity type's behaviors + description: Gets the access control configuration of the entity type's behaviors + operationId: getDefinedEntityTypeAccess + parameters: + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + x-vcloud-default-sort: + default-sort-field: behaviorId + sort-ascending: true + responses: + 200: + description: OK + schema: + $ref: './extensibility/behavior.yaml#/definitions/BehaviorAccesses' + put: + tags: + - definedInterfaceBehaviors + x-vcloud-added-in: "35.0" + summary: Sets the access control configuration of the entity type's behaviors + description: Sets the access control configuration of the entity type's behaviors + operationId: setDefinedEntityTypeAccess + consumes: + - application/json + produces: + - application/json + parameters: + - name: definition + in: body + required: true + schema: + $ref: './extensibility/behavior.yaml#/definitions/BehaviorAccesses' + responses: + 200: + description: Ok + schema: + $ref: './extensibility/behavior.yaml#/definitions/BehaviorAccesses' + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + post: + tags: + - definedInterfaceBehaviors + x-vcloud-added-in: "35.0" + summary: Adds an access control configuration of an entity type's behavior + description: Adds an access control configuration of an entity type's behavior + operationId: addDefinedEntityTypeAccess + consumes: + - application/json + produces: + - application/json + parameters: + - name: definition + in: body + required: true + schema: + $ref: './extensibility/behavior.yaml#/definitions/BehaviorAccess' + responses: + 200: + description: Ok + schema: + $ref: './extensibility/behavior.yaml#/definitions/BehaviorAccess' + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + + defined-entity-type-accessControls: + post: + tags: + - typeAccessControls + summary: Creates an access-control grant for an entity type + x-vcloud-added-in: "35.2" + description: | + Creates an access-control grant, giving the user the level of access for the vCD entity type. + operationId: createEntityTypeAccessControlGrant + consumes: + - application/json + parameters: + - name: objectId + in: path + required: true + type: string + - name: accessControlGrant + in: body + required: true + schema: + $ref: './access-control/accessControl.yaml#/definitions/AccessControlGrant' + produces: + - application/json + responses: + 201: + description: Created + schema: + $ref: './access-control/accessControl.yaml#/definitions/AccessControlGrant' + get: + tags: + - typeAccessControls + summary: Get the access-control list for the specified vCD entity type. + x-vcloud-added-in: "35.2" + description: | + Get the access-control list for the specified vCD entity type. + operationId: queryEntityTypeAccessControlGrants + produces: + - application/json + parameters: + - name: objectId + in: path + required: true + type: string + readOnly: true + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + responses: + 200: + description: Ok + schema: + $ref: './access-control/accessControl.yaml#/definitions/AccessControlGrants' + + defined-entity-type-accessControl: + get: + parameters: + - name: objectId + in: path + required: true + type: string + - name: accessControlId + in: path + required: true + type: string + readOnly: true + tags: + - typeAccessControls + summary: Get the specified access-control grant. + x-vcloud-added-in: "35.2" + description: | + Get the specified access-control grant. + operationId: getEntityTypeAccessControlGrant + produces: + - application/json + responses: + 200: + description: Ok + schema: + $ref: './access-control/accessControl.yaml#/definitions/AccessControlGrant' + put: + tags: + - typeAccessControls + summary: Updates the specified access-control grant. + x-vcloud-added-in: "35.2" + description: | + Updates the specified access-control grant. + operationId: updateEntityTypeAccessControlGrant + consumes: + - application/json + parameters: + - name: objectId + in: path + required: true + type: string + readOnly: true + - name: accessControlId + in: path + required: true + type: string + - name: accessControlGrant + in: body + required: true + schema: + $ref: './access-control/accessControl.yaml#/definitions/AccessControlGrant' + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "./access-control/accessControl.yaml#/definitions/AccessControlGrant" + delete: + tags: + - typeAccessControls + summary: Removes the specified access-control grant from the vCD entity type access-control list. + x-vcloud-added-in: "35.2" + description: | + Removes the specified access-control grant from the vCD entity type access-control list. + operationId: removeEntityTypeAccessControlGrant + parameters: + - name: objectId + in: path + required: true + type: string + readOnly: true + - name: accessControlId + in: path + required: true + type: string + responses: + 204: + description: No Content + +definitions: + DefinedEntityType: + x-vcloud-added-in: "35.0" + description: | + Describes what a defined entity type should look like. + type: object + properties: + id: + type: string + example: urn:vcloud:type:vmware:vspheresddc:1.0.0 + description: | + The id of the defined entity type in URN format. + x-vcloud-constraints: + - constraint: NonSortable + - constraint: ReadOnly + name: + type: string + example: vspheresddc + description: | + The name of the defined entity type. + description: + type: string + description: | + Description of the defined entity type. + nss: + type: string + example: sddc + description: | + A unique namespace specific string. The combination of nss and version + must be unique. + version: + type: string + x-vcloud-constraints: + - constraint: Version + example: 1.1.0 + description: | + The version of the defined entity type. The combination of nss and version + must be unique. The version string must follow semantic versioning rules. + inheritedVersion: + type: string + x-vcloud-added-in: "36.0" + x-vcloud-constraints: + - constraint: Version + example: 1.0.0 + description: | + To be used when creating a new version of a defined entity type. + Specifies the version of the type that will be the template for the authorization + configuration of a the new version. The Type ACLs and the access requirements of the + Type Behaviors of the new version will be copied from those of the inherited version. + If the value of this property is '0', then the new type version will not inherit another version + and will have the default authorization settings, just like the first version of a new type. + externalId: + type: string + example: 123 + description: | + An external entity's id that this definition may apply to. + schema: + type: object + example: + application/json: {"type": "object", "properties": {"rectangle": {"$ref": "#/definitions/Rectangle"}}, "definitions": {"size": {"type": "number", "minimum": 0}, "Rectangle": {"type": "object", "properties": {"a": {"$ref": "#/definitions/size"}, "b": {"$ref": "#/definitions/size"}}}}} + description: | + The JSON-Schema valid definition of the defined entity type. + If no JSON Schema version is specified, version 4 will be assumed. + additionalProperties: + type: object + example: + - prop1: value1 + - prop2: value2 + vendor: + type: string + description: | + The vendor name. + example: vmware + interfaces: + type: array + items: + type: string + minItems: 0 + example: + - urn:vcloud:interface:vmware.sddc:1.0.0 + description: | + List of interface ids that this defined entity type is referenced by. + hooks: + type: object + x-vcloud-added-in: "36.0" + description: | + A mapping defining which behaviors should be invoked upon specific lifecycle events, + like PostCreate, PostUpdate, PreDelete. For example: + "hooks": { "PostCreate": "urn:vcloud:behavior-interface:postCreateHook:vendorA:containerCluster:1.0.0" } + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + additionalProperties: + type: object + readonly: + type: boolean + x-vcloud-constraints: + - constraint: ReadOnly + example: false + description: True if the entity type cannot be modified. + required: + - vendor + - version + - name + - nss + - schema + + DefinedEntityTypes: + x-vcloud-added-in: "35.0" + description: | + A list of defined entity types. + allOf: + - $ref: '#/definitions/Page' + - type: object + properties: + values: + type: array + description: The current page of defined entity types. + items: + $ref: '#/definitions/DefinedEntityType' + diff --git a/schemas/openapi/src/main/resources/schemas/extensibility/externalServices.yaml b/schemas/openapi/src/main/resources/schemas/extensibility/externalServices.yaml new file mode 100644 index 00000000..38523a97 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/extensibility/externalServices.yaml @@ -0,0 +1,202 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2020-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + Provides APIs for managing external services. + title: ExternalServices + +paths: + external-services: + post: + tags: + - externalService + summary: Create external service. + operationId: createExternalService + x-vcloud-added-in: "35.0" + description: | + Create an external service. Once created, the combination of vendor, name and + version cannot be modified and must be unique. Each extension will have its own MQTT topics. + produces: + - application/json + consumes: + - application/json + parameters: + - name: service + in: body + required: true + schema: + $ref: "#/definitions/ExternalService" + responses: + 200: + description: OK + schema: + $ref: '#/definitions/ExternalService' + get: + tags: + - externalService + summary: Query external services. + operationId: getExternalServices + x-vcloud-added-in: "35.0" + x-vcloud-multisite: true + description: | + Query all external services. Extensions, created from other APIs will not be + returned. + produces: + - application/json + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + responses: + 200: + description: OK + schema: + $ref: '#/definitions/ExternalServices' + external-service: + parameters: + - name: id + in: path + required: true + type: string + get: + tags: + - externalService + summary: Retrieve an external service. + operationId: getExternalService + x-vcloud-added-in: "35.0" + description: | + Extensions, created from other APIs will not be returned. + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/ExternalService' + put: + tags: + - externalService + summary: Update an external service. + operationId: updateExternalService + x-vcloud-added-in: "35.0" + description: | + Update an external service. Vendor, name and version cannot be updated. + consumes: + - application/json + produces: + - application/json + parameters: + - name: service + in: body + required: true + schema: + $ref: "#/definitions/ExternalService" + responses: + 200: + description: OK + schema: + $ref: '#/definitions/ExternalService' + delete: + tags: + - externalService + summary: Delete an external service. + operationId: deleteExternalService + x-vcloud-added-in: "35.0" + description: | + Delete an external service. The extension must be disabled or the deletion will fail. + responses: + 204: + description: No content + + +definitions: + ExternalService: + x-vcloud-added-in: "35.0" + description: | + The central concept in vCD API extensibility framework. It serves as a namespace for all + other objects and holds top level settings like - enable/disable and API filters. + type: object + properties: + name: + type: string + description: The name of the external service. + x-vcloud-constraints: + - constraint: DefinedEntityString + id: + type: string + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSortable + example: urn:vcloud:extension:VMware.Timer:1.0.0 + description: The unique id of the external service. + version: + type: string + x-vcloud-constraints: + - constraint: Version + example: 1.0.0 + description: | + The extension's version. The version should follow semantic versioning rules. The + combination of vendor-namespace-version must be unique. + vendor: + type: string + example: VMware + x-vcloud-constraints: + - constraint: DefinedEntityString + description: | + The vendor name. The combination of vendor-namespace-version must be unique. + priority: + type: integer + minimum: 0 + maximum: 100 + default: 50 + format: int32 + description: | + Extension service priority. An integer between 0-100. A value of 50 denotes a neutral + priority. + enabled: + type: boolean + description: Whether the extension is enabled or not. + authorizationEnabled: + type: boolean + description: Whether authorization is enabled for the service. + default: false + description: + type: string + mqttTopics: + type: object + description: | + The map of MQTT topics this extension will communicate through. + x-vcloud-constraints: + - constraint: NonSortable + - constraint: ReadOnly + additionalProperties: + type: string + required: + - vendor + - version + - name + - enabled + + + ExternalServices: + x-vcloud-added-in: "35.0" + description: | + A paginated list of external services. + allOf: + - $ref: './common/query.yaml#/definitions/Page' + - type: object + properties: + values: + type: array + items: + $ref: '#/definitions/ExternalService' + + + diff --git a/schemas/openapi/src/main/resources/schemas/extensibility/interface.yaml b/schemas/openapi/src/main/resources/schemas/extensibility/interface.yaml new file mode 100644 index 00000000..1b1101fb --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/extensibility/interface.yaml @@ -0,0 +1,311 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2019-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" + +info: + title: Defined Entity Interfaces + description: Interfaces for defined entities are used for classification and Behaviors definition. + version: "1.0" + +paths: + interfaces: + get: + tags: + - definedInterface + summary: Gets the collection of interfaces defined in the vCD instance. Allows collection refinement through traditional FIQL-based filtering + description: Gets the collection of interfaces defined in the vCD instance. Allows collection refinement through traditional FIQL-based filtering + operationId: queryInterfaces + x-vcloud-added-in: "35.0" + x-vcloud-multisite: true + produces: + - application/json + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + responses: + 200: + description: OK + schema: + $ref: '#/definitions/DefinedInterfaces' + post: + tags: + - definedInterface + summary: Creates a defined interface. + description: | + Creates a defined interface. + The version must follow semantic versioning rules. + x-vcloud-added-in: "35.0" + operationId: createInterface + consumes: + - application/json + produces: + - application/json + parameters: + - name: definedInterface + in: body + required: true + schema: + $ref: "#/definitions/DefinedInterface" + responses: + 201: + description: Created + schema: + $ref: '#/definitions/DefinedInterface' + + interface: + parameters: + - name: id + in: path + required: true + type: string + example: urn:vcloud:interface:vmware.sddc:1.0.0 + get: + tags: + - definedInterface + summary: Gets the interface with the unique identifier (URN) + description: | + Gets the interface with the unique identifier (URN) + x-vcloud-added-in: "35.0" + operationId: getInterface + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/DefinedInterface' + put: + tags: + - definedInterface + summary: Updates the interface with the unique identifier (URN) + description: | + Updates the interface with the unique identifier (URN) + The version must follow semantic versioning rules. + x-vcloud-added-in: "35.0" + operationId: updateInterface + consumes: + - application/json + produces: + - application/json + parameters: + - name: definedInterface + in: body + required: true + schema: + $ref: '#/definitions/DefinedInterface' + responses: + 200: + description: OK + schema: + $ref: '#/definitions/DefinedInterface' + delete: + tags: + - definedInterface + summary: Deletes the interface with the unique identifier (URN) + description: | + Deletes the interface with the unique identifier (URN) + x-vcloud-added-in: "35.0" + operationId: deleteInterface + responses: + 204: + description: No Content + + behaviors: + parameters: + - name: id + in: path + required: true + type: string + get: + tags: + - definedInterfaceBehaviors + summary: Get the Behaviors of the Defined Interface. + x-vcloud-added-in: "35.0" + description: | + Retrieve the Behaviors of the specified Defined Interface. + operationId: getInterfaceBehaviors + parameters: + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: './extensibility/behavior.yaml#/definitions/Behaviors' + post: + tags: + - definedInterfaceBehaviors + summary: Add a new interface Behavior if the Interface is not in use + x-vcloud-added-in: "35.0" + description: | + Add a new Behavior to the Interface. Only allowed if the Interface is not in use. + operationId: addInterfaceBehavior + consumes: + - application/json + produces: + - application/json + parameters: + - name: behavior + in: body + required: true + schema: + $ref: './extensibility/behavior.yaml#/definitions/Behavior' + responses: + 200: + description: OK + schema: + $ref: './extensibility/behavior.yaml#/definitions/Behavior' + put: + tags: + - definedInterfaceBehaviors + summary: Update all the executions of the specified Behaviors (possibly removing or adding some) + x-vcloud-added-in: "35.0" + description: | + Update all Behaviors, possibly adding or removing some if the Interface is not in use. + If the Interface is in use, then only the executions of the existing Behaviors can be updated. + The Behaviors can be specified by ID or by name. + operationId: updateInterfaceBehaviors + consumes: + - application/json + produces: + - application/json + parameters: + - name: behaviors + in: body + required: true + schema: + $ref: './extensibility/behavior.yaml#/definitions/Behaviors' + responses: + 200: + description: OK + schema: + $ref: './extensibility/behavior.yaml#/definitions/Behaviors' + + behavior: + parameters: + - name: id + in: path + required: true + type: string + - name: behaviorId + in: path + required: true + type: string + get: + tags: + - definedInterfaceBehaviors + summary: Get a Behavior in the Defined Interface. + x-vcloud-added-in: "35.0" + description: | + Retrieve a specific Behavior in the specified Defined Interface. + operationId: getInterfaceBehavior + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: './extensibility/behavior.yaml#/definitions/Behavior' + put: + tags: + - definedInterfaceBehaviors + summary: Update the execution of the specified Behavior in the Defined Interface + x-vcloud-added-in: "35.0" + description: | + Update the execution of the specified Behavior in the Defined Interface. + The Behaviors can be specified by ID or by name. + operationId: updateInterfaceBehavior + consumes: + - application/json + produces: + - application/json + parameters: + - name: behavior + in: body + required: true + schema: + $ref: './extensibility/behavior.yaml#/definitions/Behavior' + responses: + 200: + description: OK + schema: + $ref: './extensibility/behavior.yaml#/definitions/Behavior' + delete: + tags: + - definedInterfaceBehaviors + summary: Remove a Behavior from the Defined Interface. + x-vcloud-added-in: "35.0" + description: | + Remove a Behavior from the Defined Interface. + The Behaviors can be specified by ID or by name. + operationId: deleteInterfaceBehavior + responses: + 204: + description: No Content + +definitions: + # "Interface" is an unusable keyword, hence this name + DefinedInterface: + x-vcloud-added-in: "35.0" + description: | + Interface for a defined entity. + The combination of nss+version+vendor should be unique. + type: object + properties: + name: + type: string + example: SDDC Interface + id: + type: string + example: urn:vcloud:interface:vmware.sddc:1.0.0 + x-vcloud-constraints: + - constraint: ReadOnly + version: + type: string + x-vcloud-constraints: + - constraint: Version + example: 1.0.0 + description: The interface's version. The version should follow semantic versioning rules. + vendor: + type: string + example: vmware + description: The vendor name. + nss: + type: string + example: myCustomEntity + description: A unique namespace associated with the interface. + readonly: + type: boolean + x-vcloud-constraints: + - constraint: ReadOnly + example: false + description: True if the entity type cannot be modified. + required: + - name + - version + - vendor + - nss + + DefinedInterfaces: + x-vcloud-added-in: "35.0" + description: | + A paginated list of defined interfaces. + allOf: + - $ref: './common/query.yaml#/definitions/Page' + - type: object + properties: + values: + type: array + items: + $ref: '#/definitions/DefinedInterface' + + diff --git a/schemas/openapi/src/main/resources/schemas/extensibility/metadata.yaml b/schemas/openapi/src/main/resources/schemas/extensibility/metadata.yaml new file mode 100644 index 00000000..4c1fabee --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/extensibility/metadata.yaml @@ -0,0 +1,106 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2021-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: Defined entities metadata API. + version: "1.0" + title: Defined entities metadata API + +paths: + entries: + parameters: + - $ref: "./common/metadata.yaml#/parameters/entityUrn" + + get: + x-vcloud-added-in: "ALPHA" + tags: + - definedEntity + summary: Retrieves all the metadata for the entity. + description: | + Retrieves all the metadata for the VM. User can view the tags if user can view the VM. + operationId: getMetadata + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: './common/metadata.yaml#/definitions/MetadataEntries' + + post: + x-vcloud-added-in: "ALPHA" + tags: + - definedEntity + summary: Creates a new entry. + description: Creates a new entry. + operationId: createMetadataEntry + parameters: + - $ref: "./common/metadata.yaml#/parameters/entry" + consumes: + - application/json + produces: + - application/json + responses: + 201: + schema: + $ref: "./common/metadata.yaml#/definitions/MetadataEntry" + + entry: + parameters: + - $ref: "./common/metadata.yaml#/parameters/entityUrn" + - $ref: "./common/metadata.yaml#/parameters/metadataId" + get: + x-vcloud-added-in: "ALPHA" + tags: + - definedEntity + operationId: + getMetadataEntry + produces: + - application/json + summary: Get a single metadata entry. + responses: + 200: + description: OK + schema: + $ref: './common/metadata.yaml#/definitions/MetadataEntry' + + delete: + x-vcloud-added-in: "ALPHA" + tags: + - definedEntity + operationId: + deleteMetadataEntry + summary: Delete a single metadata entry. + responses: + 204: + description: No Content + + put: + x-vcloud-added-in: "ALPHA" + tags: + - definedEntity + operationId: + updateMetadataEntry + summary: Update the value of a single key-value metadata entry. + parameters: + - $ref: "./common/metadata.yaml#/parameters/entry" + consumes: + - application/json + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: './common/metadata.yaml#/definitions/MetadataEntry' + diff --git a/schemas/openapi/src/main/resources/schemas/extensions/extensions.yaml b/schemas/openapi/src/main/resources/schemas/extensions/extensions.yaml index 91773e61..40d03e64 100644 --- a/schemas/openapi/src/main/resources/schemas/extensions/extensions.yaml +++ b/schemas/openapi/src/main/resources/schemas/extensions/extensions.yaml @@ -1,8 +1,9 @@ -# ************************************************************************* +# ****************************************************************************** # * api-extension-template-vcloud-director -# * Copyright 2017-2018 VMware, Inc. All rights reserved. * +# * Copyright 2017-2021 VMware, Inc. All rights reserved. * # * SPDX-License-Identifier: BSD-2-Clause -# ************************************************************************* +# ****************************************************************************** + swagger: "2.0" info: description: | @@ -16,6 +17,7 @@ info: paths: extensions-ui: get: + x-vcloud-added-in: "30.0" tags: - uiPlugins summary: Get a list of all UI Extensions @@ -32,6 +34,7 @@ paths: $ref: '#/definitions/UiPluginMetadataResponse' post: + x-vcloud-added-in: "30.0" tags: - uiPlugins summary: Adds plugin metadata for a new UI Extension @@ -66,6 +69,7 @@ paths: summary: Retrieves extension specific plugin metadata description: | Retrieve the plugin metadata for this extension + x-vcloud-added-in: "30.0" operationId: getUiPlugin produces: - application/json @@ -81,6 +85,7 @@ paths: description: | Update the plugin metadata for this extension clobbering existing information and returns the updated plugin metadata + x-vcloud-added-in: "30.0" operationId: putUiPlugin consumes: - application/json @@ -102,6 +107,7 @@ paths: - uiPlugin operationId: deleteUiPlugin summary: Delete system level logo + x-vcloud-added-in: "30.0" description: | Delete the system level logo, forcing the get method to return the vCloud Director default logo. @@ -120,6 +126,7 @@ paths: tags: - uiPluginResource summary: Upload the plugin for this extension + x-vcloud-added-in: "30.0" description: | Initiates an upload for the plugin for this extension using the Transfer service A unique transfer service URL is returned where the plugin may be uploaded. @@ -131,7 +138,7 @@ paths: in: body required: true schema: - $ref: '#/definitions/PluginUploadSpec' + $ref: './common/upload.yaml#/definitions/UploadSpec' responses: 204: description: No Content @@ -140,6 +147,7 @@ paths: tags: - uiPluginResource summary: Delete the plugin for this extension + x-vcloud-added-in: "30.0" description: | Deletes the actual plugin for this extension operationId: deleteUiPluginResource @@ -153,11 +161,17 @@ paths: in: path required: true type: string - + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" get: tags: - uiPluginTenants summary: Retrieves list of tenants for whom the plugin is explicitly published + x-vcloud-added-in: "30.0" + x-vcloud-multisite: true description: | Retrieves list of tenants for whom the plugin is explicitly published operationId: getUiPluginTenants @@ -167,9 +181,7 @@ paths: 200: description: OK schema: - type: array - items: - $ref: '#/definitions/EntityReference' + $ref: '#/definitions/EntityReferences' extensions-ui-id-plugin-tenants-publish: parameters: @@ -181,6 +193,7 @@ paths: tags: - uiPluginTenants summary: Publishes the UI plugin to the specified tenants + x-vcloud-added-in: "30.0" description: | Publishes the UI plugin to the specified tenants operationId: postUiPluginPublish @@ -201,9 +214,7 @@ paths: 200: description: OK schema: - type: array - items: - $ref: '#/definitions/EntityReference' + $ref: '#/definitions/EntityReferences' extensions-ui-id-plugin-tenants-unpublish: parameters: @@ -215,6 +226,7 @@ paths: tags: - uiPluginTenants summary: Revokes publication of the UI plugin to the specified tenants + x-vcloud-added-in: "30.0" description: | Revokes publication of the UI plugin to the specified tenants operationId: postUiPluginUnpublish @@ -235,9 +247,7 @@ paths: 200: description: OK schema: - type: array - items: - $ref: '#/definitions/EntityReference' + $ref: '#/definitions/EntityReferences' extensions-ui-id-plugin-tenants-publish-all: parameters: @@ -250,19 +260,17 @@ paths: tags: - uiPluginTenants summary: Publishes the UI plugin to all tenants + x-vcloud-added-in: "30.0" description: | Publishes the UI plugin to all tenants operationId: postUiPluginPublishAll produces: - application/json - responses: 200: description: OK schema: - type: array - items: - $ref: '#/definitions/EntityReference' + $ref: '#/definitions/EntityReferences' extensions-ui-id-plugin-tenants-unpublish-all: parameters: @@ -275,19 +283,55 @@ paths: tags: - uiPluginTenants summary: Unpublishes the UI plugin from all tenants + x-vcloud-added-in: "30.0" description: | Unpublishes the UI plugin from all tenants operationId: postUiPluginUnpublishAll + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EntityReferences' + + extensions-ui-extension-point-summary: + get: + tags: + - uiPlugin + summary: Retrieves a map of extension Points and an ordered list of items registered with that extension point + x-vcloud-added-in: "32.0" + description: + Retrieves a map of extension Points and an ordered list of items registered with that extension point + operationId: getExtensionPointSummary produces: - application/json - responses: 200: description: OK schema: - type: array - items: - $ref: '#/definitions/EntityReference' + $ref: '#/definitions/ExtensionPointSummary' + put: + tags: + - uiPlugin + summary: Customizes the order and enables/disables extension Points + x-vcloud-added-in: "32.0" + description: | + Customizes the order and enables/disables extension Points + operationId: putExtensionPointSummary + consumes: + - application/json + produces: + - application/json + parameters: + - name: extensionPointSummaryBody + in: body + required: true + schema: + $ref: '#/definitions/ExtensionPointSummary' + responses: + 200: + description: OK + schema: + $ref: '#/definitions/ExtensionPointSummary' definitions: UiPluginMetadata: @@ -320,44 +364,48 @@ definitions: - license - link - UiPluginMetadataResponse: + ExtensionPoint: + description: + Extension Point of a UI Plugin + x-vcloud-added-in: "32.0" type: object - - allOf: - - $ref: '#/definitions/UiPluginMetadata' - - type: object - properties: - id: - type: string - plugin_status: - type: string - enum: - - unavailable - - ready - resourcePath: - type: string - - PluginUploadSpec: - type: object - description: | - Information about plugin binary properties: - fileName: + extensionPointId: type: string - size: - type: integer - format: int64 - checksum: + pluginId: type: string - checksumAlgo: + name: type: string - default: sha1 - enum: - - sha1 - - sha256 + enabled: + type: boolean required: - - fileName - - size + - pluginId + - extensionPointId + - enabled + + UiPluginMetadataResponse: + type: object + allOf: + - $ref: '#/definitions/UiPluginMetadata' + - $ref: './common/upload.yaml#/definitions/UploadMetadataResponse' + + ExtensionPointSummary: + description: + A map of extension Points and an ordered list of items registered with that extension point + x-vcloud-added-in: "32.0" + properties: + extensionPointRegistrations: + type: object + additionalProperties: + type: array + items: + $ref: '#/definitions/ExtensionPoint' EntityReference: - $ref: "./common/entity.yaml#/definitions/EntityReference" \ No newline at end of file + $ref: "./common/entity.yaml#/definitions/EntityReference" + + EntityReferences: + $ref: "./common/entity.yaml#/definitions/EntityReferences" + + Page: + $ref: "./common/query.yaml#/definitions/Page" diff --git a/schemas/openapi/src/main/resources/schemas/ldap/group.yaml b/schemas/openapi/src/main/resources/schemas/ldap/group.yaml new file mode 100644 index 00000000..bfe33d29 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/ldap/group.yaml @@ -0,0 +1,159 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2019-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The vCloud Director Group API. + version: "1.0" + title: vCloud Director Group API + +paths: + + groups: + get: + tags: + - Group + summary: Get a list of groups. + x-vcloud-added-in: "35.0" + x-vcloud-multisite: true + x-vcloud-default-sort: + default-sort-field: name + sort-ascending: true + description: | + Get a list of groups. + operationId: queryGroups + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "./ldap/ldap.yaml#/definitions/UserGroups" + + post: + tags: + - Group + summary: Create a new group. + x-vcloud-added-in: "36.0" + x-vcloud-event: com/vmware/vcloud/event/group/import + operationId: createGroup + consumes: + - application/json + parameters: + - name: newGroup + in: body + required: true + schema: + $ref: "./ldap/ldap.yaml#/definitions/UserGroup" + produces: + - application/json + responses: + 201: + description: Created + schema: + $ref: "./ldap/ldap.yaml#/definitions/UserGroup" + + group: + parameters: + - name: groupUrn + in: path + description: groupUrn + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: group + get: + x-vcloud-added-in: "35.0" + tags: + - Group + summary: Get a specified group. + operationId: getGroup + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "./ldap/ldap.yaml#/definitions/UserGroup" + + delete: + tags: + - Group + summary: Delete the specified group. + operationId: deleteGroup + x-vcloud-added-in: "36.0" + responses: + 204: + description: No Content + + put: + tags: + - Group + summary: Modify the details of the specified group. + operationId: updateGroup + x-vcloud-added-in: "36.0" + x-vcloud-event: com/vmware/vcloud/event/group/modify + description: | + Modify details of the specified group. + consumes: + - application/json + parameters: + - name: updatedGroup + in: body + required: true + schema: + $ref: "./ldap/ldap.yaml#/definitions/UserGroup" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "./ldap/ldap.yaml#/definitions/UserGroup" + + users: + parameters: + - name: groupUrn + in: path + description: groupUrn + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: group + get: + x-vcloud-added-in: "35.0" + tags: + - Group + summary: Get a list of users of any type that belong to the specified group. + operationId: queryGroupUsers + x-vcloud-default-sort: + default-sort-field: name + sort-ascending: true + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "./common/entity.yaml#/definitions/EntityReferences" + diff --git a/schemas/openapi/src/main/resources/schemas/ldap/ldap.yaml b/schemas/openapi/src/main/resources/schemas/ldap/ldap.yaml new file mode 100644 index 00000000..7e6ace64 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/ldap/ldap.yaml @@ -0,0 +1,353 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2018-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + title: LDAP YAML + description: Base definitions for LDAP endpoints + version: "1.0" + +parameters: + testSearchUsername: + name: username + in: query + description: Username to use when testing LDAP search + required: false + type: string + +definitions: + LdapSettings: + description: | + LDAP Settings Specification + type: + object + properties: + hostName: + type: + string + port: + type: + integer + isSsl: + type: + boolean + isSslAcceptAll: + type: + boolean + realm: + type: + string + pagedSearchDisabled: + type: + boolean + pageSize: + type: + integer + maxResults: + type: + integer + maxUserGroups: + type: + integer + searchBase: + type: + string + userName: + type: + string + password: + type: + string + authenticationMechanism: + type: + string + enum: [SIMPLE, KERBEROS, M5DIGEST, NTLM] + groupSearchBase: + type: + string + isGroupSearchBaseEnabled: + type: + boolean + connectorType: + type: + string + enum: [ACTIVE_DIRECTORY, OPEN_LDAP] + userAttributes: + $ref: "#/definitions/LdapUserAttributesType" + groupAttributes: + $ref: "#/definitions/LdapGroupAttributesType" + useExternalKerberos: + type: + boolean + + LdapUserAttributesType: + description: | + Defines how LDAP attributes are used when importing a user. + type: + object + properties: + objectClass: + type: + string + objectIdentifier: + type: + string + userName: + type: + string + email: + type: + string + fullName: + type: + string + givenName: + type: + string + surname: + type: + string + telephone: + type: + string + groupMembershipIdentifier: + type: + string + groupBackLinkIdentifier: + type: + string + + LdapGroupAttributesType: + description: | + Defines how a group is imported from LDAP. + type: + object + properties: + objectClass: + type: + string + objectIdentifier: + type: + string + groupName: + type: + string + membership: + type: + string + membershipIdentifier: + type: + string + backLinkIdentifier: + type: + string + + LdapTestResult: + description: | + Provides LDAP connection and settings test results + type: + object + properties: + connectionTest: + $ref: "#/definitions/LdapConnectionTestResult" + settingsTest: + type: array + items: + $ref: "#/definitions/LdapSettingsTestResult" + + LdapConnectionTestResult: + description: | + Provides LDAP connection test results + type: + object + properties: + successful: + type: + boolean + description: + Flag for whether connection test was successful + error: + $ref: "../common/error.yaml#/definitions/Error" + required: + - successful + + LdapSettingsTestResult: + description: | + Provides test attribute, result, and success boolean + type: + object + properties: + attribute: + type: + string + enum: [USER_OBJECT_IDENTIFIER, USERNAME, USER_EMAIL, USER_DISPLAY_NAME, USER_GIVEN_NAME, USER_SURNAME, USER_TELEPHONE, GROUP_NAME, GROUP_OBJECT_IDENTIFIER] + description: + LDAP attribute being tested + attributeValue: + type: + string + description: + Value of LDAP user attribute being tested + result: + type: + string + description: + Result of LADP user attribute being tested (what LDAP server returned) + successful: + type: + boolean + description: + Flag to indicate if the attribute is successful or not + required: + - successful + + User: + description: | + LDAP User Spec object. + type: + object + properties: + username: + type: + string + description: + type: + string + orgEntityRef: + $ref: "../common/entity.yaml#/definitions/EntityReference" + fullname: + type: + string + email: + type: + string + phoneNumber: + type: + string + im: + type: + string + external: + type: + boolean + nameInSource: + type: + string + sourceEntityRef: + $ref: "../common/entity.yaml#/definitions/EntityReference" + description: "This field is under accelerated deprecation and will be removed next release." + enabled: + type: + boolean + locked: + type: + boolean + alertEmailPrefix: + type: + string + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: No alternative, this field has never returned data + alertEmail: + type: + string + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: No alternative, this field has never returned data + roleEntityRef: + $ref: "../common/entity.yaml#/definitions/EntityReference" + roleInherited: + type: + boolean + delayAfterPowerOnSeconds: + type: + integer + storedVMQuota: + type: + integer + description: "The stored VM quota for this user. Defaults to 0 which means unlimited. This property is deprecated in 35.0. Use user quotas API." + x-vcloud-deprecated-in: "35.0" + x-vcloud-deprecated-alternative: Use user quotas API + deployedVMQuota: + type: + integer + description: "The deployed VM quota for this user. Defaults to 0 which means unlimited. This property is deprecated in 35.0. Use user quotas API." + x-vcloud-deprecated-in: "35.0" + x-vcloud-deprecated-alternative: Use user quotas API + inSync: + type: + boolean + x-vcloud-property-annotations: + sourceEntityRef: + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: This field is unused. + + UserGroup: + description: | + Group Spec object. + type: + object + properties: + name: + type: + string + id: + type: + string + x-vcloud-added-in: "34.0" + description: + type: + string + orgEntityRef: + $ref: "../common/entity.yaml#/definitions/EntityReference" + sourceEntityRef: + $ref: "../common/entity.yaml#/definitions/EntityReference" + description: "This field is under accelerated deprecation and will be removed next release." + roleEntityRef: + $ref: "../common/entity.yaml#/definitions/EntityReference" + nameInSource: + type: + string + providerType: + type: + string + description: | + The provider type of the group. + Valid values are: +
        +
      • LDAP +
      • SAML +
      • OAUTH +
      + required: + - name + - description + - orgEntityRef + - roleEntityRef + - providerType + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: NonSortable + - constraint: ReadOnly + - constraint: Urn + args: + - arg: group + sourceEntityRef: + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: This field is unused. + + UserGroups: + x-vcloud-added-in: "34.0" + description: | + A list of groups. + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + description: The current page of groups. + items: + $ref: '#/definitions/UserGroup' diff --git a/schemas/openapi/src/main/resources/schemas/ldap/searchLdap.yaml b/schemas/openapi/src/main/resources/schemas/ldap/searchLdap.yaml new file mode 100644 index 00000000..d4002b53 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/ldap/searchLdap.yaml @@ -0,0 +1,62 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2018-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: LDAP Search Actions + version: "1.0" + title: Search LDAP YAML + +paths: + searchUsers: + get: + tags: + - LDAP + summary: Search LDAP Users + description: | + Searches LDAP for given user(s) + operationId: searchLdapUsers + produces: + - application/json + parameters: + - name: q + in: query + description: String to search for via LDAP + required: false + type: + string + responses: + 200: + description: OK + schema: + type: array + items: + $ref: "./ldap/ldap.yaml#/definitions/User" + + searchGroups: + get: + tags: + - LDAP + summary: Search LDAP Groups + description: | + Searches LDAP for given group(s) + operationId: searchLdapGroups + produces: + - application/json + parameters: + - name: q + in: query + description: String to search for via LDAP + required: false + type: + string + responses: + 200: + description: OK + schema: + type: array + items: + $ref: "./ldap/ldap.yaml#/definitions/UserGroup" diff --git a/schemas/openapi/src/main/resources/schemas/ldap/syncLdap.yaml b/schemas/openapi/src/main/resources/schemas/ldap/syncLdap.yaml new file mode 100644 index 00000000..3c39c8fe --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/ldap/syncLdap.yaml @@ -0,0 +1,26 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2018-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: LDAP Sync Actions + version: "1.0" + title: LDAP Sync YAML + +paths: + sync: + post: + tags: + - LDAP + summary: Synchronize LDAP users/settings + description: | + Begins the LDAP sync task + operationId: syncLdap + responses: + 204: + description: OK + 400: + description: Bad request diff --git a/schemas/openapi/src/main/resources/schemas/ldap/testLdap.yaml b/schemas/openapi/src/main/resources/schemas/ldap/testLdap.yaml new file mode 100644 index 00000000..bba314ed --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/ldap/testLdap.yaml @@ -0,0 +1,38 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2018-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: Custom LDAP Actions + version: "1.0" + title: Custom LDAP YAML + +paths: + test: + post: + tags: + - LDAP + summary: Tests LDAP Connection and Settings + description: | + Tests that custom LDAP settings are valid, and that the system can use them to search for a user or group + operationId: testLdap + parameters: + - $ref: "./ldap/ldap.yaml#/parameters/testSearchUsername" + - in: body + name: ldapSettings + description: LDAP Settings to use for testing connection + required: true + schema: + $ref: "./ldap/ldap.yaml#/definitions/LdapSettings" + consumes: + - application/json + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "./ldap/ldap.yaml#/definitions/LdapTestResult" diff --git a/schemas/openapi/src/main/resources/schemas/networking/applicationPortProfiles.yaml b/schemas/openapi/src/main/resources/schemas/networking/applicationPortProfiles.yaml new file mode 100644 index 00000000..fef441df --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/networking/applicationPortProfiles.yaml @@ -0,0 +1,297 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2019-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + An API for managing Application Network Port Profiles. Application Port Profiles can be used when defining NAT and Firewall rules to restrict + the traffic to certain ports and protocols. These are available only to an Org vDC that is backed by NSX-T. + version: "1.0" + title: Application Port Profiles API + +paths: + applicationPortProfiles: + get: + x-vcloud-added-in: "33.0" + tags: + - applicationPortProfiles + summary: Get all Application Port Profiles. + description: | + Retrieves all Application Port Profiles. This includes user-defined profiles and default system profile. + Supported contexts are: + Org vDC ID (_context==orgVdcId) - | + Returns all the application port profiles which are available to a specific Org vDC. + Network provider ID (_context==networkProviderId) - | + Returns all the application port profiles which are available under a specific network provider. + VDC Group Id (_context==vdcGroupId) - | + Returns all the application port profiles which are available to a specific vDC Group. + operationId: getApplicationPortProfiles + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/ApplicationPortProfiles' + post: + x-vcloud-added-in: "33.0" + tags: + - applicationPortProfiles + summary: Create a user-defined application port profile. + operationId: createApplicationPortProfile + consumes: + - application/json + parameters: + - name: applicationPortProfile + in: body + required: true + schema: + $ref: '#/definitions/ApplicationPortProfile' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + + applicationPortProfile: + parameters: + - name: applicationPortProfileId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: applicationPortProfile + + get: + x-vcloud-added-in: "33.0" + tags: + - applicationPortProfile + summary: Retrieves a specific user-defined Application Port Profile + operationId: getApplicationPortProfile + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/ApplicationPortProfile' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + put: + x-vcloud-added-in: "33.0" + tags: + - applicationPortProfile + summary: Updates a specific user-defined Application Port Profile + operationId: updateApplicationPortProfile + consumes: + - application/json + parameters: + - name: applicationPortProfile + in: body + required: true + schema: + $ref: '#/definitions/ApplicationPortProfile' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + delete: + x-vcloud-added-in: "33.0" + tags: + - applicationPortProfile + summary: Deletes a specific user-defined Application Port Profile + operationId: deleteApplicationPortProfile + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + sync: + post: + x-vcloud-added-in: "33.0" + tags: + - applicationPortProfiles + summary: Sync the application port profiles from the network provider to VCD. + description: | + Sync the application port profiles from the network provider to VCD. The network provider is required to be specified in the filter context. + Context example: (_context==networkProviderId). + operationId: syncApplicationPortProfiles + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + +definitions: + ApplicationPortProfiles: + x-vcloud-added-in: "33.0" + description: | + List of Application Port Profiles. + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: '#/definitions/ApplicationPortProfile' + + ApplicationPortProfile: + x-vcloud-added-in: "33.0" + description: | + An Application Port Profile object. The application port profile represents a set of ports and protocols that can be used when defining network service rules. + type: object + allOf: + - $ref: "./networking/applicationPortProfiles.yaml#/definitions/NetworkProviderContext" + - $ref: './networking/commonObject.yaml#/definitions/NetworkingObjectStatus' + - properties: + id: + type: string + description: The id of the Application Port Profile in URN format. + name: + type: string + description: The name of the Application Port Profile. + description: + type: string + scope: + $ref: './networking/applicationPortProfiles.yaml#/definitions/ApplicationPortProfileScopeType' + description: The scope of the application port profile definition. + readOnly: true + applicationPorts: + description: A list of protocol and ports supported by this application port profile. + type: array + items: + $ref: './networking/applicationPortProfiles.yaml#/definitions/ApplicationPortList' + usableForNAT: + type: boolean + description: | + True means that the port profile can be used for NAT configuration. A port profile can be used for NAT if there is only 1 application port + with at most 1 destination port. + required: + - name + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: Urn + args: + - arg: applicationPortProfile + - constraint: ReadOnly + - constraint: NonSortable + description: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + scope: + x-vcloud-constraints: + - constraint: ReadOnly + usableForNAT: + x-vcloud-constraints: + - constraint: ReadOnly + + + + ApplicationPortList: + x-vcloud-added-in: "33.0" + description: | + A set of ports and the protocol supported by a application port profile. + type: object + properties: + name: + description: The display name. + type: string + protocol: + description: The protocol this services applies to. + $ref: '#/definitions/ApplicationPortsProtocolType' + destinationPorts: + description: The set of ports on the destination that the profile applies to. Valid values include single ports and a range of ports. + type: array + items: + type: string + x-vcloud-property-annotations: + name: + x-vcloud-constraints: + - constraint: NonSortable + protocol: + x-vcloud-constraints: + - constraint: NonSortable + destinationPorts: + x-vcloud-constraints: + - constraint: NonSortable + + ApplicationPortProfileScopeType: + x-vcloud-added-in: "33.0" + description: | + The definition scope of an Application Port Profile. + SYSTEM profiles are available to all tenants. They are default profiles from the backing networking provider. + PROVIDER profiles are available to all tenants. They are defined by the provider at a system level. + TENANT profiles are available only to the specific tenant organization. They are defined by the tenant or by a provider on behalf of a tenant. + type: string + enum: + - SYSTEM + - PROVIDER + - TENANT + + ApplicationPortsProtocolType: + x-vcloud-added-in: "33.0" + description: | + The supported protocols for an application port profile. + type: string + enum: + - TCP + - UDP + - ICMPv4 + - ICMPv6 + + EntityReference: + $ref: "./common/entity.yaml#/definitions/EntityReference" + + NetworkProviderContext: + description: + Describes the network provider context of the network object. + type: object + properties: + orgRef: + $ref: "#/definitions/EntityReference" + description: | + The organization that this object belongs to. This property is required during creation and cannot be updated. + contextEntityId: + type: string + description: | + The context under which this object is created. The context can the id of the organization vDC, vDC Group, or network provider. + This field is required on object creation and is unset on object reads. This same context ID can be used in the context filter field + when querying for the list of objects. + networkProviderScope: + type: string + description: | + The network provider scope that this object belongs to. This is a read-only property and is determined by the input context entity ID during object creation. + x-vcloud-property-annotations: + orgRef: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + contextEntityId: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + networkProviderScope: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable diff --git a/schemas/openapi/src/main/resources/schemas/networking/commonObject.yaml b/schemas/openapi/src/main/resources/schemas/networking/commonObject.yaml new file mode 100644 index 00000000..d1995183 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/networking/commonObject.yaml @@ -0,0 +1,239 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2017-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" + +info: + title: Common networking schema objects + description: Common networking schema objects that are used across different objects + version: "1.0" + + +definitions: + + Subnets: + description: | + List of Subnets of a network + type: object + properties: + values: + type: array + items: + $ref: '#/definitions/Subnet' + + Subnet: + description: | + A network subnet defined by its gateway, + type: object + properties: + gateway: + type: string + description: The gateway for the subnet. + prefixLength: + type: integer + description: The prefix length of the subnet. + dnsSuffix: + type: string + description: The DNS suffix that VMs attached to this network will use. + dnsServer1: + type: string + description: The first DNS server that VMs attached to this network will use. + dnsServer2: + type: string + description: The second DNS server that VMs attached to this network will use. + ipRanges: + $ref: '#/definitions/IpRanges' + description: Range of IPs within the subnet that can be used in this network. A VM attached to this network is assigned one of these IPs. + enabled: + type: boolean + default: true + description: Indicates whether the external network subnet is currently enabled. + totalIpCount: + type: integer + description: The number of IP addresses defined by the static IP ranges. + usedIpCount: + type: integer + description: The number of IP address used from the static IP ranges. + required: + - gateway + - prefixLength + x-vcloud-property-annotations: + prefixLength: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + dnsSuffix: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + dnsServer1: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + dnsServer2: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + ipRanges: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + enabled: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + totalIpCount: + x-vcloud-added-in: "33.0" + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + usedIpCount: + x-vcloud-added-in: "33.0" + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + + IpRanges: + description: | + List of IpRange + type: object + properties: + values: + type: array + items: + $ref: '#/definitions/IpRange' + + IpRange: + description: | + An IpRange + type: object + properties: + startAddress: + type: string + description: Starting IP address in the range. + endAddress: + type: string + description: Ending IP address in the range. + + Network: + description: | + A network Object. + type: object + properties: + id: + type: string + description: The unique ID for the network. This field is read-only. + name: + type: string + description: The name of the network. + description: + type: string + description: The description of the network. + subnets: + $ref: '#/definitions/Subnets' + description: List of subnets configured for the network. + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSortable + description: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + BackingRef: + x-vcloud-added-in: "33.0" + description: | + Backing Id for an entity not owned by VCD. + type: object + properties: + id: + type: string + description: The id/moref of the backing entity. + name: + type: string + description: The name of backing entity. + + ObjectVersion: + x-vcloud-added-in: "33.0" + description: | + This property describes the current version of the entity. To prevent clients from overwriting each other's changes, update operations must include + the version which can be obtained by issuing a GET operation. If the version number on an update call is missing, the operation will be rejected. This is only needed + on update calls. + properties: + version: + type: integer + description: version number for the given entity. + required: + - version + x-vcloud-property-annotations: + version: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + NetworkingObjectStatusType: + x-vcloud-added-in: "33.0" + description: | + Represents status type of a networking entity. +
        +
      • PENDING - Desired entity configuration has been received by system and is pending realization. +
      • CONFIGURING - The system is in process of realizing the entity. +
      • REALIZED - The entity is successfully realized in the system. +
      • REALIZATION_FAILED - There are some issues and the system is not able to realize the entity. +
      • UNKNOWN - Current state of entity is unknown. +
      + type: object + enum: + - PENDING + - CONFIGURING + - REALIZED + - REALIZATION_FAILED + - UNKNOWN + + NetworkingObjectStatus: + x-vcloud-added-in: "33.0" + description: | + Represents status of a networking entity. + type: object + properties: + status: + $ref: '#/definitions/NetworkingObjectStatusType' + description: | + Represents current status of the networking object. + x-vcloud-property-annotations: + status: + x-vcloud-added-in: "33.0" + x-vcloud-constraints: + - constraint: ReadOnly + + EntityReference: + $ref: "./common/entity.yaml#/definitions/EntityReference" + + ExtObjectReference: + x-vcloud-added-in: "34.0" + description: | + Reference for entities which are external to VCD and do not have a VCD URN identifier. + type: object + properties: + id: + type: string + description: The id of the entity. + example: 2a4ba9ad-e8d5-409c-8cae-c06910cd9b47 + name: + type: string + description: The name of entity. + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + name: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable diff --git a/schemas/openapi/src/main/resources/schemas/networking/crossVdcNetworks.yaml b/schemas/openapi/src/main/resources/schemas/networking/crossVdcNetworks.yaml new file mode 100644 index 00000000..2aa5ed70 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/networking/crossVdcNetworks.yaml @@ -0,0 +1,227 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2011-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The Cross vDC networks API allows for management of networks that span many vDCs within a vDC group. + version: "1.0" + title: Cross vDC networks API + +paths: + + crossVdcNetworks: + get: + x-vcloud-added-in: "31.0" + tags: + - crossVdcNetworks + summary: Get all Cross vDC networks in the system. + description: | + Get all Cross vDC networks in the system. + operationId: getAllCrossVdcNetworks + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/CrossVdcNetworks' + + post: + x-vcloud-added-in: "31.0" + tags: + - crossVdcNetworks + summary: Creates a Cross vDC network. + operationId: createCrossVdcNetwork + consumes: + - application/json + parameters: + - name: crossVdcNetwork + in: body + required: true + schema: + $ref: '#/definitions/CrossVdcNetwork' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + + crossVdcNetworksForVdcGroup: + parameters: + - name: vdcGroupId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: vdcGroup + get: + x-vcloud-added-in: "31.0" + tags: + - crossVdcNetworks + summary: Get all Cross vDC networks of a vDC group. + operationId: getAllCrossVdcNetworksForVdcGroup + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/CrossVdcNetworks' + + crossVdcNetwork: + parameters: + - name: crossVdcNetworkId + in: path + required: true + type: string + + get: + x-vcloud-added-in: "31.0" + tags: + - crossVdcNetwork + summary: Retrieves a specific Cross vDC network. + operationId: getCrossVdcNetwork + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/CrossVdcNetwork' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + put: + x-vcloud-added-in: "31.0" + tags: + - crossVdcNetwork + summary: Updates a specific Cross vDC network. + operationId: updateCrossVdcNetwork + consumes: + - application/json + parameters: + - name: crossVdcNetwork + in: body + required: true + schema: + $ref: '#/definitions/CrossVdcNetwork' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + delete: + x-vcloud-added-in: "31.0" + tags: + - crossVdcNetwork + summary: Deletes a specific Cross vDC network + operationId: deleteCrossVdcNetwork + parameters: + - $ref: "./common/delete.yaml#/parameters/forceDelete" + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + sync: + parameters: + - name: crossVdcNetworkId + in: path + required: true + type: string + + post: + x-vcloud-added-in: "31.0" + tags: + - crossVdcNetwork + summary: Sync/repair a specific Cross vDC network. + description: | + Sync/repair the specific cross vdc network + operationId: syncCrossVdcNetwork + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + +definitions: + + CrossVdcNetworks: + x-vcloud-added-in: "31.0" + description: | + List of cross vDC networks + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: '#/definitions/CrossVdcNetwork' + + CrossVdcNetwork: + x-vcloud-added-in: "31.0" + description: | + A CrossVdcNetwork object + allOf: + - $ref: './networking/commonObject.yaml#/definitions/Network' + - type: object + properties: + vdcGroupRef: + $ref: '#/definitions/EntityReference' + description: The vDC group that this network belongs to. + routerRef: + $ref: '#/definitions/EntityReference' + description: The router that this network is attached to. + status: + $ref: '#/definitions/VdcGroupEntityStatus' + description: The status of the network. + errorMessage: + type: string + description: If the network has an error status, a more detailed error message is set here. + x-vcloud-property-annotations: + vdcGroupRef: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSortable + routerRef: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + status: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + errorMessage: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + EntityReference: + $ref: "./common/entity.yaml#/definitions/EntityReference" + + VdcGroupEntityStatus: + $ref: "./vdcGroups/vdcGroups.yaml#/definitions/VdcGroupEntityStatus" + diff --git a/schemas/openapi/src/main/resources/schemas/networking/dfw.yaml b/schemas/openapi/src/main/resources/schemas/networking/dfw.yaml new file mode 100644 index 00000000..c8844dd4 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/networking/dfw.yaml @@ -0,0 +1,361 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2020-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + API for Distributed firewall (DFW) configuration on a Flex vDC group. Users can create DFW policies and rules to allow or deny east-west + traffic to pass through the firewall. The policies will be applied on the networks associated with the vDC Group where the DFW configuration + is being made. + title: Distributed Firewall (DFW) API + +paths: + + dfwPolicies: + parameters: + - name: vdcGroupId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: vdcGroup + + get: + x-vcloud-added-in: "35.0" + tags: + - dfwPolicies + summary: Retrieves DFW security policies configuration. + description: | + Retrieves the current state of DFW along with all the DFW security policies + for a given networking and security domain. + operationId: getDfwPolicies + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/DfwPolicies' + + put: + x-vcloud-added-in: "35.0" + tags: + - dfwPolicies + summary: Update DFW security policies configuration. + description: | + Updates the DFW security policies for a given networking and security domain. + A default security policy will be created when DFW is enabled. Removing a security + policy will result in removal of the policy and all of its associated firewall rules. + operationId: updateDfwPolicies + consumes: + - application/json + parameters: + - name: dfwPolicies + in: body + required: true + schema: + $ref: '#/definitions/DfwPolicies' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + dfwPolicy: + parameters: + - name: vdcGroupId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: vdcGroup + - name: policyId + in: path + required: true + type: string + + get: + x-vcloud-added-in: "35.0" + tags: + - dfwPolicy + summary: Retrieves a specific DFW security policy. + operationId: getDfwPolicy + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/DfwPolicy' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + put: + x-vcloud-added-in: "35.0" + tags: + - dfwPolicy + summary: Updates a specific DFW security policy. + operationId: updateDfwPolicy + consumes: + - application/json + parameters: + - name: dfwPolicy + in: body + required: true + schema: + $ref: '#/definitions/DfwPolicy' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + delete: + x-vcloud-added-in: "35.0" + tags: + - dfwPolicy + summary: | + Deletes a specific DFW security policy. Removing a security + policy will result in removal of the policy and all of its associated firewall rules. + operationId: deleteDfwPolicy + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + dfwPolicyRules: + parameters: + - name: vdcGroupId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: vdcGroup + - name: policyId + in: path + required: true + type: string + + get: + x-vcloud-added-in: "35.0" + tags: + - dfwPolicy + summary: Retrieves all firewall rules for a given DFW security policy. + description: | + Retrieves all firewall rules for a given DFW security policy. + The rules are returned in the order of precedence. + operationId: getDfwRules + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/DfwRules' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + put: + x-vcloud-added-in: "35.0" + tags: + - dfwPolicy + summary: Updates firewall rules for a given DFW security policy. + description: | + Updates all the firewall rules for a given DFW security policy. If a rule with the ruleId + is not already present, a new rule will be created. If it already exists, the rule + will be updated. Any existing rule that is not specified in the update payload will be deleted. + The order of rules in payload will define the actual order in which this rules will be applied. + operationId: updateDfwRules + consumes: + - application/json + parameters: + - name: dfwRules + in: body + required: true + schema: + $ref: '#/definitions/DfwRules' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + dfwPolicyRule: + parameters: + - name: vdcGroupId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: vdcGroup + - name: policyId + in: path + required: true + type: string + - name: ruleId + in: path + required: true + type: string + + get: + x-vcloud-added-in: "35.0" + tags: + - dfwPolicy + summary: Retrieves a specific firewall rule for a given DFW security policy. + operationId: getDfwRule + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/DfwRule' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + put: + x-vcloud-added-in: "35.0" + tags: + - dfwPolicy + summary: Updates a specific firewall rule for a given DFW security policy. + operationId: updateDfwRule + consumes: + - application/json + parameters: + - name: dfwRule + in: body + required: true + schema: + $ref: '#/definitions/DfwRule' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + delete: + x-vcloud-added-in: "35.0" + tags: + - dfwPolicy + summary: Deletes a specific firewall rule for a given DFW security policy. + operationId: deleteDfwRule + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + +definitions: + + DfwPolicies: + x-vcloud-added-in: "35.0" + description: | + Describes DFW security policies configuration. + type: object + properties: + enabled: + type: boolean + description: A flag indicating whether DFW configuration is enabled or not. + default: false + defaultPolicy: + description: | + The default DFW security policy for the security domain. + $ref: '#/definitions/DfwPolicy' + x-vcloud-property-annotations: + enabled: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + defaultPolicy: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + + DfwPolicy: + x-vcloud-added-in: "35.0" + description: Describes a DFW security policy. + type: object + properties: + id: + type: string + description: | + The unique id of this security policy. On updates, the id is required for the policy, while for create a new id will be generated. This id is not a VCD URN. + name: + type: string + description: Name for the security policy. + description: + type: string + description: Description for the security policy. + enabled: + type: boolean + description: Whether this security policy is enabled. + default: true + version: + $ref: '#/definitions/ObjectVersion' + required: + - name + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + name: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + description: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + enabled: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + version: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + DfwRule: + x-vcloud-added-in: "35.0" + description: Describes a DFW rule. + allOf: + - $ref: "./networking/edgeGatewayFirewall.yaml#/definitions/FirewallRule" + + DfwRules: + x-vcloud-added-in: "35.0" + description: DFW rules. + type: object + properties: + values: + description: The ordered list of DFW rules. + type: array + items: + $ref: '#/definitions/DfwRule' + + ObjectVersion: + $ref: './networking/commonObject.yaml#/definitions/ObjectVersion' + + EntityReference: + $ref: "./common/entity.yaml#/definitions/EntityReference" diff --git a/schemas/openapi/src/main/resources/schemas/networking/edgeClusters.yaml b/schemas/openapi/src/main/resources/schemas/networking/edgeClusters.yaml new file mode 100644 index 00000000..e433a884 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/networking/edgeClusters.yaml @@ -0,0 +1,212 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2018-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + API for managing Edge Clusters. Edge Clusters can be created to define the storage and compute parameters used to deploy an Edge Gateway. + version: "1.0" + title: Edge Clusters API + +paths: + + edgeClusters: + + post: + x-vcloud-added-in: "32.0" + tags: + - edgeClusters + summary: Create a new Edge Cluster + description: | + Create a new Edge Cluster. An Edge Cluster is defined by a Resouce Pool and Storage Profile for deploying Edge Gateways. It can subsequently be assigned to a + given vDC Network Profile as a Primary or Secondary Edge Cluster. + operationId: createEdgeCluster + consumes: + - application/json + parameters: + - name: edgeCluster + in: body + required: true + schema: + $ref: '#/definitions/EdgeCluster' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + + get: + x-vcloud-added-in: "32.0" + tags: + - edgeClusters + summary: Get all Edge Clusters in the system + description: | + Retrieves all Edge Clusters. Results can be filtered by id, name, vCenter (resourcePool.vcId), + externalNetworkId and orgVdcId. +
        +
      • externalNetworkId - | + The URN of external Network. + Filters all edgeClusters that are accessible to externalNetworkId. + externalNetworkId filter is supported from version 35.2 + Example: (externalNetworkId==urn:vcloud:network:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) +
      • +
      • orgVdcId - | + The URN of Org vDC. + Filters all edgeClusters that are available to an Org vDC. + orgVdcId filter is supported from version 36.0 + Example: (orgVdcId==urn:vcloud:vdc:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) +
      • +
      + Error will be thrown if both externalNetworkId and orgVdcId filters are supplied. + operationId: getEdgeClusters + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EdgeClusters' + + edgeCluster: + parameters: + - name: edgeClusterId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: edgeCluster + + get: + x-vcloud-added-in: "32.0" + tags: + - edgeCluster + summary: Retrieves a specific Edge Cluster + operationId: getEdgeCluster + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EdgeCluster' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + put: + x-vcloud-added-in: "32.0" + tags: + - edgeCluster + summary: Updates a specific Edge Cluster + operationId: updateEdgeCluster + consumes: + - application/json + parameters: + - name: edgeCluster + in: body + required: true + schema: + $ref: '#/definitions/EdgeCluster' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + delete: + x-vcloud-added-in: "32.0" + tags: + - edgeCluster + summary: Deletes a specific Edge Cluster + operationId: deleteEdgeCluster + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + +definitions: + + EdgeClusters: + x-vcloud-added-in: "32.0" + description: | + List of Edge Clusters. + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: '#/definitions/EdgeCluster' + + EdgeCluster: + x-vcloud-added-in: "32.0" + description: | + An Edge Cluster object. + type: object + properties: + id: + type: string + description: The id of the Edge Cluster in URN format. + name: + type: string + description: The name of the Edge Cluster. Names for Edge Clusters must be unique across the system. + description: + type: string + resourcePool: + $ref: "#/definitions/ResourcePool" + description: The Resource Pool in vCenter where the Edge VM will be deployed. + storageProfileName: + type: string + description: Name of the Storage Profile. This will define the set of datastores where the edge vm will be deployed. + required: + - name + - vcId + - resourcePoolPath + - storageProfileName + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: Urn + args: + - arg: edgeCluster + - constraint: ReadOnly + - constraint: NonSortable + description: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + resourcePool: + x-vcloud-constraints: + - constraint: NonSortable + storageProfileName: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + x-vcloud-cross-references: + - cross-reference: + referenced-type: "./networking/externalNetworks.yaml#/definitions/ExternalNetwork" + referenced-property: id + alias: externalNetworkId + - cross-reference: + referenced-type: "./vdc/vdcs.yaml#/definitions/OrgVdc" + referenced-property: id + alias: orgVdcId + + + ResourcePool: + $ref: "./vc/resourcePool.yaml#/definitions/ResourcePool" + diff --git a/schemas/openapi/src/main/resources/schemas/networking/edgeGatewayDns.yaml b/schemas/openapi/src/main/resources/schemas/networking/edgeGatewayDns.yaml new file mode 100644 index 00000000..e0cc068f --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/networking/edgeGatewayDns.yaml @@ -0,0 +1,186 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2019-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + API for DNS configuration of an edge gateway. VMs within a vApp that are connected to the network off of the + edge gateway can inherit this DNS configuration. + version: "1.0" + title: Edge Gateway DNS API + +paths: + + dns: + parameters: + - name: gatewayId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: gateway + + get: + x-vcloud-added-in: "32.0" + tags: + - edgeGatewayDns + summary: Retrieves DNS configuration of the edge gateway. + operationId: getEdgeGatewayDns + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EdgeDnsConfig' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + put: + x-vcloud-added-in: "32.0" + tags: + - edgeGatewayDns + summary: Updates DNS configuration of the edge gateway. + operationId: updateEdgeGatewayDns + consumes: + - application/json + parameters: + - name: dnsConfig + in: body + required: true + schema: + $ref: '#/definitions/EdgeDnsConfig' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + delete: + x-vcloud-added-in: "32.0" + tags: + - edgeGatewayDns + summary: Deletes DNS configuration of the edge gateway. + operationId: deleteEdgeGatewayDns + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + +definitions: + + EdgeDnsConfig: + x-vcloud-added-in: "32.0" + description: Specifies the DNS forwarder configuration for an edge gateway backed by NSX-T. + type: object + properties: + enabled: + type: boolean + description: True means that the forwarder is enabled. False means it's disabled. + default: false + listenerIp: + type: string + description: The IP on which the DNS forwarder listens. If the Edge Gateway has a dedicated external network, this can be changed. + defaultForwarderZone: + $ref: '#/definitions/NsxtDnsForwarderZoneConfig' + description: The default forwarder zone to use if there's no matching domain in the conditional forwarder zone. + conditionalForwarderZones: + type: array + description: The list of forwarder zones with its matching DNS domains. + items: + $ref: '#/definitions/NsxtDnsForwarderZoneConfig' + minItems: 0 + maxItems: 5 + version: + $ref: '#/definitions/ObjectVersion' + snatRuleEnabled: + type: boolean + description: | + Whether there is an SNAT rule exists for the DNS forwarder or not. In NAT routed environments, an SNAT rule is required for the Edge DNS forwarder to send + traffic to an upstream server. In fully routed environments, this is not needed if the listener IP is on an advertised subnet. If the Edge Gateway has a + dedicated external network and the listener IP has been changed, there will not be an SNAT rule for the DNS forwarder. In all other cases the SNAT rule will + exist. + x-vcloud-property-annotations: + enabled: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + listenerIp: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + - constraint: NetworkAddress + args: + - arg: IPV4_IP + defaultForwarderZone: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + conditionalForwarderZones: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + snatRuleEnabled: + x-vcloud-added-in: "34.0" + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + + NsxtDnsForwarderZoneConfig: + x-vcloud-added-in: "32.0" + description: Specifies the list of domains and the DNS servers that handle those domains. + type: object + properties: + id: + type: string + description: | + The unique id of the DNS forwarder zone. If value is unset, a new zone is created. + If value is set, an update is done on the zone. + displayName: + type: string + description: User friendly name for the zone. + dnsDomainNames: + type: array + description: | + List of domain names on which conditional forwarding is based. This field is required if the DNS Zone is + being used for a conditional forwarder. This field will also be used for conditional reverse lookup. + This field should not be set if the zone is used as default forwarder zone. + items: + type: string + upstreamServers: + type: array + description: DNS servers to which the DNS request needs to be forwarded. + items: + type: string + minItems: 0 + maxItems: 3 + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSortable + displayName: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + dnsDomainNames: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + upstreamServers: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + ObjectVersion: + $ref: './networking/commonObject.yaml#/definitions/ObjectVersion' + diff --git a/schemas/openapi/src/main/resources/schemas/networking/edgeGatewayFirewall.yaml b/schemas/openapi/src/main/resources/schemas/networking/edgeGatewayFirewall.yaml new file mode 100644 index 00000000..1e06cc01 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/networking/edgeGatewayFirewall.yaml @@ -0,0 +1,386 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2019-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + API for Firewall configuration of an edge gateway. Users can create rules to allow or deny north-south + traffic to pass through the firewall. This can only be used on an Edge Gateway backed by an NSX-T Tier-1 Gateway. + version: "1.0" + title: Edge Gateway Firewall API + +paths: + + rules: + parameters: + - name: gatewayId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: gateway + + get: + x-vcloud-added-in: "33.0" + tags: + - edgeGatewayFirewallRules + summary: Retrieves all firewall rules for a given edge gateway. + description: | + Retrieves all user-defined and default firewall rules for a given edge gateway. + The rules are returned in the order of precedence. + operationId: getFirewallRules + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EdgeFirewallRules' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + put: + x-vcloud-added-in: "33.0" + tags: + - edgeGatewayFirewallRules + summary: Updates firewall rules for a given edge gateway. + description: | + Updates all the firewall rules for a given edge gateway. If a rule with the ruleId + is not already present, a new rule will be created. If it already exists, the rule + will be updated. Any existing rule that is not specified in the update payload will be deleted. + The order of rules in payload will define the actual order in which this rules will be applied. + operationId: updateFirewallRules + consumes: + - application/json + parameters: + - name: firewallRules + in: body + required: true + schema: + $ref: '#/definitions/EdgeFirewallRules' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + delete: + x-vcloud-added-in: "33.0" + tags: + - edgeGatewayFirewallRules + summary: Deletes all the firewall rules for a given edge gateway. + operationId: deleteFirewallRules + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + rule: + parameters: + - name: gatewayId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: gateway + - name: ruleId + in: path + required: true + type: string + + get: + x-vcloud-added-in: "33.0" + tags: + - edgeGatewayFirewallRule + summary: Retrieves a specific firewall rule for a given edge gateway. + operationId: getFirewallRule + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EdgeFirewallRule' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + put: + x-vcloud-added-in: "33.0" + tags: + - edgeGatewayFirewallRule + summary: Updates a specific firewall rule for a given edge gateway. + operationId: updateFirewallRule + consumes: + - application/json + parameters: + - name: firewallRule + in: body + required: true + schema: + $ref: '#/definitions/EdgeFirewallRule' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + delete: + x-vcloud-added-in: "33.0" + tags: + - edgeGatewayFirewallRule + summary: Deletes a specific firewall rule for a given edge gateway. + operationId: deleteFirewallRule + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + +definitions: + + EdgeFirewallRules: + x-vcloud-added-in: "33.0" + description: | + Firewall rules for an edge gateway. This contains an ordered list of system, + user defined and default firewall rules. All the rules are returned in the order of type and precedence. + allOf: + - $ref: './networking/commonObject.yaml#/definitions/NetworkingObjectStatus' + - type: object + properties: + systemRules: + type: array + description: | + The ordered list of system defined edge firewall rules. System rules are + applied before user defined rules in the order in which they are returned. + items: + $ref: '#/definitions/EdgeFirewallRule' + userDefinedRules: + type: array + description: | + The ordered list of user defined edge firewall rules. + Users are allowed to add/modify/delete rules only to this list. + items: + $ref: '#/definitions/EdgeFirewallRule' + maxItems: 1000 + defaultRules: + type: array + description: | + The ordered list of default edge firewall rules. Default rules are + applied after the user defined rules in the order in which they are returned. + items: + $ref: '#/definitions/EdgeFirewallRule' + + x-vcloud-property-annotations: + systemRules: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + userDefinedRules: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + defaultRules: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + FirewallRule: + x-vcloud-added-in: "34.0" + description: Describes a Firewall rule. + type: object + properties: + id: + type: string + description: | + The unique id of this firewall rule. If a rule with the ruleId + is not already present, a new rule will be created. If it already + exists, the rule will be updated. + name: + type: string + description: Name for the rule. + description: + type: string + sourceFirewallGroups: + description: | + List of source groups for firewall rule. It specifies the sources of network traffic for the firewall rule. + Null value or an empty list will be treated as "ANY" which means traffic from any source. + For Distributed Firewall rules, an entry with an id of urn:vcloud:firewallGroup:internal can be used to specify all internal vDC Group network traffic. + type: array + items: + $ref: '#/definitions/EntityReference' + maxItems: 128 + destinationFirewallGroups: + description: | + List of source groups for firewall rule. It specifies the destinations of network traffic for the firewall rule. + Null value or an empty list will be treated as "ANY" which means traffic to any destination. + For Distributed Firewall rules, an entry with an id of urn:vcloud:firewallGroup:internal can be used to specify all internal vDC Group network traffic. + type: array + items: + $ref: '#/definitions/EntityReference' + maxItems: 128 + applicationPortProfiles: + description: | + The list of application ports where this firewall rule is applicable. + Null value or an empty list will be treated as "ANY" which means rule applies to all ports. + type: array + items: + $ref: '#/definitions/EntityReference' + maxItems: 128 + ipProtocol: + description: | + Type of IP packet that should be matched while enforcing the rule. + Default value is IPV4_IPV6. + $ref: '#/definitions/FirewallRuleIpProtocol' + default: IPV4_IPV6 + action: + description: | + The action to be applied to all the traffic that meets the firewall rule criteria. + It determines if the rule permits or blocks traffic. This property is now deprecated and replaced with actionValue. + Property is required if actionValue is not set. + $ref: '#/definitions/FirewallRuleAction' + actionValue: + x-vcloud-added-in: "35.2" + type: string + description: | + The action to be applied to all the traffic that meets the firewall rule criteria. + It determines if the rule permits or blocks traffic. Property is required if action is not set. + Below are valid values. +
        +
      • ALLOW permits traffic to go through the firewall. +
      • DROP blocks the traffic at the firewall. No response is sent back to the source. +
      • REJECT blocks the traffic at the firewall. A response is sent back to the source. +
      + direction: + description: | + Specifies the direction of the network traffic. + Default value is IN_OUT. + $ref: '#/definitions/FirewallRuleDirection' + default: IN_OUT + logging: + type: boolean + description: Whether packet logging is enabled for firewall rule. + default: false + networkContextProfiles: + description: | + The list of layer 7 network context profiles where this firewall rule is applicable. + Null value or an empty list will be treated as "ANY" which means rule applies to all applications and domains. + type: array + items: + $ref: '#/definitions/EntityReference' + enabled: + type: boolean + description: Whether the firewall rule is enabled. + default: true + version: + $ref: '#/definitions/ObjectVersion' + required: + - name + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + name: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + description: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + sourceFirewallGroups: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + destinationFirewallGroups: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + services: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + ipProtocol: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + action: + x-vcloud-deprecated-in: "35.2" + x-vcloud-deprecated-alternative: actionValue + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + actionValue: + x-vcloud-added-in: "35.2" + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + direction: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + logging: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + networkContextProfiles: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + x-vcloud-added-in: "35.0" + enabled: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + EdgeFirewallRule: + x-vcloud-added-in: "33.0" + description: Describes a Firewall rule for an edge gateway backed by NSX-T. + allOf: + - $ref: "./networking/edgeGatewayFirewall.yaml#/definitions/FirewallRule" + + FirewallRuleAction: + description: | + Defines the firewall rule action to be applied. + type: object + enum: + - ALLOW + - DROP + + FirewallRuleDirection: + description: | + Defines direction of traffic for firewall rule. + type: object + enum: + - IN + - OUT + - IN_OUT + + FirewallRuleIpProtocol: + description: | + Specifies the IP protocol for the network packet that should be matched while enforcing the rule. + IPV4_IPV6 means both IPV4 and IPV6 packet type. + type: object + enum: + - IPV4 + - IPV6 + - IPV4_IPV6 + + ObjectVersion: + $ref: './networking/commonObject.yaml#/definitions/ObjectVersion' + + EntityReference: + $ref: "./common/entity.yaml#/definitions/EntityReference" diff --git a/schemas/openapi/src/main/resources/schemas/networking/edgeGatewayIpsec.yaml b/schemas/openapi/src/main/resources/schemas/networking/edgeGatewayIpsec.yaml new file mode 100644 index 00000000..2dc1f0fb --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/networking/edgeGatewayIpsec.yaml @@ -0,0 +1,831 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2019-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + API for IPSec configuration of an edge gateway. Users can create IPSec tunnels + to connect the edge gateway to a remote endpoint. + version: "1.0" + title: Edge Gateway IPSec API + +paths: + + ipsecVpnTunnels: + parameters: + - name: gatewayId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: gateway + + get: + x-vcloud-added-in: "33.0" + tags: + - edgeGatewayIpSecVpnTunnels + summary: Retrieves all IPSec tunnels for a given edge gateway. + description: | + Retrieves all IPSec VPN tunnels that are configured for an edge gateway. Pagination is supported, use response header to get the next page. + Results can be sorted by only a single parameter. Sorting by combination of parameters (sortAsc=foo&sortDesc=bar) is not allowed. + operationId: getIpSecVpnTunnels + parameters: + - $ref: "./common/query.yaml#/parameters/queryCursor" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EdgeIpSecVpnTunnels' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + post: + x-vcloud-added-in: "33.0" + tags: + - edgeGatewayIpSecVpnTunnels + summary: Creates an IPSec tunnel on the Edge Gateway. + operationId: createIpSecVpnTunnel + consumes: + - application/json + parameters: + - name: ipsecVpnTunnel + in: body + required: true + schema: + $ref: '#/definitions/EdgeIpSecVpnTunnel' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + ipsecVpnTunnel: + parameters: + - name: gatewayId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: gateway + - name: tunnelId + in: path + required: true + type: string + + get: + x-vcloud-added-in: "33.0" + tags: + - edgeGatewayIpSecVpnTunnel + summary: Retrieves a specific IPSec tunnel for a given edge gateway. + operationId: getIpSecVpnTunnel + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EdgeIpSecVpnTunnel' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + put: + x-vcloud-added-in: "33.0" + tags: + - edgeGatewayIpSecVpnTunnel + summary: Updates a specific IPSec tunnel for a given edge gateway. + operationId: updateIpSecVpnTunnel + consumes: + - application/json + parameters: + - name: ipsecVpnTunnel + in: body + required: true + schema: + $ref: '#/definitions/EdgeIpSecVpnTunnel' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + delete: + x-vcloud-added-in: "33.0" + tags: + - edgeGatewayIpSecVpnTunnel + summary: Deletes a specific IPSec tunnel for a given edge gateway. + operationId: deleteIpSecVpnTunnel + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + ipsecVpnTunnelStatus: + parameters: + - name: gatewayId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: gateway + - name: tunnelId + in: path + required: true + type: string + get: + x-vcloud-added-in: "33.0" + tags: + - edgeGatewayIpSecVpnTunnel + summary: Retrieves status of a given IPSec VPN Tunnel configured on an Edge Gateway. + operationId: getIpSecVpnTunnelStatus + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EdgeIpSecVpnTunnelStatus' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + ipsecVpnTunnelStatistics: + parameters: + - name: gatewayId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: gateway + - name: tunnelId + in: path + required: true + type: string + get: + x-vcloud-added-in: "33.0" + tags: + - edgeGatewayIpSecVpnTunnel + summary: Retrieves connection statistics for a given IPSec VPN Tunnel configured on an Edge Gateway. + operationId: getIpSecVpnTunnelStatistics + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EdgeIpSecVpnTunnelStatistics' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + ipsecVpnTunnelConnectionProperties: + parameters: + - name: gatewayId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: gateway + - name: tunnelId + in: path + required: true + type: string + get: + x-vcloud-added-in: "33.0" + tags: + - edgeGatewayIpSecVpnTunnelConnectionProperties + summary: Retrieves connection properties for a given IPSec VPN Tunnel configured on an Edge Gateway. + operationId: getIpSecVpnTunnelConnectionProperties + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EdgeIpSecVpnTunnelConnectionProperties' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + put: + x-vcloud-added-in: "33.0" + tags: + - edgeGatewayIpSecVpnTunnelConnectionProperties + summary: Updates the connection properties for a given IPSec VPN Tunnel configured on an Edge Gateway. + operationId: updateIpSecVpnTunnelConnectionProperties + consumes: + - application/json + parameters: + - name: ipSecVpnTunnelConnectionProperties + in: body + required: true + schema: + $ref: '#/definitions/EdgeIpSecVpnTunnelConnectionProperties' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + + defaultConnectionProperties: + parameters: + - name: gatewayId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: gateway + get: + x-vcloud-added-in: "33.0" + tags: + - edgeGatewayIpSecVpnTunnel + summary: Retrieves the default connection properties that are used for a given IPSec Tunnel in NSX-T when default is set or no security type is specified. + operationId: getIpSecVpnTunnelDefaultConnectionProperties + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EdgeIpSecVpnTunnelConnectionProperties' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + +definitions: + + EdgeIpSecVpnTunnelStatistics: + x-vcloud-added-in: "33.0" + description: Specifies the statistics for the given IPSec VPN Tunnel. + type: object + properties: + localSubnet: + type: string + description: Local subnet to which a tunnel belongs. + peerSubnet: + type: string + description: Peer subnet to which a tunnel belongs. + packetsIn: + type: integer + format: int64 + description: Number of packets received. + packetsOut: + type: integer + format: int64 + description: Number of packets sent. + bytesIn: + type: integer + format: int64 + description: Number of bytes received. + bytesOut: + type: integer + format: int64 + description: Number of bytes sent. + packetsSentError: + type: integer + format: int64 + description: Number of packets sent with errors. + packetsReceivedError: + type: integer + format: int64 + description: Number of packets reveived with errors. + packetsInDropped: + type: integer + format: int64 + description: Number of packets dropped while receiving. + packetsOutDropped: + type: integer + format: int64 + description: Number of packets dropped while sending. + encryptionErrors: + type: integer + format: int64 + description: Number of encryption errors. + decryptionErrors: + type: integer + format: int64 + description: Number of decryption errors. + overflowErrors: + type: integer + format: int64 + description: Number of errors due to overflow. + replayErrors: + type: integer + format: int64 + description: Number of replay errors. + integrityErrors: + type: integer + format: int64 + description: Number of integrity check errors. + saMismatchInErrors: + type: integer + format: int64 + description: Number of SA mismatch errors while receiving. + saMismatchOutErrors: + type: integer + format: int64 + description: Number of SA mismatch errors while sending. + noMatchingPolicyErrors: + type: integer + format: int64 + description: Number of packets dropped because of no matching policy is available. + + EdgeIpSecVpnTunnels: + x-vcloud-added-in: "33.0" + description: | + List of configured IPSec VPN tunnels. + allOf: + - $ref: './networking/commonObject.yaml#/definitions/NetworkingObjectStatus' + - type: object + properties: + values: + type: array + description: The list of IPSec VPN tunnels. + items: + $ref: '#/definitions/EdgeIpSecVpnTunnel' + maxItems: 1000 + + EdgeIpSecVpnTunnel: + x-vcloud-added-in: "33.0" + description: Specifies the IPSec VPN tunnel configuration. + type: object + properties: + id: + type: string + description: | + The unique id of this IPSec VPN tunnel. On updates, the id is required for the tunnel, while for create a new id will be generated. + name: + type: string + description: Name for the tunnel. + description: + type: string + enabled: + description: Described whether the tunnel is enabled or not. The default is true. + type: boolean + default: true + localEndpoint: + description: | + The Local Endpoint which corresponds to the Edge Gateway the tunnel is being configured on. Local Endpoint requires an IP. That IP must be suballocated to the + edge gateway. + $ref: '#/definitions/LocalEndpoint' + remoteEndpoint: + description: | + The Remote Endpoints correspoinds to the device on the remote site terminating the VPN tunnel. + $ref: '#/definitions/RemoteEndpoint' + authenticationMode: + description: | + The authentication mode this IPSec tunnel will use to authenticate with the peer endpoint. The default is a pre-shared key (PSK). +
        +
      • PSK - A known key is shared between each site before the tunnel is established.
      • +
      • CERTIFICATE — Incoming connections are required to present an identifying digital certificate, which VCD verifies has been signed by a trusted certificate authority.
      • +
      + type: string + default: PSK + preSharedKey: + description: This is the Pre-shared key used for authentication. + type: string + certificateRef: + description: The server certificate which will be used to secure the tunnel's local endpoint. + $ref: '#/definitions/EntityReference' + caCertificateRef: + description: The CA authority used to verify the remote endpoint’s certificate. + $ref: '#/definitions/EntityReference' + connectorInitiationMode: + description: This is the mode used by the local endpoint to establish an IKE Connection with the remote site. The default is INITIATOR. + $ref: '#/definitions/ConnectorInitiationMode' + securityType: + description: | + This is the security type used for the IPSec Tunnel. If nothing is specified, this will be set to 'DEFAULT' in which the default settings in NSX will be used. + For custom settings, one should use the connectionProperties endpoint to specify custom settings. The security type will then appropriately reflect itself as + 'CUSTOM'. + type: string + default: DEFAULT + logging: + description: Whether logging for the tunnel is enabled or not. The default is false. + type: boolean + default: false + version: + $ref: '#/definitions/ObjectVersion' + + required: + - name + - localEndpoint + - remoteEndpoint + + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + name: + x-vcloud-constraints: + - constraint: NonSearchable + description: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + localEndpoint: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + remoteEndpoint: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + authenticationMode: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + x-vcloud-added-in: "35.0" + preSharedKey: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + certificateRef: + x-vcloud-added-in: "36.0" + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + caCertificateRef: + x-vcloud-added-in: "36.0" + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + connectorInitiationMode: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + enabled: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + securityType: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + logging: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + EdgeIpSecVpnTunnelStatus: + x-vcloud-added-in: "33.0" + description: | + This includes the IPSec Tunnel status such as whether the tunnel is up or down and the IKE Session status. + properties: + tunnelStatus: + description: Gives the overall IPSec VPN Tunnel Status. If IKE is properly set and the tunnel is up, the tunnel status will be UP. + $ref: '#/definitions/TunnelStatus' + ikeStatus: + description: Status for the actual IKE Session for the given tunnel. + $ref: '#/definitions/IkeStatus' + + x-vcloud-property-annotations: + tunnelStatus: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + ikeStatus: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + EdgeIpSecVpnTunnelConnectionProperties: + x-vcloud-added-in: "33.0" + description: | + This specifies the given security profile/connection properties of a given IP Sec VPN Tunnel, such as Dead Probe Interval and IKE settings. If a security type + is set to 'CUSTOM', then ike, tunnel, and/or dpd configurations can be specified. Otherwise, those fields are read only and are set to the values based on the specific + security type. + properties: + securityType: + description: | + This is the security type used for the IPSec Tunnel. If nothing is specified, this will be set to 'DEFAULT' in which the default settings in NSX will be used. + If 'CUSTOM' is specified, then ike, tunnel, and dpd configurations can be set. + type: string + default: DEFAULT + ikeConfiguration: + description: | + The IKE Configuration to be used for the tunnel. If nothing is explictly set, the system defaults will be used. + $ref: '#/definitions/IkeConfig' + tunnelConfiguration: + description: | + The Tunnel Configuration, which contains parameters such as encryption algorithm to be used. If nothing is explicitly set, the system defaults will be used. + $ref: '#/definitions/TunnelConfig' + dpdConfiguration: + description: | + The Dead Peer Detection configuration. If nothing is explictly set, the system defaults will be used. + $ref: '#/definitions/DpdConfig' + + x-vcloud-property-annotations: + ikeConfiguration: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + tunnelConfiguration: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + dpdConfiguration: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + securityType: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + x-vcloud-added-in: "34.0" + + LocalEndpoint: + x-vcloud-added-in: "33.0" + description: | + This represents the endpoint/IP Address on the Edge Gateway where the tunnel needs to be terminated. + properties: + localId: + description: The local identifier for the endpoint. + type: string + localAddress: + description: The IPV4 Address for the endpoint. This has to be a suballocated IP on the Edge Gateway. This is required. + type: string + localNetworks: + description: List of local networks. These must be specified in normal Network CIDR format. Specifying no value is interpreted as 0.0.0.0/0. + type: array + items: + type: string + minItems: 1 + maxItems: 128 + required: + - localAddress + - localNetworks + + RemoteEndpoint: + x-vcloud-added-in: "33.0" + description: | + This represents the remote endpoint i.e. the endpoint which the tunnel from the Edge Gateway will connect to. + properties: + remoteId: + description: | + This Remote ID is needed to uniquely identify the peer site. If this tunnel is using PSK authentication, the Remote ID is the public IP Address of + the remote device terminating the VPN Tunnel. When NAT is configured on the Remote ID, enter the private IP Address of the Remote Site. If the remote + ID is not set, VCD will set the remote id to the remote address. If this tunnel is using certificate authentication, enter the distinguished name of + the certificate used to secure the remote endpoint (for example, C=US,ST=Massachusetts,O=VMware,OU=VCD,CN=Edge1). The remote id must be provided in + this case. + type: string + remoteAddress: + description: IPV4 Address of the remote endpoint on the remote site. This is the Public IPv4 Address of the remote device terminating the VPN connection. + type: string + remoteNetworks: + description: List of remote networks. These must be specified in normal Network CIDR format. Specifying no value is interpreted as 0.0.0.0/0 + type: array + items: + type: string + minItems: 0 + maxItems: 128 + required: + - remoteAddress + + IkeConfig: + x-vcloud-added-in: "33.0" + description: | + This configuration captures the IKE and phase one negotiation parameters. This configuration can be set for peering properly with remote peers. + type: object + properties: + ikeVersion: + description: IKE Protocol Version to use. The default is IKE_V2. + $ref: '#/definitions/IkeVersionType' + dhGroups: + description: The list of Diffie-Helman groups to be used is PFS is enabled. Default is GROUP14. + type: array + items: + $ref: '#/definitions/DhGroupType' + minItems: 1 + digestAlgorithms: + description: The list of Digest algorithms for IKE. This is used during IKE negotiation. Default is SHA2_256. + type: array + items: + $ref: '#/definitions/IkeDigestAlgorithmType' + encryptionAlgorithms: + description: The list of Encryption algorithms for IKE. This is used during IKE negotiation. Default is AES_128. + type: array + items: + $ref: '#/definitions/IkeEncryptionAlgorithmType' + minItems: 1 + saLifeTime: + description: The Security Association life time in seconds. Default is 86400 seconds (1 day). + type: integer + minimum: 21600 + maximum: 31536000 + default: 86400 + required: + - ikeVersion + - encryptionAlgorithms + - dhGroups + + TunnelConfig: + x-vcloud-added-in: "33.0" + description: | + This configuration captures phase two negotiation parameters and tunnel properties. + type: object + properties: + perfectForwardSecrecyEnabled: + description: If true, perfect forward secrecy is enabled. The default value is true. + type: boolean + default: true + dfPolicy: + description: Policy for handling degragmentation bit. The default is COPY. + $ref: '#/definitions/DfPolicyType' + dhGroups: + description: The list of Diffie-Helman groups to be used is PFS is enabled. Default is GROUP14. + type: array + items: + $ref: '#/definitions/DhGroupType' + minItems: 1 + digestAlgorithms: + description: | + The list of Digest algorithms to be used for message digest. The default digest algorithm is implictly covered by default encrpyption algorithm AES_GCM_128. + type: array + items: + $ref: '#/definitions/TunnelDigestAlgorithmType' + encryptionAlgorithms: + description: | + The list of Encryption algorithms to use in IPSec tunnel establishment. Default is AES_GCM_128. NO_ENCRYPTION_AUTH_AES_GMAC_* enables authentication on input + data without encryption. If one of these options is used, digest algorithm should be empty. + type: array + items: + $ref: '#/definitions/TunnelEncryptionAlgorithmType' + minItems: 1 + saLifeTime: + description: The Security Association life time in seconds. Default is 3600 seconds. + type: integer + minimum: 900 + maximum: 31536000 + default: 3600 + required: + - dhGroups + - encryptionAlgorithms + + DpdConfig: + x-vcloud-added-in: "33.0" + description: | + Specifies the Dead Peer Detection Profile. This configurations determines the number of seconds to wait in time between probes + to detect if an IPSec peer is alive or not. The default value for the DPD probe interval is 60 seconds. + type: object + properties: + probeInterval: + description: The value of the probe interval in seconds. This defines a periodic interval for DPD probes. The minimum is 3 seconds and the maximum is 60 seconds. + type: integer + minimum: 3 + maximum: 60 + required: + - probeInterval + + DhGroupType: + x-vcloud-added-in: "33.0" + description: | + The type of Diffie-Helman group. Diffie-Helman groups represent the algorithm used to derive shared keys between the IPSec VPN initiator and responder over + an unsecured network. + type: object + enum: + - GROUP2 + - GROUP5 + - GROUP14 + - GROUP15 + - GROUP16 + - GROUP19 + - GROUP20 + - GROUP21 + + IkeDigestAlgorithmType: + x-vcloud-added-in: "33.0" + description: | + Digest Algorithms are used to verify message integrity during IKE negotiation. + type: object + enum: + - SHA1 + - SHA2_256 + - SHA2_384 + - SHA2_512 + + IkeEncryptionAlgorithmType: + x-vcloud-added-in: "33.0" + description: | + Encryption algorithms are used to ensure confidentiality of messages exchanged during IKE negotiations. + type: object + enum: + - AES_128 + - AES_256 + - AES_GCM_128 + - AES_GCM_192 + - AES_GCM_256 + + IkeVersionType: + x-vcloud-added-in: "33.0" + description: The IKE Protocol version type. + type: object + enum: + - IKE_V1 + - IKE_V2 + - IKE_FLEX + + TunnelDigestAlgorithmType: + x-vcloud-added-in: "33.0" + description: This is the algorithm used to verify message integruty during tunnel establishment. + type: object + enum: + - SHA1 + - SHA2_256 + - SHA2_384 + - SHA2_512 + + TunnelEncryptionAlgorithmType: + x-vcloud-added-in: "33.0" + description: Encryption algorithm to use in IPSec tunnel establishment. + type: object + enum: + - AES_128 + - AES_256 + - AES_GCM_128 + - AES_GCM_192 + - AES_GCM_256 + - NO_ENCRYPTION_AUTH_AES_GMAC_128 + - NO_ENCRYPTION_AUTH_AES_GMAC_192 + - NO_ENCRYPTION_AUTH_AES_GMAC_256 + - NO_ENCRYPTION + + DfPolicyType: + x-vcloud-added-in: "33.0" + description: | + Defragmentation Policy helps to handle defragmentation bits present in the inner packet. COPY copies the defragmentation bit from the inner IP packet + into the outer packet. CLEAR ignores the defragmentation bit present in the inner packet. + type: object + enum: + - COPY + - CLEAR + + ConnectorInitiationMode: + x-vcloud-added-in: "33.0" + description: This is used by a local endpoint to establish ike connection with the remote site. + type: object + enum: + - INITIATOR + - RESPOND_ONLY + - ON_DEMAND + + TunnelStatus: + x-vcloud-added-in: "33.0" + description: | + The overall tunnel status which is consolidated using the Tunnel Status and IKE Status. If the tunnel is up, the status is UP. If the tunnel + is down, the status is DOWN. The tunnel may also be in a DEGRADED state due to other issues. + type: object + enum: + - UP + - DOWN + - DEGRADED + + IkeStatus: + x-vcloud-added-in: "33.0" + description: | + The status for the IPSec VPN IKE Session/Tunnel. The values are UP, DOWN, and NEGOTIATING. A fail reason is also provided if the Service Status is down. + type: object + properties: + ikeServiceStatus: + description: The overall IKE Session service status. + type: object + $ref: '#/definitions/IkeServiceStatus' + failReason: + description: The reason for the IKE Session establishment failure. This will only be set if the status is DOWN. + type: string + + IkeServiceStatus: + x-vcloud-added-in: "33.0" + description: The service status for the IKE Session. + type: object + enum: + - UP + - DOWN + - NEGOTIATING + + ObjectVersion: + $ref: './networking/commonObject.yaml#/definitions/ObjectVersion' + + EntityReference: + $ref: "./common/entity.yaml#/definitions/EntityReference" diff --git a/schemas/openapi/src/main/resources/schemas/networking/edgeGatewayL2Vpn.yaml b/schemas/openapi/src/main/resources/schemas/networking/edgeGatewayL2Vpn.yaml new file mode 100644 index 00000000..6ffb50ff --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/networking/edgeGatewayL2Vpn.yaml @@ -0,0 +1,514 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2020-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + API for L2 VPN configuration of an edge gateway. Users can create L2 VPN tunnels + to connect two VMs on a level where each can refer to the other by their MAC + address. + version: "1.0" + title: Edge Gateway L2 VPN API + +paths: + + l2VpnTunnels: + parameters: + - name: gatewayId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: gateway + + get: + x-vcloud-added-in: "35.0" + tags: + - edgeGatewayL2VpnTunnels + summary: Retrieves all L2 VPN tunnels for a given edge gateway. + description: | + Retrieves all L2 VPN tunnels that are configured for an edge gateway. + Results can be sorted by only a single parameter. Sorting by combination of parameters (sortAsc=foo&sortDesc=bar) is not allowed. + operationId: getL2VpnTunnels + parameters: + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EdgeL2VpnTunnels' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + x-vcloud-default-sort: + default-sort-field: name + sort-ascending: true + + post: + x-vcloud-added-in: "35.0" + tags: + - edgeGatewayL2VpnTunnels + summary: Creates an L2 VPN tunnel on the Edge Gateway. + operationId: createL2VpnTunnel + consumes: + - application/json + parameters: + - name: l2VpnTunnel + in: body + required: true + schema: + $ref: '#/definitions/EdgeL2VpnTunnel' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + l2VpnTunnel: + parameters: + - name: gatewayId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: gateway + - name: tunnelId + in: path + required: true + type: string + + get: + x-vcloud-added-in: "35.0" + tags: + - edgeGatewayL2VpnTunnel + summary: Retrieves a specific L2 VPN tunnel for a given edge gateway. + operationId: getL2VpnTunnel + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EdgeL2VpnTunnel' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + put: + x-vcloud-added-in: "35.0" + tags: + - edgeGatewayL2VpnTunnel + summary: Updates a specific L2 VPN tunnel for a given edge gateway. + operationId: updateL2VpnTunnel + consumes: + - application/json + parameters: + - name: l2VpnTunnel + in: body + required: true + schema: + $ref: '#/definitions/EdgeL2VpnTunnel' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + delete: + x-vcloud-added-in: "35.0" + tags: + - edgeGatewayL2VpnTunnel + summary: Deletes a specific L2 VPN tunnel for a given edge gateway. + operationId: deleteL2VpnTunnel + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + + l2VpnTunnelStatus: + parameters: + - name: gatewayId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: gateway + - name: tunnelId + in: path + required: true + type: string + get: + x-vcloud-added-in: "35.0" + tags: + - edgeGatewayL2VpnTunnel + summary: Retrieves status of a given L2 VPN Tunnel. + operationId: getL2VpnTunnelStatus + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EdgeL2VpnTunnelStatus' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + l2VpnTunnelStatistics: + parameters: + - name: gatewayId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: gateway + - name: tunnelId + in: path + required: true + type: string + get: + x-vcloud-added-in: "35.0" + tags: + - edgeGatewayL2VpnTunnel + summary: Retrieves connection statistics for a given L2 VPN Tunnel configured on an Edge Gateway. + operationId: getL2VpnTunnelStatistics + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EdgeL2VpnTunnelStatistics' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + +definitions: + + EdgeL2VpnTunnels: + x-vcloud-added-in: "35.0" + description: | + List of configured L2 VPN tunnels. + allOf: + - $ref: './networking/commonObject.yaml#/definitions/NetworkingObjectStatus' + - type: object + properties: + values: + description: The list of L2 VPN tunnels. + type: array + items: + $ref: '#/definitions/EdgeL2VpnTunnel' + maxItems: 1000 + + EdgeL2VpnTunnel: + x-vcloud-added-in: "35.0" + description: Specifies the L2 VPN tunnel configuration. + type: object + properties: + id: + type: string + description: | + The unique id of this L2 VPN tunnel. On updates, the id is required for the tunnel, while for create a new id will be generated. This id is not a VCD URN. + example: 36cc5a80-f99f-4350-b268-bb9111141a6e + name: + description: Name for the tunnel. + type: string + description: + description: Description for the tunnel. + type: string + localEndpointIP: + description: | + The IP address of the local endpoint, which corresponds to the Edge Gateway the tunnel is being configured on. + type: string + remoteEndpointIP: + description: | + The IP address of the remote endpoint, which corresponds to the device on the remote site terminating the VPN tunnel. + type: string + tunnelInterface: + description: The network CIDR block over which the session interfaces. + type: string + preSharedKey: + description: This is the Pre-shared key used for authentication, no specific format is required. + type: string + connectorInitiationMode: + description: | + This is the mode used by the local endpoint to establish an IKE Connection with the remote site. The default is INITIATOR. +
        +
      • INITIATOR - Local endpoint initiates tunnel setup and will also respond to incoming tunnel setup requests from the peer gateway.
      • +
      • RESPOND_ONLY - Local endpoint shall only respond to incoming tunnel setup requests, it shall not initiate the tunnel setup.
      • +
      • ON_DEMAND - In this mode local endpoint will initiate tunnel creation once first packet matching the policy rule is received, and will also respond to + incoming initiation requests.
      • +
      + type: string + default: 'INITIATOR' + enabled: + description: Described whether the tunnel is enabled or not. The default is true. + type: boolean + default: true + sessionMode: + type: string + description: | + The current session mode, one of either SERVER or CLIENT. +
        +
      • SERVER - In which the edge gateway acts as the server side of the L2 VPN tunnel and generates peer codes to distribute to client sessions.
      • +
      • CLIENT - In which the edge gateway receives peer codes from the server side of the L2 VPN tunnel to establish a connection.
      • +
      + default: 'SERVER' + peerCode: + type: string + description: | + This property is a base64 encoded string of the full configuration for the tunnel, generated by the server-side L2 VPN session. An L2 VPN client session must + receive and validate this string in order to successfully establish a tunnel, but be careful sharing or storing this code since it does contain the encoded + PSK. Leave this property blank if this call is being used to establish a server-side session. + attachedNetworks: + type: array + description: | + The list of OrgVDC Network entity references which are currently attached to this L2VPN tunnel. + items: + $ref: '#/definitions/EntityReference' + stretchedNetworks: + type: array + description: | + The list of OrgVDC Network entity references which are currently attached to this L2VPN tunnel. + items: + $ref: '#/definitions/EdgeL2VpnStretchedNetwork' + logging: + description: Whether logging for the tunnel is enabled or not. + type: boolean + default: false + version: + $ref: '#/definitions/ObjectVersion' + + required: + - name + - sessionMode + - localEndpointIP + - remoteEndpointIP + - tunnelInterface + - preSharedKey + + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + - constraint: ReadOnly + name: + x-vcloud-constraints: + - constraint: NonSearchable + description: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + localEndpointIP: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + - constraint: NetworkAddress + args: + - arg: IPV4_IP + - arg: IPV6_IP + remoteEndpointIP: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + - constraint: NetworkAddress + args: + - arg: IPV4_IP + - arg: IPV6_IP + tunnelInterface: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + - constraint: NetworkAddress + args: + - arg: CIDR + preSharedKey: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + connectorInitiationMode: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + peerCode: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + attachedNetworks: + x-vcloud-added-in: "35.0" + x-vcloud-deprecated-in: "36.0" + x-vcloud-removed-in: "36.0" + x-vcloud-deprecated-alternative: stretchedNetworks + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + stretchedNetworks: + x-vcloud-added-in: "36.0" + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + enabled: + x-vcloud-constraints: + - constraint: NonSortable + logging: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + version: + x-vcloud-constraints: + - constraint: ReadOnly + + EdgeL2VpnStretchedNetwork: + x-vcloud-added-in: "36.0" + description: Specifies the Org vDC network that is stretched through the given L2 VPN Tunnel. + type: object + properties: + networkRef: + description: | + The reference to the Org vDC network entity. + $ref: '#/definitions/EntityReference' + tunnelId: + description: | + The tunnel ID assigned to the network for the L2 VPN Tunnel. Ranges from (1-4096) + type: integer + format: int32 + required: + - networkRef + x-vcloud-property-annotations: + x-vcloud-constraints: + networkRef: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + tunnelId: + x-vcloud-constraints: + - constraint: ReadOnly + + EdgeL2VpnTunnelStatistics: + x-vcloud-added-in: "35.0" + description: Specifies the statistics for the given L2 VPN Tunnel. + type: object + properties: + bumBytesIn: + description: Broadcast, Unknown unicast, and Multicast (BUM) bytes in. + type: integer + format: int64 + bumBytesOut: + description: Broadcast, Unknown unicast, and Multicast (BUM) bytes out. + type: integer + format: int64 + bumPacketsIn: + description: Broadcast, Unknown unicast, and Multicast (BUM) packets in. + type: integer + format: int64 + bumPacketsOut: + description: Broadcast, Unknown unicast, and Multicast (BUM) packets out. + type: integer + format: int64 + bytesIn: + description: Total number of incoming bytes. + type: integer + format: int64 + bytesOut: + description: Total number of outgoing bytes. + type: integer + format: int64 + packetsIn: + description: Total number of incoming packets. + type: integer + format: int64 + packetsOut: + description: Total number of outgoing packets. + type: integer + format: int64 + packetsReceiveError: + description: Total number of incoming packets dropped. + type: integer + format: int64 + packetsSentError: + description: Total number of packets dropped while sending for any reason. + type: integer + format: int64 + segmentPath: + description: Policy path referencing the segment on which stats are gathered. + type: string + + x-vcloud-property-annotations: + bumBytesIn: + x-vcloud-constraints: + - constraint: ReadOnly + bumBytesOut: + x-vcloud-constraints: + - constraint: ReadOnly + bumPacketsIn: + x-vcloud-constraints: + - constraint: ReadOnly + bumPacketsOut: + x-vcloud-constraints: + - constraint: ReadOnly + bytesIn: + x-vcloud-constraints: + - constraint: ReadOnly + bytesOut: + x-vcloud-constraints: + - constraint: ReadOnly + packetsIn: + x-vcloud-constraints: + - constraint: ReadOnly + packetsOut: + x-vcloud-constraints: + - constraint: ReadOnly + packetsReceiveError: + x-vcloud-constraints: + - constraint: ReadOnly + packetsSentError: + x-vcloud-constraints: + - constraint: ReadOnly + segmentPath: + x-vcloud-constraints: + - constraint: ReadOnly + + EdgeL2VpnTunnelStatus: + x-vcloud-added-in: "35.0" + description: | + This includes the L2 VPN tunnel status such as whether the tunnel is up or down and the IKE Session status. + properties: + runtimeStatus: + description: | + Gives the overall L2 VPN Runtime Status (one of either UP or DOWN). +
        +
      • UP - Indicating that the tunnel connection has been successfully established.
      • +
      • DOWN - Indicating that the tunnel connection has not yet been successfully established.
      • +
      + type: string + failureReason: + description: The error message which led to this tunnel's failure (if applicable). + type: string + + x-vcloud-property-annotations: + runtimeStatus: + x-vcloud-constraints: + - constraint: ReadOnly + failureReason: + x-vcloud-constraints: + - constraint: ReadOnly + + ObjectVersion: + $ref: './networking/commonObject.yaml#/definitions/ObjectVersion' + + EntityReference: + $ref: "./common/entity.yaml#/definitions/EntityReference" diff --git a/schemas/openapi/src/main/resources/schemas/networking/edgeGatewayLoadBalancer.yaml b/schemas/openapi/src/main/resources/schemas/networking/edgeGatewayLoadBalancer.yaml new file mode 100644 index 00000000..b2729928 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/networking/edgeGatewayLoadBalancer.yaml @@ -0,0 +1,1507 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2020-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + API to configure Load Balancer service on an Edge Gateway. Load Balancer service needs to be first enabled on the Edge Gateway. + User can then configure Virtual Services and Pools. + title: Edge Gateway Load Balancer API + version: "1.0" + +paths: + + loadBalancer: + parameters: + - name: gatewayId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: gateway + + get: + x-vcloud-added-in: "35.0" + x-vcloud-default-sort: + default-sort-field: name + sort-ascending: true + tags: + - edgeGatewayLoadBalancer + summary: Retrieves Load Balancer configuration on an Edge Gateway. + description: | + Retrieves the current state of Load Balancer service on Edge Gateway. + operationId: getLoadBalancerConfig + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EdgeGatewayLoadBalancerConfig' + + put: + x-vcloud-added-in: "35.0" + tags: + - edgeGatewayLoadBalancer + summary: Update Load Balancer configuration on an Edge Gateway. + description: | + Updates the Load Balancer service configuration on Edge Gateway. + operationId: updateLoadBalancerConfig + consumes: + - application/json + parameters: + - name: loadBalancerConfig + in: body + required: true + schema: + $ref: '#/definitions/EdgeGatewayLoadBalancerConfig' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + + virtualServices: + post: + x-vcloud-added-in: "35.0" + tags: + - edgeGatewayLoadBalancerVirtualServices + summary: Create a new Virtual Service for a specific Edge Gateway. + description: | + Create a new Virtual Service for a specific Edge Gateway. + operationId: createVirtualService + consumes: + - application/json + parameters: + - name: virtualServiceConfig + in: body + required: true + schema: + $ref: '#/definitions/EdgeLoadBalancerVirtualService' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + + virtualServiceSummariesForGateway: + parameters: + - name: gatewayId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: gateway + get: + x-vcloud-added-in: "35.0" + tags: + - edgeGatewayLoadBalancerVirtualServices + summary: Get all Virtual Service Summaries for an Edge Gateway. + description: | + Retrieves all Virtual Service Summaries for an Edge Gateway. + operationId: getVirtualServiceSummariesForGateway + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EdgeLoadBalancerVirtualServiceSummaries' + + + virtualService: + parameters: + - name: virtualServiceId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: loadBalancerVirtualService + + get: + x-vcloud-added-in: "35.0" + tags: + - edgeGatewayLoadBalancerVirtualService + summary: Get Virtual Service. + description: | + Retrieves a specific Virtual Service. + operationId: getVirtualService + produces: + - application/json + responses: + 200: + schema: + $ref: "#/definitions/EdgeLoadBalancerVirtualService" + + put: + x-vcloud-added-in: "35.0" + tags: + - edgeGatewayLoadBalancerVirtualService + summary: Update specified Virtual Service. + description: | + Update a Virtual Service. + operationId: updateVirtualService + consumes: + - application/json + parameters: + - name: virtualServiceConfig + in: body + required: true + schema: + $ref: "#/definitions/EdgeLoadBalancerVirtualService" + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + + delete: + x-vcloud-added-in: "35.0" + tags: + - edgeGatewayLoadBalancerVirtualService + summary: Delete the specified Virtual Service. + description: | + Delete a Virtual Service. + operationId: deleteVirtualService + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + + poolSummariesForGateway: + parameters: + - name: gatewayId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: gateway + + get: + x-vcloud-added-in: "35.0" + tags: + - edgeGatewayLoadBalancerPools + summary: Retrieves all Load Balancer Pool Summaries for a given Edge Gateway. + description: | + Retrieves summaries for all of the Load Balancer Pools that are configured for an Edge Gateway. + operationId: getPoolSummariesForGateway + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EdgeLoadBalancerPoolSummaries' + + pools: + post: + x-vcloud-added-in: "35.0" + tags: + - edgeGatewayLoadBalancerPools + summary: Creates a Load Balancer Pool. + operationId: createLoadBalancerPool + consumes: + - application/json + parameters: + - name: loadBalancerPool + in: body + required: true + schema: + $ref: '#/definitions/EdgeLoadBalancerPool' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + + pool: + parameters: + - name: poolId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: loadBalancerPool + + get: + x-vcloud-added-in: "35.0" + tags: + - edgeGatewayLoadBalancerPool + summary: Retrieves a specific Load Balancer Pool. + operationId: getLoadBalancerPool + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EdgeLoadBalancerPool' + + put: + x-vcloud-added-in: "35.0" + tags: + - edgeGatewayLoadBalancerPool + summary: Updates a specific Load Balancer Pool. + operationId: updateLoadBalancerPool + consumes: + - application/json + parameters: + - name: loadBalancerPool + in: body + required: true + schema: + $ref: '#/definitions/EdgeLoadBalancerPool' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + + delete: + x-vcloud-added-in: "35.0" + tags: + - edgeGatewayLoadBalancerPool + summary: Deletes a specific Load Balancer Pool. + operationId: deleteLoadBalancerPool + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + analyticReports: + get: + x-vcloud-added-in: "35.0" + tags: + - edgeGatewayLoadBalancerAnalytics + summary: | + Retrieves analytics for a specific load balancer. Metrics are specified in the + filter query along with time period and series resolution. Up to 5 metric series can be + specified per report. All reports will span the same time period. + + Report filters are encapsulated in a fiql filter query parameter. + Sample filter: + filter=(componentId==urn:vcloud:virtualservice:7d38ad7f-cd93-4501-8c40-6f61650ccda0; + metric==l4_server.avg_total_rtt;metric==l7_server.avg_application_response_time;step==500;limit==100) + Supported filters are: +
        +
      • componentId. The URN of the virtual service or pool for which metrics will be gathered. Only one should be specified. + This is required. +
      • metric. One or more metrics of interest. filter=(metric==l4_server.avg_total_rtt;metric==l7_server.avg_application_response_time) - + This is required. Supported metrics can be found at the analytics/supportedMetrics endpoint. +
      • step. The time resolution of the report, in seconds. + This is required. Minimum supported resolution is 300 seconds (5 minutes). +
      • limit. Optional. The number of data points to be returned. + This is optional. Defaults to 59 where it can't be calculated. +
      • startTime. Start time of the series. + This is optional. Must be in ISO 8601 format (i.e. 2020-07-24T00:00:00). If not provided, start time is calculated from the step and end time. +
      • endTime. End period of the series. + This is optional. Must be in ISO 8601 format (i.e. 2020-07-24T00:00:00). Defaults to the time of latest collected data point. +
      + This feature requires additional licensing. + operationId: getLoadBalancerAnalyticReports + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/EdgeLoadBalancerAnalyticReports" + + supportedMetrics: + get: + x-vcloud-added-in: "35.0" + tags: + - edgeGatewayLoadBalancerAnalytics + summary: | + Retrieves all the supported metrics for load balancer analytic reports. These metrics can be + used to create runtime reports of load balancer virtual services and pools. + Supported filters are: +
        +
      • componentId. The URN of the load balancer virtual service or pool for which we want supported metrics. Only one should be specified. + This is required. +
      + This feature requires additional licensing. + operationId: getLoadBalancerSupportedAnalyticMetrics + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/EdgeLoadBalancerAnalyticMetrics" + +definitions: + + EdgeGatewayLoadBalancerConfig: + x-vcloud-added-in: "35.0" + description: | + Describes Load Balancer Service configuration on an Edge Gateway. + type: object + properties: + enabled: + type: boolean + description: A flag indicating whether Load Balancer Service is enabled or not. + serviceNetworkDefinition: + type: string + description: | + The network definition in Gateway CIDR format which will be used by Load Balancer service on edge. All the load balancer service engines + associated with the Service Engine Group will be attached to this network. The subnet prefix length must be 25. + If nothing is set, the default is 192.168.255.1/25. Default cidr can be configured. This field cannot be updated. + loadBalancerCloudRef: + $ref: '#/definitions/EntityReference' + description: Reference to the Load Balancer Cloud. This cloud is used by Edge Gateway's Load Balancer Virtual Services and Pools. + licenseType: + type: string + description: | + The license type of the backing Load Balancer Cloud. +
        +
      • BASIC - Basic edition of the NSX Advanced Load Balancer. +
      • ENTERPRISE - Full featured edition of the NSX Advanced Load Balancer. +
      + required: + - enabled + x-vcloud-property-annotations: + enabled: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + serviceNetworkDefinition: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + - constraint: NetworkAddress + args: + - arg: CIDR + loadBalancerCloudRef: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + x-vcloud-restricted: Visible to provider users only + licenseType: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + + EdgeLoadBalancerVirtualServiceSummaries: + x-vcloud-added-in: "35.0" + description: List of Virtual Service Summaries. + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: './networking/edgeGatewayLoadBalancer.yaml#/definitions/EdgeLoadBalancerVirtualServiceSummary' + + EdgeLoadBalancerVirtualServiceCommonProperties: + x-vcloud-added-in: "35.0" + description: Specifies common properties for Virtual Service objects. + allOf: + - $ref: './networking/commonObject.yaml#/definitions/NetworkingObjectStatus' + - type: object + properties: + id: + type: string + description: The identifier of the Virtual Service in URN format + name: + type: string + minLength: 1 + description: The name of the Virtual Service. Name is unique across all Virtual Services for an Edge Gateway. + description: + type: string + description: The description of the Virtual Service. + enabled: + type: boolean + description: A flag indicating whether Virtual Service is enabled or not. + virtualIpAddress: + type: string + description: | + The virtual IP Address (VIP) of the Virtual Service. This IP can be an allocated IP to the Gateway from the External Network or + it can be an arbitrary internal IP address used for internal load balancing. It it's an internal IP Address, this IP cannot be part of + any existing subnet attached to the Edge Gateway or any vDC Group network if the Edge Gateway is scoped accordingly. + loadBalancerPoolRef: + $ref: '#/definitions/EntityReference' + description: The Load Balancer Pool associated with this Virtual Service. + gatewayRef: + $ref: '#/definitions/EntityReference' + description: The Edge Gateway associated with this Virtual Service. + serviceEngineGroupRef: + $ref: '#/definitions/EntityReference' + description: | + The Load Balancer Service Engine Group that is assigned to the Edge Gateway. This Virtual Service will be deployed to this Service Engine Group. + certificateRef: + $ref: '#/definitions/EntityReference' + description: The certificate used for SSL termination for the Virtual Service. This is required if the service port type is "HTTPS" or "L4_TLS". + servicePorts: + description: | + A list of service ports supported by this Virtual Service. Multiple service ports are allowed only with additional licensing. + type: array + minItems: 1 + maxItems: 10 + items: + $ref: './networking/edgeGatewayLoadBalancer.yaml#/definitions/EdgeLoadBalancerServicePort' + healthStatus: + type: string + description: | + The current health status of the virtual service. Possible values are: +
        +
      • UP - The virtual service is healthy. +
      • DOWN - The virtual service is down, inactive, or has failed. +
      • DISABLED - The virtual service is disabled. +
      • UNAVAILABLE - The virtual service is unavailable. +
      • PENDING - The virtual service is being creating or resources are being allocated. +
      • UNKNOWN - The virtual service state is unknown. +
      + healthMessage: + type: string + description: The localized message on the health of the virtual service. + detailedHealthMessage: + type: string + description: The non-localized detailed message on the health of the virtual service. + required: + - name + - enabled + - virtualIpAddress + - loadBalancerPoolRef + - gatewayRef + - serviceEngineGroupRef + - servicePorts + + EdgeLoadBalancerVirtualServiceSummary: + x-vcloud-added-in: "35.0" + description: A Virtual Service for an Edge Gateway. + allOf: + - $ref: './networking/edgeGatewayLoadBalancer.yaml#/definitions/EdgeLoadBalancerVirtualServiceCommonProperties' + - type: object + properties: + applicationProfileType: + type: string + description: | + The profile type of application that this Virtual Service is configured with. + A value of "-" represents an unknown type. +
        +
      • HTTP - Virtual Service supports HTTP protocol. +
      • HTTPS - Virtual Service supports HTTPS protocol. +
      • L4 - Virtual Service supports Layer 4 (Transport) using UDP/TCP protocol. +
      • L4_TLS - Virtual Service supports Layer 4 (Transport) using UDP/TCP protocol with TLS. +
      + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: NonSortable + - constraint: ReadOnly + - constraint: Urn + args: + - arg: loadBalancerVirtualService + name: + x-vcloud-constraints: + - constraint: ReadOnly + description: + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + - constraint: ReadOnly + enabled: + x-vcloud-constraints: + - constraint: ReadOnly + virtualIpAddress: + x-vcloud-constraints: + - constraint: NetworkAddress + args: + - arg: IPV4_IP + - constraint: ReadOnly + certificateRef: + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + - constraint: ReadOnly + gatewayRef: + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + - constraint: ReadOnly + serviceEngineGroupRef: + x-vcloud-constraints: + - constraint: NonSortable + - constraint: ReadOnly + applicationProfileType: + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + - constraint: ReadOnly + servicePorts: + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + - constraint: ReadOnly + status: + x-vcloud-added-in: "35.0" + x-vcloud-constraints: + - constraint: ReadOnly + healthStatus: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + healthMessage: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + detailedHealthMessage: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + x-vcloud-restricted: Visible to provider users only + + EdgeLoadBalancerVirtualService: + x-vcloud-added-in: "35.0" + description: A Virtual Service for an Edge Gateway. + allOf: + - $ref: './networking/edgeGatewayLoadBalancer.yaml#/definitions/EdgeLoadBalancerVirtualServiceCommonProperties' + - type: object + properties: + applicationProfile: + $ref: './networking/edgeGatewayLoadBalancer.yaml#/definitions/EdgeLoadBalancerApplicationProfile' + description: Specifies the application profile for the virtual service such as whether it's HTTP, HTTPS, or TCP/UDP. + required: + - applicationProfile + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + - constraint: ReadOnly + - constraint: Urn + args: + - arg: loadBalancerVirtualService + name: + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + description: + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + enabled: + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + virtualIpAddress: + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + - constraint: NetworkAddress + args: + - arg: IPV4_IP + certificateRef: + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + loadBalancerPoolRef: + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + gatewayRef: + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + serviceEngineGroupRef: + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + applicationProfile: + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + servicePorts: + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + status: + x-vcloud-added-in: "35.0" + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + - constraint: ReadOnly + healthStatus: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + healthMessage: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + detailedHealthMessage: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + x-vcloud-restricted: Visible to provider users only + + EdgeLoadBalancerServicePort: + x-vcloud-added-in: "35.0" + description: | + A Virtual Service port configuration. + type: object + properties: + tcpUdpProfile: + $ref: '#/definitions/EdgeLoadBalancerTcpUdpProfile' + description: | + Specifies the TCP/UDP profile for the service ports such as TCP_PROXY or TCP_FAST_PATH. + If unset, a profile using the system-defined type of TCP_PROXY is used. This is valid for all Application Profiles. + For L4 application profile type, user can set the profile to a different type such as TCP_FAST_PATH. + For any other application profile type, the TCP/UDP profile type must be TCP_PROXY. + portStart: + description: | + The starting port number in the port range of the Virtual Service. If a single port is desired, only this field needs to be specified. + An example is that HTTP uses port 80. + type: integer + format: int32 + minimum: 0 + maximum: 65535 + portEnd: + description: The ending port number in the port range of the Virtual Service. This is not required if a single port is desired. + type: integer + format: int32 + minimum: 1 + maximum: 65535 + sslEnabled: + description: | + A flag indicating whether SSL termination is enabled at the port or not. + This can only be enabled if HTTPS and L4_TLS Application Profile types are used. + At least one service port must have ssl enabled when using HTTPS or L4_TLS Application Profile types. + For HTTPS, if SSL is disabled for a specific port, traffic from that port will be redirected to the first SSL port specified. + This allows for automatic HTTP to HTTPS redirects. + Disabling SSL for HTTPS and L4_TLS is allowed only with additional licensing. + type: boolean + default: false + required: + - portStart + x-vcloud-property-annotations: + tcpUdpProfile: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + portStart: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + portEnd: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + sslEnabled: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + EdgeLoadBalancerApplicationProfile: + x-vcloud-added-in: "35.0" + description: | + Specifies the application profile for the virtual service such as whether it's HTTP, HTTPS, or TCP/UDP. + type: object + properties: + name: + type: string + description: Name of the application profile. Name of the system defined monitors are prefixed with System for example 'System-HTTP'. + type: + type: string + description: | + The profile type of application that this Virtual Service is configured with. + A value of "-" represents an unknown type. + Such profile can still be removed from the Virtual Service on update but is not valid on create. + Values are below. +
        +
      • HTTP - Virtual Service supports HTTP protocol. +
      • HTTPS - Virtual Service supports HTTPS protocol. +
      • L4 - Virtual Service supports Layer 4 (Transport) using UDP/TCP protocol. +
      • L4_TLS - Virtual Service supports Layer 4 (Transport) using UDP/TCP protocol with TLS. +
      + L4_TLS is allowed only with additional licensing. + systemDefined: + type: boolean + description: Whether the Application Profile is system defined. + required: + - type + x-vcloud-property-annotations: + name: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + type: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + systemDefined: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + + EdgeLoadBalancerTcpUdpProfile: + x-vcloud-added-in: "35.0" + description: | + Specifies the TCP/UDP profile for the service ports such as TCP_PROXY or TCP_FAST_PATH. + type: object + properties: + name: + type: string + description: Name of the TCP/UDP profile. Name of the system defined monitors are prefixed with System for example 'System-TCP-Proxy'. + type: + type: string + description: | + This property specifies the different ways in which TCP/UDP packets are sent to the destination server. + A value of "-" represents an unknown type. + Such profile can still be removed from the Virtual Service on update but is not valid on create. +
        +
      • TCP_PROXY - TCP connection is terminated at the Virtual Service and a new TCP connection is made to the destination server. +
      • TCP_FAST_PATH - TCP packets are directly forwarded to the destination server. +
      • UDP_FAST_PATH - UDP packets are directly forwarded to the destination server. +
      + default: "TCP_PROXY" + systemDefined: + type: boolean + description: Whether the TCP/UDP profile is system defined. + required: + - type + x-vcloud-property-annotations: + name: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + type: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + systemDefined: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + + EdgeLoadBalancerPoolSummaries: + x-vcloud-added-in: "35.0" + description: List of Load Balancer pool summaries. + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + description: The list of Load Balancer pool summaries. + type: array + items: + $ref: './networking/edgeGatewayLoadBalancer.yaml#/definitions/EdgeLoadBalancerPoolSummary' + + EdgeLoadBalancerPoolCommonProperties: + x-vcloud-added-in: "35.0" + description: Specifies common properties for Load Balancer Pool objects. + allOf: + - $ref: './networking/commonObject.yaml#/definitions/NetworkingObjectStatus' + - type: object + properties: + id: + type: string + description: The unique ID of this Load Balancer Pool. On updates, the ID is required for the pool, while for create a new ID will be generated. + description: + type: string + description: The description of the Load Balancer Pool. + enabled: + type: boolean + description: True if Load Balancer Pool is enabled. + default: true + passiveMonitoringEnabled: + description: Whether passive monitoring for this pool is enabled or not. + type: boolean + default: true + healthStatus: + description: | + The current health status of the pool. Possible values are: +
        +
      • UP - The pool is operational. +
      • RUNNING - The pool is operational, but less than 50% of the pool members are up. +
      • DOWN - All members in the pool are down. +
      • DISABLED - Either the pool is disabled or all of the members are disabled. +
      • UNAVAILABLE - The pool is unavailable. Examples: pool has no members or pool is not assigned to any virtual service. +
      • UNKNOWN - The pool state is unknown. +
      + type: string + memberCount: + description: The total number of members in the pool. + type: integer + enabledMemberCount: + description: The number of enabled members in the pool. + type: integer + upMemberCount: + description: The number of enabled members in the pool that are operational. + type: integer + healthMessage: + type: string + description: The localized message on the health of the pool. + + EdgeLoadBalancerPoolSummary: + x-vcloud-added-in: "35.0" + description: Specifies a summary of a Load Balancer pool. + allOf: + - $ref: './networking/edgeGatewayLoadBalancer.yaml#/definitions/EdgeLoadBalancerPoolCommonProperties' + - type: object + properties: + name: + type: string + description: Name for the Load Balancer Pool. Name is unique across all pools for an Edge Gateway. + activeMonitoringEnabled: + description: Whether active monitoring for this pool is enabled or not. + type: boolean + default: false + virtualServiceRefs: + description: | + The list of Load Balancer Virtual Services associated with this Load balancer Pool. + Only first 10 Virtual Services will be returned. + type: array + maxItems: 10 + items: + $ref: '#/definitions/EntityReference' + memberSslEnabled: + description: | + Whether SSL is enabled for communicatation between the Load Balancer Virtual Services and the pool members + type: boolean + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: Urn + args: + - arg: loadBalancerPool + - constraint: ReadOnly + - constraint: NonSortable + name: + x-vcloud-constraints: + - constraint: ReadOnly + description: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + enabled: + x-vcloud-constraints: + - constraint: ReadOnly + passiveMonitoringEnabled: + x-vcloud-constraints: + - constraint: ReadOnly + activeMonitoringEnabled: + x-vcloud-constraints: + - constraint: ReadOnly + virtualServiceRefs: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + status: + x-vcloud-added-in: "35.0" + x-vcloud-constraints: + - constraint: ReadOnly + healthStatus: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + memberCount: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + enabledMemberCount: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + upMemberCount: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + memberSslEnabled: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + healthMessage: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + + EdgeLoadBalancerPool: + x-vcloud-added-in: "35.0" + description: Specifies the Load Balancer pool configuration. + allOf: + - $ref: './networking/edgeGatewayLoadBalancer.yaml#/definitions/EdgeLoadBalancerPoolCommonProperties' + - type: object + properties: + name: + type: string + description: Name for the Load Balancer Pool. Name is unique across all pools for an Edge Gateway. + defaultPort: + description: The destination server port used by the traffic sent to the member. + type: integer + format: int32 + minimum: 1 + maximum: 65535 + default: 80 + gracefulTimeoutPeriod: + description: | + Maximum time (in minutes) to gracefully disable a member. Virtual service waits for the specified time + before terminating the existing connections to the members that are disabled. + Special values: 0 represents 'Immediate', -1 represents 'Infinite'. + type: integer + format: int32 + minimum: -1 + maximum: 7200 + default: 1 + algorithm: + type: string + description: | + The algorithm for choosing a member within the pool's list of available members for each new connection. + Default value is "LEAST_CONNECTIONS". Supported algorithms are: +
        +
      • LEAST_CONNECTIONS +
      • ROUND_ROBIN +
      • CONSISTENT_HASH +
      • FASTEST_RESPONSE +
      • LEAST_LOAD +
      • FEWEST_SERVERS +
      • RANDOM +
      • FEWEST_TASKS +
      • CORE_AFFINITY +
      + CONSISTENT_HASH uses Source IP Address hash. + Using FASTEST_RESPONSE, LEAST_LOAD, FEWEST_SERVERS, RANDOM, FEWEST_TASKS, + CORE_AFFINITY algorithms may require additional licensing. + default: "LEAST_CONNECTIONS" + healthMonitors: + description: | + Member server's health can be monitored by using one or more health monitors. Active monitors + generate synthetic traffic and mark a server up or down based on the response. + type: array + items: + $ref: './networking/edgeGatewayLoadBalancer.yaml#/definitions/EdgeLoadBalancerHealthMonitor' + persistenceProfile: + description: Selected persistence profile for the Load Balancer Pool. + $ref: './networking/edgeGatewayLoadBalancer.yaml#/definitions/EdgeLoadBalancerPersistenceProfile' + members: + description: | + The list of destination servers which are used by the Load Balancer Pool to direct + load balanced traffic. + type: array + maxItems: 100 + items: + $ref: './networking/edgeGatewayLoadBalancer.yaml#/definitions/EdgeLoadBalancerPoolMember' + virtualServiceRefs: + description: The list of Load Balancer Virtual Services associated with this Load balancer Pool. + type: array + items: + $ref: '#/definitions/EntityReference' + gatewayRef: + $ref: '#/definitions/EntityReference' + description: The Edge Gateway associated with this Load Balancer Pool. + caCertificateRefs: + description: The root certificates to use when validating certificates presented by the pool members. + type: array + maxItems: 100 + items: + $ref: '#/definitions/EntityReference' + commonNameCheckEnabled: + description: | + Whether to check the common name of the certificate presented by the pool member. This cannot be enabled + if no caCertificateRefs are specified. + type: boolean + default: false + domainNames: + description: | + A list of domain names which will be used to verify the common names or subject alternative names presented by the pool + member certificates. It is performed only when common name check (commonNameCheckEnabled) is enabled. If common name check + is enabled, but domain names are not specified then the incoming host header will be used to check the certificate. + type: array + maxItems: 10 + items: + type: string + example: ["*.example.com", "www.vmware.com"] + required: + - name + - gatewayRef + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: Urn + args: + - arg: loadBalancerPool + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + description: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + enabled: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + passiveMonitoringEnabled: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + defaultPort: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + gracefulTimeoutPeriod: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + algorithm: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + healthMonitors: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + persistenceProfile: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + members: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + virtualServiceRefs: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + gatewayRef: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + status: + x-vcloud-added-in: "35.0" + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + healthStatus: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + memberCount: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + enabledMemberCount: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + upMemberCount: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + caCertificateRefs: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + commonNameCheckEnabled: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + domainNames: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + healthMessage: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + + EdgeLoadBalancerPoolMember: + x-vcloud-added-in: "35.0" + description: Defines a member (a destination server) in a Load Balancer Pool. + type: object + properties: + ipAddress: + description: The ip address of the Load Balancer Pool member. + type: string + port: + description: The port number of the Load Balancer Pool member. If unset, the port that the client used to connect will be used. + type: integer + minimum: 1 + maximum: 65535 + format: int32 + ratio: + description: The ratio of selecting eligible servers in the pool. + type: integer + minimum: 1 + maximum: 20 + default: 1 + format: int32 + enabled: + description: Whether the Load Balancer Pool member is enabled or not. + type: boolean + default: true + healthStatus: + description: | + The current health status of the pool member. Possible values are: +
        +
      • UP - The member is operational. +
      • DOWN - The member is down. +
      • DISABLED - The member is disabled +
      • UNKNOWN - The state is unknown. +
      + type: string + markedDownBy: + description: | + When the member is DOWN, the value gives the names of the health monitors that marked the member as down. + If a monitor cannot be determined, the value will be UNKNOWN. + type: array + items: + type: string + detailedHealthMessage: + description: | + The non-localized detailed message on the health of the pool member. + type: string + required: + - ipAddress + x-vcloud-property-annotations: + ipAddress: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + - constraint: NetworkAddress + args: + - arg: IPV4_IP + port: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + ratio: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + enabled: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + healthStatus: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + markedDownBy: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + detailedHealthMessage: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + x-vcloud-restricted: Visible to provider users only + + EdgeLoadBalancerHealthMonitor: + x-vcloud-added-in: "35.0" + description: | + Specifies the health monitoring configuration for a Load Balancer Pool. + Health monitors are used to monitor health of the Load Balancer Pool's member servers. + type: object + properties: + name: + type: string + description: Name of the Health monitor. Name of the system defined monitors are prefixed with System for example 'System-HTTP'. + type: + type: string + description: | + Type of the health monitors. A value of "-" represents an unknown type. + Such monitor can still be removed from the Load Balancer Pool on update but is not valid on create. + Supported values are: +
        +
      • HTTP - HTTP request/response is used to validate health. +
      • HTTPS - Used against HTTPS encrypted web servers to validate health. +
      • TCP - TCP connection is used to validate health. +
      • UDP - A UDP datagram is used to validate health. +
      • PING - An ICMP ping is used to validate health. +
      + systemDefined: + type: boolean + description: Whether the Health Monitor is system defined. + required: + - type + x-vcloud-property-annotations: + name: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + type: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + systemDefined: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + + EdgeLoadBalancerPersistenceProfile: + x-vcloud-added-in: "35.0" + description: | + Specifies the Persistence profile for a Load Balancer Pool. + Persistence profile will ensure that the same user sticks to the same server for a desired duration of time. + If the persistence profile is unmanaged by Cloud Director, updates that leave the values unchanged will continue to use the same unmanaged profile. + Any changes made to the persistence profile will cause Cloud Director to switch the pool to a profile managed by Cloud Director. + type: object + properties: + name: + type: string + description: | + Name of the Persistence profile. + type: + type: string + description: | + Type of persistence strategy to use. + Supported values are: +
        +
      • CLIENT_IP - The client’s IP is used as the identifier and mapped to the server. +
      • HTTP_COOKIE - Load Balancer inserts a cookie into HTTP responses. Cookie name must be provided as value. +
      • CUSTOM_HTTP_HEADER - Custom, static mappings of header values to specific servers are used. Header name must be provided as value. +
      • APP_COOKIE - Load Balancer reads existing server cookies or URI embedded data such as JSessionID. Cookie name must be provided as value. +
      • TLS - Information is embedded in the client’s SSL/TLS ticket ID. This will use default system profile "System-Persistence-TLS". +
      + Using CUSTOM_HTTP_HEADER, APP_COOKIE, TLS persistence types may require additional licensing. + value: + type: string + description: | + Value of attribute based on selected persistence type. + This is required for HTTP_COOKIE, CUSTOM_HTTP_HEADER and APP_COOKIE persistence types. + HTTP_COOKIE, APP_COOKIE must have cookie name set as the value and CUSTOM_HTTP_HEADER must have header name set as the value. + required: + - type + x-vcloud-property-annotations: + name: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + type: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + value: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + EdgeLoadBalancerAnalyticReports: + x-vcloud-added-in: "35.0" + description: | + A set of Load Balancer analytic reports. Each report in the list represents + a timeseries of Edge Gateway Load Balancer runtime data. + type: object + properties: + values: + maxItems: 5 + type: array + items: + $ref: '#/definitions/EdgeLoadBalancerAnalyticReport' + + EdgeLoadBalancerAnalyticReport: + x-vcloud-added-in: "35.0" + description: | + A Load Balancer Analytic Report. It represents a timeseries + of Edge Gateway Load Balancer runtime data. + type: object + properties: + gatewayId: + type: string + description: The gateway URN identier. + componentId: + type: string + description: The virtual service or pool URN identifier. + metric: + type: string + description: The metric for this specific report. Supported metrics can be determined by using the supported metrics API. + units: + type: string + description: | + The units for this specific report. Units may be one of the following +
        +
      • PER_SECOND +
      • METRIC_COUNT +
      • BITS_PER_SECOND +
      • BYTES_PER_SECOND +
      • MILLISECONDS +
      • PERCENT +
      + Units are derived from the reported metric. + statistics: + $ref: '#/definitions/EdgeLoadBalancerMetricSummaryStats' + decription: High level statistical roll up of data for this report. + data: + description: The metric timeseries of data for this report. + type: array + items: + $ref: '#/definitions/EdgeLoadBalancerMetricData' + x-vcloud-property-annotations: + gatewayId: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + componentId: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSortable + metric: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSortable + units: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + statistics: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + data: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + x-vcloud-cross-references: + - cross-reference: + alias: metric + - cross-reference: + alias: step + - cross-reference: + alias: limit + - cross-reference: + alias: startTime + - cross-reference: + alias: endTime + - cross-reference: + alias: componentId + + EdgeLoadBalancerMetricSummaryStats: + x-vcloud-added-in: "35.0" + description: | + A statistical summary of the data in the report. + type: object + properties: + mean: + type: number + description: Mean value of sample. + min: + type: number + description: Min value of sample. + max: + type: number + description: Max value of sample. + trend: + type: number + description: Sample trend. + sampleSize: + type: number + description: Sample size. + startTime: + type: string + description: Start time of data series. ISO 8601 format (i.e. 2020-07-24T00:00:00). + endTime: + type: string + description: End time of data series. ISO 8601 format (i.e. 2020-07-24T00:00:00). + + EdgeLoadBalancerMetricData: + x-vcloud-added-in: "35.0" + description: | + A data point in the metric timeseries. + type: object + properties: + timestamp: + type: string + description: Sampled data time. + value: + type: string + description: Data value for the sampled time. ISO 8601 format (i.e. 2020-07-24T00:00:00). + + EdgeLoadBalancerAnalyticMetrics: + x-vcloud-added-in: "35.0" + description: The list of supported metrics. These metrics can be used for building report queries. + type: object + properties: + metrics: + type: array + items: + $ref: '#/definitions/EdgeLoadBalancerAnalyticMetric' + x-vcloud-property-annotations: + metrics: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + + EdgeLoadBalancerAnalyticMetric: + x-vcloud-added-in: "35.0" + description: A supported metrics. + type: object + properties: + key: + type: string + description: The metric key to be used in report queries. + description: + type: string + x-vcloud-property-annotations: + key: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + description: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + x-vcloud-cross-references: + - cross-reference: + alias: componentId + + + EntityReference: + $ref: "./common/entity.yaml#/definitions/EntityReference" diff --git a/schemas/openapi/src/main/resources/schemas/networking/edgeGatewayNat.yaml b/schemas/openapi/src/main/resources/schemas/networking/edgeGatewayNat.yaml new file mode 100644 index 00000000..930ee712 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/networking/edgeGatewayNat.yaml @@ -0,0 +1,358 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2019-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + API for NAT configuration of an Org VDC edge gateway. NAT rules can be setup on the Edge Gateway to map + public facing external IP Addresses to/from private internal IP Addresses. This can only be used on an Edge Gateway backed by an NSX-T Tier-1 Gateway. + version: "1.0" + title: Edge Gateway NAT API + +paths: + + natRules: + parameters: + - name: gatewayId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: gateway + + get: + x-vcloud-added-in: "33.0" + tags: + - edgeGatewayNatRules + summary: | + Retrieves all NAT Rules on the edge gateway. + description: | + Retrieves all NAT Rules on the edge gateway. Pagination is supported to get the next page in the header response. + Results can be sorted by only a single parameter. Sorting by combination of parameters (sortAsc=foo&sortDesc=bar) is not allowed. + operationId: getNatRules + parameters: + - $ref: "./common/query.yaml#/parameters/queryCursor" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EdgeNatRules' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + post: + x-vcloud-added-in: "33.0" + tags: + - edgeGatewayNatRules + summary: Creates a NAT Rule on the Edge Gateway. + operationId: createNatRule + consumes: + - application/json + parameters: + - name: edgeNatRule + in: body + required: true + schema: + $ref: '#/definitions/EdgeNatRule' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + natRule: + parameters: + - name: gatewayId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: gateway + - name: ruleId + in: path + required: true + type: string + + get: + x-vcloud-added-in: "33.0" + tags: + - edgeGatewayNatRule + summary: Retrieves a specific NAT Rule configuration of the edge gateway based on the rule id passed in. + operationId: getNatRule + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EdgeNatRule' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + put: + x-vcloud-added-in: "33.0" + tags: + - edgeGatewayNatRule + summary: Update a specific NAT Rule configuration of the edge gateway based on the rule id passed in. + operationId: updateNatRule + consumes: + - application/json + parameters: + - name: edgeNatRule + in: body + required: true + schema: + $ref: '#/definitions/EdgeNatRule' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + delete: + x-vcloud-added-in: "33.0" + tags: + - edgeGatewayNatRule + summary: Deletes a specific NAT Rule configuration of the edge gateway based on the rule id passed in. + operationId: deleteNatRule + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + +definitions: + + EdgeNatRules: + x-vcloud-added-in: "33.0" + description: List of configured NAT Rules. + allOf: + - $ref: './networking/commonObject.yaml#/definitions/NetworkingObjectStatus' + - type: object + properties: + values: + type: array + description: The list of NAT Rules. + items: + $ref: './networking/edgeGatewayNat.yaml#/definitions/EdgeNatRule' + + EdgeNatRule: + x-vcloud-added-in: "33.0" + description: The configuration for a given NAT Rule. + type: object + properties: + id: + type: string + description: | + The unique id of the NAT Rule. This must be supplied when updating a given NAT Rule. On creation, an unique id is generated for the NAT Rule. + name: + type: string + description: User friendly name for the NAT Rule. Name must be provided. + description: + type: string + enabled: + type: boolean + description: A flag indicating whether the individual nat rule is enabled or not. The default is true. + default: true + ruleType: + $ref: '#/definitions/NatRuleType' + description: | + Represents the type of NAT Rule. SNAT translates an internal IP to an external IP and is used for outbound traffic. + DNAT translates the external IP to an internal IP and is used for inbound traffic. This property is now deprecated and replaced with type. + type: + type: string + description: | + Represents the type of NAT Rule. Below are valid values. +
        +
      • SNAT - This translates an internal IP to an external IP and is used for outbound traffic. +
      • DNAT - This translates the external IP to an internal IP and is used for inbound traffic. +
      • NO_SNAT - No internal IP translation takes place. +
      • NO_DNAT - No external IP translation takes place. +
      • REFLEXIVE - Also known as Stateless NAT. This translates an internal IP to an external IP and vice versa. + The number of internal addresses should be exactly the same as that of external addresses. +
      + applicationPortProfile: + $ref: '#/definitions/EntityReference' + description: | + Represents the application ports on which the NAT Rule will be applied. An application port profile id in the form of URN format must be provided. + If not provided then the port will be considered as "ANY". This should not be set for a REFLEXIVE Rule. + For a DNAT Rule, the source port on the application port profile represents the port from which the traffic is originating from. + For a DNAT rule, the destination port on the application port profile represents the internal port on the workloads where the traffic is terminating. + For a SNAT rule, the source port on the application port profile represents the internal port on the workloads where the traffic is originating from. + For a SNAT rule, the destination port application port profile represents the port where the traffic is terminating. + externalAddresses: + type: string + description: | + The external addresses for the NAT Rule. This must be supplied as a single IP or Network CIDR. For a DNAT rule, this is the external facing IP Address for incoming traffic. + For an SNAT rule, this is the external facing IP Address for outgoing traffic. These ips are typically allocated/suballocated IP Addresses on + the Edge Gateway. For a REFLEXIVE rule, these are the external facing IPs. + internalAddresses: + type: string + description: | + The internal addresses for the NAT Rule. This must be supplied as a single IP or Network CIDR. For a DNAT rule, this is the internal IP Address for incoming traffic. + For an SNAT rule, this is the internal IP Address for outgoing traffic. For a REFLEXIVE rule, these are the internal IPs. These ips are typically the Private IPs that are allocated to workloads. + internalPort: + type: string + description: | + Port number or port range for incoming network traffic. If Any Traffic is selected for the Service, the default internal port is "ANY". + Note that this field has been deprecated. Please use dnatExternalPort to set port forwarding for DNAT rules. + This typically should not be set for SNAT rules as the rule would not be able to support IP Translation with multiple ports. + dnatExternalPort: + type: string + description: | + This represents the external port number or port range when doing DNAT port forwarding from external to internal. + The default dnatExternalPort is "ANY" meaning traffic on any port for the given IPs selected will be translated. + logging: + type: boolean + description: A flag indicating whether logging for the individual nat rule is enabled or not. The default is false. + default: false + systemRule: + type: boolean + description: A flag indicating whether this NAT rule is managed by the system. This is not user editable + default: false + snatDestinationAddresses: + type: string + description: | + The destination addresses to match in the SNAT Rule. This must be supplied as a single IP or Network CIDR. + Providing no value for this field results in match with ANY destination network. These IPs are typically + the Private IPs that are allocated to destination workloads. + firewallMatch: + type: string + description: | + Determines how the firewall matches the address during NATing if firewall stage is not skipped. Below are valid values. +
        +
      • MATCH_INTERNAL_ADDRESS indicates the firewall will be applied to internal address of a NAT rule. For SNAT, the internal address is + the original source address before NAT is done. For DNAT, the internal address is the translated destination address after NAT is done. + For REFLEXIVE, to egress traffic, the internal address is the original source address before NAT is done; to ingress traffic, the internal address is + the translated destination address after NAT is done. +
      • MATCH_EXTERNAL_ADDRESS indicates the firewall will be applied to external address of a NAT rule. For SNAT, the external address is + the translated source address after NAT is done. For DNAT, the external address is the original destination address before NAT is done. + For REFLEXIVE, to egress traffic, the external address is the translated internal address after NAT is done; to ingress traffic, the external address is + the original destination address before NAT is done. +
      • BYPASS firewall stage will be skipped. +
      + The default is MATCH_INTERNAL_ADDRESS. + default: MATCH_INTERNAL_ADDRESS + priority: + description: If an address has multiple NAT rules, the rule with the highest priority is applied. A lower value means a higher precedence for this rule. + type: integer + format: int32 + default: 0 + minimum: 0 + maximum: 2147481599 + version: + $ref: '#/definitions/ObjectVersion' + required: + - name + - internalAddresses + - externalAddresses + + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + name: + x-vcloud-constraints: + - constraint: NonSearchable + description: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + enabled: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + ruleType: + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: type + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + type: + x-vcloud-added-in: "36.0" + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + applicationPortProfile: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + externalAddresses: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + internalAddresses: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + internalPort: + x-vcloud-added-in: "33.0" + x-vcloud-deprecated-in: "35.0" + x-vcloud-removed-in: "35.0" + x-vcloud-deprecated-alternative: Please use dnatExternalPort to configure port forwarding for DNAT. For SNAT, specifying an external port is not supported. + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + dnatExternalPort: + x-vcloud-added-in: "35.0" + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + logging: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + systemRule: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + snatDestinationAddresses: + x-vcloud-added-in: "34.0" + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + firewallMatch: + x-vcloud-added-in: "35.2" + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + priority: + x-vcloud-added-in: "35.2" + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + NatRuleType: + description: | + The Nat Rule Type for a given NAT rule. + type: object + enum: + - DNAT + - SNAT + - NO_DNAT + - NO_SNAT + + ObjectVersion: + $ref: './networking/commonObject.yaml#/definitions/ObjectVersion' + + EntityReference: + $ref: "./common/entity.yaml#/definitions/EntityReference" + diff --git a/schemas/openapi/src/main/resources/schemas/networking/edgeGatewayRouting.yaml b/schemas/openapi/src/main/resources/schemas/networking/edgeGatewayRouting.yaml new file mode 100644 index 00000000..00f80f8c --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/networking/edgeGatewayRouting.yaml @@ -0,0 +1,813 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2019-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + API for routing configuration on an edge gateway. Configurations can include route advertisement and BPG configuration + version: "1.0" + title: Edge Gateway Routing Configuration API + +paths: + + routeAdvertisement: + parameters: + - name: gatewayId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: gateway + get: + x-vcloud-added-in: "34.0" + tags: + - edgeGatewayRouteAdvertisement + summary: Retrieve the list of subnets that will be advertised so that the Edge Gateway can route out to the connected external network. + description: | + Retrieve the list of subnets that will be advertised so that the Edge Gateway can route out to the connected external network. + Org vDC networks that are in any of these subnets can then be routed out to the external networks. + operationId: getRouteAdvertisement + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/RouteAdvertisement' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + put: + x-vcloud-added-in: "34.0" + tags: + - edgeGatewayRouteAdvertisement + summary: Updates the list of subnets that will be advertised so that the Edge Gateway can route out to the connected external network. + operationId: updateRouteAdvertisement + consumes: + - application/json + parameters: + - name: routeAdvertisement + in: body + required: true + schema: + $ref: '#/definitions/RouteAdvertisement' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + bgp: + parameters: + - name: gatewayId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: gateway + + get: + x-vcloud-added-in: "34.0" + tags: + - edgeGatewayBgp + summary: Retrieves the BGP configuration for a given Edge Gateway. + description: | + Retrieves the general BGP configuration for an edge gateway. + operationId: getBgpConfig + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EdgeBgpConfig' + + put: + x-vcloud-added-in: "34.0" + tags: + - edgeGatewayBgp + summary: Updates the BGP configuration on the Edge Gateway. + description: | + Updates the general BGP configuration on an edge gateway. + operationId: updateBgpConfig + consumes: + - application/json + parameters: + - name: bgpConfig + in: body + required: true + schema: + $ref: '#/definitions/EdgeBgpConfig' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + + prefixLists: + parameters: + - name: gatewayId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: gateway + + get: + x-vcloud-added-in: "34.0" + tags: + - edgeGatewayPrefixLists + summary: Retrieves all Prefix lists for a given edge gateway. + description: | + Retrieves all Prefix lists for a given edge gateway. + Results can be sorted by only a single parameter. Sorting by combination of parameters (sortAsc=foo&sortDesc=bar) is not allowed. + operationId: getPrefixLists + parameters: + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EdgePrefixLists' + + post: + x-vcloud-added-in: "34.0" + tags: + - edgeGatewayPrefixLists + summary: Creates a new Prefix list on the edge gateway. + operationId: createPrefixList + consumes: + - application/json + parameters: + - name: prefixList + in: body + required: true + schema: + $ref: '#/definitions/EdgePrefixList' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + prefixList: + parameters: + - name: gatewayId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: gateway + - name: listId + in: path + required: true + type: string + + get: + x-vcloud-added-in: "34.0" + tags: + - edgeGatewayPrefixList + summary: Retrieves a specific Prefix list for a given edge gateway. + operationId: getPrefixList + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EdgePrefixList' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + put: + x-vcloud-added-in: "34.0" + tags: + - edgeGatewayPrefixList + summary: Updates a specific Prefix list for a given edge gateway. + operationId: updatePrefixList + consumes: + - application/json + parameters: + - name: prefixList + in: body + required: true + schema: + $ref: '#/definitions/EdgePrefixList' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + delete: + x-vcloud-added-in: "34.0" + tags: + - edgeGatewayPrefixList + summary: Deletes a specific Prefix list for a given edge gateway. + operationId: deletePrefixList + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + + bgpNeighbors: + parameters: + - name: gatewayId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: gateway + + get: + x-vcloud-added-in: "34.0" + tags: + - edgeGatewayBgpNeighbors + summary: Retrieves all BGP neighbors configured for the edge gateway. + operationId: getBgpNeighbors + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EdgeBgpNeighbors' + + post: + x-vcloud-added-in: "34.0" + tags: + - edgeGatewayBgpNeighbors + summary: Creates a new BGP neighbor for the edge gateway. + operationId: createBgpNeighbor + consumes: + - application/json + parameters: + - name: bgpNeighbor + in: body + required: true + schema: + $ref: '#/definitions/EdgeBgpNeighbor' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + bgpNeighbor: + parameters: + - name: gatewayId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: gateway + - name: neighborId + in: path + required: true + type: string + + get: + x-vcloud-added-in: "34.0" + tags: + - edgeGatewayBgpNeighbor + summary: Retrieves a specific BGP neighbor of edge gateway. + operationId: getBgpNeighbor + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EdgeBgpNeighbor' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + put: + x-vcloud-added-in: "34.0" + tags: + - edgeGatewayBgpNeighbor + summary: Updates a specific BGP neighbor of edge gateway. + operationId: updateBgpNeighbor + consumes: + - application/json + parameters: + - name: bgpNeighbor + in: body + required: true + schema: + $ref: '#/definitions/EdgeBgpNeighbor' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + delete: + x-vcloud-added-in: "34.0" + tags: + - edgeGatewayBgpNeighbor + summary: Deletes a specific BGP neighbor of edge gateway. + operationId: deleteBgpNeighbor + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + + bgpNeighborStatus: + parameters: + - name: gatewayId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: gateway + - name: neighborId + in: path + required: true + type: string + + get: + x-vcloud-added-in: "34.0" + tags: + - edgeGatewayBgpNeighbor + summary: Retrieves status of a specific BGP neighbor configured on an Edge Gateway. + operationId: getBgpNeighborStatus + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/NetworkingObjectStatus' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + +definitions: + + RouteAdvertisement: + x-vcloud-added-in: "34.0" + description: | + List of subnets that will be advertised so that the Edge Gateway can route out to the connected external network. + type: object + properties: + enable: + type: boolean + default: true + description: True means that the subnets will be advertised. The default is true. + subnets: + type: array + description: | + List of subnets that will be advertised so that the Edge Gateway can route out to the connected external network. + Each value is in CIDR format. Note that the CIDR value will automatically be converted to its network definition based on the prefix length. + items: + type: string + minItems: 0 + maxItems: 100 + example: + - '100.64.1.0/24' + - 'fc7e:f206:db42::/48' + x-vcloud-property-annotations: + subnets: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + - constraint: NetworkAddress + args: + - arg: CIDR + + EdgeBgpConfig: + x-vcloud-added-in: "34.0" + description: Specifies the Edge Gateway BGP configuration. + type: object + properties: + enabled: + type: boolean + description: A flag indicating whether BGP configuration is enabled or not. + default: true + ecmp: + type: boolean + description: A flag indicating whether ECMP is enabled or not. + default: true + localASNumber: + type: string + description: | + BGP AS number to advertise to BGP peers. BGP AS number can be specified in + either ASPLAIN or ASDOT formats, like ASPLAIN format :- '65546', ASDOT format :- '1.10'. + Read only if using a VRF-Lite backed external network. + example: 65546 + gracefulRestart: + description: | + BGP Graceful Restart configuration. Not specifying a value results + in default bahavior. Read only if using a VRF-Lite backed external network. + $ref: '#/definitions/EdgeBgpGracefulRestartConfig' + version: + $ref: '#/definitions/ObjectVersion' + required: + - version + x-vcloud-property-annotations: + enabled: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + ecmp: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + localASNumber: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + gracefulRestart: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + EdgeBgpGracefulRestartConfig: + x-vcloud-added-in: "34.0" + description: | + Describes current graceful restart configuration mode and timer for BGP configuration on an edge gateway. + type: object + properties: + mode: + $ref: '#/definitions/GracefulRestartModeTypes' + description: Currently configured graceful restart mode. Default is HELPER_ONLY. + restartTimer: + description: | + Maximum time taken (in seconds) for a BGP session to be established after a restart. + If the session is not re-established within this timer, the receiving speaker will + delete all the stale routes from that peer. + type: integer + minimum: 1 + maximum: 3600 + default: 180 + format: int32 + staleRouteTimer: + description: Maximum time (in seconds) before stale routes are removed when BGP restarts. + type: integer + minimum: 1 + maximum: 3600 + default: 600 + format: int32 + x-vcloud-property-annotations: + mode: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + restartTimer: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + staleRouteTimer: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + GracefulRestartModeTypes: + x-vcloud-added-in: "34.0" + description: | + Describes Graceful Restart configuration Modes for BGP configuration on an edge gateway. + HELPER_ONLY mode is the ability for a BGP speaker to indicate its ability + to preserve forwarding state during BGP restart. + GRACEFUL_RESTART mode is the ability of a BGP speaker to advertise its restart + to its peers. +
        +
      • DISABLE - Both graceful restart and helper modes are disabled. +
      • HELPER_ONLY - Only helper mode is enabled. +
      • GRACEFUL_AND_HELPER - Both graceful restart and helper modes are enabled. +
      + type: string + enum: + - DISABLE + - HELPER_ONLY + - GRACEFUL_AND_HELPER + + EdgePrefixLists: + x-vcloud-added-in: "34.0" + description: | + List of all configured Prefix lists for an edge gateway. + type: object + properties: + values: + type: array + description: All Prefix lists. + items: + $ref: '#/definitions/EdgePrefixList' + + EdgePrefixList: + x-vcloud-added-in: "34.0" + description: | + A list of prefixes for routing purposes. Prefix list contains one or more ordered entries + which are processed sequentially. + type: object + properties: + id: + type: string + description: | + The unique id of this prefix list. On updates, the id is required for the list, while for create a new id will be generated. This id is not a VCD URN. + name: + type: string + description: Name for the prefix list. + description: + type: string + description: Description for this prefix list. + prefixes: + type: array + description: List of network prefixes. + items: + $ref: '#/definitions/EdgePrefixListEntry' + minItems: 1 + version: + $ref: '#/definitions/ObjectVersion' + required: + - name + - prefixes + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + name: + x-vcloud-constraints: + - constraint: NonSearchable + description: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + prefixes: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + EdgePrefixListEntry: + x-vcloud-added-in: "34.0" + description: | + A network prefix entry used for routing purposes. + type: object + properties: + network: + description: | + The network prefix in CIDR format. If the value is not specified, + it will be treated as "ANY" which means match all networks. + Both IPv4 and IPv6 formats are supported. + type: string + example: 10.22.0.0/22 + action: + description: | + Action for the prefix list. This specifies whether the packet from specified network is advertised + or not for routing purposes. + type: string + enum: [PERMIT, DENY] + default: 'PERMIT' + greaterThanEqualTo: + description: The value which the prefix length must be greater than or equal to. Must be less than or equal to 'lessThanEqualTo' + type: integer + minimum: 1 + maximum: 128 + format: int32 + lessThanEqualTo: + description: The value which the prefix length must be less than or equal to. Must be greater than or equal to 'greaterThanEqualTo' + type: integer + minimum: 1 + maximum: 128 + format: int32 + x-vcloud-property-annotations: + network: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + - constraint: NetworkAddress + args: + - arg: CIDR + action: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + greaterThanEqualTo: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + lessThanEqualTo: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + EdgeBgpNeighbors: + x-vcloud-added-in: "34.0" + description: | + List of all configured BGP neighbors for an edge gateway. + type: object + properties: + values: + type: array + description: All BGP neighbors for an edge gateway. + items: + $ref: '#/definitions/EdgeBgpNeighbor' + + EdgeBgpNeighbor: + x-vcloud-added-in: "34.0" + description: | + A BGP neighbor configuration. + type: object + properties: + id: + type: string + description: | + The unique id of this BGP neighbor. On updates, the id is required for the object, while for create a new id will be generated. This id is not a VCD URN. + neighborAddress: + type: string + description: The IP address of the BGP neighbor. Both IPv4 and IPv6 formats are supported. + example: 10.22.1.100 + remoteASNumber: + type: string + description: The remote AS number of a BGP neighbor in ASPLAIN format. + example: 65546 + keepAliveTimer: + description: Specifies the time interval (in seconds) between keep alive messages sent to peer. + type: integer + minimum: 1 + maximum: 65535 + default: 60 + format: int32 + holdDownTimer: + description: Specifies the time interval (in seconds) before declaring a peer dead. + type: integer + minimum: 1 + maximum: 65535 + default: 180 + format: int32 + gracefulRestartMode: + $ref: '#/definitions/GracefulRestartModeTypes' + description: Currently configured graceful restart configuration mode. Default is HELPER_ONLY. + bfd: + $ref: '#/definitions/EdgeBgpBfdConfig' + description: | + Specifies the BFD configuration for failure detection. Not specifying a value results + in default bahavior. + allowASIn: + type: boolean + description: | + A flag indicating whether AllowAS-in is enabled or not. This specifies whether BGP neighbors + can receive routes with same AS. + default: false + neighborPassword: + type: string + description: | + Password for BGP neighbor authentication. Empty string ("") clears existing password. + Not specifying a value will be treated as "no password". + maxLength: 20 + ipAddressTypeFiltering: + description: | + Specifies IP address type based filtering in each direction. Setting the value to + 'DISABLED' will disable address family based filtering. + type: string + enum: [IPV4, IPV6, DISABLED] + default: 'DISABLED' + inRoutesFilterRef: + description: | + Specifies route filtering configuration for the BGP neighbor in IN direction. + It is the reference to the prefix list, indicating which routes to filter for IN direction. + Not specifying a value will be treated as "no IN route filters". + $ref: '#/definitions/ExtObjectReference' + outRoutesFilterRef: + description: | + Specifies route filtering configuration for the BGP neighbor in OUT direction. + It is the reference to the prefix list, indicating which routes to filter for OUT direction. + Not specifying a value will be treated as "no OUT route filters". + $ref: '#/definitions/ExtObjectReference' + version: + $ref: '#/definitions/ObjectVersion' + required: + - neighborAddress + - remoteASNumber + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + neighborAddress: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + - constraint: NetworkAddress + args: + - arg: IPV4_IP + - arg: IPV6_IP + remoteASNumber: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + keepAliveTimer: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + holdDownTimer: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + gracefulRestartMode: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + bfd: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + allowASIn: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + neighborPassword: + x-vcloud-password: true + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + ipAddressTypeFiltering: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + inRoutesFilterRef: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + outRoutesFilterRef: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + EdgeBgpBfdConfig: + x-vcloud-added-in: "34.0" + description: | + Describes BFD configuration for failure detection. + type: object + properties: + enabled: + type: boolean + description: A flag indicating whether BFD configuration is enabled or not. + default: false + bfdInterval: + description: Specifies the time interval (in milliseconds) between heartbeat packets. + type: integer + minimum: 300 + maximum: 60000 + default: 1000 + format: int32 + declareDeadMultiple: + description: Number of times heartbeat packet is missed before BFD declares that the neighbor is down. + type: integer + minimum: 2 + maximum: 16 + default: 3 + format: int32 + x-vcloud-property-annotations: + enabled: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + bfdInterval: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + declareDeadMultiple: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + NetworkingObjectStatus: + $ref: './networking/commonObject.yaml#/definitions/NetworkingObjectStatus' + + ObjectVersion: + $ref: './networking/commonObject.yaml#/definitions/ObjectVersion' + + ExtObjectReference: + $ref: './networking/commonObject.yaml#/definitions/ExtObjectReference' + diff --git a/schemas/openapi/src/main/resources/schemas/networking/edgeGatewaySLAACProfile.yaml b/schemas/openapi/src/main/resources/schemas/networking/edgeGatewaySLAACProfile.yaml new file mode 100644 index 00000000..042e8f54 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/networking/edgeGatewaySLAACProfile.yaml @@ -0,0 +1,131 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2020-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + API for SLAAC profile configuration of an NSX-T backed Org VDC edge gateway. SLAAC profiles can be setup on the Edge Gateway to enable + stateless address configuration, as well as IPv6 DNS. This feature is not available on NSX-V backed edge gateways. + version: "1.0" + title: Edge Gateway SLAAC Profile API + +paths: + slaacProfile: + parameters: + - name: gatewayId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: gateway + + get: + x-vcloud-added-in: "35.0" + tags: + - edgeGatewaySLAACProfile + summary: | + Retrieves the SLAAC profile on the edge gateway. + description: | + Retrieves the SLAAC profile on the edge gateway. + operationId: getSLAACProfile + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/SLAACProfile' + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + + put: + x-vcloud-added-in: "35.0" + tags: + - edgeGatewaySLAACProfile + summary: Creates a SLAAC profile or updates the existing one if it already exists. + operationId: updateSLAACProfile + consumes: + - application/json + parameters: + - name: SLAACProfile + in: body + required: true + schema: + $ref: '#/definitions/SLAACProfile' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + +definitions: + + SLAACProfile: + x-vcloud-added-in: "35.0" + type: object + description: The SLAAC profile containing the mode, the DNS configuration settings, and whether or not it is enabled. Only NSX-T edge gateways support a SLAAC profile. + properties: + enabled: + type: boolean + description: A flag indicating whether or not this profile is enabled. + default: false + mode: + description: | + Represents the various modes with which to configure SLAAC with. Supported values are SLAAC and DHCPv6. + type: string + default: SLAAC + dnsConfig: + $ref: '#/definitions/SLAACDnsConfig' + x-vcloud-property-annotations: + enabled: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + mode: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + dnsConfig: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + SLAACDnsConfig: + x-vcloud-added-in: "35.0" + type: object + description: The DNS settings for this SLAAC profile. + properties: + domainNames: + type: array + description: | + The list of domain names used as nameservers to configure on virtual machines connected to the gateway this profile is associated with. + items: + type: string + default: [] + maxItems: 8 + dnsServerIpv6Addresses: + type: array + description: | + The IP addresses of the DNS servers to be configured on virtual machines connected to the network using this profile. They must be valid IPv6 addresses. + items: + type: string + default: [] + maxItems: 8 + x-vcloud-property-annotations: + domainNames: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + - constraint: DomainName + dnsServerIpv6Addresses: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + - constraint: NetworkAddress + args: + - arg: IPV6_IP diff --git a/schemas/openapi/src/main/resources/schemas/networking/edgeGateways.yaml b/schemas/openapi/src/main/resources/schemas/networking/edgeGateways.yaml new file mode 100644 index 00000000..875c9f50 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/networking/edgeGateways.yaml @@ -0,0 +1,574 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2011-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + API for managing Edge Gateways belonging to a particular vDC. Edge gateways can be + backed by an NSX-T or an NSX-V installation. + version: "1.0" + title: Edge Gateways API + +paths: + + edgeGateways: + + post: + x-vcloud-added-in: "32.0" + tags: + - edgeGateways + summary: Create a new edge gateway + description: | + Create a new edge gateway for a vDC. Only NSX-T Edge Gateways can be created with this endpoint. + operationId: createEdgeGateway + consumes: + - application/json + parameters: + - name: edgeGateway + in: body + required: true + schema: + $ref: '#/definitions/EdgeGateway' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + + get: + x-vcloud-added-in: "32.0" + x-vcloud-multisite: true + tags: + - edgeGateways + summary: Get all the edge gateways + description: | + Get all edge gateways. If "ownerRef.id" filter is not specified, then user will see all the edge gateways in the organization they have the right to view. + Results can be filtered by ownerRef. Combination of ownerRef and _context. (_context==includeAccessible) + can be used to get all the edge gateways which are available to an Org vDC including the gateways which are owned by + datacenter groups but available to Org vDC. + operationId: getAllEdgeGateways + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EdgeGateways' + + edgeGateway: + + parameters: + - name: gatewayId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: gateway + + get: + x-vcloud-added-in: "32.0" + tags: + - edgeGateway + summary: Retrieves a specific Edge Gateway + operationId: getEdgeGateway + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EdgeGateway' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + put: + x-vcloud-added-in: "32.0" + tags: + - edgeGateway + summary: Updates a specific Edge Gateway + description: | + Update a specific Edge Gateway. Only NSX-T Edge Gateways can be created with this endpoint. + operationId: updateEdgeGateway + consumes: + - application/json + parameters: + - name: gateway + in: body + required: true + schema: + $ref: '#/definitions/EdgeGateway' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + delete: + x-vcloud-added-in: "32.0" + tags: + - edgeGateway + summary: Deletes a specific Edge Gateway + description: | + Deletes a specific Edge Gateway. Only NSX-T Edge Gateways can be deleted with this endpoint. + operationId: deleteEdgeGateway + parameters: + - $ref: "./common/delete.yaml#/parameters/forceDelete" + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + usedIpAddresses: + parameters: + - name: gatewayId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: gateway + + get: + x-vcloud-added-in: "33.0" + tags: + - edgeGateway + summary: Retrieve the list of IP addresses which are being used by the edge gateway. + description: | + Get all the IP Addresses which are being used by the Edge Gateway such as the primary IP or an IP used by a given + Edge Service, such as NAT. These IP addresses are a subset of the IPs allocated from the connected external networks. + If the IP is being consumed by any of the configured services on the edge gateway then name of service will be returned. + operationId: getUsedIpAddresses + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/GatewayUsedIpAddresses' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + +definitions: + + EdgeGateways: + x-vcloud-added-in: "32.0" + description: | + List of edge gateways + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + description: A list of EdgeGateways. + items: + $ref: '#/definitions/EdgeGateway' + + EdgeGateway: + x-vcloud-added-in: "32.0" + description: | + An edge gateway object + allOf: + - $ref: './networking/commonObject.yaml#/definitions/NetworkingObjectStatus' + - type: object + properties: + id: + type: string + description: The unique identifier of the edge gateway. + name: + type: string + description: The name of the edge gateway. + description: + type: string + description: The description of the edge gateway(optional). + edgeGatewayUplinks: + description: The uplink connections for the edge gateway. + type: array + items: + $ref: './networking/edgeGateways.yaml#/definitions/EdgeGatewayUplink' + distributedRoutingEnabled: + type: boolean + default: false + description: A flag indicating whether distributed routing is enabled or not. The default is false. + orgVdcNetworkCount: + type: integer + description: The number of Org vDC networks connected to the gateway. + gatewayBacking: + $ref: './networking/edgeGateways.yaml#/definitions/EdgeGatewayBacking' + description: The backing details of the edge gateway; only required if importing an NSX-T router. + orgVdc: + $ref: '#/definitions/EntityReference' + description: | + The organization vDC which the gateway belongs to. Property is deprecated. Please use ownerRef. + ownerRef: + $ref: '#/definitions/EntityReference' + description: | + The organization vDC or vDC Group that this edge gateway belongs to. If the ownerRef is set to a vDC Group, this gateway + will be available across all the participating Organization vDCs in the vDC Group. + orgRef: + $ref: '#/definitions/EntityReference' + description: The organization to which the gateway belongs. + serviceNetworkDefinition: + type: string + description: | + The network definition in CDIR form that DNS and DHCP service on an NSX-T edge will run on. The subnet prefix length must be 27. + This property applies to creating or importing an NSX-T Edge. This is not supported for VMC. + If nothing is set, the default is 192.168.255.225/27. The DHCP listener IP network is on 192.168.255.225/30. + The DNS listener IP network is on 192.168.255.228/32. This field cannot be updated. + edgeClusterConfig: + $ref: './networking/edgeGateways.yaml#/definitions/GatewayEdgeClusterConfig' + description: | + Edge Cluster Configuration for the Edge Gateway. Can be specified if a gateway needs to be placed on a specific set of Edge Clusters. + For NSX-T Edges, user should specify the ID of the NSX-T edge cluster as the value of primaryEdgeCluster's backingId. The gateway + defaults to the Edge Cluster of the connected External Network's backing Tier-0 router, if nothing is specified. The value of secondaryEdgeCluster + will be set to NULL for NSX-T edge gateways. + For NSX-V Edges, this is read-only and the legacy API must be used for edge specific placement. + required: + - name + - edgeGatewayUplinks + - orgVdc + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: Urn + args: + - arg: gateway + - constraint: ReadOnly + - constraint: NonSortable + description: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + edgeGatewayUplinks: + x-vcloud-constraints: + - constraint: NonSortable + gatewayBacking: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + orgVdc: + x-vcloud-deprecated-in: "35.0" + x-vcloud-deprecated-alternative: ownerRef + x-vcloud-constraints: + - constraint: NonSortable + ownerRef: + x-vcloud-added-in: "35.0" + x-vcloud-constraints: + - constraint: NonSortable + distributedRoutingEnabled: + x-vcloud-added-in: "33.0" + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + orgRef: + x-vcloud-added-in: "33.0" + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + orgVdcNetworkCount: + x-vcloud-added-in: "33.0" + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + serviceNetworkDefinition: + x-vcloud-added-in: "33.0" + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + edgeClusterConfig: + x-vcloud-added-in: "34.0" + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + EdgeGatewayUplink: + x-vcloud-added-in: "32.0" + description: | + The uplink (i.e. external network) that the edge gateway is connected to. This also contains the external network IPs that are allocated to the edge. + type: object + properties: + uplinkId: + type: string + description: The identifier of the external network this edge gateway is connected to. + uplinkName: + type: string + description: The name of the external network this edge gateway is connected to. + subnets: + $ref: "#/definitions/EdgeGatewaySubnets" + description: | + Set of subnets this edge will have access to. + connected: + type: boolean + description: Whether or not the gateway is connected to this uplink. This value defaults to true if it is not set. When filtering by this field, + if the filter is false, all gateways that have 0 connected uplinks will be returned, while if it is true, all gateways with at least one connected + uplink will be returned. + default: true + quickAddAllocatedIpCount: + type: integer + description: If set on create or update api calls, the specified number of IP addresses will be additionally allocated for this uplink. + IPs will be allocated from multiple subnets if needed. + dedicated: + type: boolean + description: If set to true, then the associated external network is exclusively used by this edge gateway. + default: false + vrfLiteBacked: + type: boolean + description: Whether the associated external network is backed by a NSX-T VRF-Lite Tier-0. + x-vcloud-property-annotations: + uplinkId: + x-vcloud-constraints: + - constraint: NonSortable + uplinkName: + x-vcloud-added-in: "33.0" + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + subnets: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + connected: + x-vcloud-added-in: "33.0" + x-vcloud-constraints: + - constraint: NonSortable + quickAddAllocatedIpCount: + x-vcloud-added-in: "33.0" + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + dedicated: + x-vcloud-added-in: "34.0" + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + vrfLiteBacked: + x-vcloud-added-in: "35.0" + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + + EdgeGatewayType: + x-vcloud-added-in: "32.0" + description: | + The type of the edge gateway. + type: object + enum: + - NSXV_BACKED + - NSXT_BACKED + - NSXT_IMPORTED + + EdgeGatewayBacking: + x-vcloud-added-in: "32.0" + description: | + The backing details of the edge gateway + type: object + properties: + backingId: + type: string + description: The identifier of the edge gateways backing router. + gatewayType: + $ref: '#/definitions/EdgeGatewayType' + description: The type of the gateway. Describes if this is an NSX-T edge gateway or an NSX-V edge gateway. + networkProvider: + $ref: '#/definitions/EntityReference' + description: The backing network provider, either NSX-T or NSX-V. + x-vcloud-property-annotations: + backingId: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + x-vcloud-restricted: Visible to provider users only + gatewayType: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + networkProvider: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + x-vcloud-restricted: Visible to provider users only + + GatewayEdgeClusterConfig: + x-vcloud-added-in: "34.0" + description: | + Represents the Edge Cluster Configuration for a given Edge Gateway. + type: object + properties: + primaryEdgeCluster: + $ref: '#/definitions/GatewayEdgeClusterReference' + description: | + This represents the Primary Edge Cluster used for the gateway. + For NSX-T Edges, this means the Edge Cluster the Tier 1 SR resides on. The user should + specify the ID of the NSX-T edge cluster as the value of primaryEdgeCluster's backingId. + For NSX-V Edges, this means the primary appliance for the gateway. + secondaryEdgeCluster: + $ref: '#/definitions/GatewayEdgeClusterReference' + description: | + This represents the Secondary Edge Cluster used for the gateway. + It is only applicable for NSX-V Edges when High Availability is enabled. If HA + is enabled and no secondary edge cluster is specified, both appliances will be + deployed on the primary edge cluster. If there is a specific secondary edge cluster, + the standby/secondary appliance will be deployed on the secondary edge cluster. + For NSX-T Edges, the value of secondaryEdgeCluster should be set to NULL. + required: + - primaryEdgeCluster + x-vcloud-property-annotations: + primaryEdgeCluster: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + secondaryEdgeCluster: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + + GatewayEdgeClusterReference: + x-vcloud-added-in: "34.0" + description: | + This represents the reference to an Edge Cluster used for the gateway. + type: object + properties: + edgeClusterRef: + $ref: '#/definitions/EntityReference' + description: The reference to VCD Edge Cluster. + backingId: + type: string + description: | + The Id of the edge cluster in NSX-T manager. The user should + specify the id of NSX-T edge cluster during edge gateway create/update. + VCD will automatically create a corresponding VCD Edge cluster object + referencing the specified NSX-T edge cluster. + For NSX-V Edges, this is set to NULL. + x-vcloud-property-annotations: + edgeClusterRef: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + backingId: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + EdgeGatewaySubnets: + x-vcloud-added-in: "32.0" + description: | + List of Subnets of an edge gateway + type: object + properties: + values: + type: array + items: + $ref: '#/definitions/EdgeGatewaySubnet' + + EdgeGatewaySubnet: + x-vcloud-added-in: "32.0" + description: | + Subnet for edge gateway that contains the IPs from the external network that are allocated to the edge. + allOf: + - $ref: './networking/commonObject.yaml#/definitions/Subnet' + - type: object + properties: + primaryIp: + type: string + description: | + The primary IP address allocated for this subnet. If not specified, this IP is auto-allocated. This IP belongs to the external network + and can be used for system-configured NAT rules such as DNS forwarder configuration. + autoAllocateIpRanges: + type: boolean + default: false + description: Used for create and update api calls. If set to true, IP Ranges are automatically generated based on totalIpCount. + x-vcloud-property-annotations: + primaryIp: + x-vcloud-added-in: "33.0" + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + autoAllocateIpRanges: + x-vcloud-added-in: "33.0" + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + GatewayUsedIpAddresses: + x-vcloud-added-in: "33.0" + description: | + List of IP addresses used by an edge gateway. + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: './networking/edgeGateways.yaml#/definitions/GatewayUsedIpAddress' + + GatewayUsedIpAddress: + x-vcloud-added-in: "33.0" + description: | + Describes an IP address currently be used by the edge gateway. The IP belongs to the IPs allocated to the edge. + type: object + properties: + networkRef: + $ref: '#/definitions/EntityReference' + description: The external network that this IP Address belongs to. + ipAddress: + type: string + description: The IP address in used. + category: + type: string + description: The catagory that an IP can be used for. + $ref: '#/definitions/GatewayUsedIpAddressCategory' + x-vcloud-property-annotations: + networkRef: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + ipAddress: + x-vcloud-constraints: + - constraint: ReadOnly + category: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSortable + + GatewayUsedIpAddressCategory: + x-vcloud-added-in: "33.0" + description: | + The categories that an IP can be used for. + type: object + enum: + - SNAT + - DNAT + - Load_Balancer + - IPsec_VPN + - SSL_VPN + - L2_VPN + - PRIMARY_IP + + EntityReference: + $ref: "./common/entity.yaml#/definitions/EntityReference" diff --git a/schemas/openapi/src/main/resources/schemas/networking/externalNetworks.yaml b/schemas/openapi/src/main/resources/schemas/networking/externalNetworks.yaml new file mode 100644 index 00000000..83421af6 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/networking/externalNetworks.yaml @@ -0,0 +1,486 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2018-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + API for management of external networks. An external network provides the + interface to the Internet for virtual machines connected to external + organization vDC networks. + version: "1.0" + title: External Networks API + +paths: + + externalNetworks: + get: + x-vcloud-added-in: "32.0" + x-vcloud-multisite: true + tags: + - externalNetworks + summary: Get all external networks. + description: | + Get all external networks. Results can be filtered by id, name, + backing type (networkBackings.values.backingType) and context (_context). + Supported contexts are: + Provider vDC ID (_context==providerVdcId) - | + Returns all the external networks which are available to a specific Provider vDC. + Org vDC ID (_context==orgVdcId) - | + Returns all the external networks which are available to a specific Org vDC. + vCenter ID And Resource Pool Moref (_context==vCenterId;_context==rpMoref) - | + Returns all the external networks accessible to a given vCenter resource pool. + Org vDC ID And Edge Deployment Mode (_context==orgVdcId;_context==anEdgeDeploymentMode) - | + Returns all the external networks to which an edge gateway can connect. Edge Deployment Mode can be + 'standaloneEdgeDeployment' or 'haEdgeDeployment'. Deployment mode specifies whether to use both primary + edge cluster and secondary edge cluster or just primary edge cluster to determine external network accessibility. + Edge clusters are determined via vDC Network Profile for input Org vDC. + Org vDC ID And Dedicatable External Networks (_context==orgVdcId;_context==dedicatable) - | + Dedicatable only shows external networks that have no connected Edge Gateways. + operationId: getAllExternalNetworks + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/ExternalNetworks' + + post: + x-vcloud-added-in: "32.0" + tags: + - externalNetwork + summary: Create an external network + operationId: createExternalNetwork + consumes: + - application/json + parameters: + - name: externalNetwork + in: body + required: true + schema: + $ref: '#/definitions/ExternalNetwork' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + + externalNetwork: + parameters: + - name: externalNetworkId + in: path + required: true + type: string + + get: + x-vcloud-added-in: "32.0" + tags: + - externalNetwork + summary: Retrieves a specific external network. + operationId: getExternalNetwork + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/ExternalNetwork' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + put: + x-vcloud-added-in: "33.0" + tags: + - externalNetwork + summary: Updates a specific external network. + operationId: updateExternalNetwork + consumes: + - application/json + parameters: + - name: externalNetwork + in: body + required: true + schema: + $ref: '#/definitions/ExternalNetwork' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + delete: + x-vcloud-added-in: "32.0" + tags: + - externalNetwork + summary: Deletes a specific external network. + operationId: deleteExternalNetwork + parameters: + - $ref: "./common/delete.yaml#/parameters/forceDelete" + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + usedIpAddresses: + parameters: + - name: externalNetworkId + in: path + required: true + type: string + + get: + x-vcloud-added-in: "33.0" + tags: + - externalNetwork + summary: Retrieve the list of IP addresses which are being used from the network. + description: | + Get all the used IPs for a given external network. This returns all the IP addresses of network + which are being used by a vApp VM or by an edge gateway connected to this external network. + Results can be filtered by IP address. + operationId: getUsedIpAddresses + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/UsedIpAddresses' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + availableIpAddresses: + parameters: + - name: externalNetworkId + in: path + required: true + type: string + + get: + x-vcloud-added-in: "33.0" + tags: + - externalNetwork + summary: Retrieve the list of IP addresses available for use on the network. + description: | + Get all the available IPs for a given external network. + operationId: getAvailableIpAddresses + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/AvailableIpPoolSubnets' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + +definitions: + + ExternalNetworks: + x-vcloud-added-in: "32.0" + description: | + List of External Networks + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: '#/definitions/ExternalNetwork' + + ExternalNetwork: + x-vcloud-added-in: "32.0" + description: | + An external network. + allOf: + - $ref: './networking/commonObject.yaml#/definitions/Network' + - $ref: './networking/commonObject.yaml#/definitions/NetworkingObjectStatus' + - type: object + properties: + networkBackings: + $ref: './networking/externalNetworks.yaml#/definitions/ExternalNetworkBackings' + description: | + Backings for this external network. Describes if this external network + is backed by port groups, vCenter standard switch or an NSX-T Tier-0 router. + totalIpCount: + type: integer + description: The number of IP addresses defined by the static ip pools. If the network contains any IpV6 subnets, the total ip count will be null. + usedIpCount: + type: integer + description: The number of IP address used from the static ip pools. + dedicatedOrg: + $ref: '#/definitions/EntityReference' + description: The Organization that this external network is dedicated to. This is null if this is not a dedicated external network. + dedicatedEdgeGateway: + $ref: '#/definitions/EntityReference' + description: The Edge Gateway that this external network is dedicated to. This is null if this is not a dedicated external network. + x-vcloud-property-annotations: + networkBackings: + x-vcloud-constraints: + - constraint: NonSortable + totalIpCount: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + usedIpCount: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + dedicatedOrg: + x-vcloud-added-in: "34.0" + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSortable + dedicatedEdgeGateway: + x-vcloud-added-in: "34.0" + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSortable + + ExternalNetworkBackingType: + x-vcloud-added-in: "32.0" + x-vcloud-deprecated-in: "34.0" + description: | + The type of the external network backing. + type: object + enum: + - PORTGROUP + - DV_PORTGROUP + - NSXT_TIER0 + - UNKNOWN + + ExternalNetworkBackings: + x-vcloud-added-in: "32.0" + description: | + List of External Network backings. + type: object + properties: + values: + type: array + items: + $ref: '#/definitions/ExternalNetworkBacking' + + ExternalNetworkBacking: + x-vcloud-added-in: "32.0" + description: | + Information about an external network backing. + type: object + properties: + backingId: + type: string + description: Unique identifier for the network backing in NSX/vCenter. + backingType: + $ref: '#/definitions/ExternalNetworkBackingType' + description: + Type of network backing. This is deprecated in favor of string based enums going forward. + backingTypeValue: + type: string + description: | + Backing type for the network. +
        +
      • PORTGROUP
      • +
      • DV_PORTGROUP
      • +
      • NSXT_TIER0
      • +
      • NSXT_VRF_TIER0
      • +
      • IMPORTED_T_LOGICAL_SWITCH
      • +
      • UNKNOWN
      • +
      + networkProvider: + $ref: '#/definitions/EntityReference' + description: The Network Provider for the backing, either a vCenter Server or NSX-T Manager. + name: + type: string + description: The name of this external network backing, if it exists. + parentTier0Ref: + $ref: '#/definitions/ExtObjectReference' + description: If this external network is backed by a NSX-T VRF-Lite Tier0, then this field is set to be the parent Tier0 Router. Otherwise, field is unset. + x-vcloud-property-annotations: + backingType: + x-vcloud-deprecated-in: "34.0" + x-vcloud-deprecated-alternative: backingTypeValue + backingTypeValue: + x-vcloud-added-in: "35.0" + name: + x-vcloud-added-in: "33.0" + parentTier0Ref: + x-vcloud-added-in: "35.0" + + + AvailableIpPoolSubnets: + x-vcloud-added-in: "33.0" + description: | + List of available IP addresses. + type: object + properties: + values: + type: array + items: + $ref: '#/definitions/AvailableIpPoolSubnet' + + AvailableIpPoolSubnet: + x-vcloud-added-in: "33.0" + description: | + Describes an available IP address. + type: object + properties: + gateway: + type: string + description: The gateway for the subnet on which IPs are available. + prefixLength: + type: integer + description: The netmask prefix length of the subnet. + enabled: + type: boolean + description: Indicates whether the network subnet is currently enabled. + default: false + ipRanges: + $ref: '#/definitions/IpRanges' + description: Range of IPs which are available for use. + totalIpCount: + type: integer + description: The total number of available IP addresses. + x-vcloud-property-annotations: + gateway: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + prefixLength: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + enabled: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + ipRanges: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + totalIpCount: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + + IpRanges: + $ref: "./networking/commonObject.yaml#/definitions/IpRanges" + + UsedIpAddress: + x-vcloud-added-in: "33.0" + description: | + Describes a used IP address for a network. + type: object + properties: + entityId: + type: string + description: Id of the entity using the IP address, such as a VM. + entityName: + type: string + description: Name of the entity using the IP address. + vAppName: + type: string + description: Name of the vApp whose VM is using this IP address. + ipAddress: + type: string + description: The IP address in use. + deployed: + type: boolean + description: Whether the entity using this IP address is currently deployed. + allocationType: + $ref: '#/definitions/UsedIpAddressAllocationType' + description: The possible allocation types for network address like VSM allocated, VM allocated or NAT routed. + networkRef: + $ref: "#/definitions/EntityReference" + description: | + The vApp network or Org vDC network to which this entity is connected. + orgRef: + $ref: "#/definitions/EntityReference" + description: | + The organization that this entity belongs to. + x-vcloud-property-annotations: + entityId: + x-vcloud-constraints: + - constraint: Urn + args: + - arg: gateway + - arg: vm + - constraint: NonSearchable + - constraint: NonSortable + entityName: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + vAppName: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + deployed: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + allocationType: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + networkRef: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + orgRef: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + UsedIpAddressAllocationType: + x-vcloud-added-in: "33.0" + description: | + The possible allocation types for allocated network IP address. + VM_ALLOCATED means that the IP address is used by a VM, + EDGE means that the IP address is in use by an NSX edge gateway interface. + type: object + enum: + - VM_ALLOCATED + - EDGE + + UsedIpAddresses: + x-vcloud-added-in: "33.0" + description: | + List of used IP addresses. + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: './networking/externalNetworks.yaml#/definitions/UsedIpAddress' + + EntityReference: + $ref: './common/entity.yaml#/definitions/EntityReference' + + ExtObjectReference: + $ref: './networking/commonObject.yaml#/definitions/ExtObjectReference' diff --git a/schemas/openapi/src/main/resources/schemas/networking/firewallGroupCandidates.yaml b/schemas/openapi/src/main/resources/schemas/networking/firewallGroupCandidates.yaml new file mode 100644 index 00000000..e00c1ac3 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/networking/firewallGroupCandidates.yaml @@ -0,0 +1,136 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2019-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + An API for getting the list of candidates for the firewall group members. + Member candidates can be other groups, virtual machines, or organization vDC networks. + version: "1.0" + title: Firewall Group Members + +paths: + + groups: + get: + x-vcloud-added-in: "33.0" + tags: + - firewallGroupCandidates + summary: Retrieves all groups that can be members of another group. + description: | + Retrieves all group candidates that can be members of another group. + The context is the id of the organization vDC, whose groups can be used for creating other groups. + operationId: getFirewallGroups + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/GroupMembers' + + vms: + get: + x-vcloud-added-in: "33.0" + tags: + - firewallGroupCandidates + summary: Retrieves all virtual machine candidates that can be members of a firewall group. + description: | + Retrieves all virtual machine candidates that can be members of a firewall group. + The "_context" filter key must be set to the id of the organization vDC for which candidates we want to retrieve. + operationId: getVirtualMachines + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/VdcBackedGroupMembers' + + networks: + get: + x-vcloud-added-in: "33.0" + tags: + - firewallGroupCandidates + summary: Retrieves all organization vDC network candidates that can be members of a firewall group. + description: | + Retrieves all organization vDC network candidates that can be members of a firewall group. + The "_context" filter key must be set to the id of the organization vDC for which candidates we want to retrieve. + operationId: getOrgVdcNetworks + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/VdcBackedGroupMembers' + +definitions: + + VdcBackedGroupMember: + x-vcloud-added-in: "33.0" + description: | + A member of a firewall group. The member belongs to an organization vDC. + allOf: + - $ref: "./common/entity.yaml#/definitions/EntityReference" + - type: object + properties: + vdcRef: + description: The organization vDC that the member belongs to. + $ref: "#/definitions/EntityReference" + x-vcloud-property-annotations: + vdcRef: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + GroupMembers: + x-vcloud-added-in: "33.0" + description: | + List of members of a group. + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: "#/definitions/EntityReference" + + VdcBackedGroupMembers: + x-vcloud-added-in: "33.0" + description: | + List of members of a group. Each member belongs to a organization vDC. + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: './networking/firewallGroupCandidates.yaml#/definitions/VdcBackedGroupMember' + + EntityReference: + $ref: "./common/entity.yaml#/definitions/EntityReference" + diff --git a/schemas/openapi/src/main/resources/schemas/networking/firewallGroups.yaml b/schemas/openapi/src/main/resources/schemas/networking/firewallGroups.yaml new file mode 100644 index 00000000..b35f76b1 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/networking/firewallGroups.yaml @@ -0,0 +1,473 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2019-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The Firewall Group API allows for management of an Edge or vDC Group's Firewall Groups. + Firewall Groups are a grouping construct currently used for firewall rules. + A firewall group can contain a list of ip addresses, list of Org vDC networks, or list of VM criteria. + version: "1.0" + title: vDC Firewall Group API + +paths: + + firewallGroupSummaries: + get: + x-vcloud-added-in: "33.0" + tags: + - firewallGroups + summary: Retrieves the Firewall Groups. + description: | + Get all firewall groups. Results can be filtered by name and context (_context). + Supported contexts are: +
        +
      • Org Vdc Network ID (_context==networkId) - + Returns all the firewall groups which the specified network is a member of. +
      • Edge Gateway ID (_context==edgeGatewayId) - + Returns all the firewall groups which are available to the specific edge gateway. +
      • Network Provider ID (_context==networkProviderId) - + Returns all the firewall groups which are available under a specific network provider. This context requires system admin privilege. +
      + operationId: getFirewallGroups + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/FirewallGroups' + + firewallGroups: + post: + x-vcloud-added-in: "33.0" + tags: + - firewallGroups + summary: Create a firewall group + description: | + Create a firewall group. + operationId: createFirewallGroup + consumes: + - application/json + parameters: + - name: firewallGroup + in: body + required: true + schema: + $ref: '#/definitions/FirewallGroupDetails' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + + firewallGroup: + parameters: + - name: firewallGroupId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: firewallGroup + + get: + x-vcloud-added-in: "33.0" + tags: + - firewallGroup + summary: Retrieves a specific firewall group. + operationId: getFirewallGroup + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/FirewallGroupDetails' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + put: + x-vcloud-added-in: "33.0" + tags: + - firewallGroup + summary: Updates the Firewall Group. + operationId: updateFirewallGroup + consumes: + - application/json + parameters: + - name: firewallGroup + in: body + required: true + schema: + $ref: '#/definitions/FirewallGroupDetails' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + + delete: + x-vcloud-added-in: "33.0" + tags: + - firewallGroup + summary: Deletes a Firewall Group. + operationId: deleteFirewallGroup + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + + firewallGroupAssociatedVMs: + parameters: + - name: firewallGroupId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: firewallGroup + + get: + x-vcloud-added-in: "34.0" + tags: + - firewallGroup + summary: Retrieves associated VMs for a specific firewall group. + description: | + Get all associated VMs for a specific firewall group. Associated VM members + can only be obtained for firewall groups with typeValue STATIC_MEMBERS or VM_CRITERIA. + operationId: getFirewallGroupAssociatedVMs + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/FirewallGroupAssociatedVMs' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + +definitions: + + FirewallGroups: + x-vcloud-added-in: "33.0" + description: | + List of Firewall Groups + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: '#/definitions/FirewallGroupSummary' + + FirewallGroupSummary: + x-vcloud-added-in: "33.0" + description: | + A Firewall Group object. + type: object + allOf: + - $ref: "./networking/firewallGroups.yaml#/definitions/FirewallGroupScope" + - $ref: './networking/commonObject.yaml#/definitions/NetworkingObjectStatus' + - type: object + properties: + id: + type: string + description: The id of the firewall group. + name: + type: string + description: The name of the firewall group. + description: + type: string + description: The description of the firewall group + type: + $ref: "./networking/firewallGroups.yaml#/definitions/FirewallGroupType" + description: | + Defines the type of Firewall Group which determines what can be members of this group such as IP Addresses, Org vDC networks, or VMs based on dynamic + criteria. This property is now deprecated and replaced with typeValue. + typeValue: + x-vcloud-added-in: "35.2" + type: string + description: | + Defines the type of Firewall Group which determines what can be members of this group such as IP Addresses, Org vDC networks, or VMs based on dynamic + criteria. Below are valid values. +
        +
      • IP_SET should be used when using particular IP Addresses of VMs, Networks, etc. +
      • STATIC_MEMBERS should be used when specifying exact members such as a particular Org vDC Network. +
      • VM_CRITERIA should be used when specifying some dynamic criteria that matches a VM member such as VM name or Operating System name. + This type is valid only if the firewall group is scoped to a vDC Group. +
      + The default is IP_SET. + required: + - name + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: Urn + args: + - arg: firewallGroup + - constraint: NonSortable + - constraint: ReadOnly + description: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + type: + x-vcloud-added-in: "34.0" + x-vcloud-deprecated-in: "35.2" + x-vcloud-deprecated-alternative: typeValue + typeValue: + x-vcloud-added-in: "35.2" + + FirewallGroupDetails: + x-vcloud-added-in: "33.0" + description: | + A Firewall Group object. + allOf: + - $ref: "./networking/firewallGroups.yaml#/definitions/FirewallGroupSummary" + - type: object + properties: + ipAddresses: + type: array + description: | + IP Addresses included in the group. This is only applicable for IP_SET Firewall Groups. This can support IPv4 and IPv6 addresses in single, range, and CIDR formats. + items: + type: string + members: + type: array + description: | + The list of static member entities such as Org vDC Networks to be used. This is only applicable for SECURITY_GROUP/STATIC_MEMBERS Firewall Groups. + The objects used must be scoped to the particular Edge Gateway / vDC Group specified. + items: + $ref: '#/definitions/EntityReference' + vmCriteria: + type: array + description: | + The list of dynamic criteria that determines whether a VM belongs to a firewall group. A VM needs to meet at least one criteria to belong to the + firewall group. In other words, the logical AND is used for rules within a single criteria and the logical OR is used in between each criteria. + This is only applicable for VM_CRITERIA Firewall Groups. + maxItems: 3 + items: + $ref: "./networking/firewallGroups.yaml#/definitions/VmCriteria" + + x-vcloud-property-annotations: + ipAddresses: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + members: + x-vcloud-added-in: "34.0" + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + vmCriteria: + x-vcloud-added-in: "36.0" + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + EntityReference: + $ref: "./common/entity.yaml#/definitions/EntityReference" + + FirewallGroupType: + x-vcloud-added-in: "34.0" + x-vcloud-deprecated-in: "36.0" + type: object + description: | + Defines the type of Firewall Group. These groups can be used in Firewall Rules to define rules that are scoped to the IP Addresses/Members + defined in a Firewall Group. +
        +
      • IP_SET should be used when using particular IP Addresses of VMs, Networks, etc. +
      • SECURITY_GROUP should be used when specifying exact members such as a particular Org vDC Network. +
      + The default is IP_SET. + enum: + - IP_SET + - SECURITY_GROUP + + FirewallGroupScope: + description: + Describes the scope and relationship that this firewall group has with other VCD entities. + type: object + properties: + orgRef: + $ref: "#/definitions/EntityReference" + description: | + The organization that this firewall group belongs to. This property is read-only and cannot be updated. + edgeGatewayRef: + $ref: "#/definitions/EntityReference" + description: | + The edge gateway that this firewall group is scoped to. This means that this firewall group can be used when configuring firewall rules for the edge gateway. + This property is now deprecated. ownerRef should be used instead + ownerRef: + $ref: "#/definitions/EntityReference" + description: | + The vDC Group or Edge Gateway that this firewall group is scoped to. This group can be used for configuring rules for either an Edge Gateway or vDC Group. + If an Edge Gateway is specified that belongs to a vDC Group, the the firewall group will be scoped to the vDC Group. + networkProviderScope: + type: string + description: | + The network provider scope that this object belongs to. This is a read-only property and is determined by the input context entity ID during object creation. + x-vcloud-property-annotations: + orgRef: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + edgeGatewayRef: + x-vcloud-deprecated-in: "35.0" + x-vcloud-deprecated-alternative: ownerRef + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + ownerRef: + x-vcloud-added-in: "35.0" + x-vcloud-constraints: + - constraint: NonSortable + contextEntityId: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + networkProviderScope: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + FirewallGroupAssociatedVMs: + x-vcloud-added-in: "34.0" + description: | + List of associated VMs for firewall group + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: './networking/firewallGroups.yaml#/definitions/FirewallGroupAssociatedVM' + + FirewallGroupAssociatedVM: + x-vcloud-added-in: "34.0" + description: + Represents an associated virtual machine. Contains the VM name and parent vApp name. + type: object + properties: + vmRef: + $ref: '#/definitions/EntityReference' + description: | + Reference to the vm associated with this firewall group. + vappRef: + $ref: '#/definitions/EntityReference' + description: | + Reference to the vApp of the associated vm. + vdcRef: + $ref: '#/definitions/EntityReference' + description: | + Reference to the vDC of the associated vm. + orgRef: + $ref: '#/definitions/EntityReference' + description: | + Reference to the organization of the associated vm. + x-vcloud-property-annotations: + vmRef: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + vappRef: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + vdcRef: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + orgRef: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + VmCriteriaRule: + x-vcloud-added-in: "36.0" + description: + A criteria rule that contains specific attributes that a VM can match with. + type: object + properties: + attributeType: + type: string + description: | + The attribute type of a VM used for VM matching. Below are supported types: +
        +
      • VM_TAG - Match the VM based on the tags associated with that VM. +
      • VM_NAME - Match the VM based on the name of the VM. Only CONTAINS and STARTS_WITH operators are supported for this type. +
      + attributeValue: + type: string + description: | + The attribute value that is used to determine if a VM's attribute value matches the rule. + Example: if the attribute type is VM_NAME, user should set this value to the name of the VM to match with. + operator: + type: string + description: | + The operator to perform to determine whether the rule's attribute value matches a VM's attribute value. Example: if the attribute type is VM_NAME, + user can set this operator to determine whether a VM's name must be an exact match or starts with that name. + Below are supported types: +
        +
      • EQUALS - Match occurs if the VM's attribute value is exactly the same as the rule's attribute value. +
      • CONTAINS - Match occurs if the VM's attribute value is contains the rule's attribute value. +
      • STARTS_WITH - Match occurs if the VM's attribute value starts with the rule's attribute value. +
      • ENDS_WITH - Match occurs if the VM's attribute value ends with the rule's attribute value. +
      + required: + - attributeType + - attributeValue + - operator + x-vcloud-property-annotations: + attributeType: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + attributeValue: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + operator: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + VmCriteria: + x-vcloud-added-in: "36.0" + description: + List of rules that a VM must all match for the criteria to be true (VM is part of the firewall group). + type: object + properties: + rules: + type: array + description: List of rules that a VM must all match for the criteria to be true (VM is part of the firewall group). + minItems: 1 + maxItems: 4 + items: + $ref: "#/definitions/VmCriteriaRule" + x-vcloud-property-annotations: + rules: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + diff --git a/schemas/openapi/src/main/resources/schemas/networking/loadBalancerClouds.yaml b/schemas/openapi/src/main/resources/schemas/networking/loadBalancerClouds.yaml new file mode 100644 index 00000000..0f6447a0 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/networking/loadBalancerClouds.yaml @@ -0,0 +1,258 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2020-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The Load Balancer Cloud API allows for CRUD operations for Load Balancer Clouds + title: Load Balancer Cloud API + version: "1.0" + +paths: + + loadBalancerClouds: + post: + x-vcloud-added-in: "35.0" + tags: + - loadBalancerClouds + summary: Register a new Load Balancer Cloud. + description: | + Register a new Load Balancer Cloud to be used with vCloud Director. + If the Load Balancer Cloud is backed by NSXALB, DHCP on the NSXALB Cloud is required. vCloud Director will enable DHCP on the NSXALB Cloud if needed. + operationId: registerLoadBalancerCloud + consumes: + - application/json + parameters: + - name: loadBalancerCloud + in: body + required: true + schema: + $ref: '#/definitions/LoadBalancerCloud' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + + get: + x-vcloud-added-in: "35.0" + x-vcloud-multisite: true + x-vcloud-default-sort: + default-sort-field: name + sort-ascending: true + tags: + - loadBalancerClouds + summary: Get all registered Load Balancer Clouds in the system. + description: | + Retrieves all registered Load Balancer Clouds. + operationId: getLoadBalancerClouds + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/LoadBalancerClouds' + + loadBalancerCloud: + parameters: + - name: loadBalancerCloudId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: loadBalancerCloud + + get: + x-vcloud-added-in: "35.0" + tags: + - loadBalancerCloud + summary: Get Load Balancer Cloud. + description: | + Retrieves a specific Load Balancer Cloud. + operationId: getLoadBalancerCloud + produces: + - application/json + responses: + 200: + schema: + $ref: "#/definitions/LoadBalancerCloud" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + put: + x-vcloud-added-in: "36.0" + tags: + - loadBalancerCloud + summary: Update specified Load Balancer Cloud. + description: | + Update an Load Balancer Cloud. + operationId: updateLoadBalancerCloud + consumes: + - application/json + parameters: + - name: loadBalancerCloud + in: body + required: true + schema: + $ref: "#/definitions/LoadBalancerCloud" + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + + delete: + x-vcloud-added-in: "35.0" + tags: + - loadBalancerCloud + summary: Unregister the specified Load Balancer Cloud. + description: | + Unregister an Load Balancer Cloud. + operationId: unregisterLoadBalancerCloud + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + +definitions: + LoadBalancerClouds: + x-vcloud-added-in: "35.0" + description: | + List of Load Balancer Clouds. + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: '#/definitions/LoadBalancerCloud' + + LoadBalancerCloud: + x-vcloud-added-in: "35.0" + description: | + A Load Balancer Cloud. + allOf: + - $ref: './networking/commonObject.yaml#/definitions/NetworkingObjectStatus' + - type: object + properties: + id: + type: string + description: The identifier of the registered Load Balancer Cloud in URN format + example: urn:vcloud:loadBalancerCloud:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + name: + type: string + description: | + The name of the Load Balancer Cloud. + description: + type: string + description: Description for the registered Load Balancer Cloud. + loadBalancerCloudBacking: + $ref: './networking/loadBalancerClouds.yaml#/definitions/LoadBalancerCloudBacking' + description: | + The backing that uniquely identifies + a Load Balancer Cloud configured within a Load Balancer Controller. At the present, VCD only + supports NSX-T Clouds configured within an NSX-ALB Controller deployment. This is not updatable once it's created. + networkPoolRef: + $ref: '#/definitions/EntityReference' + description: The Network Pool associated with this Cloud + healthStatus: + type: string + description: | + The current health status of the Load Balancer Cloud. Possible values are: +
        +
      • UP - The cloud is healthy and ready to enable Load Balancer for an Edge Gateway. +
      • DOWN - The cloud is in a failure state. Enabling Load balancer on an Edge Gateway may not be possible. +
      • RUNNING - The cloud is currently processing. An example is if it's enabling a Load Balancer for an Edge Gateway. +
      • UNAVAILABLE - The cloud is unavailable. +
      • UNKNOWN - The cloud state is unknown. +
      + detailedHealthMessage: + type: string + description: The non-localized detailed message on the health of the Cloud. + required: + - name + - loadBalancerCloudBacking + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: NonSortable + - constraint: ReadOnly + - constraint: Urn + args: + - arg: loadBalancerCloud + description: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + loadBalancerCloudBacking: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + networkPoolRef: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + - constraint: ReadOnly + healthStatus: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + detailedHealthMessage: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + status: + x-vcloud-added-in: "35.0" + x-vcloud-constraints: + - constraint: ReadOnly + + LoadBalancerCloudBacking: + x-vcloud-added-in: "35.0" + description: | + A Load Balancer Cloud Backing. + type: object + properties: + backingId: + type: string + description: The unique identifier of the Load Balancer Cloud. + example: NSX-ALB Clouds are identified with the following format 'cloud-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' + backingType: + type: string + description: The type of Load Balancer Cloud. Valid values are NSXALB_NSXT. + default: "NSXALB_NSXT" + loadBalancerControllerRef: + $ref: '#/definitions/EntityReference' + description: The managing Load Balancer Controller. + required: + - backingId + - loadBalancerControllerRef + x-vcloud-property-annotations: + backingId: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + backingType: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + loadBalancerControllerRef: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + EntityReference: + $ref: "./common/entity.yaml#/definitions/EntityReference" diff --git a/schemas/openapi/src/main/resources/schemas/networking/loadBalancerControllers.yaml b/schemas/openapi/src/main/resources/schemas/networking/loadBalancerControllers.yaml new file mode 100644 index 00000000..98a6566b --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/networking/loadBalancerControllers.yaml @@ -0,0 +1,213 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2020-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The Load Balancer Controllers API allows for CRUD operations for Load Balancer Controllers + title: Load Balancer Controllers API + version: "1.0" + +paths: + + loadBalancerControllers: + post: + x-vcloud-added-in: "35.0" + x-vcloud-default-sort: + default-sort-field: name + sort-ascending: true + tags: + - loadBalancerControllers + summary: Register a new Load Balancer Controller + description: | + Register a new Load Balancer Controller to be used with vCloud Director. + operationId: registerLoadBalancerController + consumes: + - application/json + parameters: + - name: loadBalancerController + in: body + required: true + schema: + $ref: '#/definitions/LoadBalancerController' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + + get: + x-vcloud-added-in: "35.0" + x-vcloud-multisite: true + tags: + - loadBalancerControllers + summary: Get all registered Load Balancer Controllers in the system. + description: | + Retrieves all registered Load Balancer Controllers. + operationId: getLoadBalancerControllers + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/LoadBalancerControllers' + + + loadBalancerController: + parameters: + - name: loadBalancerControllerId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: loadBalancerController + + get: + x-vcloud-added-in: "35.0" + tags: + - loadBalancerController + summary: Get Load Balancer Controller + description: | + Retrieves a specific Load Balancer Controller. + operationId: getLoadBalancerController + produces: + - application/json + responses: + 200: + schema: + $ref: "#/definitions/LoadBalancerController" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + put: + x-vcloud-added-in: "35.0" + tags: + - loadBalancerController + summary: Update specified Load Balancer Controller + description: | + Update an Load Balancer Controller. + operationId: updateLoadBalancerController + consumes: + - application/json + parameters: + - name: loadBalancerController + in: body + required: true + schema: + $ref: "#/definitions/LoadBalancerController" + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + + delete: + x-vcloud-added-in: "35.0" + tags: + - loadBalancerController + summary: Unregister the specified Load Balancer Controller. + description: | + Unregister an Load Balancer Controller. + operationId: unregisterLoadBalancerController + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + +definitions: + LoadBalancerControllers: + x-vcloud-added-in: "35.0" + description: | + List of Load Balancer Controllers. + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: '#/definitions/LoadBalancerController' + + LoadBalancerController: + x-vcloud-added-in: "35.0" + description: | + A Load Balancer Controller. + type: object + properties: + id: + type: string + description: The id of the Load Balancer Controller in URN format. + example: urn:vcloud:loadBalancerController:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + name: + type: string + description: The name of the Load Balancer Controller. Names for Load Balancer Controllers must be unique across the system. + description: + type: string + description: Description for the registered Load Balancer Controller. + url: + type: string + description: The URL of the Load Balancer Controller. URLs for Load Balancer Controllers must be unique across the system. + format: uri + example: https://loadBalancerController.vmware.com + username: + type: string + description: Username to connect to the Load Balancer Controller. + password: + type: string + description: Cleartext password to connect to the Load Balancer Controller. + licenseType: + type: string + description: | + The license type of the Load Balancer Controller. +
        +
      • BASIC - Basic edition of the NSX Advanced Load Balancer. +
      • ENTERPRISE - Full featured edition of the NSX Advanced Load Balancer. +
      + default: "BASIC" + version: + type: string + description: The version of the load balancer controller. + required: + - name + - url + - username + - password + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: NonSortable + - constraint: ReadOnly + - constraint: Urn + args: + - arg: loadBalancerController + description: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + url: + x-vcloud-constraints: + - constraint: NonSortable + username: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + password: + x-vcloud-password: true + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + version: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSortable diff --git a/schemas/openapi/src/main/resources/schemas/networking/loadBalancerServiceEngineGroups.yaml b/schemas/openapi/src/main/resources/schemas/networking/loadBalancerServiceEngineGroups.yaml new file mode 100644 index 00000000..af49f080 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/networking/loadBalancerServiceEngineGroups.yaml @@ -0,0 +1,496 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2020-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The Load Balancer Service Engine Groups API allows for CRUD operations for Load Balancer Service Engine Groups. + Load Balancer Service Engine Groups define the compute resources available for deploying load balancers. + title: Load Balancer Service Engine Groups API + version: "1.0" + +paths: + + loadBalancerServiceEngineGroups: + post: + x-vcloud-added-in: "35.0" + tags: + - loadBalancerServiceEngineGroups + summary: Create a new Load Balancer Service Engine Group. + description: | + Create a new Load Balancer Service Engine Group to be used with VMware Cloud Director. + operationId: createServiceEngineGroup + consumes: + - application/json + parameters: + - name: loadBalancerServiceEngineGroup + in: body + required: true + schema: + $ref: '#/definitions/LoadBalancerServiceEngineGroup' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + + get: + x-vcloud-added-in: "35.0" + x-vcloud-multisite: true + x-vcloud-default-sort: + default-sort-field: name + sort-ascending: true + tags: + - loadBalancerServiceEngineGroups + summary: Get all Load Balancer Service Engine Groups in the system. + description: | + Retrieves all Load Balancer Service Engine Groups. + Supported contexts are: + Gateway ID (_context==gatewayId) - | + Returns all Load Balancer Service Engine Groups that are accessible to the gateway. + Assignable Gateway ID (_context=gatewayId;_context==assignable) - | + Returns all Load Balancer Service Engine Groups that are assignable to the gateway. + This filters out any Load Balancer Service Engine groups that are already assigned to the gateway or + assigned to another gateway if the reservation type is 'DEDICATED'. + operationId: getServiceEngineGroups + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/LoadBalancerServiceEngineGroups' + + + loadBalancerServiceEngineGroup: + parameters: + - name: loadBalancerServiceEngineGroupId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: serviceEngineGroup + + get: + x-vcloud-added-in: "35.0" + tags: + - loadBalancerServiceEngineGroup + summary: Get Load Balancer Service Engine Group. + description: | + Retrieves a specific Load Balancer Service Engine Group. + operationId: getServiceEngineGroup + produces: + - application/json + responses: + 200: + schema: + $ref: "#/definitions/LoadBalancerServiceEngineGroup" + + put: + x-vcloud-added-in: "35.0" + tags: + - loadBalancerServiceEngineGroup + summary: Update specified Load Balancer Service Engine Group. + description: | + Update a Load Balancer Service Engine Group. + operationId: updateServiceEngineGroup + consumes: + - application/json + parameters: + - name: loadBalancerServiceEngineGroup + in: body + required: true + schema: + $ref: "#/definitions/LoadBalancerServiceEngineGroup" + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + + delete: + x-vcloud-added-in: "35.0" + tags: + - loadBalancerServiceEngineGroup + summary: Delete the specified Load Balancer Service Engine Group. + description: | + Delete a Load Balancer Service Engine Group. + operationId: deleteServiceEngineGroup + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + + loadBalancerServiceEngineGroupSync: + parameters: + - name: loadBalancerServiceEngineGroupId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: serviceEngineGroup + + post: + x-vcloud-added-in: "35.0" + tags: + - loadBalancerServiceEngineGroup + summary: Sync Load Balancer Service Engine Group. + description: | + Syncs a specified Load Balancer Service Engine Group. Requests the HA mode and the maximum number of supported + Virtual Services for this Service Engine Group from the Load Balancer, and updates vCD's local record of these + properties. + operationId: syncServiceEngineGroup + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + + assignments: + post: + x-vcloud-added-in: "35.0" + tags: + - loadBalancerServiceEngineGroupAssignments + summary: Create a new Load Balancer Service Engine Group Assignment. + description: | + Create a new Load Balancer Service Engine Group Assignment. The assignment links a Load Balancer Service Engine Group + with an Edge Gateway to provide load balancing resources to the Edge Gateway. + operationId: createServiceEngineGroupAssignment + consumes: + - application/json + parameters: + - name: assignment + in: body + required: true + schema: + $ref: '#/definitions/LoadBalancerServiceEngineGroupAssignment' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + + get: + x-vcloud-added-in: "35.0" + tags: + - loadBalancerServiceEngineGroupAssignments + summary: Get the assignments for a Load Balancer Service Engine Group. + description: | + Retrieves the service engine group assignments for the Load Balancer Service Engine Group. + operationId: getServiceEngineGroupAssignments + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + schema: + $ref: "#/definitions/LoadBalancerServiceEngineGroupAssignments" + + assignment: + parameters: + - name: assignmentId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: serviceEngineGroupAssignment + get: + x-vcloud-added-in: "35.0" + tags: + - loadBalancerServiceEngineGroupAssignment + summary: Get a Load Balancer Service Engine Group Assignment. + description: | + Retrieves a specific Load Balancer Service Engine Group Assignment. + operationId: getServiceEngineGroupAssignment + produces: + - application/json + responses: + 200: + schema: + $ref: "#/definitions/LoadBalancerServiceEngineGroupAssignment" + + put: + x-vcloud-added-in: "35.0" + tags: + - loadBalancerServiceEngineGroupAssignment + summary: Update a Load Balancer Service Engine Group Assignment. + description: | + Update a Load Balancer Service Engine Group Assignment. + Updates are not allowed if the associated Load Balancer Service Engine Group has reservation type 'DEDICATED'. + operationId: updateServiceEngineGroupAssignment + consumes: + - application/json + parameters: + - name: assignment + in: body + required: true + schema: + $ref: "#/definitions/LoadBalancerServiceEngineGroupAssignment" + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + + delete: + x-vcloud-added-in: "35.0" + tags: + - loadBalancerServiceEngineGroupAssignment + summary: Delete the specified Load Balancer Service Engine Group Assignment. + description: | + Delete a Load Balancer Service Engine Group Assignment. The Edge Gateway will no longer be able to use + the Load Balancer Service Engine Group for load balancing resources. + operationId: deleteServiceEngineGroupAssignment + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + + +definitions: + LoadBalancerServiceEngineGroups: + x-vcloud-added-in: "35.0" + description: | + List of Load Balancer Service Engine Groups. + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: '#/definitions/LoadBalancerServiceEngineGroup' + + LoadBalancerServiceEngineGroup: + x-vcloud-added-in: "35.0" + description: | + A Load Balancer Service Engine Group. + allOf: + - $ref: './networking/commonObject.yaml#/definitions/NetworkingObjectStatus' + - type: object + properties: + id: + type: string + description: The identifier of the Load Balancer Service Engine Groups in URN format + example: urn:vcloud:serviceEngineGroup:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + name: + type: string + description: | + The name of the Load Balancer Service Engine Group. + description: + type: string + description: Description of the Load Balancer Service Engine Group. + serviceEngineGroupBacking: + $ref: './networking/loadBalancerServiceEngineGroups.yaml#/definitions/LoadBalancerServiceEngineGroupBacking' + description: | + The backing that uniquely identifies a Load Balancer Service Engine Group configured within a Load Balancer Cloud. + haMode: + type: string + description: | + The service engine group's High Availability Mode. +
        +
      • ELASTIC_N_PLUS_M_BUFFER - Service Engines will scale out to N active nodes with M nodes as buffer. +
      • ELASTIC_ACTIVE_ACTIVE - Active-Active with scale out. +
      • LEGACY_ACTIVE_STANDBY - Traditional single Active-Standby configuration +
      + reservationType: + type: string + description: | + The reservation model for virutal services on the Load Balancer Service Engine Group. +
        +
      • DEDICATED - Dedicated to a single Edge Gateway and can only be assigned to a single Edge Gateway. +
      • SHARED - Shared between multiple Edge Gateways. Can be assigned to multiple Edge Gateways. +
      + default: 'SHARED' + maxVirtualServices: + type: integer + description: | + The maximum number of virtual services supported on the Load Balancer Service Engine Group. + numDeployedVirtualServices: + type: integer + description: | + The number of virtual services currently deployed on the Load Balancer Service Engine Group. + reservedVirtualServices: + type: integer + description: | + The number of virtual services already reserved on the Load Balancer Service Engine Group. This value is the sum of the guaranteed + virtual services given to Edge Gateways assigned to the Load Balancer Service Engine Group. + overAllocated: + type: boolean + description: | + Indicates whether the maximum number of virtual services supported on the Load Balancer Service Engine Group has been surpassed + by the current number of reserved virtual services. + required: + - name + - serviceEngineGroupBacking + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: NonSortable + - constraint: ReadOnly + - constraint: Urn + args: + - arg: serviceEngineGroup + description: + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + serviceEngineGroupBacking: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + haMode: + x-vcloud-constraints: + - constraint: ReadOnly + maxVirtualServices: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: ReadOnly + numDeployedVirtualServices: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: ReadOnly + reservedVirtualServices: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: ReadOnly + overAllocated: + x-vcloud-added-in: "35.0" + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + - constraint: ReadOnly + status: + x-vcloud-added-in: "35.0" + x-vcloud-constraints: + - constraint: ReadOnly + + LoadBalancerServiceEngineGroupBacking: + x-vcloud-added-in: "35.0" + description: | + A Load Balancer Service Engine Group Backing. + type: object + properties: + backingId: + type: string + description: The unique backing identifier of the Load Balancer Service Engine Group. + example: serviceenginegroup-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + loadBalancerCloudRef: + $ref: '#/definitions/EntityReference' + description: The associated Load Balancer Cloud. + required: + - backingId + - loadBalancerCloudRef + x-vcloud-property-annotations: + backingId: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + loadBalancerCloudRef: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + LoadBalancerServiceEngineGroupAssignments: + x-vcloud-added-in: "35.0" + description: | + List of Load Balancer Service Engine Group Assignments. + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: '#/definitions/LoadBalancerServiceEngineGroupAssignment' + + LoadBalancerServiceEngineGroupAssignment: + x-vcloud-added-in: "35.0" + description: + An assignment of a Load Balancer Service Engine Group to an Edge Gateway + type: object + properties: + id: + type: string + description: The identifier of the Load Balancer Service Engine Groups in URN format. + example: urn:vcloud:serviceEngineGroupAssignment:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + maxVirtualServices: + description: | + The maximum number of virtual services the Edge Gateway is allowed to use. + This is required if the Load Balancer Service Engine Group has reservation type 'SHARED'. + This must be unset if the Load Balancer Service Engine Group has reservation type 'DEDICATED'. + type: integer + format: int32 + minimum: 0 + minVirtualServices: + description: | + The number of guaranteed virtual services available to the Edge Gateway. + This is required if the Load Balancer Service Engine Group has reservation type 'SHARED'. + This must be unset if the Load Balancer Service Engine Group has reservation type 'DEDICATED'. + type: integer + format: int32 + minimum: 0 + numDeployedVirtualServices: + description: | + The current number of deployed virutal services. + type: integer + serviceEngineGroupRef: + description: The associated Load Balancer Service Engine Group. + $ref: '#/definitions/EntityReference' + gatewayRef: + description: The associated Edge Gateway. + $ref: '#/definitions/EntityReference' + gatewayOwnerRef: + description: The owner of the associated Edge Gateway. This can be a vDC or vDC Group. + $ref: '#/definitions/EntityReference' + gatewayOrgRef: + description: The organization of the associated Edge Gateway. + $ref: '#/definitions/EntityReference' + required: + - serviceEngineGroupRef + - gatewayRef + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: NonSortable + - constraint: ReadOnly + - constraint: Urn + args: + - arg: serviceEngineGroupAssignment + maxVirtualServices: + x-vcloud-constraints: + - constraint: NonSearchable + minVirtualServices: + x-vcloud-constraints: + - constraint: NonSearchable + numDeployedVirtualServices: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: ReadOnly + serviceEngineGroupRef: + x-vcloud-constraints: + - constraint: NonSortable + gatewayRef: + x-vcloud-constraints: + - constraint: NonSortable + gatewayOwnerRef: + x-vcloud-constraints: + - constraint: NonSortable + - constraint: ReadOnly + gatewayOrgRef: + x-vcloud-constraints: + - constraint: NonSortable + - constraint: ReadOnly + + EntityReference: + $ref: "./common/entity.yaml#/definitions/EntityReference" diff --git a/schemas/openapi/src/main/resources/schemas/networking/networkContextProfiles.yaml b/schemas/openapi/src/main/resources/schemas/networking/networkContextProfiles.yaml new file mode 100644 index 00000000..3f58c869 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/networking/networkContextProfiles.yaml @@ -0,0 +1,355 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2020-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + An API for managing Network Context Profiles. Network Context profiles enable creating groups of values where a value specifies + a layer 7 App Id, or Domain Names. After a network context profile has been defined, it can be used in one or more + firewall rules to restrict the traffic to/from certain layer 7 applications and domains. These are available only to an Org vDC that is backed by NSX-T. + title: Network Context Profiles API + +paths: + + networkContextProfiles: + get: + x-vcloud-added-in: "35.0" + x-vcloud-default-sort: + default-sort-field: name + sort-ascending: true + tags: + - networkContextProfiles + summary: Get all network context profiles. + description: | + Retrieves all network context profiles defined in the system. + Supported contexts are: +
        +
      • Org vDC ID (_context==orgVdcId) - + Returns all the network context profiles which are available to a specific Org vDC. +
      • Network provider ID (_context==networkProviderId) - | + Returns all the network context profiles which are available for a specific network provider. +
      • VDC Group Id (_context==vdcGroupId) - | + Returns all the network context profiles which are available to a specific vDC Group. +
      + operationId: getNetworkContextProfiles + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/NetworkContextProfiles' + + post: + x-vcloud-added-in: "35.0" + tags: + - networkContextProfiles + summary: Create a user-defined network context profile. + operationId: createNetworkContextProfile + consumes: + - application/json + parameters: + - name: networkContextProfile + in: body + required: true + schema: + $ref: '#/definitions/NetworkContextProfile' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + + sync: + post: + x-vcloud-added-in: "35.0" + tags: + - networkContextProfiles + summary: Sync the network context profiles from the network provider to VCD. + description: | + Sync the network context profiles from the network provider to VCD. The network provider is required to be specified in the filter context. + Context example: (_context==networkProviderId). + operationId: syncNetworkContextProfiles + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + + networkContextProfile: + parameters: + - name: profileId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: networkContextProfile + + get: + x-vcloud-added-in: "35.0" + tags: + - networkContextProfile + summary: Get a specific network context profile. + description: | + Retrieves a single network context profile. + operationId: getNetworkContextProfile + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/NetworkContextProfile' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + put: + x-vcloud-added-in: "35.0" + tags: + - networkContextProfile + summary: Updates a specific user-defined network context profile, changing the associated firewall and modifying the traffic this profile restricts. + operationId: updateNetworkContextProfile + consumes: + - application/json + parameters: + - name: networkContextProfile + in: body + required: true + schema: + $ref: '#/definitions/NetworkContextProfile' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + delete: + x-vcloud-added-in: "35.0" + tags: + - networkContextProfile + summary: Deletes a specific network context profile, removing the associated firewall rule and permitting the traffic this profile restricts. + operationId: deleteNetworkContextProfile + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + + attributes: + get: + x-vcloud-added-in: "35.0" + x-vcloud-default-sort: + default-sort-field: name + sort-ascending: true + tags: + - networkContextProfileAttributes + summary: List all supported network context profile attributes and sub-attributes for the given NSX-T manager. + description: | + Retrieves all available network context profile attributes and sub-attributes for the given NSX-T manager, based on the filter parameter given in FIQL format (e.g. filter="_context==urn:vcloud:nsxtmanager:"). + Optionally filter by attribute type by adding a FIQL name parameter to the above filter context (e.g. filter="_context==;name=APP_ID") + operationId: getNetworkContextProfileAttributes + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/NetworkContextProfileAttributes' + +definitions: + + NetworkContextProfile: + x-vcloud-added-in: "35.0" + description: | + Describes a networking context profile. Context profiles are groups of similar type of + values where each value specifies some layer 7 App Id, or Domain Name. + type: object + allOf: + - $ref: "./networking/applicationPortProfiles.yaml#/definitions/NetworkProviderContext" + - properties: + id: + type: string + description: The unique id of this network context profile in URN format. + name: + type: string + description: Name for the network context profile. + description: + type: string + description: Description for the network context profile. + scope: + $ref: './networking/networkContextProfiles.yaml#/definitions/NetworkContextProfileScopeType' + description: The scope of the network context profile. + attributes: + description: Array of network context profile attributes. + type: array + items: + $ref: './networking/networkContextProfiles.yaml#/definitions/NetworkContextProfileAttribute' + minItems: 1 + required: + - name + - scope + - attributes + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSortable + - constraint: Urn + args: + - arg: networkContextProfile + description: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + attributes: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + NetworkContextProfiles: + x-vcloud-added-in: "35.0" + description: List of Network context profiles. + type: object + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: '#/definitions/NetworkContextProfile' + + NetworkContextProfileAttributes: + x-vcloud-added-in: "35.0" + description: | + A wrapper object for an array of network context profile attributes. + type: object + properties: + attributes: + description: Array of network context profile attributes. + type: array + items: + $ref: '#/definitions/NetworkContextProfileAttribute' + minItems: 1 + required: + - attributes + x-vcloud-property-annotations: + attributes: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + NetworkContextProfileAttribute: + x-vcloud-added-in: "35.0" + description: | + Describes an attribute of a networking context profile. An attribute + is defined as a type and its associated values for some layer 7 App Id or Domain names. + type: object + properties: + type: + type: string + enum: [APP_ID, DOMAIN_NAME] + description: | + This describes the type of attribute value. +
        +
      • APP_ID - Values represents layer 7 App Ids. For example: ACTIVDIR +
      • DOMAIN_NAME - Values represents Domain names (FQDN). For example: *.live.com +
      + values: + type: array + description: Values for attribute. + items: + type: string + minItems: 1 + example: + - 'ACTIVDIR' + - 'AMQP' + - '*onenote.officeapps.live.com' + subAttributes: + type: array + description: | + List of sub attributes for an attribute. These are specified with the attributes + such as SSL or CIFS, which can have different cipher suites or TLS versions + as values. + items: + $ref: '#/definitions/NetworkContextProfileSubAttribute' + required: + - type + - values + x-vcloud-property-annotations: + type: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + values: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + subAttributes: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + NetworkContextProfileSubAttribute: + x-vcloud-added-in: "35.0" + description: | + Describes a sub attribute of a networking context profile attribute. + type: object + properties: + type: + type: string + enum: [TLS_CIPHER_SUITE, TLS_VERSION, CIFS_SMB_VERSION] + description: This describes the type of sub attribute's values. + values: + type: array + description: Values for sub attribute. + items: + type: string + minItems: 1 + example: + - 'SSL_V3' + - 'TLS_DHE_RSA_WITH_AES_256_GCM_SHA384' + required: + - type + - values + x-vcloud-property-annotations: + type: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + values: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + NetworkContextProfileScopeType: + x-vcloud-added-in: "35.0" + description: | + The scope of a network context profile. +
        +
      • SYSTEM profiles are available to all tenants. They are default profiles from the backing networking provider. +
      • PROVIDER profiles are available to all tenants. They are defined by the provider at a system level. +
      • TENANT profiles are available only to the specific tenant organization. They are defined by the tenant or by a provider on behalf of a tenant. +
      + type: string + enum: + - SYSTEM + - PROVIDER + - TENANT diff --git a/schemas/openapi/src/main/resources/schemas/networking/networkPools.yaml b/schemas/openapi/src/main/resources/schemas/networking/networkPools.yaml new file mode 100644 index 00000000..efe8a86e --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/networking/networkPools.yaml @@ -0,0 +1,323 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2018-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + An API for managing Network Pools. A network pool is a group of undifferentiated networks + that is available for use within an organization vDC to create vApp networks + and certain types of organization vDC networks. + version: "1.0" + title: Network Pool API + +paths: + + networkPoolSummaries: + get: + x-vcloud-added-in: "33.0" + x-vcloud-multisite: true + tags: + - networkPools + summary: Get summary of all the Network Pools in the system. + description: | + Retrieves summary of all Network Pools in the system. + Results can be filtered by context `(_context)`. + Supported contexts are: +
        +
      • Provider vDC ID (_context==providerVdcId) - + Returns all the network pools which are available to a specific Provider vDC. +
      • Org vDC ID (_context==orgVdcId) - + Returns all the network pools which are available to a specific Org vDC. +
      • Virtual Center ID (managingOwnerRef.id==vcId) + Resource Pool Moref (_context==moref) - + Returns all the network pools which are related to a specific Resoure Pool. +
      + operationId: getNetworkPoolsSummary + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/NetworkPoolsSummary' + + networkPools: + post: + x-vcloud-added-in: "33.0" + tags: + - networkPools + summary: Create a new network pool. + description: | + Create a network pool. + operationId: createNetworkPool + consumes: + - application/json + parameters: + - name: networkPool + in: body + required: true + schema: + $ref: '#/definitions/NetworkPool' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + + networkPool: + parameters: + - name: networkPoolId + in: path + required: true + type: string + + get: + x-vcloud-added-in: "33.0" + tags: + - networkPool + summary: Retrieves a specific Network Pool. + operationId: getNetworkPool + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/NetworkPool' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + put: + x-vcloud-added-in: "33.0" + tags: + - networkPool + summary: Updates a specific network pool. + operationId: updateNetworkPool + consumes: + - application/json + parameters: + - name: networkPool + in: body + required: true + schema: + $ref: '#/definitions/NetworkPool' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + delete: + x-vcloud-added-in: "33.0" + tags: + - networkPool + summary: Deletes a specific network pool. + operationId: deleteNetworkPool + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + sync: + parameters: + - name: networkPoolId + in: path + required: true + type: string + + post: + x-vcloud-added-in: "33.0" + tags: + - networkPool + summary: Synchronize the VXLAN network pool. + description: | + Synchronize the VXLAN network pool. If the user changes a transport zone in NSX by adding + or removing clusters, synchronizing the VXLAN network pool ensures that the defined scope + of the network pool is reflected in the scope of its corresponding transport zone. + operationId: syncNetworkPool + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + +definitions: + + NetworkPoolSummary: + x-vcloud-added-in: "33.0" + description: | + Common fields that NetworkPoolSummary and NetworkPool have. + allOf: + - $ref: './networking/commonObject.yaml#/definitions/NetworkingObjectStatus' + - type: object + properties: + id: + type: string + description: The id of the Network Pool in URN format. + name: + type: string + description: The name of the Network Pool. Names for Network Pools must be unique across the system. + description: + type: string + poolType: + $ref: './networking/networkPools.yaml#/definitions/NetworkPoolBackingType' + description: The network pool backing type. + promiscuousMode: + type: boolean + description: Whether promiscuous mode is enabled on the network pool. This is only applicable for VLAN network pools. + totalBackingsCount: + type: integer + description: The number of backings available for use. + readOnly: true + usedBackingsCount: + type: integer + description: The number of network pool backings in use. + readOnly: true + managingOwnerRef: + $ref: '#/definitions/EntityReference' + description: The Id of vCenter server or the NSX-T manager that manages backings for this network pool. + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: Urn + args: + - arg: networkpool + - constraint: NonSortable + - constraint: ReadOnly + description: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + totalBackingsCount: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + - constraint: ReadOnly + usedBackingsCount: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + - constraint: ReadOnly + managingOwnerRef: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSortable + + NetworkPoolsSummary: + x-vcloud-added-in: "33.0" + description: | + List of Network Pool Summary Objects. + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: './networking/networkPools.yaml#/definitions/NetworkPoolSummary' + + NetworkPool: + x-vcloud-added-in: "33.0" + description: | + A network pool is a group of undifferentiated networks that is available + for use within an organization vDC to create certain type of vDC networks + such as Organization vDC and Cross vDC networks. + allOf: + - $ref: './networking/networkPools.yaml#/definitions/NetworkPoolSummary' + - type: object + properties: + backing: + $ref: './networking/networkPools.yaml#/definitions/NetworkPoolBacking' + description: The network pool backing information. + required: + - name + - poolType + - backing + + NetworkPoolBacking: + x-vcloud-added-in: "33.0" + description: | + Describes the backing information for a network pool. A network pool is backed by + vSphere network resources such as VLAN Ids, portgroups, Transport Zones, etc. + type: object + properties: + vlanIdRanges: + $ref: '#/definitions/VlanIdRanges' + description: | + The range of backing VLAN Id's. This information is available + only for VLAN backed network pools. + vdsRefs: + type: array + items: + $ref: "#/definitions/BackingRef" + description: | + The information about virtual distributed switches. This information is + available only for VLAN, VXLAN and Universal VXLAN backed network pools. + portGroupRefs: + type: array + items: + $ref: "#/definitions/BackingRef" + description: | + All the vSphere port groups that will be used by this network pool. This information is + available only for Portgroup backed network pools. + transportZoneRef: + $ref: '#/definitions/BackingRef' + description: | + The Id of the backing transport zone in NSX. + providerRef: + $ref: '#/definitions/EntityReference' + description: The Id of vCenter server or the NSX-T manager that owns this backing entity. + + NetworkPoolBackingType: + x-vcloud-added-in: "33.0" + description: | + Represents the network pool's backing type. + type: object + enum: + - VLAN + - VXLAN + - GENEVE + - PORTGROUP_BACKED + - UNIVERSAL_VXLAN + - UNKNOWN + + VlanIdRange: + x-vcloud-added-in: "33.0" + description: | + An object representing VLAN Id range. + type: object + properties: + startId: + type: integer + description: Starting VLAN Id in the range. + endId: + type: integer + description: Ending VLAN Id in the range. + + VlanIdRanges: + description: | + List of IpRange + type: object + properties: + values: + type: array + items: + $ref: '#/definitions/VlanIdRange' + + BackingRef: + $ref: "./networking/commonObject.yaml#/definitions/BackingRef" + + EntityReference: + $ref: "./common/entity.yaml#/definitions/EntityReference" + diff --git a/schemas/openapi/src/main/resources/schemas/networking/nsxAlbResources.yaml b/schemas/openapi/src/main/resources/schemas/networking/nsxAlbResources.yaml new file mode 100644 index 00000000..99e569ad --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/networking/nsxAlbResources.yaml @@ -0,0 +1,172 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2020-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The list of network resources retrieved from an NSX-ALB Controller mainly used for importing Load Balancer resources into VCD. + version: "1.0" + title: NSX-ALB resources + +paths: + + importableClouds: + get: + x-vcloud-added-in: "35.0" + tags: + - nsxAlbResources + summary: Get all NSX-ALB Clouds from an NSX-ALB Controller. + description: | + Get all NSX-ALB Clouds that are configured on an NSX-ALB Controller. Clouds that are already imported are marked appropriately. + The "_context" filter key must be set with the id of the Load Balancer Controller for which we want to get the NSX-ALB Clouds for. + operationId: getImportableClouds + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/NsxAlbClouds' + + importableServiceEngineGroups: + get: + x-vcloud-added-in: "35.0" + tags: + - nsxAlbResources + summary: Get all importable Service Engine Groups from an NSX-ALB Cloud. + description: | + Get all importable Service Engine Groups that are configured for an NSX-ALB Cloud. + Service Engine Groups that are already imported are filtered out. + The "_context" filter key must be set with the id of the Load Balancer Cloud for which we want to get the NSX-ALB Service Engine Groups for. + Example: (_context==urn:vcloud:loadBalancerCloud:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) + operationId: getImportableServiceEngineGroups + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/queryCursor" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/NsxAlbServiceEngineGroups' + +definitions: + NsxAlbClouds: + x-vcloud-added-in: "35.0" + description: | + List of NSX-ALB Controller's Clouds. + type: object + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: './networking/nsxAlbResources.yaml#/definitions/NsxAlbCloud' + + NsxAlbCloud: + x-vcloud-added-in: "35.0" + description: | + An NSX-ALB Controller's Cloud. + properties: + id: + type: string + description: The unique id of the cloud. + displayName: + type: string + description: Name of the Cloud used in NSX-ALB Controller's logs or GUI. + alreadyImported: + type: boolean + description: True if the Cloud is already imported. Cloud cannot be imported again. + networkPoolRef: + $ref: '#/definitions/EntityReference' + description: The Network Pool associated with this Cloud. If unset, this Cloud cannot be imported. + transportZoneName: + type: string + description: | + Name of the transport zone in NSX-T associated with the NSX-ALB Cloud. If unset, the tranport zone associated with the Load Balancer Cloud + is not found in NSX-T. + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + displayName: + x-vcloud-constraints: + - constraint: ReadOnly + alreadyImported: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + networkPoolRef: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + transportZoneName: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + + NsxAlbServiceEngineGroups: + x-vcloud-added-in: "35.0" + description: | + List of NSX-ALB Cloud's Service Engine Groups + properties: + values: + type: array + items: + $ref: '#/definitions/NsxAlbServiceEngineGroup' + + NsxAlbServiceEngineGroup: + x-vcloud-added-in: "35.0" + description: | + An NSX-ALB Cloud's Service Engine Group + properties: + id: + type: string + description: The unique id of the service engine group. + displayName: + type: string + description: Name of the service engine group used in NSX-ALB Controller's logs or GUI. + haMode: + type: string + description: | + The service engine group's High Availability Mode. + ELASTIC_N_PLUS_M_BUFFER - Service Engines will scale out to N active nodes with M nodes as buffer. + ELASTIC_ACTIVE_ACTIVE - Active-Active with scale out. + LEGACY_ACTIVE_STANDBY - Traditional single Active-Standby configuration + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + displayName: + x-vcloud-constraints: + - constraint: ReadOnly + haMode: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + + EntityReference: + $ref: "./common/entity.yaml#/definitions/EntityReference" diff --git a/schemas/openapi/src/main/resources/schemas/networking/nsxTResources.yaml b/schemas/openapi/src/main/resources/schemas/networking/nsxTResources.yaml new file mode 100644 index 00000000..0711d8de --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/networking/nsxTResources.yaml @@ -0,0 +1,305 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2018-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The list of NSX-T resources such as Tier-0 routers that are accessible to an organization vDC + or all the overlay transport zones that are configured on a specific NSX-T manager. + version: "1.0" + title: NSX-T resources + +paths: + + importableTier0Routers: + get: + x-vcloud-added-in: "32.0" + tags: + - nsxTResources + summary: Get all importable Tier-0 routers that are accessible to an organization vDC. + description: | + Get all Tier-0 routers that are accessible to an organization vDC. Routers that are already associated with an External Network are filtered out. + The "_context" filter key must be set with the id of the NSX-T manager for which we want to get the Tier-0 routers for. + operationId: getImportableTier0Routers + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/queryCursor" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/Tier0Routers' + + importableTransportZones: + get: + x-vcloud-added-in: "33.0" + tags: + - nsxTResources + summary: Get all importable overlay transport zones that are configured on an NSX-T manager. + description: | + Get all importable overlay transport zones that are configured on an NSX-T manager. + Transport zones that are already associated with a network pool are filtered out. + The "_context" filter key must be set with the id of the NSX-T manager which we want to get the transport zones for. + operationId: getImportableTransportZones + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/queryCursor" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/NsxTTransportZones' + + edgeClusters: + get: + x-vcloud-added-in: "34.0" + tags: + - nsxTResources + summary: Get all edge clusters that are configured on an NSX-T manager. + description: | + Returns all the configured NSX-T edge clusters for an Org vDC or a VDC Group or a Provider VDC. + Supported filters are: +
        +
      • orgVdcId - | + The filter orgVdcId must be set equal to the id of the NSX-T backed Org vDC for which we want to get the edge clusters. + Example: (orgVdcId==urn:vcloud:vdc:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) +
      • vdcGroupId - | + The filter vdcGroupId must be set equal to the id of the NSX-T VDC Group for which we want to get the edge clusters. + Example: (vdcGroupId==urn:vcloud:vdcGroup:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) +
      • pvdcId - | + The filter pvdcId must be set equal to the id of the NSX-T backed Provider VDC for which we want to get the edge clusters. + pvdcId filter is supported from version 35.2 + Example: (pvdcId==urn:vcloud:providervdc:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) +
      + Use of "_context" filter has been deprecated. Please use supported filters. + operationId: getNsxTEdgeClusters + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/queryCursor" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/NsxTEdgeClusters' + +definitions: + + CommonNsxTRouterFields: + description: Common fields that all Tier-0 or Tier-1 routers have. + properties: + id: + type: string + description: The unique id of the router. Field is sortable. + description: + type: string + description: The description of the router. + displayName: + type: string + description: Name used in NSX-T's logs or GUI. Field is sortable. + + Tier0Routers: + x-vcloud-added-in: "32.0" + description: | + List of NSX-T's Tier-0 routers. + type: object + properties: + values: + type: array + items: + $ref: '#/definitions/Tier0Router' + + Tier0Router: + x-vcloud-added-in: "32.0" + description: | + An NSX-T's Tier-0 router. + allOf: + - $ref: './networking/nsxTResources.yaml#/definitions/CommonNsxTRouterFields' + - type: object + properties: + parentTier0Id: + type: string + description: Id of parent Tier0 if this Tier0 Router is a VRF-Lite Tier0. + x-vcloud-property-annotations: + parentTier0Id: + x-vcloud-added-in: "35.0" + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + NsxTTransportZone: + x-vcloud-added-in: "33.0" + description: | + Information about a configured transport zone on an NSX-T manager. + NSX uses transport zones to provide connectivity between hypervisors. + properties: + id: + type: string + description: The unique id of the transport zone on the NSX-T manager. + name: + type: string + description: Name of Transport Zone in NSX-T Manager. + type: + $ref: '#/definitions/NsxTTransportZoneType' + description: Type of a transport zone. + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + name: + x-vcloud-constraints: + - constraint: NonSearchable + type: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + NsxTTransportZoneType: + x-vcloud-added-in: "33.0" + description: | + Represents an NSX-T transport zone's traffic type. + type: object + enum: + - GENEVE + + NsxTTransportZones: + x-vcloud-added-in: "33.0" + description: | + List of transport zones configured on an NSX-T manager. + type: object + properties: + values: + type: array + items: + $ref: '#/definitions/NsxTTransportZone' + + NsxTEdgeCluster: + x-vcloud-added-in: "34.0" + description: | + Information about a configured edge cluster on an NSX-T manager. + An Edge cluster is a group of edge transport nodes. + properties: + id: + type: string + description: The unique id of the edge cluster on the NSX-T manager. + name: + type: string + description: Name of edge cluster. + description: + type: string + description: Description of the edge cluster. + nodeCount: + type: integer + description: Number of edge transport nodes in the edge cluster. + nodeType: + $ref: '#/definitions/NsxTEdgeClusterNodeType' + description: | + Type of transport nodes in the edge cluster. All the nodes in the edge + cluster are of same type. + deploymentType: + $ref: '#/definitions/NsxTEdgeClusterDeploymentType' + description: | + Deployment type for transport nodes in the edge cluster. The nodes in the edge + cluster may have different deployment types. + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + name: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + description: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + nodeCount: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + nodeType: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + deploymentType: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + x-vcloud-cross-references: + - cross-reference: + referenced-type: "./networking/vdcs.yaml#/definitions/OrgVdc" + referenced-property: id + alias: orgVdcId + - cross-reference: + referenced-type: "./networking/vdcGroups.yaml#/definitions/VdcGroup" + referenced-property: id + alias: vdcGroupId + - cross-reference: + referenced-type: "./pvdc/pvdc.yaml#/definitions/ProviderVdc" + referenced-property: id + alias: pvdcId + + NsxTEdgeClusterNodeType: + x-vcloud-added-in: "34.0" + description: | + Represents the type of transport nodes in an edge cluster. + All of the transport nodes in an edge cluster must belong to the same type. + type: object + enum: + - EDGE_NODE + - PUBLIC_CLOUD_GATEWAY_NODE + - UNKNOWN + + NsxTEdgeClusterDeploymentType: + x-vcloud-added-in: "34.0" + description: | + Represents the deployment type for an edge cluster. This is derived + from the deplyment type of the nodes in an edge cluster. If all the edge + nodes are of same type then that type is returned, otherwise if the cluster + contains nodes with different deployment types then HYBRID is returned. + type: object + enum: + - VIRTUAL_MACHINE + - PHYSICAL_MACHINE + - HYBRID + - UNKNOWN + + NsxTEdgeClusters: + x-vcloud-added-in: "34.0" + description: | + List of edge clusters configured on an NSX-T manager. + type: object + properties: + values: + type: array + items: + $ref: '#/definitions/NsxTEdgeCluster' + + ExternalNetwork: + $ref: "./networking/externalNetworks.yaml#/definitions/ExternalNetwork" + + diff --git a/schemas/openapi/src/main/resources/schemas/networking/nsxTResourcesDisabled.yaml b/schemas/openapi/src/main/resources/schemas/networking/nsxTResourcesDisabled.yaml new file mode 100644 index 00000000..caba5c6a --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/networking/nsxTResourcesDisabled.yaml @@ -0,0 +1,161 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2018-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The list of NSX-T resources such as Tier-1 routers that are accessible to an organization vDC. + These APIs are disabled/hidden for now. If they are enabled, they should be merged with + nsxTResources.yaml. + version: "1.0" + title: NSX-T resources + +paths: + + importableTier1Routers: + get: + x-vcloud-added-in: "32.0" + tags: + - nsxTResourcesDisabled + summary: Get all importable Tier-1 routers that are accessible to an organization vDC. + description: | + Get all Tier-1 routers that are accessible to an organization vDC. Routers that are already associated with an Edge Gateway + are filtered out. The "_context" filter key must be set with the id of the organization vDC which we want to get the Tier-1 routers for. + operationId: getImportableTier1Routers + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/queryCursor" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/Tier1Routers' + + importableSegments: + get: + x-vcloud-added-in: "ALPHA" + tags: + - nsxTResourcesDisabled + summary: Get all importable segments + description: | + Get all importable segments for an OrgVDC or VdcGroup + operationId: getImportableSegments + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/queryCursor" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/NsxTImportableSegments' + +definitions: + + Tier1Routers: + x-vcloud-added-in: "32.0" + description: | + List of NSX-T's Tier-1 routers. + type: object + properties: + values: + type: array + items: + $ref: '#/definitions/Tier1Router' + + Tier1Router: + x-vcloud-added-in: "32.0" + description: | + An NSX-T's Tier-1 router. + allOf: + - $ref: './networking/nsxTResources.yaml#/definitions/CommonNsxTRouterFields' + - type: object + properties: + tier0Id: + type: string + description: | + The id of the connected Tier-0 router. Null indicates that this Tier-1 is + not connected to any Tier-0 router. If this id is populated and there is + no linkedExternalNetwork, this means that the connected Tier-0 router has + not been imported into VCD as an external network. + linkedExternalNetwork: + $ref: '#/definitions/ExternalNetwork' + description: | + The NSX-T Tier-0 router backed external network connected to this + Tier-1 router. + x-vcloud-property-annotations: + tier0Id: + x-vcloud-added-in: "33.0" + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + linkedExternalNetwork: + x-vcloud-added-in: "33.0" + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + + NsxTImportableSegments: + x-vcloud-added-in: "future" + description: | + List of NSX-T Importable Segments + type: object + properties: + values: + type: array + items: + $ref: '#/definitions/NsxTImportableSegment' + + NsxTImportableSegment: + x-vcloud-added-in: "future" + description: | + An NSX-T's Importable Segment + type: object + properties: + name: + type: string + description: Name of segment. + id: + type: string + description: The unique id of the segment in NSX-T Manager + x-vcloud-property-annotations: + name: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + id: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + x-vcloud-cross-references: + - cross-reference: + referenced-type: "./networking/vdcs.yaml#/definitions/OrgVdc" + referenced-property: id + alias: orgVdcId + description: | + A filter to look up Nsx T ImportableSegments that can be imported into this Organization Vdc + - cross-reference: + referenced-type: "./networking/vdcGroups.yaml#/definitions/VdcGroup" + referenced-property: id + alias: vdcGroupId + description: | + A filter to look up Nsx T ImportableSegments that can be imported into this Vdc Group + + ExternalNetwork: + $ref: "./networking/externalNetworks.yaml#/definitions/ExternalNetwork" + + diff --git a/schemas/openapi/src/main/resources/schemas/networking/nsxVResources.yaml b/schemas/openapi/src/main/resources/schemas/networking/nsxVResources.yaml new file mode 100644 index 00000000..284a5588 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/networking/nsxVResources.yaml @@ -0,0 +1,87 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2018-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The list of NSX-V resources such all the transport zones that are configured on a specific NSX-V manager. + version: "1.0" + title: NSX-V resources + +paths: + + importableTransportZones: + get: + x-vcloud-added-in: "33.0" + tags: + - nsxVResources + summary: Get all importable vxlan transport zones that are configured on a vCenter backed by a NSX-V manager. + description: | + Get all importable transport zones that are configured on a vCenter backed by a NSX-V manager. + Transport zones that are already associated with a network pool are filtered out. Only "_context" filter is + supported and "_context" filter key must be set with the id of the vCenter which we want to get the transport zones for. + operationId: getImportableTransportZones + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/NsxVTransportZones' + +definitions: + + NsxVTransportZone: + x-vcloud-added-in: "33.0" + description: | + Information about a configured transport zone on an NSX-V manager. + NSX uses transport zones to provide connectivity between hypervisors. + properties: + id: + type: string + description: The unique id of the transport zone on the NSX manager. + name: + type: string + description: Name of Transport Zone in NSX Manager. + type: + $ref: '#/definitions/NsxVTransportZoneType' + description: Type of a transport zone. + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + name: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + type: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + NsxVTransportZoneType: + x-vcloud-added-in: "33.0" + description: | + Represents an NSX-V transport zone's traffic type. + type: object + enum: + - VXLAN + - UNIVERSAL_VXLAN + + NsxVTransportZones: + x-vcloud-added-in: "33.0" + description: | + List of transport zones configured on an NSX-V manager. + type: object + properties: + values: + type: array + items: + $ref: '#/definitions/NsxVTransportZone' diff --git a/schemas/openapi/src/main/resources/schemas/networking/orgVdcNetworks.yaml b/schemas/openapi/src/main/resources/schemas/networking/orgVdcNetworks.yaml new file mode 100644 index 00000000..6ca35e48 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/networking/orgVdcNetworks.yaml @@ -0,0 +1,958 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2018-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The organization vDC network API allows for management of networks that span an organization vDC or a vDC Group which can contain + many organization vDCs. + version: "1.0" + title: Organization vDC Network API + +paths: + + dvpgProperties: + + parameters: + - name: vdcNetworkId + in: path + required: true + type: string + + get: + x-vcloud-added-in: "34.0" + summary: Returns the DVPG properties, such as promiscuous mode and forged transmit, of a specific Org vDC network. This is a SysAdmin only API. + tags: + - dvpgProperties + operationId: getDvpgProperties + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/DvpgProperties" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + put: + x-vcloud-added-in: "34.0" + summary: Toggles the DVPG properties of a specific Org vDC network. Allows for update of promiscuous mode and forged transmit. This is a SysAdmin only API. + tags: + - dvpgProperties + operationId: updateDvpgProperties + consumes: + - application/json + parameters: + - name: dvpgProperties + in: body + required: true + schema: + $ref: "#/definitions/DvpgProperties" + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + orgVdcNetworkAdditionalProperties: + + parameters: + - name: vdcNetworkId + in: path + required: true + type: string + + get: + x-vcloud-added-in: "36.0" + summary: Returns the additional properties of a specific Org VDC network. This is a System Administrator only API. + description: | + Returns the set of additional properties for the given Org VDC Network + tags: + - orgVdcNetwork + operationId: getAdditionalProperties + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/OrgVdcNetworkAdditionalProperties" + + orgVdcNetworks: + get: + x-vcloud-added-in: "31.0" + x-vcloud-multisite: true + tags: + - orgVdcNetworks + summary: Get all Org vDC networks. + description: | + Get all Org vDC networks. If "ownerRef" property is not specified in the filter, then user + must have the rights to view all the vDCs within an organization in order to see all the networks in the organization. + Results can be filtered by ownerRef or combination of ownerRef and _context. (_context==includeAccessible) + can be used to get all the networks which are available to an Org vDC. In order to return only those networks which + are eligible as an uplink to a vApp network, add an additional filter, (vAppUplinkEligible==true). This + filter must be used in conjunction with either the "orgVdc.id" filter, or the "ownerRef.id" filter with a value + corresponding to an Org vDC. + operationId: getAllVdcNetworks + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./networking/orgVdcNetworks.yaml#/definitions/QueryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/VdcNetworks' + + post: + x-vcloud-added-in: "31.0" + tags: + - orgVdcNetworks + summary: Create an organization vDC network. + operationId: createNetwork + consumes: + - application/json + parameters: + - name: vdcNetwork + in: body + required: true + schema: + $ref: '#/definitions/VdcNetwork' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + + orgVdcNetwork: + parameters: + - name: vdcNetworkId + in: path + required: true + type: string + + get: + x-vcloud-added-in: "31.0" + tags: + - orgVdcNetwork + summary: Retrieves a specific Org vDC network. + operationId: getOrgVdcNetwork + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/VdcNetwork' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + put: + x-vcloud-added-in: "32.0" + tags: + - orgVdcNetwork + summary: Updates a specific Org vDC network. + operationId: updateNetwork + consumes: + - application/json + parameters: + - name: vdcNetwork + in: body + required: true + schema: + $ref: '#/definitions/VdcNetwork' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + delete: + x-vcloud-added-in: "32.0" + tags: + - orgVdcNetwork + summary: Deletes a specific Org vDC network. + operationId: deleteNetwork + parameters: + - $ref: "./common/delete.yaml#/parameters/forceDelete" + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + reset: + parameters: + - name: vdcNetworkId + in: path + required: true + type: string + + post: + x-vcloud-added-in: "32.0" + tags: + - orgVdcNetwork + summary: Reset a specific isolated Org vDC network. + description: | + Reset a specific isolated Org vDC network. Reset involves redeploying the internal edge gateway of the isolated Org vDC Network if present. + An error is returned if the network is not isolated. + operationId: resetNetwork + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + syncSyslog: + parameters: + - name: vdcNetworkId + in: path + required: true + type: string + + post: + x-vcloud-added-in: "32.0" + tags: + - orgVdcNetwork + summary: Synchronize syslog server settings for a Org vDC network. + description: | + When the IP addresses of the primary or secondary syslog server are updated, this api can synchronize syslog server settings + of an Isolated Org VDC Network against the vCD Syslog Settings. An error is returned if network is a direct network. + operationId: syncSyslogSettingsOfNetwork + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + sync: + parameters: + - name: vdcNetworkId + in: path + required: true + type: string + + post: + x-vcloud-added-in: "35.0" + tags: + - orgVdcNetwork + summary: Sync/repair a specific Org vDC network. + description: | + Sync/repair the vDC Group Cross vDC network. + An example usage is to realize a network in the participating vDC which was unreachable + when the network was created. This operation is only allowed for VIRTUAL_WIRE + backed cross vDC networks. + operationId: syncOrgVdcNetwork + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + allocatedIpAddresses: + parameters: + - name: vdcNetworkId + in: path + required: true + type: string + + get: + x-vcloud-added-in: "32.0" + tags: + - orgVdcNetwork + summary: Retrieve the list of IP addresses allocated to the network. + description: | + Get all the allocated IPs for a given Org vDC network. This returns all the + IP addresses of network which are allocated to a vApp VM, an edge gateway interface and the + addresses being used in a NAT routed environment. + Results can be filtered by IP address. + operationId: getAllocatedIpAddresses + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/AllocatedIpAddresses' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + secondaryAllocatedIpAddresses: + parameters: + - name: vdcNetworkId + in: path + required: true + type: string + + get: + x-vcloud-added-in: "36.0" + tags: + - orgVdcNetwork + summary: Retrieve the list of secondary IP addresses allocated to the network, if the network is a dual stack network. + description: | + Get all the secondary allocated IPs for a given Org vDC network. This returns all the + IP addresses of network which are allocated to a vApp VM, an edge gateway interface, from + the IPv6 subnet of the Org vDC network. + Results can be filtered by IP address. + operationId: getSecondaryAllocatedIpAddresses + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/AllocatedIpAddresses' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + dhcp: + parameters: + - name: vdcNetworkId + in: path + required: true + type: string + + get: + x-vcloud-added-in: "32.0" + tags: + - orgVdcNetworkDhcp + summary: Retrieves Dhcp configuration of a specific Org vDC network. + operationId: getNetworkDhcpConfig + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/VdcNetworkDhcpConfig' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + put: + x-vcloud-added-in: "32.0" + tags: + - orgVdcNetworkDhcp + summary: Updates Dhcp configuration of a specific Org vDC network. + operationId: updateNetworkDhcpConfig + consumes: + - application/json + parameters: + - name: dhcpConfig + in: body + required: true + schema: + $ref: '#/definitions/VdcNetworkDhcpConfig' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + delete: + x-vcloud-added-in: "32.0" + tags: + - orgVdcNetworkDhcp + summary: Removes Dhcp configuration on a specific Org vDC network. + operationId: deleteNetworkDhcpConfig + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + +definitions: + + OrgVdcNetworkAdditionalProperties: + x-vcloud-added-in: "36.0" + description: | + Addition information about an Org VDC Network + type: object + properties: + overlayId: + type: integer + format: int32 + description: Overlay Id of the virtual wire backing this network. + vAppUplinkEligible: + type: boolean + description: Whether or not this network is eligible as an uplink to a vApp network + x-vcloud-property-annotations: + overlayId: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + vAppUplinkEligible: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSortable + - constraint: NonSearchable + + VdcNetworks: + x-vcloud-added-in: "31.0" + description: | + List of Org vDC networks + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: '#/definitions/VdcNetwork' + + VdcNetwork: + x-vcloud-added-in: "31.0" + description: | + An organization vDC network. + allOf: + - $ref: './networking/commonObject.yaml#/definitions/Network' + - type: object + properties: + backingNetworkId: + type: string + description: The NSX id of the backing network. + backingNetworkType: + $ref: './networking/orgVdcNetworks.yaml#/definitions/BackingNetworkType' + description: The object type of the backing network. + parentNetworkId: + $ref: '#/definitions/EntityReference' + description: The parent network if the network is a direct network, otherwise it will be null. + networkType: + $ref: './networking/orgVdcNetworks.yaml#/definitions/VdcNetworkFenceType' + description: | + The type of network. Changing the network type allows converting between an isolated and routed network. + Note that the "connection" field must also be set if converting from isolated to routed network. + orgVdc: + $ref: '#/definitions/EntityReference' + description: | + The organization vDC the network belongs to. This should be unset if the network is owned by a vDC Group. + For API version 35.0 and above, this field will be treated as read only. Please use ownerRef for new network creation. + ownerRef: + $ref: '#/definitions/EntityReference' + description: | + The org vDC or vDC Group that this network belongs to. If the ownerRef is set to a vDC Group, this network + will be available across all the vDCs in the vDC Group. If the vDC Group is backed by a NSX-V network provider, + the org vDC network is automatically connected to the distributed router associated with the vDC Group and + the "connection" field does not need to be set. For API version 35.0 and above, this field should be set for + network creation. + orgVdcIsNsxTBacked: + description: For an Org vDC network, whether the vDC is backed by NSX-T. + type: boolean + default: false + orgRef: + $ref: '#/definitions/EntityReference' + description: The organization to which the network belongs. + connection: + $ref: './networking/orgVdcNetworks.yaml#/definitions/RouterConnection' + description: | + The edge gateway that the network is attached to. + isDefaultNetwork: + type: boolean + description: | + Deprecated unused field, this property will be removed in future release. + shared: + type: boolean + description: Whether this network is shared with other organization vDCs. + enableDualSubnetNetwork: + description: Whether or not this network will support two subnets + type: boolean + default: false + status: + $ref: './networking/orgVdcNetworks.yaml#/definitions/OrgVdcNetworkStatus' + description: | + Description of the network's status. + readOnly: true + lastTaskFailureMessage: + type: string + description: | + Brief failure message if the last configuration task failed. + Deprecated in Api 33.0, this property will be removed in next release. + readOnly: true + guestVlanTaggingAllowed: + type: boolean + description: Whether guest VLAN tagging is allowed. + retainNicResources: + type: boolean + description: Whether network resources such as IP/MAC Addresses are to be retained. + crossVdcNetworkId: + type: string + description: The id of the cross vdc network if this is a stretched network, otherwise it will be null. + readOnly: true + crossVdcNetworkLocationId: + type: string + description: The id of the org from which this network can be managed if this is a stretched network, otherwise it will be null. + readOnly: true + overlayId: + type: integer + description: | + Overlay connectivity ID for this Network. This field is used on creation during POST only and will not be displayed on an object returned through GET or PUT. + format: int32 + totalIpCount: + type: integer + description: The number of IP addresses defined by the static ip pools. If the network contains any IpV6 subnets, the total ip count will be null. + readOnly: true + usedIpCount: + type: integer + description: The number of IP address used from the static ip pools. + readOnly: true + routeAdvertised: + type: boolean + description: | + Whether this network is advertised so that it can be routed out to the external networks. This applies only to + network backed by NSX-T. Value will be unset if route advertisement is not applicable. + readOnly: true + securityGroups: + type: array + items: + $ref: '#/definitions/EntityReference' + description: | + The list of firewall groups of type SECURITY_GROUP/STATIC_MEMBERS that are assigned to the Org VDC Network. These groups can then be used + in firewall rules to protect the Org VDC Network and allow/deny traffic. + x-vcloud-property-annotations: + backingNetworkId: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + x-vcloud-restricted: Visible to provider users only + backingNetworkType: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + networkType: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + orgVdc: + x-vcloud-constraints: + - constraint: NonSortable + orgVdcIsNsxTBacked: + x-vcloud-added-in: "36.0" + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + x-vcloud-restricted: Visible to provider users only + orgRef: + x-vcloud-added-in: "35.0" + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSortable + ownerRef: + x-vcloud-added-in: "35.0" + x-vcloud-constraints: + - constraint: NonSortable + connection: + x-vcloud-constraints: + - constraint: NonSortable + isDefaultNetwork: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + lastTaskFailureMessage: + x-vcloud-deprecated-in: "33.0" + x-vcloud-deprecated-alternative: | + Please use VCD Task API to monitor status of last task. + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + guestVlanTaggingAllowed: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + retainNicResources: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + crossVdcNetworkId: + x-vcloud-constraints: + - constraint: NonSortable + crossVdcNetworkLocationId: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + overlayId: + x-vcloud-added-in: "36.0" + x-vcloud-restricted: Visible to provider users only + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + totalIpCount: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + usedIpCount: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + routeAdvertised: + x-vcloud-added-in: "34.0" + securityGroups: + x-vcloud-added-in: "34.0" + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + enableDualSubnetNetwork: + x-vcloud-added-in: "35.0" + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + x-vcloud-cross-references: + - cross-reference: + referenced-type: './networking/orgVdcNetworks.yaml#/definitions/OrgVdcNetworkAdditionalProperties' + referenced-property: vAppUplinkEligible + alias: vAppUplinkEligible + description: | + A filter to look up a list of networks that are eligible as an uplink to a vApp + Example usage: + filter?vAppUplinkEligible==true + + RouterConnection: + x-vcloud-added-in: "31.0" + description: | + Describes the connection between a routed network and an edge gateway. This must be set if converting from an isolated to a routed network. + type: object + properties: + routerRef: + $ref: '#/definitions/EntityReference' + description: The edge gateway that this network is attached to. + connectionType: + $ref: '#/definitions/VdcNetworkConnectionType' + description: | + How the network is connected to the edge gateway. This field is updatable to allow conversions between different types. + If owner is a VDC group that is backed by a NSX-V network provider, this field does not need to be set. The organization + VDC network will be automatically connected to the distributed router associated with the VDC group. + connected: + type: boolean + default: true + description: Whether network is marked as connected in NSX. + x-vcloud-property-annotations: + connected: + x-vcloud-added-in: "33.0" + + VdcNetworkDhcpConfig: + x-vcloud-added-in: "32.0" + description: | + Configuration for the DHCP service that runs for the network. In order to use DHCPv6 in NSX-T, the network must be configured in EDGE mode, the network must be + attached to a router, and the router must have a SLAAC profile configured with DHCPv6 mode. + type: object + properties: + enabled: + type: boolean + description: Whether the DHCP service is currently enabled on network. + default: true + leaseTime: + type: integer + description: | + The amount of time in milliseconds of how long a DHCP IP will be leased out for. The minimum is 60ms while the maximum is 4294967295ms, which is + roughly 49 days. + default: 86400 + format: int64 + dhcpPools: + type: array + items: + $ref: '#/definitions/VdcNetworkDhcpPool' + description: Range of DHCP IP addresses + mode: + type: string + description: | + This value describes how the DHCP service is configured for this network. Once a DHCP service has been created, the mode attribute cannot be changed. + The mode field will default to 'EDGE' if it is not provided. This field only applies to networks backed by an NSX-T network provider. +
        +
      • The supported values are EDGE and NETWORK.
      • +
      • If EDGE is specified, the DHCP service of the edge is used to obtain DHCP IPs.
      • +
      • If NETWORK is specified, a DHCP server is created for use by this network.
      • +
      + In order to use DHCP for IPV6, NETWORK mode must be used. Routed networks which are using NETWORK DHCP services can be disconnected from the edge gateway + and still retain their DHCP configuration, however network using EDGE DHCP cannot be disconnected from the gateway until DHCP has been disabled. + ipAddress: + type: string + description: | + The IP address of the DHCP service. This is required upon create if using NETWORK mode. This field only applies to networks backed by an NSX-T + network provider. + x-vcloud-property-annotations: + mode: + x-vcloud-added-in: "35.0" + leaseTime: + x-vcloud-added-in: "35.0" + ipAddress: + x-vcloud-added-in: "35.0" + x-vcloud-constraints: + - constraint: NetworkAddress + args: + - arg: IPV4_IP + - arg: IPV6_IP + + VdcNetworkDhcpPool: + x-vcloud-added-in: "32.0" + description: | + A range of DHCP ip addresses and its lease time configuration. + type: object + properties: + enabled: + type: boolean + description: Whether the DHCP address pool is currently enabled + ipRange: + $ref: "./commonObject.yaml#/definitions/IpRange" + maxLeaseTime: + type: integer + minimum: 0 + description: Max lease time in seconds + defaultLeaseTime: + type: integer + minimum: 0 + description: Default lease time in seconds + + EntityReference: + $ref: "./common/entity.yaml#/definitions/EntityReference" + + VdcNetworkConnectionType: + x-vcloud-added-in: "31.0" + description: | + Describes how a network is connected to a gateway. + type: object + enum: + - DISTRIBUTED + - INTERNAL + - SUBINTERFACE + + VdcNetworkFenceType: + x-vcloud-added-in: "31.0" + description: | + The network type. + type: object + enum: + - DIRECT + - DIRECT_UPLINK + - ISOLATED + - OPAQUE + - NAT_ROUTED + - CROSS_VDC + + OrgVdcNetworkStatus: + x-vcloud-added-in: "32.0" + description: | + Represents status of a Org Vdc network. This value will be PENDING if the network has been recorded by VCD but has not been fully configured, + CONFIGURING if the network is in transition, REALIZED if the existing state of the network has been fully realized, or REALIZED_FAILED if there + was an error creating the network. + type: object + enum: + - PENDING + - CONFIGURING + - REALIZED + - REALIZATION_FAILED + + BackingNetworkType: + x-vcloud-added-in: "32.0" + description: | + The backing network type. + type: object + enum: + - DV_PORTGROUP + - VIRTUAL_WIRE + - IMPORTED_T_LOGICAL_SWITCH + - OPAQUE_NETWORK + - NSXT_FIXED_SEGMENT + - NSXT_FLEXIBLE_SEGMENT + + AllocatedIpAddresses: + x-vcloud-added-in: "32.0" + description: | + List of allocated IP addresses. + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: './networking/orgVdcNetworks.yaml#/definitions/AllocatedIpAddress' + + AllocatedIpAddress: + x-vcloud-added-in: "32.0" + description: | + Describes an allocated IP address for a network. IP addresses can be allocated + to a vApp VM, an edge gateway interface or may be used in a NAT routed environment. + If the address is allocated to an edge gateway, the name of the entity will be 'Edge Gateway'. + type: object + properties: + id: + type: string + description: Unique identifier for record. This is to support UI operations. + entityId: + type: string + description: Id of the entity to which the IP address is allocated such as a VM. + entityName: + type: string + description: Name of the entity to which the IP address is allocated. + vAppName: + type: string + description: Name of the vApp whose VM is using allocated IP address. + ipAddress: + type: string + description: The allocated IP address. + deployed: + type: boolean + description: Whether the entity using this IP address is currently deployed. + allocationType: + $ref: '#/definitions/AllocatedIpAddressAllocationType' + description: The possible allocation types for allocated network address like VSM allocated, VM allocated or NAT routed. + networkRef: + $ref: "#/definitions/EntityReference" + description: | + The vApp network or Org vDC network to which this entity is connected. + orgRef: + $ref: "#/definitions/EntityReference" + description: | + The organization that this entity belongs to. + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + entityId: + x-vcloud-constraints: + - constraint: Urn + args: + - arg: gateway + - arg: vm + - constraint: NonSearchable + - constraint: NonSortable + entityName: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + vAppName: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + deployed: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + allocationType: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + networkRef: + x-vcloud-added-in: "33.0" + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + orgRef: + x-vcloud-added-in: "33.0" + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + AllocatedIpAddressAllocationType: + x-vcloud-added-in: "32.0" + description: | + The possible allocation types for allocated network address. + VM_ALLOCATED means that the IP address is allocated by a VM, + NAT_ROUTED means that the IP address is used in a NAT routed environment and + VSM_ALLOCATED means that the IP address is allocated to an NSX edge gateway interface. + type: object + enum: + - VM_ALLOCATED + - NAT_ROUTED + - VSM_ALLOCATED + + DvSwitch: + $ref: "./networking/vCenterResources.yaml#/definitions/DvSwitch" + + DvpgProperty: + x-vcloud-added-in: "34.0" + description: | + A set of properties which can be managed on a DVPG + type: object + properties: + dvpgMoref: + type: string + description: The VC Moref of the DVPG + vlanId: + type: integer + description: VLAN Id for the DVPG + promiscuousMode: + type: boolean + description: Whether promiscuous mode is currently enabled + forgedTransmit: + type: boolean + description: Whether forged transmit is currently enabled + dvSwitch: + $ref: '#/definitions/DvSwitch' + description: The DVSwitch that this DVPG was created on + x-vcloud-property-annotations: + dvpgMoref: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + vlanId: + x-vcloud-added-in: "35.2" + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + promiscuousMode: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + forgedTransmit: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + dvSwitch: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + + DvpgProperties: + x-vcloud-added-in: "34.0" + description: A list of DvpgProperty for all the DVPG's backing a network + type: object + properties: + dvpgProperties: + type: array + items: + $ref: '#/definitions/DvpgProperty' + description: List of DvpgProperty for each DVPG backing this network + + QueryPageSize: + in: query + name: pageSize + required: true + minimum: 0 + maximum: 32 + default: 16 + type: integer + description: Results per page to fetch. + + diff --git a/schemas/openapi/src/main/resources/schemas/networking/orgVdcVpnGroup.yaml b/schemas/openapi/src/main/resources/schemas/networking/orgVdcVpnGroup.yaml new file mode 100644 index 00000000..69b98207 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/networking/orgVdcVpnGroup.yaml @@ -0,0 +1,220 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2020-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + This API represents a grouping of two or more Org Vdcs connected via VPN (either the vDC + entities or the gateway entities) and chosen associated networks. The networks within the VDC + VPN group members will be accessible to the other VDCs or edge gateways by VPN. + version: "1.0" + title: Org VDC VPN Group API + +paths: + orgVdcVpnGroups: + get: + x-vcloud-added-in: "ALPHA" + tags: + - orgVdcVpnGroup + summary: gets all Org VDC VPN Groups + description: | + Gets all the Org VDC VPN Groups available to the user + operationId: getVdcVpnGroups + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + schema: + $ref: '#/definitions/VdcVpnGroups' + + post: + x-vcloud-added-in: "ALPHA" + tags: + - orgVdcVpnGroup + summary: creates an Org VDC VPN Group + description: | + Takes an Org VDC VPN Group object and establishes a VPN connection between each pair of VDCs + (and the associated networks) within the object + operationId: createVdcVpnGroup + consumes: + - application/json + parameters: + - name: vdcVpnGroup + in: body + required: true + schema: + $ref: '#/definitions/VdcVpnGroup' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + + orgVdcVpnGroup: + parameters: + - name: vdcVpnGroupId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: vdcVpnGroup + + get: + x-vcloud-added-in: "ALPHA" + tags: + - orgVdcVpnGroup + summary: gets an Org VDC VPN Group + description: | + Retrieves a singular Org VDC VPN Group with the given ID + operationId: getVdcVpnGroup + produces: + - application/json + responses: + 200: + schema: + $ref: '#/definitions/VdcVpnGroup' + + put: + x-vcloud-added-in: "ALPHA" + tags: + - orgVdcVpnGroup + summary: updates an Org VDC VPN Group + description: | + Updates a singular Org VDC VON Group with the given ID + operationId: updateVdcVpnGroup + consumes: + - application/json + parameters: + - name: vdcVpnGroup + in: body + required: true + schema: + $ref: '#/definitions/VdcVpnGroup' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + + delete: + x-vcloud-added-in: "ALPHA" + tags: + - orgVdcVpnGroup + summary: deletes specified Org VDC VPN Grouping + description: | + Deletes a singular Org VDC VPN Group with the given ID + operationId: deleteVdcVpnGroup + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + + +definitions: + VdcVpnGroups: + x-vcloud-added-in: "ALPHA" + description: | + List of VDC VPN Groups + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: '#/definitions/VdcVpnGroup' + + VdcVpnGroup: + x-vcloud-added-in: "ALPHA" + description: | + A VDC VPN Group object contains a series of VDC VPN Group Members to establish VPN + connections amongst them. Each VDC and network listed within the VDC VPN Group will have its + networks accessible to the other VDCs in the connection. + type: object + properties: + name: + type: string + description: The name of the Org VDC VPN Group + description: + type: string + description: The description of the Org VDC VPN Group + id: + type: string + description: The URN of the Org VDC VPN Group Object + orgId: + type: string + description: The organization that this VDC VPN group belongs to. + members: + type: array + description: List of VDC VPN Group members to connect with VPN + items: + $ref: '#/definitions/VdcVpnGroupMember' + required: + - name + - members + - orgId + x-vcloud-property-annotations: + description: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + id: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + - constraint: Urn + args: + - arg: vdcVpnGroup + orgId: + x-vcloud-constraints: + - constraint: NonSortable + - constraint: Urn + args: + - arg: org + members: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + + VdcVpnGroupMember: + x-vcloud-added-in: "ALPHA" + description: | + A VDC VPN Group Member contains the org VDC or edge gateway to connect and selected org VDC + networks to be accessible across the VPN connection. + properties: + connectedEntity: + $ref: '#/definitions/EntityReference' + description: Either a VDC or an edge gateway to use as one end of the VPN connection + networks: + type: array + description: The list of org VDC networks entity refs to be shared in the VPN connection + items: + $ref: '#/definitions/EntityReference' + required: + - connectedEntity + - networks + x-vcloud-property-annotations: + connectedEntity: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + networks: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + EntityReference: + $ref: "./common/entity.yaml#/definitions/EntityReference" + diff --git a/schemas/openapi/src/main/resources/schemas/networking/securityTags.yaml b/schemas/openapi/src/main/resources/schemas/networking/securityTags.yaml new file mode 100644 index 00000000..339af706 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/networking/securityTags.yaml @@ -0,0 +1,288 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2021-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + API to manage security tags for an entity such as VMs. + version: "1.0" + title: Tag API + +paths: + + tag-values: + get: + x-vcloud-added-in: "36.0" + x-vcloud-default-sort: + default-sort-field: tag + sort-ascending: true + tags: + - securityTags + summary: Retrieves the list of security tags that are in the organization. + description: | + Retrieves the list of security tags that are in the organization and can be reused to tag an entity. + The list of tags include tags assigned to entities within the organization. + This API is meant for organization user only (i.e. not system provider). + operationId: getTagValues + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/SecurityTagValues' + + tagged-entities: + get: + x-vcloud-added-in: "36.0" + x-vcloud-default-sort: + default-sort-field: entityType + sort-ascending: true + tags: + - securityTags + summary: Retrieves the list of entities that have at least one tag assigned to it. + description: | + Retrieves the list of entities that have at least one tag assigned to it. + Besides entityType, additional supported filters are: +
        +
      • tag - The tag to search by +
      + Example: filter=(tag==Web;entityType==vm) + operationId: getSecurityTaggedEntities + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/SecurityTaggedEntities' + + security-tag: + put: + x-vcloud-added-in: "36.0" + tags: + - securityTags + summary: Updates a specific tag + description: | + Only the list of tagged entities can be updated. The name cannot be updated. + Any other existing entities not in the list will be untagged. + operationId: updateSecurityTag + consumes: + - application/json + parameters: + - name: securityTag + in: body + required: true + schema: + $ref: '#/definitions/SecurityTag' + responses: + 204: + description: security tag updated + + vm-tags: + parameters: + - name: id + description: the URN of the VM to manage tags for. + in: path + required: true + type: string + + get: + x-vcloud-added-in: "36.0" + tags: + - securityTags + summary: Retrieves the list of tags for a specific VM. + description: | + Retrieves the list of tags for a specific VM. If user has view right to the VM, user can view its tags. + operationId: getVmTags + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EntitySecurityTags' + + put: + x-vcloud-added-in: "36.0" + tags: + - securityTags + summary: Update the list of tags for a specific VM. + description: | + Update the list of tags for a specific VM. An empty list of tags means to delete all dags for the VM. + If user has edit permission on the VM, user can edit its tags. + operationId: updateVmTags + consumes: + - application/json + produces: + - application/json + parameters: + - name: entityTags + in: body + description: the list of tags to update. + required: true + schema: + $ref: '#/definitions/EntitySecurityTags' + responses: + 200: + description: OK + schema: + $ref: "#/definitions/EntitySecurityTags" + +definitions: + + SecurityTagValue: + x-vcloud-added-in: "36.0" + description: | + Describes the most basic tag structure: its value. + type: object + properties: + tag: + type: string + description: The value of the tag. The value is case-agnostic and will be converted to lower-case. + maxLength: 128 + x-vcloud-case-agnostic: true + required: + - value + x-vcloud-property-annotations: + value: + x-vcloud-constraints: + - constraint: ReadOnly + + SecurityTagValues: + x-vcloud-added-in: "36.0" + description: | + List of a tags that users can use to assign to entities. + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: './networking/securityTags.yaml#/definitions/SecurityTagValue' + + SecurityTaggedEntities: + x-vcloud-added-in: "36.0" + description: | + List of entities that are tagged. + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: './networking/securityTags.yaml#/definitions/SecurityTaggedEntity' + + SecurityTaggedEntity: + x-vcloud-added-in: "36.0" + description: | + An entity that has a tag. + type: object + properties: + id: + type: string + description: | + The unique identifier of the entity in URN format. + name: + type: string + description: The name of the entity. + readOnly: true + parentRef: + $ref: '#/definitions/EntityReference' + description: The parent of the entity such as vApp if the entity is a VM. If not applicable, field is not set. + ownerRef: + $ref: '#/definitions/EntityReference' + description: The owner of the specified entity such as vDC or vDC Group. If not applicable, field is not set. + entityType: + type: string + description: The type of entity. Currently only "vm" is supported. + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: Urn + args: + - arg: vm + - constraint: NonSortable + - constraint: ReadOnly + name: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + - constraint: ReadOnly + parentRef: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + - constraint: ReadOnly + ownerRef: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + - constraint: ReadOnly + entityType: + x-vcloud-constraints: + - constraint: ReadOnly + x-vcloud-cross-references: + - cross-reference: + alias: tag + + EntitySecurityTags: + x-vcloud-added-in: "36.0" + description: | + List of a tags assigned to a specific entity + type: object + properties: + tags: + type: array + description: The list of tags. The value is case-agnostic and will be converted to lower-case. + items: + type: string + maxItems: 256 + x-vcloud-property-annotations: + tags: + x-vcloud-constraints: + - constraint: ReadOnly + + SecurityTag: + x-vcloud-added-in: "36.0" + description: | + An individual security tag + type: object + properties: + tag: + type: string + description: The tag to use. + maxLength: 128 + x-vcloud-case-agnostic: true + entities: + type: array + description: List of entities to tag in urn format. + items: + type: string + required: + - tag + - entities + x-vcloud-property-annotations: + tag: + x-vcloud-constraints: + - constraint: ReadOnly + + EntityReference: + $ref: "./common/entity.yaml#/definitions/EntityReference" diff --git a/schemas/openapi/src/main/resources/schemas/networking/universalEgressPoints.yaml b/schemas/openapi/src/main/resources/schemas/networking/universalEgressPoints.yaml new file mode 100644 index 00000000..0bd4c44d --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/networking/universalEgressPoints.yaml @@ -0,0 +1,244 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2011-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The vCloud Director Universal Egress Points API allows for management of egress points that belong to a universal router. + The egress points can be used for routing in a vDC Group. + version: "1.0" + title: Egress Points API + +paths: + + egressPoints: + parameters: + - name: universalRouterId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: universalRouter + + get: + tags: + - egressPoints + summary: Get a list of Universal Egress Points for a Universal Router. + operationId: getEgressPoints + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EgressPoints' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + post: + tags: + - egressPoints + summary: Creates a new Universal Egress Point from a specified Edge Gateway and Org vDC. + operationId: createEgressPoint + consumes: + - application/json + parameters: + - name: egressPoint + in: body + required: true + schema: + $ref: '#/definitions/EgressPoint' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + + egressPoint: + parameters: + - name: universalRouterId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: universalRouter + - name: egressPointId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: universalEgressPoint + + get: + tags: + - egressPoint + summary: Retrieves a specific Universal Egress Point. + operationId: getEgressPoint + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EgressPoint' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + delete: + tags: + - egressPoint + summary: Deletes a specific Universal Egress Point. + operationId: deleteEgressPoint + parameters: + - $ref: "./common/delete.yaml#/parameters/forceDelete" + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + sync: + parameters: + - name: universalRouterId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: universalRouter + - name: egressPointId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: universalEgressPoint + + post: + tags: + - egressPoint + summary: Sync/repair the egress point. + operationId: syncEgressPoint + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + +definitions: + + EgressPoints: + description: | + List of Egress Points. + type: object + properties: + values: + type: array + description: The list of Universal Egress Points. + items: + $ref: '#/definitions/EgressPoint' + + EgressPoint: + description: | + An Egress Point. + type: object + properties: + id: + type: string + description: The unique ID for the Universal Egress Point (read-only). + vdcRef: + $ref: '#/definitions/EntityReference' + description: The Org vDC the Universal Egress Point belongs to. + gatewayRef: + $ref: '#/definitions/EntityReference' + description: The Edge Gateway the Egress Point is referring to. + networkProviderScope: + type: string + description: Read-only field that specifies the network provider scope of the Universal Egress Point (inherited from the Org vDC). + isUsedForRouting: + type: boolean + description: Specifies whether the egress point is being used for Universal Routing. This is a read-only field. + status: + $ref: '#/definitions/VdcGroupEntityStatus' + description: The status of the Universal Egress Point. + errorMessage: + type: string + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: Urn + args: + - arg: universalEgressPoint + - constraint: ReadOnly + - constraint: NonSearchable + vdcRef: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + gatewayRef: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + networkProviderScope: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + isUsedForRouting: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + - constraint: ReadOnly + status: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + errorMessage: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + EgressPointReference: + description: | + An EgressPoint reference object for use in universal routing. + type: object + properties: + egressPointId: + type: string + description: The id of the Universal Egress Point reference. + vdcRef: + $ref: '#/definitions/EntityReference' + description: The Org vDC of the Universal Egress Point reference. + gatewayRef: + $ref: '#/definitions/EntityReference' + description: The Edge Gateway of the Universal Egress Point reference. + x-vcloud-property-annotations: + vdcRef: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + gatewayRef: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + egressPointId: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + EntityReference: + $ref: "./common/entity.yaml#/definitions/EntityReference" + + VdcGroupEntityStatus: + $ref: "./vdcGroups/vdcGroups.yaml#/definitions/VdcGroupEntityStatus" diff --git a/schemas/openapi/src/main/resources/schemas/networking/universalRouters.yaml b/schemas/openapi/src/main/resources/schemas/networking/universalRouters.yaml new file mode 100644 index 00000000..633309d2 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/networking/universalRouters.yaml @@ -0,0 +1,488 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2011-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + API for Universal Routers + version: "1.0" + title: Universal Routers API + +paths: + + universalRouters: + + post: + tags: + - universalRouters + summary: Create a new universal router + description: | + Create a new universal router for a vDC group + operationId: createUniversalRouter + consumes: + - application/json + parameters: + - name: universalRouter + in: body + required: true + schema: + $ref: '#/definitions/UniversalRouter' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + + universalRoutersForVdcGroup: + parameters: + - name: vdcGroupId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: vdcGroup + + get: + tags: + - universalRouters + summary: Get all the universal routers defined for a vDC group + description: | + Get all the universal routers defined for a vDC group in the system. + operationId: getAllUniversalRoutersForVdcGroup + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/UniversalRouters' + + universalRouter: + parameters: + - name: universalRouterId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: universalRouter + + get: + tags: + - universalRouter + summary: Retrieves a specific Universal Router + operationId: getUniversalRouter + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/UniversalRouter' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + put: + tags: + - universalRouter + summary: Updates a specific Universal Router + operationId: updateUniversalRouter + consumes: + - application/json + parameters: + - name: router + in: body + required: true + schema: + $ref: '#/definitions/UniversalRouter' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + delete: + tags: + - universalRouter + summary: Deletes a specific Universal Router + operationId: deleteUniversalRouter + parameters: + - $ref: "./common/delete.yaml#/parameters/forceDelete" + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + sync: + parameters: + - name: universalRouterId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: universalRouter + + post: + tags: + - universalRouter + summary: Sync/repair the Universal Router + description: | + Sync/repair the Universal Router + operationId: syncUniversalRouter + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + dns: + parameters: + - name: universalRouterId + in: path + required: true + type: string + + get: + tags: + - universalRouterDns + summary: Retrieves dns configuration of a universal router + operationId: getDnsConfigForRouter + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/RouterDnsConfig' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + put: + tags: + - universalRouterDns + summary: Updates dns configuration of a universal Router + operationId: updateDnsConfigForRouter + consumes: + - application/json + parameters: + - name: dnsConfig + in: body + required: true + schema: + $ref: '#/definitions/RouterDnsConfig' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + delete: + tags: + - universalRouterDns + summary: Deletes dns configuration of a universal router + operationId: deleteDnsConfigForRouter + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + dhcp: + parameters: + - name: universalRouterId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: universalRouter + + get: + tags: + - universalRouterDhcp + summary: Retrieves Dhcp configuration of a specific Universal Router + operationId: getDhcpConfigForUniversalRouter + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/UniversalRouterDhcpConfig' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + put: + tags: + - universalRouterDhcp + summary: Updates Dhcp configuration for a specific Universal Router + operationId: updateDhcpConfigForUniversalRouter + consumes: + - application/json + parameters: + - name: dhcpConfig + in: body + required: true + schema: + $ref: '#/definitions/UniversalRouterDhcpConfig' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + delete: + tags: + - universalRouterDhcp + summary: Deletes Dhcp configuration of a specific Universal Router + operationId: deleteDhcpConfigForUniversalRouter + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + health: + parameters: + - name: universalRouterId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: universalRouter + + get: + tags: + - universalRouterHealth + summary: Get Health information of a universal router + description: | + Get Health information of a universal router and its associated entities such as egress points + and routing. It includes information about reachability status of all the participating vDC's of + referenced vDC group and it also includes information about all the nsx managers covered by this universal router + along with associated nsx controller cluster. + operationId: getUniversalRouterHealth + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/RouterHealthReport' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + +definitions: + + UniversalRouters: + description: | + List of Universal Routers + type: object + properties: + values: + type: array + items: + $ref: '#/definitions/UniversalRouter' + + UniversalRouter: + description: | + A UniversalRouter object + type: object + properties: + id: + type: string + name: + type: string + description: + type: string + vdcGroupRef: + $ref: '#/definitions/EntityReference' + localEgress: + type: boolean + status: + $ref: '#/definitions/VdcGroupEntityStatus' + errorMessage: + type: string + required: + - vdcGroupRef + - name + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: Urn + args: + - arg: universalRouter + - constraint: ReadOnly + - constraint: NonSearchable + name: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + description: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + vdcGroupRef: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + localEgress: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + status: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + errorMessage: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + RouterDnsConfig: + description: | + A RouterDnsConfig object + type: object + properties: + enabled: + type: boolean + nameServers: + type: array + items: + type: string + x-vcloud-property-annotations: + enabled: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + nameServers: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + UniversalRouterDhcpConfig: + description: | + A UniversalRouterDhcpConfig object. + type: object + properties: + enabled: + type: boolean + servers: + type: array + items: + $ref: '#/definitions/UniversalRouterDhcpServer' + x-vcloud-property-annotations: + enabled: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + servers: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + UniversalRouterDhcpServer: + description: | + List of Dhcp servers for universal router. + Either egressRef or serverAddress is required to identify Dhcp server. + type: object + properties: + egressRef: + $ref: '#/definitions/EntityReference' + serverAddress: + type: string + + RouterHealthReport: + description: | + Health Report of a Router + type: object + properties: + nsxManagersHealth: + description: | + Status of all the nsx managers spanned by the universal router. + type: array + items: + $ref: '#/definitions/RouterComponentHealth' + controlVmHealth: + description: | + Status of all the universal router control VMs within each network provider scope. + This also includes status of egress points and routes configured for the universal router. + type: array + items: + $ref: '#/definitions/RouterComponentHealth' + controlPlaneHealth: + description: | + Status of the nsx controller cluster associated with the nsx managers. + $ref: '#/definitions/RouterComponentHealth' + vdcReachabilityStatus: + description: | + Reachability status for local and remote participating vDC's of referenced vDC group. + States whether a vDC is reachable from this local site. + type: array + items: + $ref: '#/definitions/RouterComponentHealth' + x-vcloud-property-annotations: + nsxManagersHealth: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + controlVmHealth: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + controlPlaneHealth: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + vdcReachabilityStatus: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + RouterComponentHealth: + description: | + A ComponentHealth object + type: object + properties: + component: + type: string + status: + $ref: '#/definitions/RouterComponentStatus' + message: + type: string + action: + type: string + code: + type: integer + + EntityReference: + $ref: "./common/entity.yaml#/definitions/EntityReference" + + VdcGroupEntityStatus: + $ref: "./vdcGroups/vdcGroups.yaml#/definitions/VdcGroupEntityStatus" + + RouterComponentStatus: + description: | + Status of a router component. + type: object + enum: + - UP + - DOWN + diff --git a/schemas/openapi/src/main/resources/schemas/networking/universalRouting.yaml b/schemas/openapi/src/main/resources/schemas/networking/universalRouting.yaml new file mode 100644 index 00000000..628f9b25 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/networking/universalRouting.yaml @@ -0,0 +1,258 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2011-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The vCloud Director Universal Routing API allows for routing configuration/management for a Universal Router and its associated Egress Points. + version: "1.0" + title: Universal Routing API + +paths: + + universalEgressRouting: + parameters: + - name: universalRouterId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: universalRouter + + get: + tags: + - universalRouting + summary: Retrieves Universal Egress Points and routing configuration for a Universal Router. + operationId: getUniversalEgressRouting + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/UniversalEgressRoutes' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + put: + tags: + - universalRouting + summary: | + Updates the routing configuration using the specified egress points in the universal routes. Any egress point that does not exist will be + created before updating routing. Any egress point that currently exists and is not in use by any of the specified routes will be deleted. If the new + egress points for routing fail to create, routing will not be updated. + operationId: updateUniversalEgressRouting + consumes: + - application/json + parameters: + - name: universalEgressRoutes + in: body + required: true + schema: + $ref: '#/definitions/UniversalEgressRoutes' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + universalRouting: + parameters: + - name: universalRouterId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: universalRouter + + get: + tags: + - universalRouting + summary: Retrieves routing configuration for a Universal Router. + operationId: getUniversalRoutes + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/UniversalRoutes' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + put: + tags: + - universalRouting + summary: Updates routing configuration for a Universal Router. + operationId: updateUniversalRoutes + consumes: + - application/json + parameters: + - name: routes + in: body + required: true + schema: + $ref: '#/definitions/UniversalRoutes' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + universalRoutingSync: + parameters: + - name: universalRouterId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: universalRouter + + post: + tags: + - universalRouting + summary: Sync/repair the routing configuration for a Universal Router. + description: | + Sync/repair the universal routes + operationId: syncUniversalRoutes + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + +definitions: + + UniversalRoutes: + description: | + List of routes associated with a Universal Router. + type: object + properties: + keepAliveTimer: + type: integer + description: The Keep Alive Timer is the frequency (in seconds) at which the Universal Router seeds Keep Alive messages to its egress peers. + values: + type: array + description: The list of Universal Routes. + items: + $ref: '#/definitions/UniversalRoute' + providerScopesToForceUnconfigure: + type: array + description: | + The list network provider scopes whose route will be unconfigure forcefully. This means that a route that is in state that normally shouldn't be + unconfigurable (i.e. NSX or remote vCD site is down) will still be unconfigured. Errors may be ignored. Note that this force option also affects any route + update where a network provider's egress point is modified/changed. vCD will first unconfigure any existing egress point before configuring the new egress + point. + items: + type: string + x-vcloud-property-annotations: + keepAliveTimer: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + providerScopesToForceUnconfigure: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + UniversalRoute: + description: | + A Route for a Universal Router. + type: object + properties: + defaultEgress: + $ref: '#/definitions/EgressPointReference' + description: For a given route, routing by default will go through the default egress point. Every valid/configured route will have a default egress point. + standbyEgress: + $ref: '#/definitions/EgressPointReference' + description: A standby egress point can be configured for failover of routes in case there is an issue routign to the default egress point. + networkProviderScope: + type: string + description: The network provider scope for the given route. There can only be one route per fault domain for a Universal Route. + status: + $ref: '#/definitions/UniversalRoutingStatus' + description: The status of the route (whether it's realized, failed, etc.). + errorMessage: + type: string + required: + - networkProviderScope + x-vcloud-property-annotations: + defaultEgress: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + standbyEgress: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + networkProviderScope: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + status: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + errorMessage: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + UniversalEgressRoutes: + description: | + Object consisting of Egress Points and Universal Routes for a Universal Router. + type: object + properties: + egressPoints: + $ref: '#/definitions/EgressPoints' + description: The list of Egress Points for routing configuration. This is read-only. + universalRoutes: + $ref: '#/definitions/UniversalRoutes' + description: | + The list of Universal Routes for routing configuration. + x-vcloud-property-annotations: + egressPoints: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + universalRoutes: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + UniversalRoutingStatus: + description: | + Represents status of given routing configuration, such as realized, universal router routing configuration failed, egress routing configuration failed, etc. + type: object + enum: + - SAVING + - SAVED + - CONFIGURING + - REALIZED + - REALIZATION_FAILED + - CONFIGURATION_FAILED_UNIVERSAL_ROUTER + - CONFIGURATION_FAILED_UNIVERSAL_EGRESS_POINT + - UNCONFIGURED + - DELETING + - DELETION_FAILED_UNIVERSAL_ROUTER + - DELETION_FAILED_UNIVERSAL_EGRESS_POINT + + EgressPoints: + $ref: "./networking/universalEgressPoints.yaml#/definitions/EgressPoints" + + EgressPointReference: + $ref: "./networking/universalEgressPoints.yaml#/definitions/EgressPointReference" diff --git a/schemas/openapi/src/main/resources/schemas/networking/vCenterResources.yaml b/schemas/openapi/src/main/resources/schemas/networking/vCenterResources.yaml new file mode 100644 index 00000000..fb247bf2 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/networking/vCenterResources.yaml @@ -0,0 +1,181 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2019-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + List of existing vCenter resources. + version: "1.0" + title: vCenter resources + +paths: + + importableDistributedPortgroups: + get: + x-vcloud-added-in: "33.0" + tags: + - vCenterResources + summary: Get all DVPG network backings that are available. + description: | + Get all DVPG network backings that are available. The "_context" filter key is optional and can be set + with the id of the vCenter from which to obtain the DVPG network backings. + "orgVdcId==[vdcUrn]" can be set as a filter to show importable DVPGs for an Org vDC. + operationId: getImportableDvpgs + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/DistributedPortGroups' + + importablePortgroups: + get: + x-vcloud-added-in: "33.0" + tags: + - vCenterResources + summary: Get all standard porgroups available as backings. + description: | + Get all standard portgroups that are available as backings. The "_context" filter key is optional and can be set + with the id of the vCenter from which to obtain the standard porgroup backings. + operationId: getImportablePortgroups + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/PortGroups' + + dvSwitches: + get: + x-vcloud-added-in: "33.0" + tags: + - vCenterResources + summary: Retrieves all distributed virtual switches. + operationId: getDvSwitches + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/DvSwitches' + +definitions: + + DistributedPortGroups: + x-vcloud-added-in: "33.0" + description: | + List of distributed portgroups. + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: './networking/vCenterResources.yaml#/definitions/DistributedPortGroup' + + DistributedPortGroup: + x-vcloud-added-in: "33.0" + description: | + Distributed portgroup. + type: object + properties: + backingRef: + $ref: '#/definitions/BackingRef' + description: Contains the backing id and name of the distributed portgroup. + virtualCenter: + $ref: '#/definitions/EntityReference' + description: The entity reference for the vCenter that contains this distributed portgroup. + vlan: + type: string + description: The VLAN associated with this distributed portgroup. This can be a single number or a numerical range(1-10). + dvSwitch: + $ref: '#/definitions/DvSwitch' + description: The distributed virtual switch on which this distributed virtual portgroup was created. + x-vcloud-cross-references: + - cross-reference: + referenced-type: "./networking/vdcs.yaml#/definitions/OrgVdc" + referenced-property: id + alias: orgVdcId + + DvSwitches: + x-vcloud-added-in: "33.0" + description: | + List of distributed virtual switches. + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: './networking/vCenterResources.yaml#/definitions/DvSwitch' + + DvSwitch: + x-vcloud-added-in: "33.0" + description: | + Distributed virtual switch. + type: object + properties: + backingRef: + $ref: '#/definitions/BackingRef' + description: Contains the backing id and name of the distributed virtual switch. + virtualCenter: + $ref: '#/definitions/EntityReference' + description: The entity reference for the vCenter that contains this distributed virtual switch. + + PortGroup: + x-vcloud-added-in: "33.0" + description: | + Standard portgroup. + type: object + properties: + backingRef: + $ref: '#/definitions/BackingRef' + description: Contains the backing id and name of the standard portgroup. + virtualCenter: + $ref: '#/definitions/EntityReference' + description: The entity reference for the vCenter that contains this portgroup. + + PortGroups: + x-vcloud-added-in: "33.0" + description: | + List of standard portgroups. + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: './networking/vCenterResources.yaml#/definitions/PortGroup' + + EntityReference: + $ref: "./common/entity.yaml#/definitions/EntityReference" + + BackingRef: + $ref: "./networking/commonObject.yaml#/definitions/BackingRef" diff --git a/schemas/openapi/src/main/resources/schemas/networking/vdcNetworkProfiles.yaml b/schemas/openapi/src/main/resources/schemas/networking/vdcNetworkProfiles.yaml new file mode 100644 index 00000000..83f1f4f4 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/networking/vdcNetworkProfiles.yaml @@ -0,0 +1,134 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2019-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The vDC Network Profile API allows for management of of an Org vDC's Network Profile. + A Given vDC Network Profile definition can contain things such as Primary/Secondary Edge Clusters, etc. + An Org VDC, which will deploy networks/edges based on the profile. + version: "1.0" + title: vDC Network Profile API + +paths: + + vdcNetworkProfile: + parameters: + - name: orgVdcId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: vdc + + get: + x-vcloud-added-in: "32.0" + tags: + - vdcNetworkProfile + summary: Retrieves the vDC Network Profile. + operationId: getVdcNetworkProfile + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/VdcNetworkProfile' + + put: + x-vcloud-added-in: "32.0" + tags: + - vdcNetworkProfile + summary: Updates the vDC Network Profile. + operationId: updateVdcNetworkProfile + consumes: + - application/json + parameters: + - name: vdcNetworkProfile + in: body + required: true + schema: + $ref: '#/definitions/VdcNetworkProfile' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + + delete: + x-vcloud-added-in: "32.0" + tags: + - vdcNetworkProfile + summary: Deletes/Reset a vDC Network Profile. + operationId: deleteVdcNetworkProfile + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + +definitions: + + VdcNetworkProfile: + x-vcloud-added-in: "32.0" + description: | + A vDC Network Profile object. + type: object + properties: + primaryEdgeCluster: + $ref: '#/definitions/EntityReference' + description: The Edge Cluster where the primary appliance for an NSX-V Edge Gateway will be deployed. + secondaryEdgeCluster: + $ref: '#/definitions/EntityReference' + description: The Edge Cluster where the secondary appliance for an NSX-V Edge Gateway will be deployed if HA is enabled on the Edge. + servicesEdgeCluster: + $ref: '#/definitions/ServicesEdgeCluster' + description: The Edge Cluster where the DHCP server profile will be stored for NSX-T networks using NETWORK mode DHCP. + x-vcloud-added-in: "35.0" + x-vcloud-property-annotations: + primaryEdgeCluster: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + secondaryEdgeCluster: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + servicesEdgeCluster: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + ServicesEdgeCluster: + x-vcloud-added-in: "35.0" + description: | + This represents the Edge Cluster to be used for network services. + This can only be used to represent Edge Clusters managed by NSX-T. + type: object + properties: + edgeClusterRef: + $ref: '#/definitions/EntityReference' + description: The reference to VCD Edge Cluster, if it exists. + backingId: + type: string + description: | + The Id of the Edge Cluster in the NSX-T manager. If the user + provides the id of NSX-T edge cluster during update, VCD will + automatically create a corresponding VCD Edge cluster object + referencing the specified NSX-T edge cluster. For NSX-V Edges, + this is set to NULL. + x-vcloud-property-annotations: + edgeClusterRef: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + backingId: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + EntityReference: + $ref: "./common/entity.yaml#/definitions/EntityReference" diff --git a/schemas/openapi/src/main/resources/schemas/org/org.yaml b/schemas/openapi/src/main/resources/schemas/org/org.yaml new file mode 100644 index 00000000..5e9b5aca --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/org/org.yaml @@ -0,0 +1,223 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2019-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The vCloud Director Org API. + version: "1.0" + title: vCloud Director Org API + +paths: + + orgs: + get: + tags: + - Org + summary: Get list of all orgs accessible to the user. + x-vcloud-added-in: "35.0" + x-vcloud-multisite: true + x-vcloud-default-sort: + default-sort-field: name + sort-ascending: true + description: | + Get list of all orgs accessible to the user. + operationId: queryOrgs + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/Orgs' + + post: + tags: + - Org + summary: Create a new organization + x-vcloud-added-in: "36.0" + operationId: createOrg + consumes: + - application/json + parameters: + - name: newOrg + in: body + required: true + schema: + $ref: "#/definitions/Org" + produces: + - application/json + responses: + 201: + description: Created + schema: + $ref: "#/definitions/Org" + + org: + parameters: + - name: orgUrn + in: path + description: orgUrn + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: org + get: + x-vcloud-added-in: "35.0" + tags: + - Org + summary: Get specified organization. + operationId: getOrg + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/Org" + delete: + tags: + - Org + summary: Delete the specified org. + operationId: deleteOrg + parameters: + - $ref: "./common/delete.yaml#/parameters/forceDelete" + description: "Pass force=true as query parameter to remove an organization regardless of its state." + - $ref: "./common/delete.yaml#/parameters/recursiveDelete" + description: "Pass recursive=true as query parameter to remove an organization and any objects it contains." + x-vcloud-added-in: "36.0" + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + put: + tags: + - Org + summary: Updates an organization. + x-vcloud-added-in: "36.0" + description: | + Updates an organization. + operationId: updateOrg + consumes: + - application/json + parameters: + - name: modifiedOrg + in: body + required: true + schema: + $ref: "#/definitions/Org" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/Org" + +definitions: + + Org: + x-vcloud-added-in: "35.0" + description: | + An Organization. + type: object + properties: + id: + type: string + description: A unique identifier for the organization. + name: + type: string + description: Name of the organization. + pattern: "^[a-zA-Z0-9_\\-\\.\\!\\'\\(\\),\\$]+$" + maxLength: 128 + displayName: + type: string + description: Full display name of the organization. + pattern: "(?=.*\\S.*)^[^\\p{Zl}\\p{Zp}\\p{C}]*$" + maxLength: 128 + description: + type: string + default: "" + description: Description of the organization. + maxLength: 256 + isEnabled: + type: boolean + default: false + description: Whether the organization is enabled or not. + x-vcloud-restricted: restricted field, requires "Organization Administrator View" right to access this field. + orgVdcCount: + type: integer + description: The number of VDCs in the org. + x-vcloud-added-in: "36.0" + x-vcloud-restricted: restricted field, requires "Organization Administrator View" right to access this field. + x-vcloud-constraints: + - constraint: ReadOnly + catalogCount: + type: integer + description: The number of catalogs in the org. + x-vcloud-added-in: "36.0" + x-vcloud-restricted: restricted field, requires "Organization Administrator View" right to access this field. + x-vcloud-constraints: + - constraint: ReadOnly + vappCount: + type: integer + description: The number of vApps in the org. + x-vcloud-added-in: "36.0" + x-vcloud-restricted: restricted field, requires "Organization Administrator View" right to access this field. + x-vcloud-constraints: + - constraint: ReadOnly + runningVMCount: + type: integer + description: The number of running VMs in the org. + x-vcloud-added-in: "36.0" + x-vcloud-restricted: restricted field, requires "Organization Administrator View" right to access this field. + x-vcloud-constraints: + - constraint: ReadOnly + userCount: + type: integer + description: The number of users in the org. + x-vcloud-added-in: "36.0" + x-vcloud-restricted: restricted field, requires "Organization Administrator View" right to access this field. + x-vcloud-constraints: + - constraint: ReadOnly + canPublish: + type: boolean + description: Whether the organization can publish catalogs externally. + x-vcloud-added-in: "36.0" + x-vcloud-restricted: restricted field, requires "Organization Administrator View" right to access this field. + x-vcloud-constraints: + - constraint: ReadOnly + required: + - name + - displayName + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: NonSortable + - constraint: Urn + - constraint: ReadOnly + args: + - arg: org + Orgs: + x-vcloud-added-in: "35.0" + description: | + A list of Organizations. + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + description: The current page of organizations. + items: + $ref: '#/definitions/Org' diff --git a/schemas/openapi/src/main/resources/schemas/preferences/user-preferences.yaml b/schemas/openapi/src/main/resources/schemas/preferences/user-preferences.yaml new file mode 100644 index 00000000..e0441814 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/preferences/user-preferences.yaml @@ -0,0 +1,230 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2018-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The vCloud Director user preferences API allows to create and view user preferences. + version: "1.0" + title: vCloud Director user preferences API + +paths: + preference-definitions: + get: + tags: + - preferences + summary: Get list of preference definitions. + x-vcloud-added-in: "32.0" + description: | + Get list of preference definitions + operationId: queryPreferenceDefinitions + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/PreferenceDefinitions" + + preference-definition: + parameters: + - name: preferenceDefinitionId + in: path + required: true + type: string + get: + tags: + - preferences + summary: Get specified preference definition. + x-vcloud-added-in: "32.0" + operationId: getPreferenceDefinition + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/PreferenceDefinition" + 404: + description: Not Found + + preferences: + get: + tags: + - preferences + summary: Query user preferences. + x-vcloud-added-in: "32.0" + description: | + Query user preferences + operationId: queryPreferences + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/Preferences" + + preference: + parameters: + - name: classifier + in: path + required: true + type: string + get: + tags: + - preferences + summary: Get specified user preference. + x-vcloud-added-in: "32.0" + operationId: getPreference + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/Preference" + 404: + description: Not Found + put: + tags: + - preferences + summary: Update specified user preference + x-vcloud-added-in: "32.0" + operationId: updatePreference + consumes: + - application/json + parameters: + - name: updatePreferenceParams + in: body + required: true + schema: + $ref: "#/definitions/Preference" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/Preference" + +definitions: + + PreferenceDefinition: + description: | + The Preference Definition is immutable. + type: object + x-vcloud-added-in: "32.0" + properties: + id: + type: string + description: | + UUID for preference definition. This is immutable. + name: + type: string + description: | + Display name. + description: + type: string + default: "" + description: | + Description for user preference + classifier: + type: string + description: | + unique indetifier for this preference definition. It should be of type :. + e.g vrops:myworkflow. This is immutable. + dataType: + type: string + enum: [BOOLEAN, INTEGER, STRING] + description: | + user preference value data type. This is immutable. + constrained: + type: boolean + description: | + true if user preference is selected from list of values (dataType should be number or string), false otherwise. This is immutable. + minValue: + type: number + description: | + minimum value for user preference. Only valid if user preference type is number. This is immutable. + maxValue: + type: number + description: | + maximum value for user preference. Only valid if user preference type is number. This is immutable. + defaultValue: + type: string + desription: | + default value for user preference. + allowedValues: + type: array + items: + type: string + description: + array of allowed values to select from when constrained is true.. This is immutable after creation. + required: + - name + - classifier + - constrained + - dataType + - defaultValue + + PreferenceDefinitions: + description: | + A list of preference definitions + x-vcloud-added-in: "32.0" + allOf: + - $ref: '#/definitions/Page' + - type: object + properties: + values: + type: array + description: The current page for preference definitions. + items: + $ref: '#/definitions/PreferenceDefinition' + + Preference: + type: object + x-vcloud-added-in: "32.0" + properties: + classifier: + type: string + description: | + unique indetifier for this preference definition. It will be of type :. + e.g vrops:myworkflow. This is immutable + name: + type: string + description: | + Display name. This is same as preference definition name and is immutable. + value: + type: string + desription: | + Value for user preference. + required: + - name + - value + - classifier + + Preferences: + description: | + A list of user preferences + x-vcloud-added-in: "32.0" + allOf: + - $ref: '#/definitions/Page' + - type: object + properties: + values: + type: array + description: The list of user preferences. + items: + $ref: '#/definitions/Preference' diff --git a/schemas/openapi/src/main/resources/schemas/pvdc/pvdc.yaml b/schemas/openapi/src/main/resources/schemas/pvdc/pvdc.yaml new file mode 100644 index 00000000..66523438 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/pvdc/pvdc.yaml @@ -0,0 +1,188 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2019-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The Provider VDC API allows for basic CRUD operations of a PVDC. + title: Provider VDC API + +paths: + + providerVdcs: + get: + x-vcloud-multisite: true + x-vcloud-added-in: "33.0" + tags: + - ProviderVdc + summary: Get all provider VDCs. + description: | + Retrieve a list of all provider VDCs. + Results can be filtered by context (_context). + Supported contexts are: + DVS (_context==dvs-NN;vimServer.id==urn:vcloud:vimserver:uuid) - | + Returns all the provider VDCs which are related to the DVS. + The VimServer is required for this filtering. + External Network (_context==urn:vcloud:network:uuid) - | + Returns all the provider VDCs which are related to the external network. + Network Pool (_context==urn:vcloud:networkpool:uuid) - | + Returns all the provider VDCs which are accessible to the network pool. + operationId: getAllProviderVDCs + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/ProviderVdcs" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + + rootResourcePools: + get: + x-vcloud-added-in: "33.0" + tags: + - ProviderVdc + summary: Browse valid root resource pools hierarchy to back a Provider VDC. + description: | + Get a list of all root resource pools. + If a resource pool is ineligible, but is in the response, + this means it has children, which are eligible. + A resource pool will be ineligible, + unless the cluster has an ESXi host on it. + The list will be sorted by name, case insensitive. + operationId: getRootResourcePools + parameters: + - name: pvdcUrn + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: providervdc + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + schema: + $ref: "./vc/virtualCenter.yaml#/definitions/ResourcePools" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + childResourcePools: + get: + x-vcloud-added-in: "33.0" + tags: + - ProviderVdc + summary: Browse valid root resource pools hierarchy to back a Provider VDC. + description: | + Get list of child resource pools of the specified parent. + If a resource pool is ineligible, but is in the response, + this means it has children, which are eligible. + A resource pool will be ineligible, + unless the cluster has an ESXi host on it. + The list will be sorted by name, case insensitive. + operationId: getChildResourcePools + parameters: + - name: pvdcUrn + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: providervdc + - name: moref + in: path + required: true + type: string + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + schema: + $ref: "./vc/virtualCenter.yaml#/definitions/ResourcePools" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + +definitions: + + ProviderVdc: + x-vcloud-added-in: "33.0" + description: | + A provider vdc. + type: object + properties: + id: + type: string + description: A unique identifier for the pvdc. + name: + type: string + description: The name of the pvdc. + description: + type: string + description: + The description of the pvdc. + isEnabled: + type: boolean + description: Whether the pvdc is enabled or not. + maxSupportedHwVersion: + type: string + description: The maximum hardware version this pvdc supports. + nsxTManager: + x-vcloud-added-in: "33.0" + $ref: "../common/entity.yaml#/definitions/EntityReference" + description: The NSX-T manager of the pvdc, if any. + vimServer: + x-vcloud-added-in: "33.0" + $ref: "../common/entity.yaml#/definitions/EntityReference" + description: The vCenter server the pvdc belongs to. + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: Urn + args: + - arg: providervdc + - constraint: NonSortable + description: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + nsxTmanager: + x-vcloud-constraints: + - constraint: NonSortable + vimServer: + x-vcloud-constraints: + - constraint: NonSortable + + ProviderVdcs: + x-vcloud-added-in: "33.0" + description: | + List of Provider VDCs. + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: "./pvdc/pvdc.yaml#/definitions/ProviderVdc" + diff --git a/schemas/openapi/src/main/resources/schemas/qms/entity-quotas.yaml b/schemas/openapi/src/main/resources/schemas/qms/entity-quotas.yaml new file mode 100644 index 00000000..08cbee14 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/qms/entity-quotas.yaml @@ -0,0 +1,213 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2020-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The VMware Cloud Director QMS APIs are used to view effective quotas applicable to a given entity + title: VMware Cloud Director Quotas API + +paths: + user-quotas: + parameters: + - name: userUrn + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: user + get: + tags: + - entityQuotas + summary: Get the effective quotas applicable for the given user. + x-vcloud-added-in: "35.0" + operationId: getQuotasForUser + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/Quotas" + put: + tags: + - entityQuotas + summary: Assign quotas to given target user. + x-vcloud-added-in: "35.0" + operationId: assignQuotasToUser + consumes: + - application/json + parameters: + - name: quotas + in: body + required: true + schema: + $ref: '#/definitions/Quotas' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + + group-quotas: + parameters: + - name: groupUrn + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: group + get: + tags: + - entityQuotas + summary: Get the effective quotas applicable for the given group. + x-vcloud-added-in: "35.0" + operationId: getQuotasForGroup + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/Quotas" + put: + tags: + - entityQuotas + summary: Assign quotas to given target group. + x-vcloud-added-in: "35.0" + operationId: assignQuotasToGroup + consumes: + - application/json + parameters: + - name: quotas + in: body + required: true + schema: + $ref: '#/definitions/Quotas' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + + org-quotas: + parameters: + - name: orgUrn + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: org + get: + tags: + - entityQuotas + summary: Get the effective quotas applicable for the given organization. + x-vcloud-added-in: "35.0" + operationId: getQuotasForOrg + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/Quotas" + put: + tags: + - entityQuotas + summary: Assign quotas to given target organization. + x-vcloud-added-in: "35.0" + operationId: assignQuotasToOrg + consumes: + - application/json + parameters: + - name: quotas + in: body + required: true + schema: + $ref: '#/definitions/Quotas' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + + vapp-quotas: + parameters: + - name: vappUrn + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: vapp + get: + tags: + - entityQuotas + summary: Get the effective quotas applicable for the given vapp. + x-vcloud-added-in: "35.0" + operationId: getQuotasForVApp + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/Quotas" + +definitions: + + Quotas: + description: | + A list of quota pools. + type: object + x-vcloud-added-in: "35.0" + properties: + quotaPools: + type: array + items: + type: object + properties: + enforcingQuotaPolicy: + description: | + The quota policy that enforced this quota. + x-vcloud-constraints: + - constraint: NonSortable + - constraint: ReadOnly + $ref: './qms/entity-quotas.yaml#/definitions/EnforcingQuotaPolicy' + quotaPoolDefinition: + description: | + The quota pool definition used for the consumed quota resource. + x-vcloud-constraints: + - constraint: NonSortable + - constraint: ReadOnly + $ref: '#/definitions/QuotaPoolDefinition' + quotaConsumed: + type: integer + format: int64 + description: | + The quota amount consumed for this resource. This field is conditional and for group + quotas it is not returned. + x-vcloud-constraints: + - constraint: ReadOnly + + EnforcingQuotaPolicy: + x-vcloud-added-in: "35.0" + description: Quota policy that enforces this quota. + allOf: + - $ref: '#/definitions/EntityReference' + - type: object + properties: + inheritedFrom: + description: | + The entity from which enforcing quota policy is inherited. + $ref: '#/definitions/EntityReference' + + EntityReference: + $ref: "./common/entity.yaml#/definitions/EntityReference" + + QuotaPoolDefinition: + $ref: "./quota-policy/quota-policy.yaml#/definitions/QuotaPoolDefinition" diff --git a/schemas/openapi/src/main/resources/schemas/qms/quota-policy-assignment.yaml b/schemas/openapi/src/main/resources/schemas/qms/quota-policy-assignment.yaml new file mode 100644 index 00000000..33f44daf --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/qms/quota-policy-assignment.yaml @@ -0,0 +1,201 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2019-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The VMware Cloud Director QMS APIs allow to assign/unassign quota policies to targets such as user, organization etc. + title: VMware Cloud Director Quota Policy API + +paths: + user-quota-policy-assignment: + parameters: + - name: userUrn + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: user + get: + tags: + - quotaPolicyAssignment + summary: Get the assigned quota policy reference for the given user. + x-vcloud-added-in: "35.0" + operationId: getUserAssignedQuotaPolicy + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/AssignedQuotaPolicy" + put: + tags: + - quotaPolicyAssignment + summary: | + Assign or unassign a quota policy to a given target user. + An empty payload is used to unassign an existing quota policy from a given user. + x-vcloud-added-in: "35.0" + operationId: assignQuotaPolicyToUser + consumes: + - application/json + parameters: + - name: quotaPolicyReference + in: body + required: true + schema: + $ref: '#/definitions/AssignedQuotaPolicy' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + + org-quota-policy-assignment: + parameters: + - name: orgUrn + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: org + get: + tags: + - quotaPolicyAssignment + summary: Get the assigned quota policy reference for the given organization. + x-vcloud-added-in: "35.0" + operationId: getOrgAssignedQuotaPolicy + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/AssignedQuotaPolicy" + put: + tags: + - quotaPolicyAssignment + summary: | + Assign or unassign a quota policy to a given target organization. + An empty payload is used to unassign an existing quota policy from a given organization. + x-vcloud-added-in: "35.0" + operationId: assignQuotaPolicyToOrg + consumes: + - application/json + parameters: + - name: quotaPolicyReference + in: body + required: true + schema: + $ref: '#/definitions/AssignedQuotaPolicy' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + + group-quota-policy-assignment: + parameters: + - name: groupUrn + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: group + get: + tags: + - quotaPolicyAssignment + summary: Get the assigned quota policy reference for the given group. + x-vcloud-added-in: "35.0" + operationId: getGroupAssignedQuotaPolicy + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/AssignedQuotaPolicy" + put: + tags: + - quotaPolicyAssignment + summary: | + Assign or unassign a quota policy to a given target group. + An empty payload is used to unassign an existing quota policy from a given group. + x-vcloud-added-in: "35.0" + operationId: assignQuotaPolicyToGroup + consumes: + - application/json + parameters: + - name: quotaPolicyReference + in: body + required: true + schema: + $ref: '#/definitions/AssignedQuotaPolicy' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + + vapp-quota-policy-assignment: + parameters: + - name: vappUrn + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: vapp + get: + tags: + - quotaPolicyAssignment + summary: Get the assigned quota policy reference for the given vapp. + x-vcloud-added-in: "35.0" + operationId: getVAppAssignedQuotaPolicy + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/AssignedQuotaPolicy" + put: + tags: + - quotaPolicyAssignment + summary: | + Assign or unassign a quota policy to a given target vapp. + An empty payload is used to unassign an existing quota policy from a given vapp. + x-vcloud-added-in: "35.0" + operationId: assignQuotaPolicyToVApp + consumes: + - application/json + parameters: + - name: quotaPolicyReference + in: body + required: true + schema: + $ref: '#/definitions/AssignedQuotaPolicy' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + +definitions: + AssignedQuotaPolicy: + type: object + x-vcloud-added-in: "35.0" + properties: + quotaPolicyReference: + description: | + The quota policy reference assigned. + x-vcloud-constraints: + - constraint: NonSortable + $ref: '#/definitions/EntityReference' + EntityReference: + $ref: "./common/entity.yaml#/definitions/EntityReference" + + #checking changes in mirror + diff --git a/schemas/openapi/src/main/resources/schemas/quota-policy/quota-policy.yaml b/schemas/openapi/src/main/resources/schemas/quota-policy/quota-policy.yaml new file mode 100644 index 00000000..f1686093 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/quota-policy/quota-policy.yaml @@ -0,0 +1,258 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2019-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The VMware Cloud Director quota policy API allows to create and view quota policies in system and tenant organizations. + title: VMware Cloud Director Quota Policy API + +paths: + quota-policies: + get: + x-vcloud-multisite: true + tags: + - quotaPolicies + summary: Get list of quota policies. + x-vcloud-added-in: "35.0" + description: | + Get list of quota policies. + Results can be filtered by id + Returns all the quota policies which are available in the system. + operationId: queryQuotaPolicies + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/QuotaPolicies" + + post: + tags: + - quotaPolicies + summary: Creates a new quota policy + x-vcloud-added-in: "35.0" + description: | + Creates a new quota policy + operationId: createQuotaPolicy + consumes: + - application/json + parameters: + - name: quotaPolicyParams + in: body + required: true + schema: + $ref: "#/definitions/QuotaPolicy" + produces: + - application/json + responses: + 201: + description: Created + schema: + $ref: "#/definitions/QuotaPolicy" + + quota-policy: + parameters: + - name: quotaPolicyId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: quotaPolicy + get: + tags: + - quotaPolicies + summary: Get the specified quota policy + x-vcloud-added-in: "35.0" + operationId: getQuotaPolicy + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/QuotaPolicy" + put: + tags: + - quotaPolicies + summary: Update the specified quota policy + x-vcloud-added-in: "35.0" + operationId: updateQuotaPolicy + consumes: + - application/json + parameters: + - name: updateQuotaPolicyParams + in: body + required: true + schema: + $ref: "#/definitions/QuotaPolicy" + produces: + - application/json + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 200: + description: OK + schema: + $ref: "#/definitions/QuotaPolicy" + delete: + tags: + - quotaPolicies + summary: Delete the specified quota policy. + x-vcloud-added-in: "35.0" + operationId: deleteQuotaPolicy + responses: + 204: + description: No Content + + capabilities: + get: + x-vcloud-added-in: "35.0" + tags: + - capabilities + summary: Retrieves capabilities for quotaPolicy feature. + operationId: getQuotaPolicyCapabilities + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: './common/capability.yaml#/definitions/Capabilities' + 204: + description: No Content + +definitions: + + QuotaPolicy: + type: object + x-vcloud-added-in: "35.0" + properties: + id: + type: string + description: | + URN for quota policy. This is immutable. + x-vcloud-constraints: + - constraint: NonSortable + - constraint: Urn + args: + - arg: quotaPolicy + - constraint: ReadOnly + description: + type: string + minLength: 1 + maxLength: 256 + default: "A quota policy." + x-vcloud-constraints: + - constraint: NonSortable + name: + type: string + minLength: 1 + maxLength: 128 + required: true + description: | + Display name for the quota policy. + orgId: + type: string + description: | + URN of org in which this policy is created. This is immutable + x-vcloud-constraints: + - constraint: NonSortable + - constraint: Urn + args: + - arg: org + - constraint: ReadOnly + quotaPoolDefinitions: + type: array + description: A list of quota pool definitions. + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + items: + $ref: '#/definitions/QuotaPoolDefinition' + isAutoGenerated: + type: boolean + x-vcloud-constraints: + - constraint: ReadOnly + description: | + This field cannot be updated and is a read-only field in the client. It defines if the quota policy + is auto-generated. + required: + - name + - quotaPoolDefinitions + + QuotaPoolDefinition: + type: object + x-vcloud-added-in: "35.0" + properties: + quotaResourceName: + type: string + description: | + The localized name of quota resource type. + example: Running VMs quota is the user friendly name for resource type VM + with qualifiers deployed == true. + Consumed Memory quota is the user fiendly name for resource type memory. + x-vcloud-constraints: + - constraint: ReadOnly + resourceType: + type: string + description: | + The quota resource type such as memory, cpu, vm etc. + Available resource types: memory, cpu, storage, urn:vcloud:legacy:vm, urn:vcloud:type:vmware.tkgcluster:1.0.0 + quotaResourceUnit: + type: string + description: | + The unit of quota defined for quota resource type. + Available quota units for resource types: + memory - MB + cpu - MHz + storage - MB + urn:vcloud:legacy:vm - count + example: memory unit - MB, cpu unit - MHz, storage unit - MB + x-vcloud-constraints: + - constraint: ReadOnly + quota: + type: integer + format: int64 + description: | + The quota amount for this resource. + qualifiers: + type: array + description: | + The qualifiers for quota resource type, such as vm.guestOs == Windows. + This is optional. Qualifiers just helps in narrowing down quota resource + based on values of one or more of its properties. If vm is a quota resource, + from the above example, only VMs with Windows guest OS will be considered + for quota eligibility. If more than one qualifier is provided, system will + use AND operator to process them. + example: vm.guestOs == Windows + items: + type: string + required: + - resourceType + - quota + + QuotaPolicies: + description: | + A list of quota policies. + allOf: + - $ref: '#/definitions/Page' + - type: object + properties: + values: + type: array + description: The current page of quota policies. + items: + $ref: '#/definitions/QuotaPolicy' diff --git a/schemas/openapi/src/main/resources/schemas/rbac/globalRoles.yaml b/schemas/openapi/src/main/resources/schemas/rbac/globalRoles.yaml new file mode 100644 index 00000000..8b902c0f --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/rbac/globalRoles.yaml @@ -0,0 +1,395 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2018-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The vCloud Director Global Roles API + version: "1.0" + title: vCloud Director Global Rolese API + +paths: + global-roles: + get: + tags: + - globalRoles + summary: Get list of global roles + description: | + Get list of global roles + operationId: queryGlobalRoles + x-vcloud-multisite: true + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/GlobalRoles' + + post: + tags: + - globalRoles + summary: Creates a new global role + description: | + Creates a new global role + operationId: createGlobalRole + consumes: + - application/json + parameters: + - name: newGlobalRole + in: body + required: true + schema: + $ref: "#/definitions/GlobalRole" + produces: + - application/json + responses: + 201: + description: Created + schema: + $ref: "#/definitions/GlobalRole" + + global-role: + parameters: + - name: id + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: globalRole + get: + tags: + - globalRoles + summary: Get specified global role + operationId: getGlobalRole + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/GlobalRole" + 404: + description: Not Found + put: + tags: + - globalRoles + summary: Update specified global role + operationId: updateGlobalRole + consumes: + - application/json + parameters: + - name: updatedGlobalRole + in: body + required: true + schema: + $ref: "#/definitions/GlobalRole" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/GlobalRole" + delete: + tags: + - globalRoles + summary: Delete specified global role + operationId: deleteGlobalRole + responses: + 204: + description: No Content + + global-role-rights: + parameters: + - name: id + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: globalRole + get: + tags: + - globalRoles + summary: Gets a paged list of rights (as references) contained by a particular global role + description: | + Get list of rights (as references) contained by a particular global role + operationId: queryGlobalRoleRights + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EntityReferences' + put: + tags: + - globalRoles + summary: Replaces the existing set of rights in global role with the rights (as references) supplied. + description: | + Replaces the existing set of rights in global role with the rights (as references) supplied. + operationId: replaceRightsInGlobalRole + parameters: + - name: rightsReferencesBody + in: body + required: true + schema: + $ref: '#/definitions/EntityReferences' + consumes: + - application/json + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EntityReferences' + post: + tags: + - globalRoles + summary: Adds the specified rights to a global role. + description: | + Adds the list of rights (passed as references) to a global role. + operationId: addRightsToGlobalRole + parameters: + - name: rightsReferencesBody + in: body + required: true + schema: + $ref: '#/definitions/EntityReferences' + consumes: + - application/json + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EntityReferences' + + global-role-tenants: + parameters: + - name: id + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: globalRole + + get: + tags: + - globalRoles + summary: Retrieves list of tenants for whom the global role is explicitly published + description: | + Retrieves list of tenants for whom the global role is explicitly published + operationId: queryGlobalRoleTenants + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EntityReferences' + + put: + tags: + - globalRoles + summary: Resets list of tenants for whom the global role is explicitly published + description: | + Resets list of tenants for whom the global role is explicitly published + operationId: setGlobalRoleTenants + consumes: + - application/json + produces: + - application/json + parameters: + - name: publishTenantsBody + in: body + required: true + schema: + $ref: '#/definitions/EntityReferences' + + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EntityReferences' + + global-role-tenants-publish: + parameters: + - name: id + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: globalRole + post: + tags: + - globalRoles + summary: Publishes the global role to the specified tenants + description: | + Publishes the global role to the specified tenants + operationId: postGlobalRolePublish + consumes: + - application/json + produces: + - application/json + parameters: + - name: publishTenantsBody + in: body + required: true + schema: + $ref: '#/definitions/EntityReferences' + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EntityReferences' + + global-role-tenants-unpublish: + parameters: + - name: id + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: globalRole + post: + tags: + - globalRoles + summary: Revokes publication of the global role to the specified tenants + description: | + Revokes publication of the global role to the specified tenants + operationId: postGlobalRoleUnpublish + consumes: + - application/json + produces: + - application/json + parameters: + - name: unpublishTenantsBody + in: body + required: true + schema: + $ref: '#/definitions/EntityReferences' + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EntityReferences' + + global-role-tenants-publish-all: + parameters: + - name: id + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: globalRole + post: + tags: + - globalRoles + summary: Publishes the global role to all tenants + description: | + Publishes the global role to all tenants + operationId: postGlobalRolePublishAll + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EntityReferences' + + global-role-tenants-unpublish-all: + parameters: + - name: id + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: globalRole + post: + tags: + - globalRoles + summary: Unpublishes the global role from all tenants + description: | + Unpublishes the global role from all tenants + operationId: postGlobalRoleUnpublishAll + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EntityReferences' + +definitions: + GlobalRoles: + description: | + A list of global roles. + allOf: + - $ref: '#/definitions/Page' + - type: object + properties: + values: + type: array + description: The current page of global roles. + items: + $ref: '#/definitions/GlobalRole' + + GlobalRole: + type: object + allOf: + - $ref: "./rbac/rights.yaml#/definitions/PublishableRightsMapping" + - type: object + properties: + id: + type: string + maxLength: 128 + x-vcloud-constraints: + - constraint: Urn + args: + - arg: globalRole + + EntityReferences: + $ref: "./common/entity.yaml#/definitions/EntityReferences" + EntityReference: + $ref: "./common/entity.yaml#/definitions/EntityReference" + + Page: + $ref: "./common/query.yaml#/definitions/Page" diff --git a/schemas/openapi/src/main/resources/schemas/rbac/rights.yaml b/schemas/openapi/src/main/resources/schemas/rbac/rights.yaml new file mode 100644 index 00000000..68830d72 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/rbac/rights.yaml @@ -0,0 +1,181 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2018-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: Right types + version: "1.0" + title: Rights YAML + +paths: + rights: + get: + tags: + - rights + summary: Get list of rights visible to logged-in user + description: | + Get list of rights + operationId: queryRights + x-vcloud-default-sort: + default-sort-field: name + sort-ascending: true + x-vcloud-multisite: true + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/Rights' + + rights-id: + parameters: + - name: id + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: right + get: + tags: + - rights + summary: Retrieve an individual right. + description: Retrieves the requested Right by id. + operationId: getRight + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/Right' + +definitions: + Rights: + description: | + A list of rights. + allOf: + - $ref: '#/definitions/Page' + - type: object + properties: + values: + type: array + description: The current page of rights. + items: + $ref: '#/definitions/Right' + + Right: + description: | + Right + type: object + properties: + name: + type: string + minLength: 1 + maxLength: 128 + id: + type: string + maxLength: 128 + x-vcloud-constraints: + - constraint: Urn + args: + - arg: right + - constraint: ReadOnly + description: + type: string + minLength: 1 + maxLength: 256 + bundleKey: + type: string + minLength: 1 + maxLength: 128 + category: + type: string + minLength: 1 + maxLength: 128 + x-vcloud-constraints: + - constraint: Urn + args: + - arg: rightsCategory + serviceNamespace: + type: string + minLength: 1 + maxLength: 128 + x-vcloud-constraints: + - constraint: ReadOnly + rightType: + type: string + enum: ['VIEW', 'MODIFY'] + impliedRights: + x-vcloud-added-in: "32.0" + type: array + x-vcloud-constraints: + - constraint: ReadOnly + description: The set of implied rights. + items: + $ref: '#/definitions/EntityReference' + required: + - name + + RightsMapping: + description: | + RightsMapping + type: object + properties: + name: + minLength: 1 + type: string + maxLength: 128 + id: + type: string + maxLength: 128 + x-vcloud-constraints: + - constraint: ReadOnly + description: + type: string + maxLength: 256 + bundleKey: + type: string + minLength: 1 + maxLength: 128 + x-vcloud-constraints: + - constraint: ReadOnly + readOnly: + type: boolean + x-vcloud-constraints: + - constraint: ReadOnly + required: + - name + + PublishableRightsMapping: + description: | + RightsMapping that can be published to tenants + type: object + allOf: + - $ref: '#/definitions/RightsMapping' + - type: object + properties: + publishAll: + description: | + Read-only value indicating publishAll state + type: boolean + default: false + x-vcloud-constraints: + - constraint: ReadOnly + + EntityReference: + $ref: "./common/entity.yaml#/definitions/EntityReference" + + Page: + $ref: "./common/query.yaml#/definitions/Page" diff --git a/schemas/openapi/src/main/resources/schemas/rbac/rightsBundles.yaml b/schemas/openapi/src/main/resources/schemas/rbac/rightsBundles.yaml new file mode 100644 index 00000000..1625594c --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/rbac/rightsBundles.yaml @@ -0,0 +1,393 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2018-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The vCloud Director Rights-bundles API + version: "1.0" + title: vCloud Director Rights-bundles API + +paths: + rights-bundles: + get: + tags: + - rightsBundles + summary: Get list of rights bundles + description: | + Get list of rights bundles + operationId: queryRightsBundles + x-vcloud-multisite: true + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/RightsBundles' + + post: + tags: + - rightsBundles + summary: Creates a new rights bundle + description: | + Creates a new rights bundle + operationId: createRightsBundle + consumes: + - application/json + parameters: + - name: newRightsBundle + in: body + required: true + schema: + $ref: "#/definitions/RightsBundle" + produces: + - application/json + responses: + 201: + description: Created + schema: + $ref: "#/definitions/RightsBundle" + + rights-bundle: + parameters: + - name: id + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: rightsBundle + get: + tags: + - rightsBundles + summary: Get specified rights bundle + operationId: getRightsBundle + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/RightsBundle" + 404: + description: Not Found + put: + tags: + - rightsBundles + summary: Update specified rights bundle + operationId: updateRightsBundle + consumes: + - application/json + parameters: + - name: updatedRightsBundle + in: body + required: true + schema: + $ref: "#/definitions/RightsBundle" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/RightsBundle" + delete: + tags: + - rightsBundles + summary: Delete specified rights bundle + operationId: deleteRightsBundle + responses: + 204: + description: No Content + + rights-bundle-rights: + parameters: + - name: id + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: rightsBundle + get: + tags: + - rightsBundles + summary: Gets a paged list of rights (as references) contained by a particular bundle + description: | + Get list of rights (as references) contained by a particular bundle + operationId: queryRightsBundleRights + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EntityReferences' + put: + tags: + - rightsBundles + summary: Replaces the existing set of rights in bundle with the rights (as references) supplied. + description: | + Replaces the existing set of rights in bundle with the rights (as references) supplied. + operationId: replaceRightsInRightsBundle + parameters: + - name: rightsReferencesBody + in: body + required: true + schema: + $ref: '#/definitions/EntityReferences' + consumes: + - application/json + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EntityReferences' + post: + tags: + - rightsBundles + summary: Adds the specified rights to a rights bundle. + description: | + Adds the list of rights (passed as references) to a rights bundle. + operationId: addRightsToRightsBundle + parameters: + - name: rightsReferencesBody + in: body + required: true + schema: + $ref: '#/definitions/EntityReferences' + consumes: + - application/json + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EntityReferences' + + rights-bundle-tenants: + parameters: + - name: id + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: rightsBundle + get: + tags: + - rightsBundles + summary: Retrieves list of tenants for whom the rights bundle is explicitly published + description: | + Retrieves list of tenants for whom the rights bundle is explicitly published + operationId: queryRightsBundleTenants + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EntityReferences' + + put: + tags: + - rightsBundles + summary: Resets list of tenants for whom the rights bundle is explicitly published + description: | + Resets list of tenants for whom the rights bundle is explicitly published + operationId: setRightsBundleTenants + consumes: + - application/json + produces: + - application/json + parameters: + - name: publishTenantsBody + in: body + required: true + schema: + $ref: '#/definitions/EntityReferences' + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EntityReferences' + + rights-bundle-tenants-publish: + parameters: + - name: id + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: rightsBundle + post: + tags: + - rightsBundles + summary: Publishes the rights bundle to the specified tenants + description: | + Publishes the rights bundle to the specified tenants + operationId: postRightsBundlePublish + consumes: + - application/json + produces: + - application/json + parameters: + - name: publishTenantsBody + in: body + required: true + schema: + $ref: '#/definitions/EntityReferences' + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EntityReferences' + + rights-bundle-tenants-unpublish: + parameters: + - name: id + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: rightsBundle + post: + tags: + - rightsBundles + summary: Revokes publication of the rights bundle to the specified tenants + description: | + Revokes publication of the rights bundle to the specified tenants + operationId: postRightsBundleUnpublish + consumes: + - application/json + produces: + - application/json + parameters: + - name: unpublishTenantsBody + in: body + required: true + schema: + $ref: '#/definitions/EntityReferences' + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EntityReferences' + + rights-bundle-tenants-publish-all: + parameters: + - name: id + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: rightsBundle + post: + tags: + - rightsBundles + summary: Publishes the rights bundle to all tenants + description: | + Publishes the rights bundle to all tenants + operationId: postRightsBundlePublishAll + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EntityReferences' + + rights-bundle-tenants-unpublish-all: + parameters: + - name: id + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: rightsBundle + post: + tags: + - rightsBundles + summary: Unpublishes the rights bundle from all tenants + description: | + Unpublishes the rights bundle from all tenants + operationId: postRightsBundleUnpublishAll + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EntityReferences' + + +definitions: + RightsBundles: + allOf: + - $ref: '#/definitions/Page' + - type: object + properties: + values: + type: array + description: The current page of rights bundles. + items: + $ref: '#/definitions/RightsBundle' + + RightsBundle: + type: object + allOf: + - $ref: "./rbac/rights.yaml#/definitions/PublishableRightsMapping" + - type: object + properties: + id: + type: string + maxLength: 128 + x-vcloud-constraints: + - constraint: Urn + args: + - arg: rightsBundle + + EntityReferences: + $ref: "./common/entity.yaml#/definitions/EntityReferences" + EntityReference: + $ref: "./common/entity.yaml#/definitions/EntityReference" + + Page: + $ref: "./common/query.yaml#/definitions/Page" + diff --git a/schemas/openapi/src/main/resources/schemas/rbac/rightsCategories.yaml b/schemas/openapi/src/main/resources/schemas/rbac/rightsCategories.yaml new file mode 100644 index 00000000..681ed6df --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/rbac/rightsCategories.yaml @@ -0,0 +1,131 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2018-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: Rights Categories types + version: "1.0" + title: Rights Categories YAML + +paths: + rights-categories: + get: + tags: + - rightsCategories + summary: Get a list of Rights Categories visible to the logged in user + description: | + Get list of Rights Categories + operationId: queryRightsCategories + x-vcloud-multisite: true + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/RightsCategoryNodes' + + rights-category: + parameters: + - name: id + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: rightsCategory + + get: + tags: + - rightsCategories + summary: Retrieve an individual Right category. + description: Retrieves the requested Rights Category by id. + operationId: getRightsCategory + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/RightsCategoryNode' + +definitions: + RightsCategoryNode: + description: | + RightsCategoryNode + type: object + properties: + name: + type: string + minLength: 1 + maxLength: 128 + id: + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: rightsCategory + - constraint: ReadOnly + bundleKey: + type: string + minLength: 1 + maxLength: 128 + parent: + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: rightsCategory + rightsCount: + $ref: '#/definitions/RightsCount' + subCategories: + type: array + items: + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: rightsCategory + required: + - name + - bundleKey + + RightsCategoryNodes: + description: | + A list of rights category nodes. + allOf: + - $ref: '#/definitions/Page' + - type: object + properties: + values: + type: array + description: The current page of rights category nodes. + items: + $ref: '#/definitions/RightsCategoryNode' + + RightsCount: + description: | + RightsCount - A count of rights in a given category by type + type: object + properties: + view: + type: integer + x-vcloud-constraints: + - constraint: ReadOnly + modify: + type: integer + x-vcloud-constraints: + - constraint: ReadOnly + + Page: + $ref: "./common/query.yaml#/definitions/Page" diff --git a/schemas/openapi/src/main/resources/schemas/rbac/roles.yaml b/schemas/openapi/src/main/resources/schemas/rbac/roles.yaml new file mode 100644 index 00000000..3750498f --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/rbac/roles.yaml @@ -0,0 +1,224 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2018-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The vCloud Director Roles API + version: "1.0" + title: vCloud Director Roles API + +paths: + roles: + get: + tags: + - roles + summary: Get list of roles for a tenant + x-vcloud-added-in: "31.0" + x-vcloud-multisite: true + description: | + Get list of roles for a tenant + operationId: queryTenantRoles + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/Roles' + + post: + tags: + - roles + summary: Creates a new role + description: | + Creates a new role + operationId: createRole + consumes: + - application/json + parameters: + - name: newRole + in: body + required: true + schema: + $ref: "#/definitions/Role" + produces: + - application/json + responses: + 201: + description: Created + schema: + $ref: "#/definitions/Role" + + role: + parameters: + - name: id + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: role + get: + tags: + - roles + summary: Get specified role + operationId: getRole + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/Role" + 404: + description: Not Found + put: + tags: + - roles + summary: Update specified role + operationId: updateRole + consumes: + - application/json + parameters: + - name: updatedRole + in: body + required: true + schema: + $ref: "#/definitions/Role" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/Role" + delete: + tags: + - roles + summary: Delete specified role + operationId: deleteRole + responses: + 204: + description: No Content + + role-rights: + parameters: + - name: id + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: role + get: + tags: + - roles + summary: Gets a paged list of rights (as references) contained by a particular role + description: | + Get list of rights (as references) contained by a particular role + operationId: queryRoleRights + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EntityReferences' + post: + tags: + - roles + summary: Adds the specified rights to a role. + description: | + Adds the list of rights (passed as references) to a role. + operationId: addRightsToRole + parameters: + - name: rightsReferencesBody + in: body + required: true + schema: + $ref: "#/definitions/EntityReferences" + consumes: + - application/json + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/EntityReferences" + put: + tags: + - roles + summary: Replaces the existing set of rights in role with the rights (as references) supplied. + description: | + Replaces the existing set of rights in role with the rights (as references) supplied. + operationId: replaceRightsInRole + parameters: + - name: rightsReferencesBody + in: body + required: true + schema: + $ref: "#/definitions/EntityReferences" + consumes: + - application/json + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/EntityReferences" + +definitions: + Roles: + description: | + A list of roles. + allOf: + - $ref: '#/definitions/Page' + - type: object + properties: + values: + type: array + description: The current page of roles. + items: + $ref: '#/definitions/Role' + Role: + type: object + allOf: + - $ref: "./rbac/rights.yaml#/definitions/RightsMapping" + - type: object + properties: + id: + type: string + maxLength: 128 + x-vcloud-constraints: + - constraint: Urn + args: + - arg: role + + EntityReferences: + $ref: "./common/entity.yaml#/definitions/EntityReferences" + EntityReference: + $ref: "./common/entity.yaml#/definitions/EntityReference" + + Page: + $ref: "./common/query.yaml#/definitions/Page" + diff --git a/schemas/openapi/src/main/resources/schemas/service-apps/serviceApps.yaml b/schemas/openapi/src/main/resources/schemas/service-apps/serviceApps.yaml new file mode 100644 index 00000000..e5bd7646 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/service-apps/serviceApps.yaml @@ -0,0 +1,285 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2018-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The Service Application API allows regristration of external VMware Service Applications. + version: "1.0" + title: VMware Service Application API + +paths: + + serviceApps: + get: + x-vcloud-added-in: "32.0" + tags: + - serviceApps + summary: Get all registered VMware service applications + operationId: queryServiceApps + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/ServiceApps" + post: + x-vcloud-added-in: "32.0" + tags: + - serviceApps + summary: Create a VMware service app + operationId: createServiceApp + consumes: + - application/json + produces: + - application/json + parameters: + - name: serviceAppId + in: body + required: true + schema: + $ref: '#/definitions/ServiceApp' + responses: + 201: + schema: + $ref: "#/definitions/ServiceApp" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + + + serviceApp: + parameters: + - name: serviceAppId + in: path + required: true + type: string + + get: + x-vcloud-added-in: "32.0" + tags: + - serviceApp + summary: Retrieves a specific VMware service application + operationId: getServiceApp + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/ServiceApp' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + put: + x-vcloud-added-in: "32.0" + tags: + - serviceApp + summary: Updates a specific VMware service application. + operationId: updateServiceApp + consumes: + - application/json + produces: + - application/json + parameters: + - name: serviceApp + in: body + required: true + schema: + $ref: '#/definitions/ServiceApp' + responses: + 200: + description: OK + schema: + $ref: '#/definitions/ServiceApp' + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + delete: + x-vcloud-added-in: "32.0" + tags: + - serviceApp + summary: Deletes a specific VMware service application. + operationId: deleteServiceApp + responses: + 204: + description: No Content + + sddcs: + parameters: + - name: serviceAppId + in: path + required: true + type: string + + get: + x-vcloud-added-in: "32.0" + tags: + - vmcSddcs + summary: Retrieves a list of SDDCs for a specific VMware service application that are available + operationId: getVmcSddcs + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/VmcSddcs' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + post: + x-vcloud-added-in: "32.0" + tags: + - vmcSddcs + summary: Register a VMware service application SDDC's components + operationId: registerVmcSDDC + consumes: + - application/json + parameters: + - name: serviceAppSddc + in: body + required: true + schema: + $ref: '#/definitions/VmcSddc' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + +definitions: + + ServiceApps: + x-vcloud-added-in: "32.0" + description: | + List of VMware service applications + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: '#/definitions/ServiceApp' + + ServiceApp: + x-vcloud-added-in: "32.0" + description: | + A VMware service application + type: object + properties: + id: + type: string + description: The unique ID for the service application. This field is read-only. + name: + type: string + description: The name of the service application + clientId: + type: string + description: The client ID + clientSecret: + type: string + description: The client secret + orgId: + type: string + description: The external organization id of the service application + serviceScope: + $ref: '#/definitions/ServiceAppScope' + description: The scope of the service application + accessTokenTTL: + type: integer + description: The read-only time-to-live of the access token in seconds. + accessTokenExpiration: + type: string + format: date-time + description: The read-only expiration date of the access token. + enabled: + type: boolean + description: Whether the application is currently enabled. + default: true + required: + - name + - clientId + - clientSecret + - serviceScope + + VmcSddcs: + x-vcloud-added-in: "32.0" + description: | + List of VMware Cloud on AWS SDDCs + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: '#/definitions/VmcSddc' + + + VmcSddc: + x-vcloud-added-in: "32.0" + description: | + A VMware Cloud on AWS SDDC + type: object + properties: + id: + type: string + description: The unique ID for the VMC SDDC. + name: + type: string + description: The name of the VMC SDDC. This field is read-only. + vcUsername: + x-vcloud-added-in: "35.0" + type: string + description: The username for the account to use to register Virtual Center, if not using the VMC default. + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + vcPassword: + x-vcloud-added-in: "35.0" + type: string + description: The password for the account to use to register Virtual Center, if not using the VMC default. + x-vcloud-password: true + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + proxyConfigUrn: + x-vcloud-added-in: "35.0" + type: string + description: The URN for the proxy configuration to use for connecting to Virtual Center. + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + - constraint: Urn + args: + - arg: proxyConfiguration + required: + - id + - name + + ServiceAppScope: + x-vcloud-added-in: "32.0" + description: | + Describes the type of service application. + VMC_REFRESH_TOKEN: The application authtenticates to VMC via a refresh token + VMC_CLIENT_CREDENTIAL: The application authenticates to VMC using client credentials + VMC: Deprecated. Defaults to VMC_REFRESH_TOKEN. + type: object + enum: + - VMC + - VMC_REFRESH_TOKEN + - VMC_CLIENT_CREDENTIAL diff --git a/schemas/openapi/src/main/resources/schemas/services/services.yaml b/schemas/openapi/src/main/resources/schemas/services/services.yaml index 96de31a7..c9b53396 100644 --- a/schemas/openapi/src/main/resources/schemas/services/services.yaml +++ b/schemas/openapi/src/main/resources/schemas/services/services.yaml @@ -1,8 +1,9 @@ -# ************************************************************************* +# ****************************************************************************** # * api-extension-template-vcloud-director -# * Copyright 2017-2018 VMware, Inc. All rights reserved. * +# * Copyright 2017-2021 VMware, Inc. All rights reserved. * # * SPDX-License-Identifier: BSD-2-Clause -# ************************************************************************* +# ****************************************************************************** + swagger: "2.0" info: description: | @@ -32,7 +33,7 @@ paths: 200: description: OK schema: - $ref: "./common/query.yaml#/definitions/QueryResults" + $ref: "#/definitions/Services" post: tags: @@ -102,6 +103,12 @@ paths: - services summary: Delete specified service operationId: deleteService + parameters: + - name: recursive + in: query + description: If true, the Service and all its service items will be deleted. If false, and there are service items in the service, delete will fail. + default: false + type: boolean responses: 204: description: No Content @@ -118,40 +125,20 @@ paths: - $ref: "./common/query.yaml#/parameters/querySortDesc" - $ref: "./common/query.yaml#/parameters/queryPage" - $ref: "./common/query.yaml#/parameters/queryPageSize" - produces: - - application/json - responses: - 200: - description: OK - schema: - $ref: "./common/query.yaml#/definitions/QueryResults" + - in: query + name: getExternalData + required: false + type: boolean + default: true + description: Flag indicating whether data stored outside of vCloud Director should be included in results - post: - tags: - - services - summary: Adds service item - description: | - Adds service items to the service - operationId: addServiceItems - consumes: - - application/json produces: - application/json - parameters: - - name: newServiceItems - in: body - required: true - schema: - type: array - items: - $ref: '#/definitions/ServiceItem' responses: 200: description: OK schema: - type: array - items: - $ref: '#/definitions/ServiceItem' + $ref: "#/definitions/ServiceItems" service-item: parameters: @@ -216,7 +203,7 @@ paths: get: tags: - services - summary: Get all workflow items in this service + summary: This endpoint will not produce results. It is a placeholder to enforce code generation of VroWorkflowServiceItem operationId: getWorkflowServiceItems produces: - application/json @@ -269,7 +256,7 @@ paths: - services summary: Retrieves list of tenants for whom the service item is explicitly published description: | - Retrieves list of item for whom the service library is explicitly published + Retrieves list of item for whom the service item is explicitly published operationId: getServiceItemTenants produces: - application/json @@ -281,6 +268,34 @@ paths: items: $ref: '#/definitions/EntityReference' + put: + tags: + - services + summary: Resets list of tenants for whom the service item is explicitly published + description: | + Resets list of tenants for whom the service item is explicitly published + operationId: setServiceItemTenants + consumes: + - application/json + produces: + - application/json + parameters: + - name: publishTenantsBody + in: body + required: true + schema: + type: array + items: + $ref: '#/definitions/EntityReference' + + responses: + 200: + description: OK + schema: + type: array + items: + $ref: '#/definitions/EntityReference' + service-item-tenants-publish: parameters: - name: id @@ -426,10 +441,28 @@ definitions: default: true providerScoped: type: boolean + default: true + publishAll: + description: | + Read-only value indicating publishAll state + type: boolean default: false required: - serviceItemType + ServiceItems: + description: | + A list of service items. + allOf: + - $ref: '#/definitions/Page' + - type: object + properties: + values: + type: array + description: The current page of service items. + items: + $ref: '#/definitions/ServiceItem' + Service: type: object properties: @@ -445,16 +478,23 @@ definitions: type: string id: type: string - serviceItems: - type: array - items: - type: object - oneOf: - - $ref: "./vro/vro.yaml#/definitions/VroWorkflowServiceItem" - required: - - name - - iconMimeType - - iconData + required: + - name + - iconMimeType + - iconData + + Services: + description: | + A list of services. + allOf: + - $ref: '#/definitions/Page' + - type: object + properties: + values: + type: array + description: The current page of services. + items: + $ref: '#/definitions/Service' EntityReference: - $ref: "./common/entity.yaml#/definitions/EntityReference" \ No newline at end of file + $ref: "./common/entity.yaml#/definitions/EntityReference" diff --git a/schemas/openapi/src/main/resources/schemas/site/configuration.yaml b/schemas/openapi/src/main/resources/schemas/site/configuration.yaml new file mode 100644 index 00000000..da70f3cc --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/site/configuration.yaml @@ -0,0 +1,120 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2021-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + + +swagger: "2.0" +info: + description: | + Can be used to view and mutate configuration property/value pairs. + version: "1.0" + title: Cloud Director Configuration API + +paths: + + configurations: + get: + x-vcloud-added-in: "36.0" + x-vcloud-multisite: true + tags: + - Configurations + summary: Returns all configuration properties. At present this will always return an EMPTY list. + operationId: getConfigs + produces: + - application/json + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + responses: + 200: + description: OK + schema: + $ref: "#/definitions/Configs" + + configuration: + parameters: + - name: name + in: path + description: URN containing the name of the configuration property. + required: true + type: string + + get: + x-vcloud-added-in: "36.0" + tags: + - Configurations + summary: Get the current setting for the specified configuration property. + operationId: getConfig + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/Config" + + put: + x-vcloud-added-in: "36.0" + x-vcloud-event: com/vmware/vcloud/event/configuration/property/modify + tags: + - Configurations + summary: Sets a configuration property to the provided value. + operationId: setConfig + consumes: + - application/json + parameters: + - name: newConfigValue + description: The configuration with the desired value. + in: body + required: true + schema: + $ref: "#/definitions/Config" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/Config" + +definitions: + + Config: + x-vcloud-added-in: "36.0" + description: | + A site-wide configuration value. + type: object + properties: + name: + type: string + description: Name of the configuration property. + x-vcloud-constraints: + - constraint: ReadOnly + typedValue: + $ref: "../common/typed-value.yaml#/definitions/TypedValue" + description: The value of the configuration property (at present all configuration values are treated as the "string" type). + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + required: + - name + + Configs: + x-vcloud-added-in: "36.0" + description: | + A list of site-wide configuration properties. + allOf: + - $ref: "query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + description: The current page of configurations. + items: + $ref: '#/definitions/Config' + diff --git a/schemas/openapi/src/main/resources/schemas/site/site-settings-cors.yaml b/schemas/openapi/src/main/resources/schemas/site/site-settings-cors.yaml new file mode 100644 index 00000000..56a81d0b --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/site/site-settings-cors.yaml @@ -0,0 +1,87 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2020-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The Cloud Director Allowed Origins API + version: "1.0" + title: Cloud Director Allowed Origins API + +paths: + cors: + get: + tags: + - cors + summary: Queries CORS allowed origins. + x-vcloud-added-in: "36.0" + x-vcloud-multisite: true + x-vcloud-default-sort: + default-sort-field: origin + sort-ascending: true + description: | + Queries the set of allowed origins. + operationId: queryAllowedOrigins + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/AllowedOrigins' + put: + tags: + - cors + summary: Sets allowed origins to the given set of origins. + x-vcloud-added-in: "36.0" + x-vcloud-event: com/vmware/vcloud/event/cors/allowedOrigins/modify + operationId: setAllowedOrigins + consumes: + - application/json + parameters: + - name: allowedOrigins + in: body + required: true + schema: + $ref: "#/definitions/AllowedOrigins" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/AllowedOrigins" + +definitions: + AllowedOrigins: + x-vcloud-added-in: "36.0" + description: | + A list of Allowed Origins. + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + description: The current page of allowed origins. + items: + $ref: './site/site-settings-cors.yaml#/definitions/AllowedOrigin' + + AllowedOrigin: + x-vcloud-added-in: "36.0" + description: | + An origin for which CORS is allowed. + type: object + properties: + origin: + type: string + description: The origin that will be allowed. diff --git a/schemas/openapi/src/main/resources/schemas/site/site-settings.yaml b/schemas/openapi/src/main/resources/schemas/site/site-settings.yaml new file mode 100644 index 00000000..9ae27839 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/site/site-settings.yaml @@ -0,0 +1,24 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2020-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The Cloud Director Site Settings API + version: "1.0" + title: Cloud Director Site Settings API + +paths: + siteSettings: + get: + tags: + - siteSettings + summary: Retrieve links for navigating site settings. + x-vcloud-added-in: "36.0" + operationId: getSiteSettingsLinks + responses: + 204: + description: No Content diff --git a/schemas/openapi/src/main/resources/schemas/ssl/certificateLibrary.yaml b/schemas/openapi/src/main/resources/schemas/ssl/certificateLibrary.yaml new file mode 100644 index 00000000..8a9aa5ac --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/ssl/certificateLibrary.yaml @@ -0,0 +1,275 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2019-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The VMware Cloud Director Certificate Library API + version: "1.0" + title: VMware Cloud Director Certificate Library API + +paths: + certificateLibrary: + get: + tags: + - certificateLibrary + summary: Get the certificate libray items + x-vcloud-added-in: "35.0" + x-vcloud-multisite: true + description: | + Get a list of the certificate library items + operationId: queryCertificateLibrary + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/CertificateLibraryItems' + + post: + tags: + - certificateLibrary + summary: Add an item to the certificate library + x-vcloud-added-in: "35.0" + description: | + Add an item to the certificate library + operationId: addCertificateLibraryItem + consumes: + - application/json + parameters: + - name: newCertificateLibraryItem + in: body + required: true + schema: + $ref: "#/definitions/CertificateLibraryItem" + produces: + - application/json + responses: + 201: + description: Created + schema: + $ref: "#/definitions/CertificateLibraryItem" + + certificateLibraryItem: + parameters: + - name: id + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: certificateLibraryItem + get: + tags: + - certificateLibrary + summary: Get the specified certificate library item + description: | + Retrieves the specified certificate library item. + Note: This API also supports a former (erroneously spelt) alternate path /cetificateLibrary/{id} + as a Deprecated API (deprecated-in and removed after API version 36.0) + x-vcloud-added-in: "35.0" + operationId: getCertificateLibraryItem + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/CertificateLibraryItem" + + put: + tags: + - certificateLibrary + summary: Update the specified certificate library item. + description: | + Updates the specified certificate library item. Only the alias and description fields may be edited + Note: This API also supports a former (erroneously spelt) alternate path /cetificateLibrary/{id} + as a Deprecated API (deprecated-in and removed after API version 36.0) + x-vcloud-added-in: "35.0" + operationId: updateCertificateLibraryItem + produces: + - application/json + consumes: + - application/json + parameters: + - name: modifiedCertificatLibraryItem + in: body + required: true + schema: + $ref: "#/definitions/CertificateLibraryItem" + responses: + 200: + description: OK + schema: + $ref: "#/definitions/CertificateLibraryItem" + + delete: + tags: + - certificateLibrary + summary: Remove certificate library item. + description: | + Delete the specified certificate library item. Only items that are not in use can be deleted. + Note: This API also supports a former (erroneously spelt) alternate path /cetificateLibrary/{id} + as a Deprecated API (deprecated-in and removed after API version 36.0) + x-vcloud-added-in: "35.0" + operationId: deleteCertificateLibraryItem + responses: + 204: + description: No Content + + certificateLibraryItemConsumers: + parameters: + - name: certLibraryItemId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: certificateLibraryItem + get: + tags: + - certificateLibrary + summary: Gets a paged list of consumers (as references) of a particular certificate library item + description: | + Get list of consumers (as references) of a particular certificate library item + operationId: queryCertLibraryItemConsumerRefs + x-vcloud-added-in: "35.0" + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EntityReferences' + post: + tags: + - certificateLibrary + summary: Adds the specified consumer reference to a library item. + description: | + Adds the specified consumer reference to a library item. + operationId: addConsumerRefToCertLibraryItem + x-vcloud-added-in: "35.0" + parameters: + - name: consumerReference + in: body + required: true + schema: + $ref: "#/definitions/EntityReference" + consumes: + - application/json + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/EntityReference" + put: + tags: + - certificateLibrary + summary: Replaces the existing consumer refs with the used by references supplied. + description: | + Replaces the existing consumer refs with the consumer references supplied. + operationId: replaceCertLibraryItemConsumerRefs + x-vcloud-added-in: "35.0" + parameters: + - name: consumerRefs + in: body + required: true + schema: + $ref: "#/definitions/EntityReferences" + consumes: + - application/json + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/EntityReferences" + +definitions: + CertificateLibraryItems: + description: | + A list of certificate library items. + x-vcloud-added-in: "35.0" + allOf: + - $ref: '#/definitions/Page' + - type: object + properties: + values: + type: array + description: The current page of certificate library items. + items: + $ref: '#/definitions/CertificateLibraryItem' + CertificateLibraryItem: + type: object + description: A certificate library item. + x-vcloud-added-in: "35.0" + properties: + id: + type: string + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSortable + - constraint: Urn + args: + - arg: certificateLibraryItem + alias: + type: string + maxLength: 128 + privateKey: + type: string + description: PEM encoded private key. Required if providing a certificate chain + x-vcloud-restricted: Value is never returned from the API + x-vcloud-constraints: + - constraint: NonSortable + privateKeyPassphrase: + type: string + description: passphrase for the private key. Required if the private key is encrypted + x-vcloud-restricted: Value is never returned from the API + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + certificate: + type: string + description: PEM encoded certificate + x-vcloud-constraints: + - constraint: Certificate + - constraint: NonSortable + - constraint: NonSearchable + description: + type: string + description: Description of the certificate library item + x-vcloud-constraints: + - constraint: NonSortable + - constraint: NonSearchable + required: + - alias + - certificate + + EntityReferences: + $ref: "./common/entity.yaml#/definitions/EntityReferences" + EntityReference: + $ref: "./common/entity.yaml#/definitions/EntityReference" + + Page: + $ref: "./common/query.yaml#/definitions/Page" diff --git a/schemas/openapi/src/main/resources/schemas/ssl/sslSettings.yaml b/schemas/openapi/src/main/resources/schemas/ssl/sslSettings.yaml new file mode 100644 index 00000000..e33d8583 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/ssl/sslSettings.yaml @@ -0,0 +1,123 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2019-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The vCloud Director SSL Settings API + version: "1.0" + title: vCloud Director SSL Settings API + +paths: + sslSettings: + get: + tags: + - sslSettings + summary: Get the SSL settings + x-vcloud-added-in: "34.0" + description: | + Get the current VCD SSL settings + operationId: getSslSettings + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/SslSettings' + + put: + tags: + - sslSettings + summary: Updates the SSL settings. + x-vcloud-added-in: "35.2" + description: | + Updates the current VCD SSL settings + operationId: updateSslSettings + consumes: + - application/json + parameters: + - name: modifiedSslSettings + in: body + required: true + schema: + $ref: "#/definitions/SslSettings" + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + +definitions: + SslSettings: + type: object + description: The VCD SSL settings + x-vcloud-added-in: "34.0" + properties: + enabledSslProtocols: + type: array + description: SSL protocols + items: + type: string + x-vcloud-constraints: + - constraint: ReadOnly + enabledSslCiphers: + type: array + description: SSL ciphers + items: + type: string + x-vcloud-constraints: + - constraint: ReadOnly + keySize: + type: integer + description: Size of keys generated + x-vcloud-constraints: + - constraint: ReadOnly + certificateValidityDays: + type: integer + description: Number of days generated certificates are valid for + x-vcloud-constraints: + - constraint: ReadOnly + certificateSignatureAlgorithm: + type: string + description: Algorithm used to sign generated certificates + x-vcloud-constraints: + - constraint: ReadOnly + fipsMode: + type: string + default: "OFF" + description: | + The desired FIPS mode of this server group. +
        +
      • + ON: Indicates FIPS mode is desired for this server group. +
      • +
      • + OFF: Indicates FIPS mode is not desired for this server group. +
      • +
      + x-vcloud-added-in: "35.2" + status: + type: string + default: "CURRENT" + description: | + The current SSL settings status for this server group. +
        +
      • + CURRENT: Indicates that all of the SSL settings for this server group are up to date. +
      • +
      • + UPDATING: Indicates that there is at least one cell in the server group which has not yet + applied the SSL settings. +
      • +
      • + AWAITING_RESTART: Indicates that the SSL settings for this server group have been applied on each cell, + and that each cell needs to be rebooted for the settings to take place. When each cell has been rebooted this field + will change to CURRENT. +
      • +
      + x-vcloud-added-in: "35.2" + x-vcloud-constraints: + - constraint: ReadOnly + diff --git a/schemas/openapi/src/main/resources/schemas/ssl/testConnection.yaml b/schemas/openapi/src/main/resources/schemas/ssl/testConnection.yaml new file mode 100644 index 00000000..0d813d1d --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/ssl/testConnection.yaml @@ -0,0 +1,191 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2019 -2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + Allows testing of a connection, including SSL handshake and hostname verification. + version: "1.0" + title: vCloud Director Connection Test API + +paths: + test: + post: + tags: + - testConnection + summary: Test a connection + x-vcloud-added-in: "34.0" + description: | + Tests a connection, including SSL handshake and hostname verification. + operationId: test + consumes: + - application/json + parameters: + - name: connection + in: body + required: true + schema: + $ref: "#/definitions/Connection" + produces: + - application/json + responses: + 200: + schema: + $ref: "#/definitions/TestResult" + +definitions: + Connection: + description: | + Connection to test. + type: object + x-vcloud-added-in: "34.0" + properties: + host: + description: The host (or IP address) to connect to. + type: string + minLength: 1 + maxLength: 256 + port: + description: The port to use when connecting. + type: integer + minimum: 1 + maximum: 65535 + secure: + description: If the connection should use https. + type: boolean + default: true + timeout: + type: integer + description: Maximum time (in seconds) any step in the test should wait for a response. + default: 10 + format: int32 + minimum: 1 + maximum: 120 + hostnameVerificationAlgorithm: + description: | + Endpoint/Hostname verification algorithm to be used during SSL/TLS/DTLS handshake. + Their values are as follows: +
        +
      • + HTTPS: use https hostname verification algorithm as described in + RFC 2818 +
      • +
      • + LDAPS: use ldaps hostname verification algorithm as described in + RFC 2830 +
      • +
      + When this field is not set, the default value null indicates no hostname verification will be performed. + type: string + x-vcloud-added-in: "36.0" + additionalCAIssuers: + type: array + items: + type: string + description: | + A list of URLs being authorized by the user to retrieve additional CA certificates from, + if necessary, to complete the certificate chain to its trust anchor. +

      + Upon retrieving the certificate chain presented during the handshake, if signing CA certificates were not included, + but a location is specified for the 'caIssuers' access method of the 'Authority Info Access' extension + (as described in RFC 5280 Section 4.2.2.1) + of those certificates and that location is one of these supplied URLs, then additional certificates will be retrieved + from those URLs in accordance with the protocol laid out in the RFC. +

      + Any failure to retrieve this certificate will NOT fail the test connection request, nor will the error associated with this failure be returned. +

      + In the unlikely event that the CA Issuers URL specifies `https` instead of `http`, the original certificate, + that included that URL, will be temporarily used to trust the server during ssl handshake + x-vcloud-added-in: "36.0" + proxyConnection: + $ref: '#/definitions/ProxyConnection' + required: + - host + - port + + ProxyConnection: + description: | + Proxy connection to use for test. If none is specified, then no proxy is used to test the connection. + type: object + x-vcloud-added-in: "34.0" + properties: + proxyHost: + description: The host (or IP address) of the proxy. + type: string + maxLength: 256 + proxyPort: + description: The port to use when connecting to the proxy. + type: integer + proxyUsername: + description: Username to authenticate to the proxy. + type: string + maxLength: 256 + proxyPassword: + description: Password to authenticate to the proxy. + type: string + maxLength: 256 + proxySecure: + description: If the connection to the proxy should use https. + default: true + type: boolean + required: + - proxyHost + - proxyPort + + TestResult: + description: | + Results of a connection test. + type: object + x-vcloud-added-in: "34.0" + properties: + targetProbe: + $ref: '#/definitions/ProbeResult' + proxyProbe: + $ref: '#/definitions/ProbeResult' + + ProbeResult: + description: | + Results of a connection test to a specific endpoint. + type: object + x-vcloud-added-in: "34.0" + properties: + result: + description: Localized message describing the connection result stating success or an error message with a brief summary. + type: string + x-vcloud-constraints: + - constraint: ReadOnly + resolvedIp: + description: The IP address the host was resolved to. + type: string + x-vcloud-constraints: + - constraint: ReadOnly + canConnect: + description: If vCD can establish a connection on the specified port. + type: boolean + x-vcloud-constraints: + - constraint: ReadOnly + sslHandshake: + description: If an SSL Handshake succeeded (secure requests only). + type: boolean + x-vcloud-constraints: + - constraint: ReadOnly + certificateChain: + description: The SSL certificate chain presented by the server if a secure connection was made. + type: string + x-vcloud-constraints: + - constraint: ReadOnly + additionalCAIssuers: + type: array + items: + type: string + description: | + URLs supplied by Certificate Authorities to retrieve signing certificates, when those certificates are not included in the chain. + These URLs are the locations for the 'caIssuers' access method in the 'Authority Info Access' extension + (as described in RFC 5280 Section 4.2.2.1) + of the certificates and gives the caller an indication where additional CA certificates may be retrieved from, + to complete the chain to the trust anchor. + x-vcloud-added-in: "36.0" + diff --git a/schemas/openapi/src/main/resources/schemas/ssl/trustedCertificates.yaml b/schemas/openapi/src/main/resources/schemas/ssl/trustedCertificates.yaml new file mode 100644 index 00000000..812c0766 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/ssl/trustedCertificates.yaml @@ -0,0 +1,170 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2019-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The vCloud Director Trusted Certificates (Truststore) API + version: "1.0" + title: vCloud Director Trusted Certificates (Truststore) API + +paths: + trustedCertificates: + get: + tags: + - trustedCertificates + summary: Get currently trusted certificates + x-vcloud-added-in: "34.0" + x-vcloud-multisite: true + description: | + Get currently trusted certificates + operationId: queryTrustedCertificates + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/Certificates' + + post: + tags: + - trustedCertificates + summary: Add to list of currently trusted certificates + x-vcloud-added-in: "34.0" + description: | + Add to list of currently trusted certificates + operationId: trustCertificate + consumes: + - application/json + parameters: + - name: newCertificate + in: body + required: true + schema: + $ref: "#/definitions/TrustedCertificate" + produces: + - application/json + responses: + 201: + description: Created + schema: + $ref: "#/definitions/TrustedCertificate" + + certificate: + parameters: + - name: trustedCertificate + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: Urn + args: + - arg: trustedCertificate + get: + tags: + - trustedCertificates + summary: Get specified certificate + description: | + Get the PEM-encoded certificate with the requested URN + x-vcloud-added-in: "34.0" + operationId: getCertificate + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/TrustedCertificate" + + put: + tags: + - trustedCertificates + summary: Updates an existing trusted certificate + x-vcloud-added-in: "34.0" + description: | + Updates an existing trusted certificate + operationId: updateCertificate + consumes: + - application/json + parameters: + - name: modifiedCertificate + in: body + required: true + schema: + $ref: "#/definitions/TrustedCertificate" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/TrustedCertificate" + + delete: + tags: + - trustedCertificates + summary: Revoke trusting specified certificate + description: | + Revoke trusting specified certificate + x-vcloud-added-in: "34.0" + operationId: deleteCertificate + responses: + 204: + description: No Content + +definitions: + Certificates: + description: | + A list of certificates. + x-vcloud-added-in: "34.0" + allOf: + - $ref: './common/query.yaml#/definitions/Page' + - type: object + properties: + values: + type: array + description: The current page of certificates. + items: + $ref: '#/definitions/TrustedCertificate' + + TrustedCertificate: + description: | + SSL certificate in PEM format. + type: object + x-vcloud-added-in: "34.0" + properties: + id: + type: string + maxLength: 128 + x-vcloud-constraints: + - constraint: Urn + args: + - arg: trustedCertificate + - constraint: ReadOnly + alias: + type: string + maxLength: 255 + certificate: + type: string + description: PEM encoded certificate + x-vcloud-constraints: + - constraint: NonSortable + - constraint: Certificate + example: -----BEGIN CERTIFICATE----- + + -----END CERTIFICATE----- + required: + - alias + - certificate + diff --git a/schemas/openapi/src/main/resources/schemas/storageContainers/storageContainers.yaml b/schemas/openapi/src/main/resources/schemas/storageContainers/storageContainers.yaml new file mode 100644 index 00000000..788cc952 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/storageContainers/storageContainers.yaml @@ -0,0 +1,213 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2021-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The Storage Container API allows for viewing of Datastores and Datastore Clusters + version: "1.0" + title: Storage Container API + +paths: + storageContainer: + parameters: + - name: storageContainerUrn + in: path + description: storageContainerUrn + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: storagecontainer + get: + x-vcloud-added-in: "36.0" + tags: + - storageContainer + summary: Get specified Datastore or Datastore Cluster. + operationId: getStorageContainer + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/StorageContainer" + + storageContainers: + get: + x-vcloud-added-in: "36.0" + tags: + - storageContainer + summary: Get a paged list of all standalone Datastores and Datastore Clusters in the system + description: | + Get a paged list of all standalone Datastores and Datastore Clusters in the system + operationId: getStorageContainers + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/StorageContainers' + + datastores: + parameters: + - name: storageContainerUrn + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: storagecontainer + + get: + x-vcloud-added-in: "36.0" + tags: + - storageContainer + summary: Retrieves all Datastores associated with the specified Datastore Cluster. + description: | + Retrieves all Datastores associated with the specified Datastore Cluster. + operationId: getDatastoreClusterDatastores + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/StorageContainers' + +definitions: + StorageContainer: + x-vcloud-added-in: "36.0" + description: | + A Storage Container, which can be a Datastore or a Datastore Cluster. + type: object + properties: + id: + type: string + description: "Unique VCD Id for the Storage Container." + name: + type: string + description: "Name for the Storage Container." + datastoreType: + type: string + description: "Datastore Type of the Storage Container." + isDatastoreCluster: + description: "True if this Storage Container is a Datastore Cluster." + type: boolean + isEnabled: + description: "True if this Storage Container is enabled. Unset if this storage container is part of a Datastore Cluster" + type: boolean + isDeleted: + description: "Deleted state of the Storage Container." + type: boolean + moref: + type: string + description: "Unique Id in Virtual Center of the Storage Container." + vcRef: + $ref: "../common/entity.yaml#/definitions/EntityReference" + description: "The VC that this Storage Container belongs to." + totalStorageMb: + type: integer + format: int64 + description: "Total storage in MB for this Storage Container." + usedStorageMb: + type: integer + format: int64 + description: "Total used storage in MB for this Storage Container." + provisionedStorageMb: + type: integer + format: int64 + description: "Total provisioned storage in MB for this Storage Container." + iopsCapacity: + type: integer + format: int64 + description: "Total IOPS capacity for this Storage Container." + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSortable + - constraint: Urn + args: + - arg: storagecontainer + name: + x-vcloud-constraints: + - constraint: ReadOnly + datastoreType: + x-vcloud-constraints: + - constraint: ReadOnly + isDatastoreCluster: + x-vcloud-constraints: + - constraint: ReadOnly + isDeleted: + x-vcloud-constraints: + - constraint: ReadOnly + isEnabled: + x-vcloud-constraints: + - constraint: ReadOnly + moref: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSortable + vcRef: + x-vcloud-constraints: + - constraint: ReadOnly + iopsCapacity: + x-vcloud-constraints: + - constraint: ReadOnly + totalStorageMb: + x-vcloud-constraints: + - constraint: ReadOnly + usedStorageMb: + x-vcloud-constraints: + - constraint: ReadOnly + provisionedStorageMb: + x-vcloud-constraints: + - constraint: ReadOnly + x-vcloud-cross-references: + - cross-reference: + alias: storagePolicyName + description: | + A filter to look up Storage Containers that support certain Storage Policies by name. + Sorting by this filter is not supported. This filter is not supported for datastores that are part of a Datastore Cluster . + Example usage: + ?filter=storagePolicyName==iops-policy + - cross-reference: + alias: storagePolicyId + description: | + A filter to look up Storage Containers that support certain Storage Policies by Storage Policy ID. + Sorting by this filter is not supported. This filter is not supported for datastores that are part of a Datastore Cluster. + Example usage: + ?filter=storagePolicyId==urn:vcloud:storagepolicy:UUID + + StorageContainers: + x-vcloud-added-in: "36.0" + description: | + A list of Storage Containers. + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + description: The current page of Storage Containers. + items: + $ref: '#/definitions/StorageContainer' diff --git a/schemas/openapi/src/main/resources/schemas/storagePolicies/orgVdcStoragePolicies.yaml b/schemas/openapi/src/main/resources/schemas/storagePolicies/orgVdcStoragePolicies.yaml new file mode 100644 index 00000000..8facbf8a --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/storagePolicies/orgVdcStoragePolicies.yaml @@ -0,0 +1,214 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2019-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The Org VDC Storage Policy API allows for management of storage policies configured for organization VDCs. + version: "1.0" + title: Org VDC Storage Policy API + +paths: + orgVdcStoragePolicy: + parameters: + - name: orgVdcStoragePolicyUrn + in: path + description: orgVdcStoragePolicyUrn + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: orgvdcstoragepolicy + get: + x-vcloud-added-in: "35.2" + tags: + - orgVdcStoragePolicy + summary: Get specified Org VDC storage policy. + operationId: getOrgVdcStoragePolicy + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/OrgVdcStoragePolicy" + + orgVdcStoragePolicies: + get: + x-vcloud-added-in: "35.2" + tags: + - orgVdcStoragePolicy + summary: Get a paged list of all organization VDC level storage policies in the system + description: | + Get a paged list of all organization VDC level storage policies in the system + operationId: getOrgVdcStoragePolicies + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/OrgVdcStoragePolicies' + + capabilities: + parameters: + - name: id + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: orgvdcstoragepolicy + + get: + x-vcloud-added-in: "34.0" + tags: + - capabilities + summary: Retrieves capabilities of a specific organization VDC storage policy. + description: | + Retrieves the current capabilities configured on a specific organization VDC storage policy. + These cannot be edited. + operationId: getOrgVdcStoragePolicyCapabilities + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: './common/capability.yaml#/definitions/Capabilities' + + orgVdcStoragePolicySupportedEntityTypes: + parameters: + - name: orgVdcStoragePolicyUrn + in: path + description: orgVdcStoragePolicyUrn + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: orgvdcstoragepolicy + + get: + x-vcloud-added-in: "36.0" + x-vcloud-default-sort: + default-sort-field: name + sort-ascending: true + tags: + - orgVdcStoragePolicy + summary: Get a paged list of the supported entity types for the specified Organization VDC storage policy. + operationId: getOrgVdcStoragePolicySupportedEntityTypes + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: './storagePolicies/pvdcStoragePolicies.yaml#/definitions/StoragePolicySupportedEntityTypes' + +definitions: + OrgVdcStoragePolicy: + x-vcloud-added-in: "35.2" + description: | + An organization VDC storage policy. + type: object + properties: + id: + type: string + description: "Unique VCD Id for the policy." + name: + type: string + description: "Unique name for the policy." + minLength: 1 + maxLength: 128 + isEnabled: + type: boolean + description: "Enabled state of the policy, defaults to true." + default: true + isDefaultStoragePolicy: + description: "Storage policy is marked as default, defaults to false." + type: boolean + default: false + storageLimitMb: + type: integer + format: int64 + description: "Storage limit for the policy." + orgVdcRef: + $ref: "../common/entity.yaml#/definitions/EntityReference" + description: "The Org VDC that this policy belongs to." + pvdcStoragePolicyRef: + $ref: "../common/entity.yaml#/definitions/EntityReference" + description: "The parent PVDC storage policy for this Organization VDC storage policy." + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSortable + - constraint: Urn + args: + - arg: orgvdcstoragepolicy + orgVdcRef: + x-vcloud-constraints: + - constraint: ReadOnly + pvdcStoragePolicyRef: + x-vcloud-constraints: + - constraint: ReadOnly + x-vcloud-cross-references: + - cross-reference: + referenced-type: "./common/capability.yaml#/definitions/Capability" + referenced-property: name + alias: capabilityName + description: | + A filter to look up storage policies that contain certain capabilities. + - cross-reference: + referenced-type: "./storagePolicies/pvdcStoragePolicies.yaml#/definitions/StoragePolicySupportedEntityType" + referenced-property: name + alias: entityTypeName + description: | + A filter to look up storage policies with the supported entity type. + Example usage: + filter?entityTypeName==com.vmware.vcloud.entity.vapp + - cross-reference: + referenced-type: "./storagePolicies/pvdcStoragePolicies.yaml#/definitions/StoragePolicySettings" + referenced-property: supportsAllValidEntityTypes + alias: supportsAllValidEntityTypes + description: | + A filter to look up storage policies which support all entity types + Example usage: + filter?supportsAllValidEntityTypes==true + required: + - name + - vdcUrn + - providerVdcUrn + + OrgVdcStoragePolicies: + x-vcloud-added-in: "35.2" + description: | + A list of organization VDC storage policies. + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + description: The current page of OrgVDC storage policies. + items: + $ref: '#/definitions/OrgVdcStoragePolicy' + diff --git a/schemas/openapi/src/main/resources/schemas/storagePolicies/pvdcStoragePolicies.yaml b/schemas/openapi/src/main/resources/schemas/storagePolicies/pvdcStoragePolicies.yaml new file mode 100644 index 00000000..6221e452 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/storagePolicies/pvdcStoragePolicies.yaml @@ -0,0 +1,434 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2019-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + + +swagger: "2.0" +info: + description: | + The PVDC Storage Policy API allows for management of storage policies configured for provider VDCs. + version: "1.0" + title: PVDC Storage Policy API + +paths: + pvdcStoragePolicy: + parameters: + - name: pvdcStoragePolicyUrn + in: path + description: pvdcStoragePolicyUrn + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: providervdcstoragepolicy + get: + x-vcloud-added-in: "35.2" + tags: + - pvdcStoragePolicy + summary: Get specified Provider VDC storage policy. + operationId: getPvdcStoragePolicy + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/PvdcStoragePolicy" + + pvdcStoragePolicies: + get: + x-vcloud-added-in: "35.2" + tags: + - pvdcStoragePolicy + summary: Get a paged list of all Provider VDC level storage policies in the system + description: | + Get a paged list of all Provider VDC level storage policies in the system + operationId: getPvdcStoragePolicies + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/PvdcStoragePolicies' + + capabilities: + parameters: + - name: id + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: providervdcstoragepolicy + get: + x-vcloud-added-in: "34.0" + tags: + - capabilities + summary: Retrieves capabilities of a specific provider VDC storage policy. + description: | + Retrieves the current capabilities configured on a specific provider VDC storage policy. + These cannot be edited. + operationId: getPvdcStoragePolicyCapabilities + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: './common/capability.yaml#/definitions/Capabilities' + + inheritableSettings: + parameters: + - name: id + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: providervdcstoragepolicy + + get: + x-vcloud-added-in: "35.0" + tags: + - pvdcStoragePolicy + summary: | + Retrieves the settings that child Org VDC storage policies of this provider VDC + storage policy should inherit. + description: | + Retrieves the settings that child Org VDC storage policies of this provider VDC + storage policy should inherit. + operationId: getPvdcStoragePolicyInheritableSettings + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/StoragePolicySettings' + + put: + x-vcloud-added-in: "35.0" + tags: + - pvdcStoragePolicy + summary: | + Updates the settings that child Org VDC storage policies of this provider VDC + storage policy should inherit. + description: | + Updates the settings that child Org VDC storage policies of this provider VDC + storage policy should inherit. + operationId: updatePvdcStoragePolicyInheritableSettings + consumes: + - application/json + parameters: + - name: updatedSettings + description: The updated inheritable settings. + in: body + required: true + schema: + $ref: '#/definitions/StoragePolicySettings' + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/StoragePolicySettings' + + supportedEntityTypes: + get: + x-vcloud-added-in: "35.2" + tags: + - pvdcStoragePolicy + summary: Get a paged list of all supported entity types configured for storage policies in the system + description: | + Get a paged list of all supported entity types configured for storage policies in the system + operationId: getAllSupportedStorageEntityTypes + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/StoragePolicySupportedEntityTypes' + + put: + x-vcloud-added-in: "35.2" + tags: + - pvdcStoragePolicy + summary: | + Updates the supported entity types for the specified provider VDC storage policy. + operationId: updateAllStoragePolicySupportedEntityTypes + consumes: + - application/json + parameters: + - name: updatedSupportedEntityTypes + description: The updated list of supported entity types. + in: body + required: true + schema: + type: array + items: + $ref: '#/definitions/StoragePolicySupportedEntityType' + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/StoragePolicySupportedEntityTypes' + + pvdcStoragePolicySupportedEntityTypes: + parameters: + - name: pvdcStoragePolicyUrn + in: path + description: pvdcStoragePolicyUrn + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: providervdcstoragepolicy + + get: + x-vcloud-added-in: "35.2" + tags: + - pvdcStoragePolicy + summary: Get a paged list of the supported entity types for the specified Provider VDC storage policy. + operationId: getPvdcStoragePolicySupportedEntityTypes + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/StoragePolicySupportedEntityTypes' + + put: + x-vcloud-added-in: "35.2" + tags: + - pvdcStoragePolicy + summary: | + Updates the supported entity types for the specified provider VDC storage policy. + operationId: updatePvdcStoragePolicySupportedEntityTypes + consumes: + - application/json + parameters: + - name: updatedSupportedEntityTypes + description: The updated list of supported entity types. + in: body + required: true + schema: + type: array + items: + $ref: '#/definitions/StoragePolicySupportedEntityType' + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/StoragePolicySupportedEntityTypes' + +definitions: + PvdcStoragePolicy: + x-vcloud-added-in: "35.2" + description: | + A Provider VDC storage policy. + type: object + properties: + id: + type: string + description: "Unique VCD Id for the policy." + name: + type: string + description: "Unique name for the policy." + minLength: 1 + maxLength: 128 + storagePolicyMoref: + type: string + description: "Unique Id in Virtual Center of the policy." + isEnabled: + description: "Enabled state of the policy, defaults to true." + type: boolean + default: true + providerVdcRef: + $ref: "../common/entity.yaml#/definitions/EntityReference" + description: "The PVDC that this policy belongs to." + vcRef: + $ref: "../common/entity.yaml#/definitions/EntityReference" + description: "The VC that this policy belongs to." + totalCapacityMb: + type: integer + format: int64 + description: "Total capacity in MB for this storage policy" + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSortable + - constraint: Urn + args: + - arg: providervdcstoragepolicy + storagePolicyMoref: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: UUID + - constraint: NonSortable + providerVdcRef: + x-vcloud-constraints: + - constraint: ReadOnly + vcRef: + x-vcloud-constraints: + - constraint: ReadOnly + totalCapacityMb: + x-vcloud-constraints: + - constraint: ReadOnly + x-vcloud-cross-references: + - cross-reference: + referenced-type: "./common/capability.yaml#/definitions/Capability" + referenced-property: name + alias: capabilityName + description: | + A filter to look up storage policies that contain certain capabilities. + Example usage: + filter?capabilityName==VSphere/Encryption + - cross-reference: + referenced-type: "#/definitions/StoragePolicySupportedEntityType" + referenced-property: name + alias: entityTypeName + description: | + A filter to look up storage policies with the supported entity type. + Example usage: + filter?entityTypeName==com.vmware.vcloud.entity.vapp + - cross-reference: + referenced-type: "#/definitions/StoragePolicySettings" + referenced-property: supportsAllValidEntityTypes + alias: supportsAllValidEntityTypes + description: | + A filter to look up storage policies which support all entity types + Example usage: + filter?supportsAllValidEntityTypes==true + required: + - name + - storagePolicyMoref + - providerVdcUrn + - vcUrn + + PvdcStoragePolicies: + x-vcloud-added-in: "35.2" + description: | + A list of Provider VDC storage policies. + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + description: The current page of PVDC storage policies. + items: + $ref: '#/definitions/PvdcStoragePolicy' + + StoragePolicySettings: + x-vcloud-added-in: "35.0" + description: | + Various settings for a storage policy. + type: object + properties: + supportsAllValidEntityTypes: + type: boolean + default: true + description: If true, designates that this storage policy can be used with all valid entity types + x-vcloud-added-in: "35.2" + diskIopsMax: + type: integer + format: int64 + description: Maximum IOPS for any disk associated with this storage policy. + default: 0 + minimum: 0 + diskIopsPerGbMax: + type: integer + format: int64 + description: | + Maximum IOPS that can be assigned to any disk associated with this storage policy based + on the size of the disk (in GB). This is also the default IOPS value used for any disk + associated with this policy. If set to zero, Default Disk IOPS is used as the default IOPS + to be assigned to any disk associated with this storage policy. + default: 0 + minimum: 0 + diskIopsDefault: + type: integer + format: int64 + description: | + Default IOPS value to use for any disk associated with the storage policy. + This default is only used when Disk IOPS Per GB Max is set to zero. + default: 0 + minimum: 0 + storagePolicyIopsLimit: + type: integer + format: int64 + description: | + The sum of IOPS across all disks associated with this policy will be limited to this value. + default: 0 + minimum: 0 + isIopsLimitingEnabled: + type: boolean + default: false + description: Whether IOPS limiting is enabled. + ignoreIopsPlacement: + type: boolean + default: false + description: Whether VCD IOPS placement should be ignored for disks using this policy. + + StoragePolicySupportedEntityTypes: + x-vcloud-added-in: "35.2" + description: | + A list of supported entity types for a Provider VDC storage policy. + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + description: The current page of supported entity types. + items: + $ref: '#/definitions/StoragePolicySupportedEntityType' + + StoragePolicySupportedEntityType: + x-vcloud-added-in: "35.2" + description: | + A supported entity type for a storage policy. + type: object + properties: + name: + type: string + description: | + The name of the supported entity type. Can be either a static VCD type or a defined entity type. + example: 'urn:vcloud:type:vmware:vm' + x-vcloud-property-annotations: + name: + x-vcloud-constraints: + - constraint: ReadOnly diff --git a/schemas/openapi/src/main/resources/schemas/storagePolicies/storagePolicies.yaml b/schemas/openapi/src/main/resources/schemas/storagePolicies/storagePolicies.yaml new file mode 100644 index 00000000..a8f96125 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/storagePolicies/storagePolicies.yaml @@ -0,0 +1,100 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2021-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The Storage Policies API allows for viewing of Provider Storage Policies. + version: "1.0" + title: Storage Policies API + +paths: + storagePolicy: + parameters: + - name: storagePolicyUrn + in: path + description: storagePolicyUrn + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: storagepolicy + get: + x-vcloud-added-in: "36.0" + tags: + - storagePolicy + summary: Get specified Storage Policy. + operationId: getStoragePolicy + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/StoragePolicy" + + storagePolicies: + get: + x-vcloud-added-in: "36.0" + tags: + - storagePolicy + summary: Get a paged list of all Provider Storage Policies in the system + description: | + Get a paged list of all Provider Storage Policies in the system + operationId: getStoragePolicies + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/StoragePolicies' + +definitions: + StoragePolicy: + x-vcloud-added-in: "36.0" + description: | + A Provider Storage Policy. + type: object + properties: + id: + type: string + description: "Unique VCD Id for the Storage Policy." + name: + type: string + description: "Name for the Storage Policy." + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSortable + - constraint: Urn + args: + - arg: storagepolicy + name: + x-vcloud-constraints: + - constraint: ReadOnly + + StoragePolicies: + x-vcloud-added-in: "36.0" + description: | + A list of Storage Policies. + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + description: The current page of Storage Policies. + items: + $ref: '#/definitions/StoragePolicy' diff --git a/schemas/openapi/src/main/resources/schemas/tags/entityTags.yaml b/schemas/openapi/src/main/resources/schemas/tags/entityTags.yaml new file mode 100644 index 00000000..b429a1a0 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/tags/entityTags.yaml @@ -0,0 +1,197 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2021-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + API to manage tags for an entity. + The supported entity types are documented in the "/1.0.0/entity/{id}/tags" API. + version: "1.0" + title: Tag API + +paths: + + entity-tags-summaries: + get: + x-vcloud-added-in: 36.0 + x-vcloud-default-sort: + default-sort-field: entityType + sort-ascending: true + tags: + - entityTags + summary: Retrieves the list of entities that have at least one tag assigned to it. + description: | + Retrieves the list of entities that have at least one tag assigned to it. + The list of tags is limited to the first 10 found. For the full list of tags, + use the API /1.0.0/entity/{id}/tags. + Besides entityType, additional supported filters are: +

        +
      • tag - The tag to search by +
      • scope - The scope to search by +
      + Example: filter=(tag==Web;scope==Security;entityType==vm) + operationId: getEntityTagsSummaries + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EntityTagsSummaries' + + entity-tags: + parameters: + - name: id + description: the URN of the entity to manage tag for. + in: path + required: true + type: string + + get: + x-vcloud-added-in: 36.0 + tags: + - entityTags + summary: Retrieves the tag information for a specific entity. + description: | + Retrieves the tag information for a specific entity. If user has view right to the entity, user can view its tags. + operationId: getEntityTags + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EntityTags' + + put: + x-vcloud-added-in: 36.0 +# x-vcloud-event: com/vmware/vcloud/event/tag/entityTags/modify + tags: + - entityTags + summary: Update the tag information for a specific entity. + description: | + Update the tag information for a specific entity. An empty list of tags means to delete all dags for the entity. + If user has edit permission on the entity, user can edit its tags. + Only entities of specific types are supported. + Supported types which can be determined based on a VCD Entity's URN ID such as "vm" in "urn:vcloud:vm:". +
        +
      • vm - Virtual Machines. Note that if a VM tag has a scope of "vcd-security", that tag value can be used + when defining dynamic Security/Firewall Group to match the VM for DFW use-case. +
      + operationId: updateEntityTags + consumes: + - application/json + produces: + - application/json + parameters: + - name: entityTags + in: body + description: the list of tags to update. + required: true + schema: + $ref: '#/definitions/EntityTags' + responses: + 200: + description: OK + schema: + $ref: "#/definitions/EntityTags" + +definitions: + + Tag: + $ref: "./tags/tags.yaml#/definitions/Tag" + + CommonEntityTags: + x-vcloud-added-in: 36.0 + description: | + Describes a tag information for a specific entity. + type: object + properties: + id: + type: string + description: | + The unique identifier of the entity in URN format. The entity type must be supported, which is documented + in "/1.0.0/tags/entitySummaries" API. + name: + type: string + description: The name of the entity. + readOnly: true + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: Urn + args: + - arg: vm + - constraint: NonSortable + - constraint: ReadOnly + name: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + - constraint: ReadOnly + + EntityTagsSummaries: + x-vcloud-added-in: 36.0 + description: | + List of entities that are tagged. + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: './tags/entityTags.yaml#/definitions/EntityTagsSummary' + + EntityTagsSummary: + x-vcloud-added-in: 36.0 + description: | + List of entities that are tagged. The summary only contains a partial list of the tags. + allOf: + - $ref: "./tags/entityTags.yaml#/definitions/CommonEntityTags" + - type: object + properties: + entityType: + type: string + description: The type of entity. See endpoint documentation for /1.0.0/entity/{id}/tags for full list of supported type. + firstTenTags: + description: The list of first 10 tags found that are assigned to this entity. + type: array + items: + $ref: '#/definitions/Tag' + minItems: 0 + maxItems: 10 + x-vcloud-cross-references: + - cross-reference: + alias: tag + - cross-reference: + alias: scope + x-vcloud-property-annotations: + entityType: + x-vcloud-constraints: + - constraint: ReadOnly + + EntityTags: + x-vcloud-added-in: 36.0 + description: | + List of entities that are tagged. + allOf: + - $ref: "./tags/entityTags.yaml#/definitions/CommonEntityTags" + - type: object + properties: + tags: + description: The list of all tags that are assigned to this entity. + type: array + items: + $ref: '#/definitions/Tag' + minItems: 0 + maxItems: 64 diff --git a/schemas/openapi/src/main/resources/schemas/tags/tags.yaml b/schemas/openapi/src/main/resources/schemas/tags/tags.yaml new file mode 100644 index 00000000..4fbb31b4 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/tags/tags.yaml @@ -0,0 +1,464 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2021-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + API to browse tags and scopes in VCD and to manage system scopes and its predefined tags. + version: "1.0" + title: Tag API + +paths: + + tags: + get: + x-vcloud-added-in: 36.0 + x-vcloud-default-sort: + default-sort-field: value + sort-ascending: true + tags: + - tag + summary: Retrieves the list of tags. + description: | + Retrieves the list of tags that can be used to tag an entity. The tag/scope pair is considered a unique item in the list. + The list of tags include tags assigned to entities within the organization and also tags associated with system scopes + that may not be assigned to any entity yet. + Filter example: +
        +
      • scope==vcd-security - get all tags with the specified scope +
      • isSystemScope==false - get all tags not associated with any system scope +
      + operationId: getTags + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/Tags' + + scopes: + get: + x-vcloud-added-in: 36.0 + x-vcloud-default-sort: + default-sort-field: value + sort-ascending: true + tags: + - tag + summary: Retrieves the list of unique scopes associated with tags. + description: | + Retrieves the list of unique scopes associated with tags. + A tag can have multiple scopes, which are different contexts in which a tag is used. + An example is that a tag of "web" can be used in different scopes: security, compute. + Depending on the system scope filter, either system scopes are returned or + only non-system scopes within the organization are returned. + Non-system scopes are free-form scopes user created when tagging an entity. + Filter example: +
        +
      • isSystemScope==true - get all system scopes +
      • isSystemScope==false - get all non-system scopes +
      + operationId: getScopes + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/Scopes' + + system-scope-summaries: + get: + x-vcloud-added-in: 36.0 + x-vcloud-default-sort: + default-sort-field: value + sort-ascending: true + tags: + - systemScopes + summary: Retrieves the list of system scope summaries. + description: | + Retrieves the list of system scope summaries. Only the number of predefied tags are returned instead of all the tags. + operationId: getSystemScopeSummaries + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/SystemScopeSummaries' + + system-scopes: + post: + x-vcloud-added-in: 36.0 +# x-vcloud-event: com/vmware/vcloud/event/tag/systemScope/create + tags: + - systemScopes + summary: Create a system scope. + description: | + Create a system scope, which is a collection of predefined tags and usage settings of these tags for organizations. + operationId: createSystemScope + consumes: + - application/json + produces: + - application/json + parameters: + - name: systemScope + in: body + required: true + schema: + $ref: '#/definitions/SystemScope' + responses: + 200: + description: OK + schema: + $ref: '#/definitions/SystemScope' + 400: + $ref: './common/response.yaml#/components/responses/BadRequest' + + system-scope: + parameters: + - name: id + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: tagSystemScope + + get: + x-vcloud-added-in: 36.0 + tags: + - systemScope + summary: Get the specific system scope. + description: | + Retrieves the specific system scope. + operationId: getSystemScope + produces: + - application/json + responses: + 200: + schema: + $ref: "#/definitions/SystemScope" + + put: + x-vcloud-added-in: 36.0 +# x-vcloud-event: com/vmware/vcloud/event/tag/systemScope/modify + tags: + - systemScope + summary: Update the system scope. + description: | + Update the system scope. + operationId: updateSystemScope + consumes: + - application/json + produces: + - application/json + parameters: + - name: systemScope + in: body + description: the system scope to update. + required: true + schema: + $ref: '#/definitions/SystemScope' + responses: + 200: + description: OK + schema: + $ref: "#/definitions/SystemScope" + + delete: + x-vcloud-added-in: 36.0 +# x-vcloud-event: com/vmware/vcloud/event/tag/systemScope/delete + tags: + - systemScope + summary: Delete the specific system scope. + description: | + Delete the specific system scope. If recursive delete is set to true, + all tags with the system scope will also be deleted from all entities. + operationId: deleteSystemScope + parameters: + - $ref: "./common/delete.yaml#/parameters/recursiveDelete" + responses: + 204: + description: No Content + +definitions: + + EntityReference: + $ref: "./common/entity.yaml#/definitions/EntityReference" + + Tag: + x-vcloud-added-in: 36.0 + description: | + Describes the most basic tag structure: its value and scope. + type: object + properties: + value: + type: string + description: The value of the tag. The value is case-insensitive and will be converted to lower-case. + scope: + type: string + description: The scope or context in which this tag is used for. The value is case-insensitive and will be converted to lower-case. + x-vcloud-property-annotations: + value: + x-vcloud-constraints: + - constraint: ReadOnly + scope: + x-vcloud-constraints: + - constraint: ReadOnly + x-vcloud-cross-references: + - cross-reference: + alias: isSystemScope + + Tags: + x-vcloud-added-in: 36.0 + description: | + List of a tags that users can use to assign to entities. + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: './tags/tags.yaml#/definitions/Tag' + + CommonScope: + x-vcloud-added-in: 36.0 + description: | + Describes a scope, which is a context in which the tag is applied. + type: object + properties: + value: + type: string + description: The value of the scope such as "vcd-security". + name: + type: string + description: User-friendly name of the scope such as "Security". This is not set for general/free-form scopes created by the user. + description: + type: string + description: The description about the scope. This is not set for general/free-form scopes created by the user. + orgUsageSettings: + $ref: "#/definitions/SystemScopeUsageSettings" + description: | + The usage settings that determines how predefined tags in this system scope can be viewed/used. + This is not set for general/free-form scopes created by the user. + + Scopes: + x-vcloud-added-in: 36.0 + description: | + List of a unique scopes associated with tags. + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: './tags/tags.yaml#/definitions/Scope' + + Scope: + x-vcloud-added-in: 36.0 + description: | + Describes a scope, which is a context in which the tag is applied. + allOf: + - $ref: "./tags/tags.yaml#/definitions/CommonScope" + x-vcloud-property-annotations: + value: + x-vcloud-constraints: + - constraint: ReadOnly + name: + x-vcloud-constraints: + - constraint: ReadOnly + description: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + orgUsageSettings: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + x-vcloud-cross-references: + - cross-reference: + alias: isSystemScope + + CommonSystemScope: + x-vcloud-added-in: 36.0 + description: | + Describes a system scope. System scope is a scope that's system-wide and has a list of predefined tags associated with it. + allOf: + - $ref: "./tags/tags.yaml#/definitions/CommonScope" + - type: object + properties: + id: + type: string + description: The id of the system scope. + preserveTags: + type: boolean + description: | + True means that when an entity is copied/moved (i.e. VM), any tag with with this system scope is preserved with the entity. + This property cannot be updated. + default: true + + SystemScopeSummaries: + x-vcloud-added-in: 36.0 + description: | + List of summaries of system scopes. + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: './tags/tags.yaml#/definitions/SystemScopeSummary' + + SystemScopeSummary: + x-vcloud-added-in: 36.0 + description: | + Summary of a systems cope. Only the count of its predefined tags are returned. + allOf: + - $ref: "./tags/tags.yaml#/definitions/CommonSystemScope" + - type: object + properties: + predefinedTagCount: + description: The number of predefined tags. + type: integer + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: Urn + args: + - arg: tagSystemScope + - constraint: NonSortable + - constraint: ReadOnly + value: + x-vcloud-constraints: + - constraint: ReadOnly + name: + x-vcloud-constraints: + - constraint: ReadOnly + description: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + orgUsageSettings: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + preserveTags: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + predefinedTagCount: + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + + SystemScope: + x-vcloud-added-in: 36.0 + description: | + The system scope information. + allOf: + - $ref: "./tags/tags.yaml#/definitions/CommonSystemScope" + - type: object + properties: + predefinedTags: + description: | + The list of all predefined tags associated with this system scope. User can add or remove tags by updating this list. + A predefined tag that is removed from this list will also have the tag removed from entities that use the tag. + type: array + items: + $ref: './tags/tags.yaml#/definitions/PredefinedTag' + minItems: 0 + maxItems: 64 + required: + - name + - value + - orgUsageSettings + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: Urn + args: + - arg: tagSystemScope + - constraint: NonSortable + description: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + orgUsageSettings: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + preserveTags: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + predefinedTags: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + PredefinedTag: + x-vcloud-added-in: 36.0 + description: | + Describes a predefined tag for a system scope. + type: object + properties: + value: + type: string + description: The value of the tag, which is case-agnostic. + required: + - value + + SystemScopeUsageSettings: + x-vcloud-added-in: 36.0 + description: The usage settings that determines how predefined tags in this system scope can be used. + type: object + properties: + canUseTags: + type: boolean + description: True means that user in any organization can use the use existing tags with this scope when tagging an entity. + default: true + canAddNewTags: + type: boolean + description: True means that user in any organization can add new tags with the system scope when tagging an entity. + default: true + x-vcloud-property-annotations: + canUseTags: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + canAddNewTags: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable diff --git a/schemas/openapi/src/main/resources/schemas/unimplemented-openapi-schemas.yaml b/schemas/openapi/src/main/resources/schemas/unimplemented-openapi-schemas.yaml new file mode 100644 index 00000000..19cf11b4 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/unimplemented-openapi-schemas.yaml @@ -0,0 +1,151 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2019-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" + +info: + title: Unimplemented vCloud Director OpenAPI + description: | + API here is meant to allow code generation to occur so that API implementation can be started without releasing the API. + + A typical flow is that if the API is not ready for release after stabilization branching: + * Move the API definition from vcloud-openapi-schemas.yaml to this file. + * Set the 'x-vcloud-added-in' fields for all applicable endpoints to 'future'. + * Mark the tests as UNIMPLEMENTED/BROKEN so that it can be skipped + + Alternately, if one wishes to disable an entire path: + * Move the API definition from vcloud-openapi-schemas.yaml to this file. + * Remove the API handler from the main-rest-api-application-context.xml + * Remove all links to the API from other API handlers + * Mark the tests as UNIMPLEMENTED/BROKEN so that it can be skipped + + version: "future" + +produces: + - '*/*' + +paths: + +### Add unimplmented path below. An example: ### +# /1.0.0/edgeGateways/{gatewayId}/dns: +# $ref: "./networking/edgeGatewayDns.yaml#/paths/dns" + +# Please keep path below in order to support empty path list (i.e. when we have no API to hide) + /some/fake/path: + +#### Networking endpoints #### + + /1.0.0/firewallGroups/candidates/groups: + $ref: "./networking/firewallGroupCandidates.yaml#/paths/groups" + + /1.0.0/firewallGroups/candidates/vms: + $ref: "./networking/firewallGroupCandidates.yaml#/paths/vms" + + /1.0.0/firewallGroups/candidates/networks: + $ref: "./networking/firewallGroupCandidates.yaml#/paths/networks" + + /1.0.0/nsxTResources/importableTier1Routers: + $ref: "./networking/nsxTResourcesDisabled.yaml#/paths/importableTier1Routers" + + /1.0.0/nsxTResources/importableSegments: + $ref: "./networking/nsxTResourcesDisabled.yaml#/paths/importableSegments" + + #### Org VDC VPN Groups #### + /1.0.0/orgVdcVpnGroups: + $ref: "./networking/orgVdcVpnGroup.yaml#/paths/orgVdcVpnGroups" + + /1.0.0/orgVdcVpnGroups/{vdcVpnGroupId}: + $ref: "./networking/orgVdcVpnGroup.yaml#/paths/orgVdcVpnGroup" + +##### Access Control Grants ######### + + /1.0.0/accessControls/membershipAccessControlDummy: + $ref: "./access-control/accessControl.yaml#/paths/membership-access-controls" + + /1.0.0/accessControls/rightAccessControlDummy: + $ref: "./access-control/accessControl.yaml#/paths/right-access-controls" + +##### Compute policies ######### + + /2.0.0/vdcComputePolicies/{vdcComputePolicyId}/supportedKubernetesVersions: + $ref: "./compute-policy/compute-policy-2.0.0.yaml#/paths/supported-kubernetes-versions" + + /2.0.0/pvdcComputePolicies/vm: + $ref: "./compute-policy/compute-policy-2.0.0.yaml#/paths/pvdc-vm-policies" + + /2.0.0/pvdcComputePolicies/kubernetes: + $ref: "./compute-policy/compute-policy-2.0.0.yaml#/paths/pvdc-tkg-policies" + + /2.0.0/vdcComputePolicies/vm: + $ref: "./compute-policy/compute-policy-2.0.0.yaml#/paths/vdc-vm-policies" + + /2.0.0/vdcComputePolicies/kubernetes: + $ref: "./compute-policy/compute-policy-2.0.0.yaml#/paths/vdc-tkg-policies" + + /2.0.0/vdcComputePolicies/metrics: + $ref: "./compute-policy/compute-policy-2.0.0.yaml#/paths/vdc-policy-metrics" + + /2.0.0/pvdcComputePolicies/metrics: + $ref: "./compute-policy/compute-policy-2.0.0.yaml#/paths/pvdc-policy-metrics" + + /2.0.0/pvdcComputePolicies/{pvdcComputePolicyId}/metrics: + $ref: "./compute-policy/compute-policy-2.0.0.yaml#/paths/pvdc-compute-policy-metrics" + +##### Dummy Objects for TypedValue ######### + + /1.0.0/common/typedValueDummy: + $ref: "./common/typed-value.yaml#/paths/dummy" + + ######################################################## + # + # vRO Catalog APIs + ######################################################## + /vro/servers/{vroId}/catalog: + $ref: "./vro/vro-catalog.yaml#/paths/vroServerCatalog" + /vro/servers/{vroId}/catalog/{namespace}: + $ref: "./vro/vro-catalog.yaml#/paths/vroServerCatalogNamespace" + /vro/servers/{vroId}/catalog/{namespace}/{type}: + $ref: "./vro/vro-catalog.yaml#/paths/vroServerCatalogNamespaceType" + /vro/servers/{vroId}/catalog/{namespace}/metadata/icon: + $ref: "./vro/vro-catalog.yaml#/paths/getNamespaceIcon" + /vro/servers/{vroId}/catalog/{namespace}/{type}/{id}: + $ref: "./vro/vro-catalog.yaml#/paths/vroServerCatalogNamespaceTypeId" + /vro/servers/{vroId}/catalog/{namespace}/{type}/metadata/icon: + $ref: "./vro/vro-catalog.yaml#/paths/getNamespaceTypeIcon" + /vro/servers/{vroId}/catalog/{namespace}/{parentType}/{parentId}/{relationName}: + $ref: "./vro/vro-catalog.yaml#/paths/getByRelation" + /vro/servers/{vroId}/categories/{id}: + $ref: "./vro/vro-catalog.yaml#/paths/getCategoryById" + +######################################################## +# +# End vRO Catalog APIs +# +######################################################## + +######################################################## +# vRO Forms Overlay API +######################################################## + /workflows/forms/{workflowId}: + $ref: "./vro/vro-forms.yaml#/paths/workflow-forms" + + /workflows/forms/{workflowId}/evaluationContext: + $ref: "./vro/vro-forms.yaml#/paths/workflow-forms-eval-context" + + /workflows/forms/{workflowId}/evaluations/: + $ref: "./vro/vro-forms.yaml#/paths/workflow-forms-evaluations" + + /workflows/forms/{workflowId}/executions/: + $ref: "./vro/vro-forms.yaml#/paths/workflow-forms-executions" + + #enforce generation of referred parameter types + /workflows/parameterTypesForms: + $ref: "./vro/vro-forms.yaml#/paths/parameter-types-forms" + +######################################################## +# End vRO Forms Overlay API +######################################################## + diff --git a/schemas/openapi/src/main/resources/schemas/user/user.yaml b/schemas/openapi/src/main/resources/schemas/user/user.yaml new file mode 100644 index 00000000..1c0061b1 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/user/user.yaml @@ -0,0 +1,160 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2019-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The vCloud Director User API. + version: "1.0" + title: vCloud Director User API + +paths: + users: + get: + tags: + - User + summary: Get a list of users. + x-vcloud-added-in: "35.0" + x-vcloud-multisite: true + x-vcloud-default-sort: + default-sort-field: username + sort-ascending: true + description: | + Get a list of users. + operationId: queryUsers + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: './common/user.yaml#/definitions/VcdUsers' + + post: + tags: + - User + summary: Create a new user. + x-vcloud-added-in: "35.0" + operationId: createUser + consumes: + - application/json + parameters: + - name: newUser + in: body + required: true + schema: + $ref: "./common/user.yaml#/definitions/VcdUser" + produces: + - application/json + responses: + 201: + description: Created + schema: + $ref: "./common/user.yaml#/definitions/VcdUser" + + user: + parameters: + - name: userUrn + in: path + description: userUrn + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: user + get: + x-vcloud-added-in: "35.0" + tags: + - User + summary: Get a specified user by id. + operationId: getUser + description: | + Get a specified user by id. + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "./common/user.yaml#/definitions/VcdUser" + + delete: + tags: + - User + summary: Delete the specified user. + operationId: deleteUser + x-vcloud-added-in: "35.0" + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + + put: + tags: + - User + summary: Modify the details of a user. A non-administrator user may only modify their own password. An administrator can edit any user. + operationId: updateUser + x-vcloud-added-in: "35.0" + description: | + Modify basic details of the specified user. + consumes: + - application/json + parameters: + - name: updatedUser + in: body + required: true + schema: + $ref: "./common/user.yaml#/definitions/VcdUser" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "./common/user.yaml#/definitions/VcdUser" + + groups: + parameters: + - name: userUrn + in: path + description: userUrn + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: user + get: + x-vcloud-added-in: "35.0" + tags: + - User + summary: Get a list of groups that the user with the given id belongs to. + operationId: queryUserGroups + x-vcloud-default-sort: + default-sort-field: name + sort-ascending: true + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + description: | + Get a list of references of groups that the user with the given id belongs to. + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "./common/entity.yaml#/definitions/EntityReferences" + diff --git a/schemas/openapi/src/main/resources/schemas/vc/proxyConfiguration.yaml b/schemas/openapi/src/main/resources/schemas/vc/proxyConfiguration.yaml new file mode 100644 index 00000000..51ce1d31 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/vc/proxyConfiguration.yaml @@ -0,0 +1,197 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2018-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The Proxy Configuration API allows for management of proxies used by vCloud Director to connect + to vCenter Servers, ESXi hosts, or NSX servers. + title: Proxy Configuration API + version: "1.0" + +paths: + proxy-configurations: + get: + tags: + - proxyConfiguration + summary: Gets a paged list of proxy configurations. + x-vcloud-added-in: "34.0" + description: | + Gets a paged list of proxy configurations. + operationId: queryProxyConfigurations + x-vcloud-default-sort: + default-sort-field: name + sort-ascending: true + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/ProxyConfigurations" + post: + tags: + - proxyConfiguration + summary: Creates a proxy configuration. + x-vcloud-added-in: "34.0" + description: | + Creates a proxy configuration. + operationId: createProxyConfiguration + parameters: + - name: proxyConfiguration + description: The new proxy configuration API model. + in: body + required: true + schema: + $ref: "#/definitions/ProxyConfiguration" + consumes: + - application/json + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + + proxy-configuration: + parameters: + - name: id + description: Proxy Configuration ID URN + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: proxyConfiguration + + get: + tags: + - proxyConfiguration + summary: Retrieves a specific proxy configuration. + x-vcloud-added-in: "34.0" + operationId: getProxyConfiguration + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/ProxyConfiguration" + + put: + tags: + - proxyConfiguration + summary: Update a specific proxy configuration. + x-vcloud-added-in: "34.0" + operationId: updateProxyConfiguration + consumes: + - application/json + parameters: + - name: updatedProxyConfiguration + description: The updated proxy configuration API model. + in: body + required: true + schema: + $ref: "#/definitions/ProxyConfiguration" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/ProxyConfiguration" + + delete: + tags: + - proxyConfiguration + summary: Delete a specific proxy configuration. + x-vcloud-added-in: "34.0" + operationId: deleteProxyConfiguration + responses: + 204: + description: No Content + +definitions: + + ProxyConfigurations: + x-vcloud-added-in: "34.0" + description: | + A paginated list of proxy configurations + allOf: + - $ref: './common/query.yaml#/definitions/Page' + - type: object + properties: + values: + type: array + items: + $ref: '#/definitions/ProxyConfiguration' + + ProxyConfiguration: + x-vcloud-added-in: "34.0" + description: | + A Proxy Configuration. This configuration object declares a backend proxy that sits between vCD and the vSphere/NSX/ESX estate. + type: object + properties: + name: + type: string + pattern: '.*[\S].*' + example: Proxy Sample Name + id: + type: string + x-vcloud-constraints: + - constraint: NonSortable + - constraint: ReadOnly + - constraint: Urn + args: + - arg: proxyConfiguration + description: + type: string + description: Optional description. + example: Configuration to connect to VC-1 + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + authType: + type: string + enum: [BASIC, BEARER] + username: + type: string + description: username to connect to the proxy server. + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + password: + type: string + description: password to connect to the proxy server, when auth type is Basic. + x-vcloud-password: true + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + token: + type: string + description: authentication token to connect to the proxy server, when auth type is Bearer. + x-vcloud-password: true + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + host: + type: string + description: hostname of the proxy server. + example: sampleProxy.vmware.com + port: + type: integer + description: port of the proxy server. + required: + - name + - authType + - password + - host + - port + diff --git a/schemas/openapi/src/main/resources/schemas/vc/resourcePool.yaml b/schemas/openapi/src/main/resources/schemas/vc/resourcePool.yaml new file mode 100644 index 00000000..bec14410 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/vc/resourcePool.yaml @@ -0,0 +1,40 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2011-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + Entity used to describe a resource pool in vCenter. + title: Resource Pool + version: "1.0" + +definitions: + + ResourcePool: + description: | + A vCenter Resource Pool. + type: object + properties: + moref: + type: string + description: The vCenter Id of the Resource Pool. It must be in the format (resgroup-#). + name: + type: string + description: The name of the Resource Pool. + vcId: + type: string + description: The vCenter the Resource Pool belongs to. + eligible: + type: boolean + description: | + Used in resource pool tree navigation. + Indicates whether the resource pool is eligible or not. + kubernetesEnabled: + type: boolean + x-vcloud-added-in: "35.0" + description: | + Indicates whether the resource pool's cluster is enabled for vSphere Kubernetes. + diff --git a/schemas/openapi/src/main/resources/schemas/vc/unmanagedVirtualMachine.yaml b/schemas/openapi/src/main/resources/schemas/vc/unmanagedVirtualMachine.yaml new file mode 100644 index 00000000..656a7fb8 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/vc/unmanagedVirtualMachine.yaml @@ -0,0 +1,122 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2020-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + Entity used to describe unmanaged Virtual Machine in vCenter, such unmanaged VMs are candidates for import into Cloud Director. + title: Unmanaged Virtual Machine + version: "1.0" + +paths: + unmanagedVirtualMachines: + get: + x-cloud-added-in: 34.0 + tags: + - VirtualCenter + summary: Get a list of unmanaged virtual machines from vCenter Server + description: | + Get a list of unmanaged virtual machines from vCenter Server + operationId: getUnmanagedVirtualMachines + x-vcloud-default-sort: + default-sort-field: name + sort-ascending: true + parameters: + - name: vcUrn + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: vimserver + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + schema: + $ref: "./vc/unmanagedVirtualMachine.yaml#/definitions/UnmanagedVirtualMachines" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + +definitions: + + UnmanagedVirtualMachine: + x-vcloud-added-in: "34.0" + description: | + An unmanaged Virtual Machine is a Virtual Machine that is not managed by Cloud Director but is present in vCenter. + type: object + properties: + name: + type: string + description: The name of the virtual machine. + x-vcloud-constraints: + - constraint: ReadOnly + memory: + type: integer + format: int64 + description: The total memory (in MB) of the virtual machine. + x-vcloud-constraints: + - constraint: ReadOnly + cpuCount: + type: integer + format: int32 + description: The total number of CPUs of the virtual machine. + x-vcloud-constraints: + - constraint: ReadOnly + storage: + type: integer + format: int64 + description: The total storage (in KB) of the virtual machine. + x-vcloud-constraints: + - constraint: ReadOnly + path: + type: string + description: The absolute path of the virtual machine in the vCenter's datastore. + x-vcloud-constraints: + - constraint: ReadOnly + virtualHardwareVersion: + type: integer + description: The virtual hardware version of the virtual machine. + x-vcloud-constraints: + - constraint: ReadOnly + state: + type: string + description: The following strings are valid states of the virtual machine. +
        +
      • INVALID
      • +
      • OFF
      • +
      • ON
      • +
      • SUSPENDED
      • +
      • UNKNOWN
      • +
      • STUCK
      • +
      + x-vcloud-constraints: + - constraint: ReadOnly + moRef: + type: string + description: The vSphere Managed Object Reference. + x-vcloud-constraint: + - constraint: NonSortable + - constraint: ReadOnly + + UnmanagedVirtualMachines: + x-vcloud-added-in: "34.0" + description: | + A list of unmanaged Virtual Machines + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: "./vc/unmanagedVirtualMachine.yaml#/definitions/UnmanagedVirtualMachine" diff --git a/schemas/openapi/src/main/resources/schemas/vc/vcStoragePolicies.yaml b/schemas/openapi/src/main/resources/schemas/vc/vcStoragePolicies.yaml new file mode 100644 index 00000000..3ff74569 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/vc/vcStoragePolicies.yaml @@ -0,0 +1,46 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2020-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The Virtual Center Storage Policy API allows for management of storage policies configured for virtual centers. + title: Virtual Center Storage Policy API + +paths: + capabilities: + parameters: + - name: vcUrn + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: vimserver + - name: moref + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: UUID + + get: + x-vcloud-added-in: "34.0" + tags: + - VirtualCenter + summary: Retrieves capabilities of a specific Virtual Center storage policy. + description: | + Retrieves the current capabilities configured on a specific Virtual Center storage policy. + These cannot be edited. + operationId: getVcStoragePolicyCapabilities + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: './common/capability.yaml#/definitions/Capabilities' diff --git a/schemas/openapi/src/main/resources/schemas/vc/virtualCenter.yaml b/schemas/openapi/src/main/resources/schemas/vc/virtualCenter.yaml new file mode 100644 index 00000000..b3c9cc39 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/vc/virtualCenter.yaml @@ -0,0 +1,903 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2019-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The Virtual Center API allows for basic CRUD operations of a VC. + title: Virtual Center API + +paths: + + rootResourcePools: + get: + x-vcloud-added-in: "33.0" + tags: + - VirtualCenter + summary: Get resource pools of a VC + description: | + Get a list of all root resource pools. + If a resource pool is ineligible, but is in the response, + this means it has children, which are eligible. + A resource pool will be ineligible, + unless the cluster has an ESXi host on it. + The list will be sorted by name, case insensitive. + operationId: getRootResourcePools + parameters: + - name: vcUrn + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: vimserver + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + schema: + $ref: "#/definitions/ResourcePools" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + childResourcePools: + get: + x-vcloud-added-in: "33.0" + tags: + - VirtualCenter + summary: Get resource pools of a VC + description: | + Get list of child resource pools of the specified parent. + If a resource pool is ineligible, but is in the response, + this means it has children, which are eligible. + A resource pool will be ineligible, + unless the cluster has an ESXi host on it. + The list will be sorted by name, case insensitive. + operationId: getChildResourcePools + parameters: + - name: vcUrn + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: vimserver + - name: moref + in: path + required: true + type: string + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + schema: + $ref: "#/definitions/ResourcePools" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + storageProfiles: + get: + x-vcloud-added-in: "33.0" + tags: + - VirtualCenter + summary: Get storage profiles of a VC + description: | + Get a list of all storage profiles for a VC. + Supported contexts are: + Resource Pool Moref (_context==moref) - | + Returns all the storage profiles which are related to a specific Resoure Pool. + Example: /cloudapi/{ver}/virtualCenters/{urn}/storageProfiles?filter=_context==resgroup-N + operationId: getStorageProfiles + parameters: + - name: vcUrn + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: vimserver + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + schema: + $ref: "#/definitions/StorageProfiles" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + supportedHardwareVersions: + get: + x-vcloud-added-in: "33.0" + tags: + - VirtualCenter + summary: Get supported hardware versions of a resource pool + description: | + Get a set of all supported hardware versions by the ESXi hosts in the resource pool. + operationId: getSupportedHardwareVersions + parameters: + - name: vcUrn + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: vimserver + - name: moref + in: path + required: true + type: string + produces: + - application/json + responses: + 200: + schema: + $ref: "#/definitions/HardwareVersions" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + kubernetesConfig: + get: + x-vcloud-added-in: "35.0" + tags: + - VirtualCenter + summary: Get kubernetes configuration for a resource pool. + description: | + Get kubernetes configuration for a resource pool which is backed by a kubernetes enabled cluster. + operationId: getResourcePoolKubernetesConfig + parameters: + - name: vcUrn + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: vimserver + - name: moref + in: path + required: true + type: string + produces: + - application/json + responses: + 200: + schema: + $ref: "#/definitions/ResourcePoolKubernetesConfig" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + virtualMachineClasses: + get: + x-vcloud-added-in: "35.0" + tags: + - VirtualCenter + summary: Get a list of Virtual Machine Classes associated with this resource pool. + description: | + Get a list of Virtual Machine Classes associated with this resource pool. + This API throws 400 BadRequestException if called against a resource pool which is not Kubernetes enabled. + operationId: queryVirtualMachineClasses + parameters: + - name: vcUrn + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: vimserver + - name: moref + in: path + required: true + type: string + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + schema: + $ref: "./compute-policy/compute-policy-2.0.0.yaml#/definitions/VirtualMachineClasses" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + + virtualCenter: + get: + x-vcloud-added-in: "34.0" + tags: + - VirtualCenter + summary: Get Virtual Center server + description: | + Retrieve the representation of a vCenter server registered and managed by vCD. + operationId: getVirtualCenter + parameters: + - name: vcUrn + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: vimserver + produces: + - application/json + responses: + 200: + schema: + $ref: "#/definitions/VCenterServer" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + put: + x-vcloud-added-in: "34.0" + tags: + - VirtualCenter + summary: Update specified Virtual Center server + description: | + Update the representation of a registered vCenter server. + This operation is asynchronous and returns a task that + you can monitor to track the progress of the request. + Starting with API version 36.0, a null nsxVManager will attempt to remove the NSX-V Manager from the vCenter, + and a non-null nsxVManager will attempt to add the NSX-V Manager to the vCenter if there is none registered + or update the NSX-V Manager if there is one already registered to the vCenter. + If you don't want to update the NSX-V Manager, provide the same NSX-V Manager settings as the existing one. + For API versions before 36.0, no changes or updates to the nsxVManager will be made, + regardless of whether an nsxVManger is provided or if it's different than the existing one. + operationId: updateVirtualCenter + consumes: + - application/json + parameters: + - name: vcUrn + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: vimserver + - name: updateVCenterServerParams + in: body + required: true + schema: + $ref: "#/definitions/VCenterServer" + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + delete: + x-vcloud-added-in: "34.0" + tags: + - VirtualCenter + summary: Detach the specified Virtual Center server + description: | + Unregister a vCenter server. + This operation is asynchronous and returns a task that + you can monitor to track the progress of the request. + operationId: deleteVirtualCenter + parameters: + - name: vcUrn + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: vimserver + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + + virtualCenterMetrics: + get: + x-vcloud-added-in: "34.0" + tags: + - VirtualCenter + summary: Get Virtual Center server metrics + description: | + Retrieve the metrics of a registered vCenter server. + operationId: getVirtualCenterMetrics + parameters: + - name: vcUrn + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: vimserver + produces: + - application/json + responses: + 200: + schema: + $ref: "#/definitions/VCenterServerMetrics" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + nsxVManagerSettings: + get: + x-vcloud-added-in: "34.0" + tags: + - VirtualCenter + summary: Get Virtual Center server network settings + description: | + Retrieve the networking configuration of a registered vCenter server. + operationId: getNsxVManagerSettings + parameters: + - name: vcUrn + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: vimserver + produces: + - application/json + responses: + 200: + schema: + $ref: "#/definitions/NsxVManagerSettings" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + put: + x-vcloud-added-in: "34.0" + tags: + - VirtualCenter + summary: Update specified Virtual Center server network settings + description: | + Update the network settings of a registered vCenter server. + This operation is asynchronous and returns a task that + you can monitor to track the progress of the request. + operationId: updateNsxVManagerSettings + consumes: + - application/json + parameters: + - name: vcUrn + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: vimserver + - name: updateVCenterServerParams + in: body + required: true + schema: + $ref: "#/definitions/NsxVManagerSettings" + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + + virtualCenters: + get: + x-vcloud-added-in: "34.0" + tags: + - VirtualCenter + summary: Gets a paged list of Virtual Center servers. + description: | + Retrieves a paged list of all Virtual Center servers in the system. + operationId: queryVirtualCenters + x-vcloud-multisite: true + x-vcloud-default-sort: + default-sort-field: name + sort-ascending: true + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/VCenterServers" + post: + x-vcloud-added-in: "34.0" + tags: + - VirtualCenter + operationId: attachVirtualCenter + summary: Attach a Virtual Center server + description: Attach a Virtual Center server. + consumes: + - application/json + parameters: + - name: vimserver + in: body + required: true + schema: + $ref: "#/definitions/VCenterServer" + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + 401: + description: Unauthorized + +definitions: + + ResourcePools: + description: | + A list of Resource Pools + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: "./vc/resourcePool.yaml#/definitions/ResourcePool" + + StorageProfiles: + description: | + A list of Storage Profiles + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: "./vc/virtualCenter.yaml#/definitions/StorageProfile" + + StorageProfile: + description: | + A Storage Profile. + type: object + properties: + moref: + type: string + description: The Moref of the Storage Profile. + name: + type: string + description: The name of the Storage Profile. + + SupportedHardwareVersion: + x-vcloud-added-in: "35.2" + description: supported ESXi virtual hardware version. + type: object + properties: + isDefault: + type: boolean + description: indicates whether this virtual hardware version is the default in vCenter. + x-vcloud-constraints: + - constraint: ReadOnly + name: + type: string + description: The name of the virtual hardware version. + x-vcloud-constraints: + - constraint: ReadOnly + + HardwareVersions: + x-vcloud-added-in: "33.0" + description: Set of supported ESXi virtual hardware versions. + type: object + properties: + versions: + type: array + items: + type: string + supportedVersions: + type: array + items: + $ref: '#/definitions/SupportedHardwareVersion' + x-vcloud-property-annotations: + versions: + x-vcloud-added-in: "33.0" + x-vcloud-deprecated-in: "35.2" + x-vcloud-deprecated-alternative: supportedVersions + supportedVersions: + x-vcloud-added-in: "35.2" + + NsxVManager: + x-vcloud-added-in: "34.0" + description: | + An object representing an NSX-V server. + type: object + properties: + username: + type: string + description: User name to connect to the NSX-V server. + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + password: + type: string + description: Cleartext password to connect to the NSX-V server. + x-vcloud-password: true + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + url: + type: string + description: URL of the server. + format: uri + example: https://sampleVsm.vmware.com + x-vcloud-constraints: + - constraint: NonSortable + softwareVersion: + type: string + description: Version of the NSX-V Manager + x-vcloud-constraints: + - constraint: ReadOnly + required: + - username + - url + + VCenterServer: + x-vcloud-added-in: "34.0" + description: | + An object representing a vCenter server. + type: object + properties: + vcId: + type: string + description: URN of the associated vCenter server. + example: urn:vcloud:vimserver:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + x-vcloud-constraints: + - constraint: NonSortable + - constraint: ReadOnly + - constraint: Urn + args: + - arg: vimserver + name: + type: string + description: The name of the vCenter server. + example: vCenter Sample Name + description: + type: string + description: Optional description. + example: vCenter Sample Description + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + username: + type: string + description: User name to connect to the server. + password: + type: string + description: Cleartext password to connect to the server. + x-vcloud-password: true + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + url: + type: string + description: URL of the server. + format: uri + example: https://sampleVc.vmware.com + isEnabled: + type: boolean + default: false + description: True if the vCenter server is enabled for use with vCloud Director. + vsphereWebClientServerUrl: + type: string + description: The URL of vCenter web client server. + format: uri + hasProxy: + type: boolean + default: false + description: When present, indicates that a proxy exists within vCloud Director that proxies this vCenter server + for access by authorized end-users. Setting this field to true when registering a vCenter server + will result in a proxy being created for the vCenter server, and another + for the corresponding SSO endpoint (if different from the vCenter server's endpoint). + This field is immutable after the vCenter Server is registered, and will be updated by the system + when/if the proxy is removed. + rootFolder: + type: string + description: vCenter root folder in which the vCloud Director system folder will + be created. This parameter only takes the folder name and not + directory structure. + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + - constraint: ReadOnly + vcNoneNetwork: + type: string + description: Network in Vcenter to be used as 'NONE' network by vCD. + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + - constraint: ReadOnly + tenantVisibleName: + type: string + description: Public label of this vCenter server visible to all tenants. + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + isConnected: + type: boolean + default: false + description: True if the vCenter server is connected. + x-vcloud-constraints: + - constraint: ReadOnly + mode: + type: string + enum: [NONE, IAAS, SDDC, MIXED] + description: The vcenter mode. One of +
        +
      • NONE - undetermined
      • +
      • IAAS - provider scoped
      • +
      • SDDC - tenant scoped
      • +
      • MIXED
      • +
      + IAAS indicates this vCenter server is scoped to the provider. SDDC indicates that this + vCenter server is scoped to tenants, while MIXED indicates mixed mode, where both uses are + allowed in this vCenter server. + x-vcloud-constraints: + - constraint: ReadOnly + listenerState: + type: string + description: The vcenter listener state. One of +
        +
      • INITIAL
      • +
      • INVALID_SETTINGS
      • +
      • UNSUPPORTED
      • +
      • DISCONNECTED
      • +
      • CONNECTING
      • +
      • CONNECTED_SYNCING
      • +
      • CONNECTED
      • +
      • STOP_REQ
      • +
      • STOP_AND_PURGE_REQ
      • +
      • STOP_ACK
      • +
      + x-vcloud-constraints: + - constraint: ReadOnly + clusterHealthStatus: + type: string + enum: [GRAY, RED, YELLOW, GREEN] + description: The overall health status of clusters in this vCenter server. One of +
        +
      • GRAY
      • +
      • RED
      • +
      • YELLOW
      • +
      • GREEN
      • +
      + x-vcloud-constraints: + - constraint: ReadOnly + vcVersion: + type: string + description: The version of the VIM server. + example: 6.7.0 + x-vcloud-constraints: + - constraint: ReadOnly + buildNumber: + x-vcloud-added-in: "35.2" + type: string + description: The build number of the VIM server. + example: 12345 + x-vcloud-constraints: + - constraint: ReadOnly + uuid: + type: string + description: The instance UUID property of the vCenter server. + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + nsxVManager: + $ref: '#/definitions/NsxVManager' + description: the NSX-V attached to this Virtual Center server, when present. + proxyConfigurationUrn: + required: false + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: proxyConfiguration + - constraint: NonSearchable + - constraint: NonSortable + required: + - name + - username + - url + + VCenterServerMetrics: + x-vcloud-added-in: "34.0" + description: | + An object representing metrics of a vCenter server. + type: object + properties: + vcId: + type: string + description: URN of the associated vCenter server. + example: urn:vcloud:vimserver:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + x-vcloud-constraints: + - constraint: NonSortable + - constraint: ReadOnly + - constraint: Urn + args: + - arg: vimserver + clustersCount: + type: integer + description: The number of clusters in this vCenter server. + x-vcloud-constraints: + - constraint: ReadOnly + totalVmCount: + type: integer + description: The number of VMs in this vCenter server. + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + poweredOnVmCount: + type: integer + description: The number of powered-on VMs in this vCenter server. + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + totalMemMb: + type: integer + description: The total memory (in MB) in this vCenter server. + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + reservedMemMb: + type: integer + description: The reserved memory (in MB) in this vCenter server. + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + demandedMemMb: + type: integer + description: The demanded memory (in MB) in this vCenter server. + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + totalCpuMhz: + type: integer + description: The total CPU (in MHz) in this vCenter server. + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + reservedCpuMhz: + type: integer + description: The reserved CPU (in MHz) in this vCenter server. + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + demandedCpuMhz: + type: integer + description: The demanded CPU (in MHz) in this vCenter server. + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + totalStorageMb: + type: integer + description: The size (in MB) of all datastores in this vCenter server. + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + freeStorageMb: + type: integer + description: The size of free storage (in MB) of all datastores in this vCenter server. + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + uncommittedStorageMb: + type: integer + description: The size of uncommitted storage (in MB) of all datastores in this vCenter server. + x-vcloud-constraints: + - constraint: ReadOnly + - constraint: NonSearchable + - constraint: NonSortable + + NsxVManagerSettings: + x-vcloud-added-in: "34.0" + description: | + An object representing networking configuration of a vCenter server. + type: object + properties: + vcId: + type: string + description: URN of the associated vCenter server. + example: urn:vcloud:vimserver:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + x-vcloud-constraints: + - constraint: NonSortable + - constraint: ReadOnly + - constraint: Urn + args: + - arg: vimserver + networkProviderScope: + type: string + description: Public label of this NSX server visible to all tenants. + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + controlVmResourcePoolVcPath: + type: string + description: Path to the resource pool to use for creating Control VM for Cross-VDC Networking. + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + controlVmDatastoreName: + type: string + description: Name of the Datastore to use for creating Control VM for Cross-VDC Networking. + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + controlVmManagementInterfaceName: + type: string + description: Name of the management interface to use for creating Control VM for Cross-VDC Networking. + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + required: + - vcId + - networkProviderScope + - controlVmResourcePoolVcPath + - controlVmDatastoreName + - controlVmManagementInterfaceName + + VCenterServers: + description: | + A list of vCenter servers. + allOf: + - $ref: '#/definitions/Page' + - type: object + properties: + values: + type: array + description: The current page of vCenter server. + items: + $ref: '#/definitions/VCenterServer' + + ResourcePoolKubernetesConfig: + x-vcloud-added-in: "35.0" + description: | + Kubernetes configuration for a resource pool backed by kubernetes enabled cluster. + type: object + properties: + controlPlaneEndpoint: + type: string + description: | + Endpoint for the kubernetes enabled cluster backed by this Resource Pool. + diff --git a/schemas/openapi/src/main/resources/schemas/vcloud-openapi-schemas.yaml b/schemas/openapi/src/main/resources/schemas/vcloud-openapi-schemas.yaml index 1a39aabf..4c789425 100644 --- a/schemas/openapi/src/main/resources/schemas/vcloud-openapi-schemas.yaml +++ b/schemas/openapi/src/main/resources/schemas/vcloud-openapi-schemas.yaml @@ -1,30 +1,307 @@ # ****************************************************************************** # * api-extension-template-vcloud-director -# * Copyright 2011-2018 VMware, Inc. All rights reserved. * +# * Copyright 2017 -2021 VMware, Inc. All rights reserved. * # * SPDX-License-Identifier: BSD-2-Clause # ****************************************************************************** + swagger: "2.0" info: - title: Umbrella vcloud YAML - description: Top level YAML file to contain all vcloud openapi schemas - version: "1.0" + title: VMware Cloud Director OpenAPI + version: "36.0" + contact: + name: VMware, Inc. + url: https://code.vmware.com + email: https://code.vmware.com/support + license: + name: '' + url: '' + # When editing this description, be careful about how it renders in the docs + description: | + VMware Cloud Director OpenAPI is a new API that is defined using the OpenAPI standards.
      + This ReSTful API borrows some elements of the legacy VMware Cloud Director API and establishes new patterns for use + as described below. +

      Authentication

      + Authentication and Authorization schemes are the same as those for the legacy APIs. You can authenticate + using the JWT token via the Authorization header or specifying a session using + x-vcloud-authorization (The latter form is deprecated). +

      Operation Patterns

      + This API follows the following general guidelines to establish a consistent CRUD pattern: + + + + + + + + + +
      OperationDescriptionResponse CodeResponse Content
      GET /itemsReturns a paginated list of items200Response will include Navigational links to the items in the list. +
      POST /itemsReturns newly created item201Content-Location header links to the newly created item +
      GET /items/urnReturns an individual item200A single item using same data type as that included in list above +
      PUT /items/urnUpdates an individual item200Updated view of the item is returned +
      DELETE /items/urnDeletes the item204No content is returned. +
      +
      Asynchronous operations
      + Asynchronous operations are determined by the server. In those cases, instead of responding as described above, + the server responds with an HTTP Response code 202 and an empty body. The tracking task (which is the same task as + all legacy API operations use) is linked via the URI provided in the Location header.
      + All API calls can choose to service a request asynchronously or synchronously as determined by the server upon + interpreting the request. Operations that choose to exhibit this dual behavior will have both options documented by + specifying both response code(s) below. The caller must be prepared to handle responses to such API calls by + inspecting the HTTP Response code. +
      Error Conditions
      + All operations report errors using the following error reporting rules: +
        +
      • 400: Bad Request - In event of bad request due to incorrect data or other user error
      • +
      • 401: Bad Request - If user is unauthenticated or their session has expired
      • +
      • 403: Forbidden - If the user is not authorized or the entity does not exist
      • +
      +

      OpenAPI Design Concepts and Principles

      +
        +
      • IDs are full Uniform Resource Names (URNs).
      • +
      • OpenAPI's Content-Type is always application/json
      • +
      • REST links are in the Link header.
      • +
          +
        • Multiple relationships for any link are represented by multiple values in a space-separated list.
        • +
        • Links have a custom VMware Cloud Director-specific "model" attribute that hints at the applicable data + type for the links.
        • +
        • title + rel + model attributes evaluates to a unique link.
        • +
        • Links follow Hypermedia as the Engine of Application State (HATEOAS) principles. Links are present if + certain operations are present and permitted for the user"s current role and the state of the + referred entities.
        • +
        +
      • APIs follow a flat structure relying on cross-referencing other entities instead of the navigational style + used by the legacy VMware Cloud Director APIs.
      • +
      • Most endpoints that return a list support filtering and sorting similar to the query service in the legacy + VMware Cloud Director APIs.
      • +
      • Accept header must be included to specify the API version for the request similar to calls to existing legacy + VMware Cloud Director APIs.
      • +
      • Each feature has a version in the path element present in its URL.
        + Note API URL's without a version in their paths must be considered experimental.
      • +
      basePath: /cloudapi - schemes: - - https + - HTTPS +produces: + - '*/*' + +tags: + - name: accessControls + - name: accessLevels + - name: Advisory + description: APIs that allow administrators to create advisories and all users to view and snooze/dismiss them. + - name: applicationPortProfile + - name: applicationPortProfiles + - name: auditTrail + - name: auditTrailUnimplemented + - name: branding + - name: capabilities + - name: Cell + - name: certificateLibrary + - name: cloudApiBase + - name: codegenPlaceholder + - name: Configurations + - name: cors + - name: crossVdcNetwork + - name: crossVdcNetworks + - name: customEntities + - name: definedEntity + - name: definedEntityType + - name: definedInterface + - name: definedInterfaceBehaviors + - name: dfwPolicies + - name: dfwPolicy + - name: dvpgProperties + - name: edgeCluster + - name: edgeClusters + - name: edgeGateway + - name: edgeGatewayBgp + - name: edgeGatewayBgpNeighbor + - name: edgeGatewayBgpNeighbors + - name: edgeGatewayDns + - name: edgeGatewayFirewallRule + - name: edgeGatewayFirewallRules + - name: edgeGatewayIpSecVpnTunnel + - name: edgeGatewayIpSecVpnTunnelConnectionProperties + - name: edgeGatewayIpSecVpnTunnels + - name: edgeGatewayL2VpnTunnel + - name: edgeGatewayL2VpnTunnels + - name: edgeGatewayLoadBalancer + - name: edgeGatewayLoadBalancerAnalytics + - name: edgeGatewayLoadBalancerPool + - name: edgeGatewayLoadBalancerPools + - name: edgeGatewayLoadBalancerVirtualService + - name: edgeGatewayLoadBalancerVirtualServices + - name: edgeGatewayNatRule + - name: edgeGatewayNatRules + - name: edgeGatewayPrefixList + - name: edgeGatewayPrefixLists + - name: edgeGatewayRouteAdvertisement + - name: edgeGateways + - name: edgeGatewaySLAACProfile + - name: egressPoint + - name: egressPoints + - name: EmailSettings + - name: entity + - name: entityQuotas + - name: externalNetwork + - name: externalNetworks + - name: externalService + - name: firewallGroup + - name: firewallGroupCandidates + - name: firewallGroups + - name: globalRoles + - name: Group + - name: LDAP + - name: loadBalancerCloud + - name: loadBalancerClouds + - name: loadBalancerController + - name: loadBalancerControllers + - name: loadBalancerServiceEngineGroup + - name: loadBalancerServiceEngineGroupAssignment + - name: loadBalancerServiceEngineGroupAssignments + - name: loadBalancerServiceEngineGroups + - name: logicalVmGroups + - name: networkContextProfile + - name: networkContextProfileAttributes + - name: networkContextProfiles + - name: networkPool + - name: networkPools + - name: nsxAlbResources + - name: nsxTResources + - name: nsxTResourcesDisabled + - name: nsxVResources + - name: Org + - name: orgVdcNetwork + - name: orgVdcNetworkDhcp + - name: orgVdcNetworks + - name: orgVdcStoragePolicy + - name: preferences + - name: ProviderVdc + - name: proxy + - name: proxyConfiguration + - name: pvdcComputePolicies + - name: pvdcComputePolicies2 + - name: pvdcStoragePolicy + - name: quotaPolicies + description: | + Quota Management Definition APIs allow for creation and management of limits on various resources that are encapsulated as quota policies. + These quotas can be put to use by assigning them to various targets using quotaPolicyAssignment APIs + - name: quotaPolicyAssignment + description: Quota Management Assignment APIs allow application of defined quota policies to various to a variety of targets. + - name: rights + - name: rightsBundles + - name: rightsCategories + - name: roles + - name: sddcProxy + - name: sddcs + - name: securityTags + - name: serviceApp + - name: serviceApps + - name: services + - name: sessions + - name: siteSettings + - name: sslSettings + - name: storageContainer + - name: storagePolicy + - name: testConnection + - name: tkgCluster + - name: token + - name: trustedCertificates + - name: typeAccessControls + - name: uiPlugin + - name: uiPluginResource + - name: uiPlugins + - name: uiPluginTenants + - name: universalRouter + - name: universalRouterDhcp + - name: universalRouterDns + - name: universalRouterHealth + - name: universalRouters + - name: universalRouting + - name: User + - name: vCenterResources + - name: vdc + - name: vdc2 + - name: vdcComputePolicies + - name: vdcComputePolicies2 + - name: vdcComputePolicies2NonPublic + - name: vdcGroup + - name: vdcGroupCandidates + - name: vdcGroups + - name: vdcGroupsSettings + - name: vdcNetworkProfile + - name: VirtualCenter + - name: vmcSddcs + - name: vrealizeBrowse + - name: vrealizeCatalog + - name: vrealizeCategory + - name: vRealizeOrchestrator + - name: vRealizeOrchestrators + - name: vrealizeWorkflows + - name: vroFormsOverlay + - name: vroWorkflowExecution + - name: vroWorkflowPresentation + +x-vmw-vendor-extensions: + - name: x-vcloud-added-in + description: Indicates the API version the feature/api/model/field was added in. + - name: x-vcloud-deprecated-in + description: Indicates the API version the feature/api/model/field was deprecated in. + - name: x-vcloud-deprecated-alternative + description: A textual description of the alternative to be used for the feature/api/model/field that has been deprecated. + - name: x-vcloud-removed-in + description: Indicates the API version, whenceforth the feature/api/model/field will no longer be available. + - name: x-vcloud-event + description: The Event that is emitted by this operation paths: + + /: + get: + tags: + - cloudApiBase + summary: Get base navigation links + description: Retrieves links to start navigation + operationId: getBaseLinks + responses: + '204': + description: Base links successfully retrieved + '401': + description: The user is not authorized to retrieve base links + /branding: $ref: "./branding/branding.yaml#/paths/branding" /branding/logo: $ref: "./branding/branding.yaml#/paths/logo" + /branding/icon: + $ref: "./branding/branding.yaml#/paths/icon" + + /branding/tenant/{org}: + $ref: "./branding/branding.yaml#/paths/org-branding" + + /branding/tenant/{org}/logo: + $ref: "./branding/branding.yaml#/paths/org-logo" + + /branding/tenant/{org}/icon: + $ref: "./branding/branding.yaml#/paths/org-icon" + /branding/themes: $ref: "./branding/branding.yaml#/paths/themes" + /branding/themes/{name}: + $ref: "./branding/branding.yaml#/paths/theme-name" + + /branding/themes/{name}/css: + $ref: "./branding/branding.yaml#/paths/theme-name-css" + + /branding/themes/{name}/contents: + $ref: "./branding/branding.yaml#/paths/theme-name-contents" + /extensions/ui: $ref: "./extensions/extensions.yaml#/paths/extensions-ui" @@ -49,6 +326,16 @@ paths: /extensions/ui/{id}/tenants/unpublishAll: $ref: "./extensions/extensions.yaml#/paths/extensions-ui-id-plugin-tenants-unpublish-all" + /extensions/ui/extensionPoints: + $ref: "./extensions/extensions.yaml#/paths/extensions-ui-extension-point-summary" + + #### API extensibility #### + /extensions/api: + $ref: "./extensibility/externalServices.yaml#/paths/external-services" + /extensions/api/{id}: + $ref: "./extensibility/externalServices.yaml#/paths/external-service" + + /serviceItem: $ref: "./services/services.yaml#/paths/service-items" @@ -96,7 +383,13 @@ paths: #enforce generation of referred constraints /workflows/constraints: $ref: "./vro/workflowExecution.yaml#/paths/supported-constraints" - #END temporary codegen placeholder + + #enforce generation of common Page type to be used for paged lists + /query/page: + $ref: "./common/query.yaml#/paths/page-placeholder" + + /vro/servers/discovery: + $ref: "./vro/vro.yaml#/paths/discovery" /vro/servers: $ref: "./vro/vro.yaml#/paths/vros" @@ -104,23 +397,35 @@ paths: /vro/servers/{id}: $ref: "./vro/vro.yaml#/paths/vro" + /vro/servers/{vroId}/sdkObjects/{target}: + $ref: "./vro/vro.yaml#/paths/vroSdkObjectsBase" + + /vro/servers/{vroId}/sdkObjects/{target}/{browsePaths:.+}: + $ref: "./vro/vro.yaml#/paths/vroSdkObjectsBrowse" + + /vro/servers/{vroId}/entityTypes: + $ref: "./vro/vro.yaml#/paths/pluginList" + + /vro/servers/{vroId}/entityTypes/{pluginName}: + $ref: "./vro/vro.yaml#/paths/pluginTypeList" + +######################################################## +# +# These API's will be deleted after transitioning to above APIs +# +######################################################## + /vro/servers/{vroServerId}/workflows: $ref: "./vro/vro.yaml#/paths/queryWorkflows" /vro/servers/{vroId}/inventory{any:.*}: $ref: "./vro/vro.yaml#/paths/vroInventory" - /vro/servers/{vroId}/catalog: - $ref: "./vro/vro.yaml#/paths/vroCatalogBase" - - /vro/servers/{vroId}/catalog/{plugin}: - $ref: "./vro/vro.yaml#/paths/vroCatalogPlugin" - - /vro/servers/{vroId}/catalog/{plugin}/{type}: - $ref: "./vro/vro.yaml#/paths/vroCatalogPluginType" - - /vro/servers/{vroId}/catalog/{plugin}/{type}/{itemId}: - $ref: "./vro/vro.yaml#/paths/vroCatalogPluginTypeItem" +######################################################## +# +# Above API's will be deleted after transitioning to above APIs +# +######################################################## /workflows/{workflowId}/executions: $ref: "./vro/workflowExecution.yaml#/paths/workflow-executions" @@ -140,6 +445,11 @@ paths: /workflows/{workflowId}/presentation/instances/{presentationExecutionId}: $ref: "./vro/workflowExecution.yaml#/paths/workflow-presentation-instance" +### VCD Entity endpoints below ### + + /1.0.0/entity/{id}: + $ref: "./entity-resolver/entityResolver.yaml#/paths/entity-resolver" + ### Custom Entities endpoints below ### /customEntityTypes: @@ -148,6 +458,21 @@ paths: /customEntityTypes/{customEntityTypeId}: $ref: "./vro/customEntities.yaml#/paths/custom-entity-type" + /customEntityTypes/{customEntityTypeId}/tenants: + $ref: "./vro/customEntities.yaml#/paths/custom-entity-type-tenants" + + /customEntityTypes/{customEntityTypeId}/tenants/publish: + $ref: "./vro/customEntities.yaml#/paths/custom-entity-type-tenants-publish" + + /customEntityTypes/{customEntityTypeId}/tenants/unpublish: + $ref: "./vro/customEntities.yaml#/paths/custom-entity-type-tenants-unpublish" + + /customEntityTypes/{customEntityTypeId}/tenants/publishAll: + $ref: "./vro/customEntities.yaml#/paths/custom-entity-type-tenants-publish-all" + + /customEntityTypes/{customEntityTypeId}/tenants/unpublishAll: + $ref: "./vro/customEntities.yaml#/paths/custom-entity-type-tenants-unpublish-all" + /customEntityTypes/{customEntityTypeId}/actions: $ref: "./vro/customEntities.yaml#/paths/custom-entity-type-actions" @@ -163,7 +488,941 @@ paths: /customEntities/{customEntityId}/sdkObject: $ref: "./vro/customEntities.yaml#/paths/custom-entity-sdk-object" + ### RBAC 2.0 endpoints below ### + /1.0.0/rights: + $ref: "./rbac/rights.yaml#/paths/rights" + + /1.0.0/rights/{id}: + $ref: "./rbac/rights.yaml#/paths/rights-id" + + /1.0.0/rightsCategories: + $ref: "./rbac/rightsCategories.yaml#/paths/rights-categories" + + /1.0.0/rightsCategories/{id}: + $ref: "./rbac/rightsCategories.yaml#/paths/rights-category" + + /1.0.0/rightsBundles: + $ref: "./rbac/rightsBundles.yaml#/paths/rights-bundles" + + /1.0.0/rightsBundles/{id}: + $ref: "./rbac/rightsBundles.yaml#/paths/rights-bundle" + + /1.0.0/rightsBundles/{id}/rights: + $ref: "./rbac/rightsBundles.yaml#/paths/rights-bundle-rights" + + /1.0.0/rightsBundles/{id}/tenants: + $ref: "./rbac/rightsBundles.yaml#/paths/rights-bundle-tenants" + + /1.0.0/rightsBundles/{id}/tenants/publish: + $ref: "./rbac/rightsBundles.yaml#/paths/rights-bundle-tenants-publish" + + /1.0.0/rightsBundles/{id}/tenants/unpublish: + $ref: "./rbac/rightsBundles.yaml#/paths/rights-bundle-tenants-unpublish" + + /1.0.0/rightsBundles/{id}/tenants/publishAll: + $ref: "./rbac/rightsBundles.yaml#/paths/rights-bundle-tenants-publish-all" + + /1.0.0/rightsBundles/{id}/tenants/unpublishAll: + $ref: "./rbac/rightsBundles.yaml#/paths/rights-bundle-tenants-unpublish-all" + + /1.0.0/globalRoles: + $ref: "./rbac/globalRoles.yaml#/paths/global-roles" + + /1.0.0/globalRoles/{id}: + $ref: "./rbac/globalRoles.yaml#/paths/global-role" + + /1.0.0/globalRoles/{id}/rights: + $ref: "./rbac/globalRoles.yaml#/paths/global-role-rights" + + /1.0.0/globalRoles/{id}/tenants: + $ref: "./rbac/globalRoles.yaml#/paths/global-role-tenants" + + /1.0.0/globalRoles/{id}/tenants/publish: + $ref: "./rbac/globalRoles.yaml#/paths/global-role-tenants-publish" + + /1.0.0/globalRoles/{id}/tenants/unpublish: + $ref: "./rbac/globalRoles.yaml#/paths/global-role-tenants-unpublish" + + /1.0.0/globalRoles/{id}/tenants/publishAll: + $ref: "./rbac/globalRoles.yaml#/paths/global-role-tenants-publish-all" + + /1.0.0/globalRoles/{id}/tenants/unpublishAll: + $ref: "./rbac/globalRoles.yaml#/paths/global-role-tenants-unpublish-all" + + /1.0.0/roles: + $ref: "./rbac/roles.yaml#/paths/roles" + + /1.0.0/roles/{id}: + $ref: "./rbac/roles.yaml#/paths/role" + + /1.0.0/roles/{id}/rights: + $ref: "./rbac/roles.yaml#/paths/role-rights" + +#### Compute policies API below #### + + /1.0.0/pvdcComputePolicies: + $ref: "./compute-policy/compute-policy.yaml#/paths/pvdc-compute-policies" + + /1.0.0/pvdcComputePolicies/{pvdcComputePolicyId}: + $ref: "./compute-policy/compute-policy.yaml#/paths/pvdc-compute-policy" + + /1.0.0/pvdcComputePolicies/{pvdcComputePolicyId}/vms: + $ref: "./compute-policy/compute-policy.yaml#/paths/pvdc-compute-policy-vm-refs" + + /1.0.0/vdcComputePolicies: + $ref: "./compute-policy/compute-policy.yaml#/paths/vdc-compute-policies" + + /1.0.0/vdcComputePolicies/{vdcComputePolicyId}: + $ref: "./compute-policy/compute-policy.yaml#/paths/vdc-compute-policy" + + /1.0.0/vdcComputePolicies/{vdcComputePolicyId}/vms: + $ref: "./compute-policy/compute-policy.yaml#/paths/vdc-compute-policy-vm-refs" + + /1.0.0/vdcComputePolicies/{vdcComputePolicyId}/vdcs: + $ref: "./compute-policy/compute-policy.yaml#/paths/vdc-refs" + +#### Compute policies 2.0.0 API below #### + + /2.0.0/pvdcComputePolicies: + $ref: "./compute-policy/compute-policy-2.0.0.yaml#/paths/pvdc-compute-policies" + + /2.0.0/pvdcComputePolicies/{pvdcComputePolicyId}: + $ref: "./compute-policy/compute-policy-2.0.0.yaml#/paths/pvdc-compute-policy" + + /2.0.0/pvdcComputePolicies/{pvdcComputePolicyId}/virtualMachineClasses: + $ref: "./compute-policy/compute-policy-2.0.0.yaml#/paths/virtual-machine-classes-pvdc-policy" + + /2.0.0/vdcComputePolicies: + $ref: "./compute-policy/compute-policy-2.0.0.yaml#/paths/vdc-compute-policies" + + /2.0.0/vdcComputePolicies/{vdcComputePolicyId}: + $ref: "./compute-policy/compute-policy-2.0.0.yaml#/paths/vdc-compute-policy" + + /2.0.0/vdcComputePolicies/{vdcComputePolicyId}/metrics: + $ref: "./compute-policy/compute-policy-2.0.0.yaml#/paths/vdc-compute-policy-metrics" + + /2.0.0/vdcComputePolicies/{vdcComputePolicyId}/vdcs: + $ref: "./compute-policy/compute-policy-2.0.0.yaml#/paths/vdc-refs" + + /2.0.0/vdcComputePolicies/{vdcComputePolicyId}/virtualMachineClasses: + $ref: "./compute-policy/compute-policy-2.0.0.yaml#/paths/virtual-machine-classes-vdc-policy" + +#### Logical Vm Group API below #### + + /1.0.0/logicalVmGroups: + $ref: "./compute-policy/logical-vm-group.yaml#/paths/logical-vm-groups" + + /1.0.0/logicalVmGroups/{logicalVmGroupId}: + $ref: "./compute-policy/logical-vm-group.yaml#/paths/logical-vm-group" + + /1.0.0/logicalVmGroups/{logicalVmGroupId}/namedVmGroups: + $ref: "./compute-policy/logical-vm-group.yaml#/paths/logical-vm-group-named-vm-group-refs" + + /1.0.0/logicalVmGroups/{logicalVmGroupId}/pvdcPolicies: + $ref: "./compute-policy/logical-vm-group.yaml#/paths/logical-vm-group-pvdc-policy-refs" + +### Quota Policy APIs ### + + /1.0.0/quotaPolicies: + $ref: "./quota-policy/quota-policy.yaml#/paths/quota-policies" + + /1.0.0/quotaPolicies/{quotaPolicyId}: + $ref: "./quota-policy/quota-policy.yaml#/paths/quota-policy" + + /1.0.0/quotaPolicy/capabilities: + $ref: "./quota-policy/quota-policy.yaml#/paths/capabilities" + +### Custom LDAP Endpoints Below ### + + /1.0.0/ldap/test: + $ref: "./ldap/testLdap.yaml#/paths/test" + + /1.0.0/ldap/sync: + $ref: "./ldap/syncLdap.yaml#/paths/sync" + + /1.0.0/ldap/search/user: + $ref: "./ldap/searchLdap.yaml#/paths/searchUsers" + + /1.0.0/ldap/search/group: + $ref: "./ldap/searchLdap.yaml#/paths/searchGroups" + +#### Email Settings test API below #### + + /1.0.0/smtp/test: + $ref: "./email-settings/testEmailSettings.yaml#/paths/testEmailSettings" + +#### Advisories API below #### + + /1.0.0/definitions/advisories: + $ref: "./advisories/advisories.yaml#/paths/advisory-definitions" + + /1.0.0/definitions/advisories/{advisoryId}: + $ref: "./advisories/advisories.yaml#/paths/advisory-definition" + + /1.0.0/advisories: + $ref: "./advisories/advisories.yaml#/paths/advisories" + + /1.0.0/advisories/{advisoryId}: + $ref: "./advisories/advisories.yaml#/paths/advisory" + +#### vDC Groups API below #### + + /1.0.0/vdcGroups: + $ref: "./vdcGroups/vdcGroups.yaml#/paths/vdcGroups" + + /1.0.0/vdcGroups/networkingCandidateVdcs: + $ref: "./vdcGroups/vdcGroupCandidates.yaml#/paths/networkingCandidateVdcs" + + /1.0.0/vdcGroups/{vdcGroupId}: + $ref: "./vdcGroups/vdcGroups.yaml#/paths/vdcGroup" + + /1.0.0/vdcGroups/{vdcGroupId}/sync: + $ref: "./vdcGroups/vdcGroups.yaml#/paths/sync" + + /1.0.0/vdcGroups/settings: + $ref: "./vdcGroups/vdcGroups.yaml#/paths/settings" + + /1.0.0/vdcGroups/{vdcGroupId}/capabilities: + $ref: "./vdcGroups/vdcGroups.yaml#/paths/capabilities" + + /1.0.0/vdcGroups/{vdcGroupId}/universalRouters: + $ref: "./networking/universalRouters.yaml#/paths/universalRoutersForVdcGroup" + + /1.0.0/vdcGroups/{vdcGroupId}/crossVdcNetworks: + $ref: "./networking/crossVdcNetworks.yaml#/paths/crossVdcNetworksForVdcGroup" + +#### VDC Group DFW APIs #### + /1.0.0/vdcGroups/{vdcGroupId}/dfwPolicies: + $ref: "./networking/dfw.yaml#/paths/dfwPolicies" + + /1.0.0/vdcGroups/{vdcGroupId}/dfwPolicies/{policyId}: + $ref: "./networking/dfw.yaml#/paths/dfwPolicy" + + /1.0.0/vdcGroups/{vdcGroupId}/dfwPolicies/{policyId}/rules: + $ref: "./networking/dfw.yaml#/paths/dfwPolicyRules" + + /1.0.0/vdcGroups/{vdcGroupId}/dfwPolicies/{policyId}/rules/{ruleId}: + $ref: "./networking/dfw.yaml#/paths/dfwPolicyRule" + +#### Cross vDC networks #### + + /1.0.0/crossVdcNetworks: + $ref: "./networking/crossVdcNetworks.yaml#/paths/crossVdcNetworks" + + /1.0.0/crossVdcNetworks/{crossVdcNetworkId}: + $ref: "./networking/crossVdcNetworks.yaml#/paths/crossVdcNetwork" + + /1.0.0/crossVdcNetworks/{crossVdcNetworkId}/sync: + $ref: "./networking/crossVdcNetworks.yaml#/paths/sync" + +### Edge Gateways #### + + /1.0.0/edgeGateways: + $ref: "./networking/edgeGateways.yaml#/paths/edgeGateways" + + /1.0.0/edgeGateways/{gatewayId}: + $ref: "./networking/edgeGateways.yaml#/paths/edgeGateway" + + /1.0.0/edgeGateways/{gatewayId}/usedIpAddresses: + $ref: "./networking/edgeGateways.yaml#/paths/usedIpAddresses" + + /1.0.0/edgeGateways/{gatewayId}/dns: + $ref: "./networking/edgeGatewayDns.yaml#/paths/dns" + + /1.0.0/edgeGateways/{gatewayId}/nat/rules: + $ref: "./networking/edgeGatewayNat.yaml#/paths/natRules" + + /1.0.0/edgeGateways/{gatewayId}/nat/rules/{ruleId}: + $ref: "./networking/edgeGatewayNat.yaml#/paths/natRule" + + /1.0.0/edgeGateways/{gatewayId}/firewall/rules: + $ref: "./networking/edgeGatewayFirewall.yaml#/paths/rules" + + /1.0.0/edgeGateways/{gatewayId}/firewall/rules/{ruleId}: + $ref: "./networking/edgeGatewayFirewall.yaml#/paths/rule" + + /1.0.0/edgeGateways/{gatewayId}/ipsec/tunnels: + $ref: "./networking/edgeGatewayIpsec.yaml#/paths/ipsecVpnTunnels" + + /1.0.0/edgeGateways/{gatewayId}/ipsec/tunnels/{tunnelId}: + $ref: "./networking/edgeGatewayIpsec.yaml#/paths/ipsecVpnTunnel" + + /1.0.0/edgeGateways/{gatewayId}/ipsec/tunnels/defaultConnectionProperties: + $ref: "./networking/edgeGatewayIpsec.yaml#/paths/defaultConnectionProperties" + + /1.0.0/edgeGateways/{gatewayId}/ipsec/tunnels/{tunnelId}/connectionProperties: + $ref: "./networking/edgeGatewayIpsec.yaml#/paths/ipsecVpnTunnelConnectionProperties" + + /1.0.0/edgeGateways/{gatewayId}/ipsec/tunnels/{tunnelId}/status: + $ref: "./networking/edgeGatewayIpsec.yaml#/paths/ipsecVpnTunnelStatus" + + /1.0.0/edgeGateways/{gatewayId}/ipsec/tunnels/{tunnelId}/statistics: + $ref: "./networking/edgeGatewayIpsec.yaml#/paths/ipsecVpnTunnelStatistics" + + /1.0.0/edgeGateways/{gatewayId}/l2vpn/tunnels: + $ref: "./networking/edgeGatewayL2Vpn.yaml#/paths/l2VpnTunnels" + + /1.0.0/edgeGateways/{gatewayId}/l2vpn/tunnels/{tunnelId}: + $ref: "./networking/edgeGatewayL2Vpn.yaml#/paths/l2VpnTunnel" + + /1.0.0/edgeGateways/{gatewayId}/l2vpn/tunnels/{tunnelId}/status: + $ref: "./networking/edgeGatewayL2Vpn.yaml#/paths/l2VpnTunnelStatus" + + /1.0.0/edgeGateways/{gatewayId}/l2vpn/tunnels/{tunnelId}/metrics: + $ref: "./networking/edgeGatewayL2Vpn.yaml#/paths/l2VpnTunnelStatistics" + + /1.0.0/edgeGateways/{gatewayId}/routing/advertisement: + $ref: "./networking/edgeGatewayRouting.yaml#/paths/routeAdvertisement" + + /1.0.0/edgeGateways/{gatewayId}/routing/bgp: + $ref: "./networking/edgeGatewayRouting.yaml#/paths/bgp" + + /1.0.0/edgeGateways/{gatewayId}/routing/bgp/neighbors: + $ref: "./networking/edgeGatewayRouting.yaml#/paths/bgpNeighbors" + + /1.0.0/edgeGateways/{gatewayId}/routing/bgp/neighbors/{neighborId}: + $ref: "./networking/edgeGatewayRouting.yaml#/paths/bgpNeighbor" + + /1.0.0/edgeGateways/{gatewayId}/routing/bgp/neighbors/{neighborId}/status: + $ref: "./networking/edgeGatewayRouting.yaml#/paths/bgpNeighborStatus" + + /1.0.0/edgeGateways/{gatewayId}/routing/bgp/prefixLists: + $ref: "./networking/edgeGatewayRouting.yaml#/paths/prefixLists" + + /1.0.0/edgeGateways/{gatewayId}/routing/bgp/prefixLists/{listId}: + $ref: "./networking/edgeGatewayRouting.yaml#/paths/prefixList" + + /1.0.0/edgeGateways/{gatewayId}/slaacProfile: + $ref: "./networking/edgeGatewaySLAACProfile.yaml#/paths/slaacProfile" + + /1.0.0/edgeGateways/{gatewayId}/loadBalancer: + $ref: "./networking/edgeGatewayLoadBalancer.yaml#/paths/loadBalancer" + + /1.0.0/edgeGateways/{gatewayId}/loadBalancer/virtualServiceSummaries: + $ref: "./networking/edgeGatewayLoadBalancer.yaml#/paths/virtualServiceSummariesForGateway" + + /1.0.0/loadBalancer/virtualServices: + $ref: "./networking/edgeGatewayLoadBalancer.yaml#/paths/virtualServices" + + /1.0.0/loadBalancer/virtualServices/{virtualServiceId}: + $ref: "./networking/edgeGatewayLoadBalancer.yaml#/paths/virtualService" + + /1.0.0/edgeGateways/{gatewayId}/loadBalancer/poolSummaries: + $ref: "./networking/edgeGatewayLoadBalancer.yaml#/paths/poolSummariesForGateway" + + /1.0.0/loadBalancer/pools: + $ref: "./networking/edgeGatewayLoadBalancer.yaml#/paths/pools" + + /1.0.0/loadBalancer/pools/{poolId}: + $ref: "./networking/edgeGatewayLoadBalancer.yaml#/paths/pool" + + /1.0.0/loadBalancer/analyticReports: + $ref: "./networking/edgeGatewayLoadBalancer.yaml#/paths/analyticReports" + + /1.0.0/loadBalancer/analyticReports/supportedMetrics: + $ref: "./networking/edgeGatewayLoadBalancer.yaml#/paths/supportedMetrics" + +### Edge Clusters ### + /1.0.0/edgeClusters: + $ref: "./networking/edgeClusters.yaml#/paths/edgeClusters" + + /1.0.0/edgeClusters/{edgeClusterId}: + $ref: "./networking/edgeClusters.yaml#/paths/edgeCluster" + +#### Universal Routers, Egress Points, and Routing #### + + /1.0.0/universalRouters: + $ref: "./networking/universalRouters.yaml#/paths/universalRouters" + + /1.0.0/universalRouters/{universalRouterId}: + $ref: "./networking/universalRouters.yaml#/paths/universalRouter" + + /1.0.0/universalRouters/{universalRouterId}/sync: + $ref: "./networking/universalRouters.yaml#/paths/sync" + + /1.0.0/universalRouters/{universalRouterId}/dns: + $ref: "./networking/universalRouters.yaml#/paths/dns" + + /1.0.0/universalRouters/{universalRouterId}/dhcp: + $ref: "./networking/universalRouters.yaml#/paths/dhcp" + + /1.0.0/universalRouters/{universalRouterId}/health: + $ref: "./networking/universalRouters.yaml#/paths/health" + + /1.0.0/universalRouters/{universalRouterId}/routing: + $ref: "./networking/universalRouting.yaml#/paths/universalEgressRouting" + + /1.0.0/universalRouters/{universalRouterId}/routing/routes: + $ref: "./networking/universalRouting.yaml#/paths/universalRouting" + + /1.0.0/universalRouters/{universalRouterId}/routing/routes/sync: + $ref: "./networking/universalRouting.yaml#/paths/universalRoutingSync" + + /1.0.0/universalRouters/{universalRouterId}/routing/egressPoints: + $ref: "./networking/universalEgressPoints.yaml#/paths/egressPoints" + + /1.0.0/universalRouters/{universalRouterId}/routing/egressPoints/{egressPointId}: + $ref: "./networking/universalEgressPoints.yaml#/paths/egressPoint" + + /1.0.0/universalRouters/{universalRouterId}/routing/egressPoints/{egressPointId}/sync: + $ref: "./networking/universalEgressPoints.yaml#/paths/sync" + +#### Organization vDC networks #### + /1.0.0/orgVdcNetworks: + $ref: "./networking/orgVdcNetworks.yaml#/paths/orgVdcNetworks" + + /1.0.0/orgVdcNetworks/{vdcNetworkId}: + $ref: "./networking/orgVdcNetworks.yaml#/paths/orgVdcNetwork" + + /1.0.0/orgVdcNetworks/{vdcNetworkId}/reset: + $ref: "./networking/orgVdcNetworks.yaml#/paths/reset" + + /1.0.0/orgVdcNetworks/{vdcNetworkId}/syncSyslog: + $ref: "./networking/orgVdcNetworks.yaml#/paths/syncSyslog" + + /1.0.0/orgVdcNetworks/{vdcNetworkId}/dhcp: + $ref: "./networking/orgVdcNetworks.yaml#/paths/dhcp" + + /1.0.0/orgVdcNetworks/{vdcNetworkId}/allocatedIpAddresses: + $ref: "./networking/orgVdcNetworks.yaml#/paths/allocatedIpAddresses" + + /1.0.0/orgVdcNetworks/{vdcNetworkId}/secondaryAllocatedIpAddresses: + $ref: "./networking/orgVdcNetworks.yaml#/paths/secondaryAllocatedIpAddresses" + + /1.0.0/orgVdcNetworks/{vdcNetworkId}/dvpgProperties: + $ref: "./networking/orgVdcNetworks.yaml#/paths/dvpgProperties" + + /1.0.0/orgVdcNetworks/{vdcNetworkId}/sync: + $ref: "./networking/orgVdcNetworks.yaml#/paths/sync" + + /1.0.0/orgVdcNetworks/{vdcNetworkId}/additionalProperties: + $ref: "./networking/orgVdcNetworks.yaml#/paths/orgVdcNetworkAdditionalProperties" + +#### Nsx-T resources APIs #### + /1.0.0/nsxTResources/importableTier0Routers: + $ref: "./networking/nsxTResources.yaml#/paths/importableTier0Routers" + + /1.0.0/nsxTResources/importableTransportZones: + $ref: "./networking/nsxTResources.yaml#/paths/importableTransportZones" + + /1.0.0/nsxTResources/edgeClusters: + $ref: "./networking/nsxTResources.yaml#/paths/edgeClusters" + +#### Nsx-V resources APIs #### + /1.0.0/nsxVResources/importableTransportZones: + $ref: "./networking/nsxVResources.yaml#/paths/importableTransportZones" + + +#### NSX-ALB resources APIs #### + /1.0.0/nsxAlbResources/importableClouds: + $ref: "./networking/nsxAlbResources.yaml#/paths/importableClouds" + + /1.0.0/nsxAlbResources/importableServiceEngineGroups: + $ref: "./networking/nsxAlbResources.yaml#/paths/importableServiceEngineGroups" + +#### User Preferences #### + /1.0.0/definitions/preferences: + $ref: "./preferences/user-preferences.yaml#/paths/preference-definitions" + + /1.0.0/definitions/preferences/{preferenceDefinitionId}: + $ref: "./preferences/user-preferences.yaml#/paths/preference-definition" + + /1.0.0/preferences: + $ref: "./preferences/user-preferences.yaml#/paths/preferences" + + /1.0.0/preferences/{classifier}: + $ref: "./preferences/user-preferences.yaml#/paths/preference" + +#### CPOM endpoints #### + /1.0.0/sddcProxiesPac/{id}: + $ref: "./cpom/proxy.yaml#/paths/anonymousPacFile" + + /1.0.0/sddcs: + $ref: "./cpom/sddc.yaml#/paths/sddcs" + + /1.0.0/sddcs/{id}: + $ref: "./cpom/sddc.yaml#/paths/sddc" + + /1.0.0/sddcs/{id}/proxies: + $ref: "./cpom/sddc.yaml#/paths/sddc-proxies" + + /1.0.0/sddcs/{id}/owner: + $ref: "./cpom/sddc.yaml#/paths/sddc-owner" + + /1.0.0/sddcs/{id}/tenants: + $ref: "./cpom/sddc.yaml#/paths/sddc-tenants" + + /1.0.0/sddcs/{id}/tenants/publish: + $ref: "./cpom/sddc.yaml#/paths/sddc-tenants-publish" + + /1.0.0/sddcs/{id}/tenants/unpublish: + $ref: "./cpom/sddc.yaml#/paths/sddc-tenants-unpublish" + + /1.0.0/endpoints: + $ref: "./cpom/sddc.yaml#/paths/sddc-endpoints" + + /1.0.0/endpoints/{id}: + $ref: "./cpom/sddc.yaml#/paths/sddc-endpoint" + + /1.0.0/sddcProxiesPac: + $ref: "./cpom/proxy.yaml#/paths/pacFile" + + /1.0.0/proxies: + $ref: "./cpom/proxy.yaml#/paths/proxies" + + /1.0.0/proxies/{id}: + $ref: "./cpom/proxy.yaml#/paths/proxy" + + /1.0.0/proxies/{id}/cert: + $ref: "./cpom/proxy.yaml#/paths/proxy-cert" + + /1.0.0/proxies/{id}/crl: + $ref: "./cpom/proxy.yaml#/paths/proxy-crl" + + /1.0.0/proxies/{id}/thumbprint: + $ref: "./cpom/proxy.yaml#/paths/proxy-thumbprint" + + /1.0.0/sddcProxies: + $ref: "./cpom/proxy.yaml#/paths/sddcProxies" + + /1.0.0/sddcProxies/{id}: + $ref: "./cpom/proxy.yaml#/paths/sddcProxy" + + /1.0.0/sddcProxies/{id}/cert: + $ref: "./cpom/proxy.yaml#/paths/sddc-proxy-cert" + + /1.0.0/sddcProxies/{id}/crl: + $ref: "./cpom/proxy.yaml#/paths/sddc-proxy-crl" + + /1.0.0/sddcProxies/{id}/thumbprint: + $ref: "./cpom/proxy.yaml#/paths/sddc-proxy-thumbprint" + + /1.0.0/tokens: + $ref: "./auth/tokens.yaml#/paths/tokens" + + /1.0.0/tokens/{id}: + $ref: "./auth/tokens.yaml#/paths/token" + + #### Service Application endpoints #### + /1.0.0/serviceApps: + $ref: "./service-apps/serviceApps.yaml#/paths/serviceApps" + + /1.0.0/serviceApps/{serviceAppId}: + $ref: "./service-apps/serviceApps.yaml#/paths/serviceApp" + + /1.0.0/serviceApps/{serviceAppId}/sddcs: + $ref: "./service-apps/serviceApps.yaml#/paths/sddcs" + +#### External Network endpoints #### + /1.0.0/externalNetworks: + $ref: "./networking/externalNetworks.yaml#/paths/externalNetworks" + + /1.0.0/externalNetworks/{externalNetworkId}: + $ref: "./networking/externalNetworks.yaml#/paths/externalNetwork" + + /1.0.0/externalNetworks/{externalNetworkId}/usedIpAddresses: + $ref: "./networking/externalNetworks.yaml#/paths/usedIpAddresses" + + /1.0.0/externalNetworks/{externalNetworkId}/availableIpAddresses: + $ref: "./networking/externalNetworks.yaml#/paths/availableIpAddresses" + +#### Network Pool endpoints #### + /1.0.0/networkPools: + $ref: "./networking/networkPools.yaml#/paths/networkPools" + + /1.0.0/networkPools/networkPoolSummaries: + $ref: "./networking/networkPools.yaml#/paths/networkPoolSummaries" + + /1.0.0/networkPools/{networkPoolId}: + $ref: "./networking/networkPools.yaml#/paths/networkPool" + + /1.0.0/networkPools/{networkPoolId}/sync: + $ref: "./networking/networkPools.yaml#/paths/sync" + +#### Application Port Profile endpoints #### + /1.0.0/applicationPortProfiles: + $ref: "./networking/applicationPortProfiles.yaml#/paths/applicationPortProfiles" + + /1.0.0/applicationPortProfiles/{applicationPortProfileId}: + $ref: "./networking/applicationPortProfiles.yaml#/paths/applicationPortProfile" + + /1.0.0/applicationPortProfiles/sync: + $ref: "./networking/applicationPortProfiles.yaml#/paths/sync" + +#### Network Context Profiles #### + /1.0.0/networkContextProfiles: + $ref: "./networking/networkContextProfiles.yaml#/paths/networkContextProfiles" + + /1.0.0/networkContextProfiles/{profileId}: + $ref: "./networking/networkContextProfiles.yaml#/paths/networkContextProfile" + + /1.0.0/networkContextProfiles/sync: + $ref: "./networking/networkContextProfiles.yaml#/paths/sync" + + /1.0.0/networkContextProfiles/attributes: + $ref: "./networking/networkContextProfiles.yaml#/paths/attributes" + +#### Firewall Group endpoints #### + /1.0.0/firewallGroups/summaries: + $ref: "./networking/firewallGroups.yaml#/paths/firewallGroupSummaries" + + /1.0.0/firewallGroups: + $ref: "./networking/firewallGroups.yaml#/paths/firewallGroups" + + /1.0.0/firewallGroups/{firewallGroupId}: + $ref: "./networking/firewallGroups.yaml#/paths/firewallGroup" + + /1.0.0/firewallGroups/{firewallGroupId}/associatedVMs: + $ref: "./networking/firewallGroups.yaml#/paths/firewallGroupAssociatedVMs" + +#### Provider VDC #### + /1.0.0/providerVdcs: + $ref: "./pvdc/pvdc.yaml#/paths/providerVdcs" + + /1.0.0/providerVdcs/{pvdcUrn}/infra/resourcePools/browse/: + $ref: "./pvdc/pvdc.yaml#/paths/rootResourcePools" + + /1.0.0/providerVdcs/{pvdcUrn}/infra/resourcePools/browse/{moref}: + $ref: "./pvdc/pvdc.yaml#/paths/childResourcePools" + +### Proxy Configurations ### + /1.0.0/proxyConfigurations: + $ref: "./vc/proxyConfiguration.yaml#/paths/proxy-configurations" + + /1.0.0/proxyConfigurations/{id}: + $ref: "./vc/proxyConfiguration.yaml#/paths/proxy-configuration" + +### Virtual Centers ### + /1.0.0/virtualCenters: + $ref: "./vc/virtualCenter.yaml#/paths/virtualCenters" + + /1.0.0/virtualCenters/{vcUrn}: + $ref: "./vc/virtualCenter.yaml#/paths/virtualCenter" + + /1.0.0/virtualCenters/{vcUrn}/metrics: + $ref: "./vc/virtualCenter.yaml#/paths/virtualCenterMetrics" + + /1.0.0/virtualCenters/{vcUrn}/nsxVSettings: + $ref: "./vc/virtualCenter.yaml#/paths/nsxVManagerSettings" + + /1.0.0/virtualCenters/{vcUrn}/resourcePools/browse: + $ref: "./vc/virtualCenter.yaml#/paths/rootResourcePools" + + /1.0.0/virtualCenters/{vcUrn}/resourcePools/browse/{moref}: + $ref: "./vc/virtualCenter.yaml#/paths/childResourcePools" + + /1.0.0/virtualCenters/{vcUrn}/resourcePools/{moref}/hwv: + $ref: "./vc/virtualCenter.yaml#/paths/supportedHardwareVersions" + + /1.0.0/virtualCenters/{vcUrn}/resourcePools/{moref}/kubernetesConfig: + $ref: "./vc/virtualCenter.yaml#/paths/kubernetesConfig" + + /1.0.0/virtualCenters/{vcUrn}/resourcePools/{moref}/virtualMachineClasses: + $ref: "./vc/virtualCenter.yaml#/paths/virtualMachineClasses" + + /1.0.0/virtualCenters/{vcUrn}/storageProfiles: + $ref: "./vc/virtualCenter.yaml#/paths/storageProfiles" + + /1.0.0/virtualCenters/{vcUrn}/storageProfiles/{moref}/capabilities: + $ref: "./vc/vcStoragePolicies.yaml#/paths/capabilities" + + /1.0.0/virtualCenters/{vcUrn}/unmanagedVirtualMachines: + $ref: "./vc/unmanagedVirtualMachine.yaml#/paths/unmanagedVirtualMachines" + + #### vCenter resources APIs #### + /1.0.0/virtualCenters/resources/importableDvpgs: + $ref: "./networking/vCenterResources.yaml#/paths/importableDistributedPortgroups" + + /1.0.0/virtualCenters/resources/importablePortgroups: + $ref: "./networking/vCenterResources.yaml#/paths/importablePortgroups" + + /1.0.0/virtualCenters/resources/dvSwitches: + $ref: "./networking/vCenterResources.yaml#/paths/dvSwitches" + +#### Org vDC #### + /1.0.0/vdcs/{orgVdcId}/maxComputePolicy: + $ref: "./vdc/vdcs.yaml#/paths/vdc-max-compute-policy" + + /1.0.0/vdcs/{orgVdcId}/networkProfile: + $ref: "./networking/vdcNetworkProfiles.yaml#/paths/vdcNetworkProfile" + + /1.0.0/vdcs/{orgVdcId}/capabilities: + $ref: "./vdc/vdcCapabilities.yaml#/paths/capabilities" + + /1.0.0/vdcs/{orgVdcId}/computePolicies: + $ref: "./vdc/vdcs.yaml#/paths/computePolicies" + + /1.0.0/vdcs: + $ref: "./vdc/vdcs.yaml#/paths/vdcs" + + /1.0.0/vdcs/{orgVdcId}: + $ref: "./vdc/vdcs.yaml#/paths/vdc" + +### 2.0.0 Org vDC ### + + /2.0.0/vdcs/{orgVdcId}/computePolicies: + $ref: "./vdc/vdcs-2.0.0.yaml#/paths/computePolicies" + + /2.0.0/vdcs/{orgVdcId}/maxComputePolicy: + $ref: "./vdc/vdcs-2.0.0.yaml#/paths/vdc-max-compute-policy" + +#### Storage Policy Endpoints #### + + /1.0.0/pvdcStoragePolicies: + $ref: "./storagePolicies/pvdcStoragePolicies.yaml#/paths/pvdcStoragePolicies" + + /1.0.0/storagePolicySupportedEntityTypes: + $ref: "./storagePolicies/pvdcStoragePolicies.yaml#/paths/supportedEntityTypes" + + /1.0.0/pvdcStoragePolicies/{pvdcStoragePolicyUrn}: + $ref: "./storagePolicies/pvdcStoragePolicies.yaml#/paths/pvdcStoragePolicy" + + /1.0.0/pvdcStoragePolicies/{pvdcStoragePolicyUrn}/supportedEntityTypes: + $ref: "./storagePolicies/pvdcStoragePolicies.yaml#/paths/pvdcStoragePolicySupportedEntityTypes" + + /1.0.0/pvdcStoragePolicies/{id}/capabilities: + $ref: "./storagePolicies/pvdcStoragePolicies.yaml#/paths/capabilities" + + /1.0.0/pvdcStoragePolicies/{id}/inheritableSettings: + $ref: "./storagePolicies/pvdcStoragePolicies.yaml#/paths/inheritableSettings" + + /1.0.0/orgVdcStoragePolicies: + $ref: "./storagePolicies/orgVdcStoragePolicies.yaml#/paths/orgVdcStoragePolicies" + + /1.0.0/orgVdcStoragePolicies/{orgVdcStoragePolicyUrn}: + $ref: "./storagePolicies/orgVdcStoragePolicies.yaml#/paths/orgVdcStoragePolicy" + + /1.0.0/orgVdcStoragePolicies/{id}/capabilities: + $ref: "./storagePolicies/orgVdcStoragePolicies.yaml#/paths/capabilities" + + /1.0.0/orgVdcStoragePolicies/{orgVdcStoragePolicyUrn}/supportedEntityTypes: + $ref: "./storagePolicies/orgVdcStoragePolicies.yaml#/paths/orgVdcStoragePolicySupportedEntityTypes" + + /1.0.0/storagePolicies: + $ref: "./storagePolicies/storagePolicies.yaml#/paths/storagePolicies" + + /1.0.0/storagePolicies/{storagePolicyUrn}: + $ref: "./storagePolicies/storagePolicies.yaml#/paths/storagePolicy" + + #### Storage Container Endpoints #### + + /1.0.0/storageContainers: + $ref: "./storageContainers/storageContainers.yaml#/paths/storageContainers" + + /1.0.0/storageContainers/{storageContainerUrn}: + $ref: "./storageContainers/storageContainers.yaml#/paths/storageContainer" + + /1.0.0/storageContainers/{storageContainerUrn}/datastores: + $ref: "./storageContainers/storageContainers.yaml#/paths/datastores" + +#### Audit Trail endpoints #### + /1.0.0/auditTrail: + $ref: "./audit-trail/audit-trail.yaml#/paths/auditTrail" + +#### Auth endpoints #### + /1.0.0/sessions: + $ref: "./auth/sessions.yaml#/paths/sessions" + /1.0.0/sessions/{id:((?!provider|current).)*}: + $ref: "./auth/sessions.yaml#/paths/session" + /1.0.0/sessions/current: + $ref: "./auth/sessions.yaml#/paths/currentSession" + /1.0.0/sessions/{id:((?!provider|current).)*}/accessibleLocations: + $ref: "./auth/sessions.yaml#/paths/accessibleLocations" + /1.0.0/sessions/{id:((?!provider|current).)*}/token: + $ref: "./auth/sessions.yaml#/paths/token" + /1.0.0/sessions/provider: + $ref: "./auth/sessions.yaml#/paths/provider" + +#### Cell #### + /1.0.0/cells: + $ref: "./cell/cell.yaml#/paths/cells" + + /1.0.0/cells/{cellUrn}: + $ref: "./cell/cell.yaml#/paths/cell" + +#### Org Endpoints #### + /1.0.0/orgs: + $ref: "./org/org.yaml#/paths/orgs" + + /1.0.0/orgs/{orgUrn}: + $ref: "./org/org.yaml#/paths/org" + + /1.0.0/orgs/{orgUrn}/quotaPolicy: + $ref: "./qms/quota-policy-assignment.yaml#/paths/org-quota-policy-assignment" + + /1.0.0/orgs/{orgUrn}/quotas: + $ref: "./qms/entity-quotas.yaml#/paths/org-quotas" + +#### Users #### + /1.0.0/users: + $ref: "./user/user.yaml#/paths/users" + + /1.0.0/users/{userUrn}: + $ref: "./user/user.yaml#/paths/user" + + /1.0.0/users/{userUrn}/quotaPolicy: + $ref: "./qms/quota-policy-assignment.yaml#/paths/user-quota-policy-assignment" + + /1.0.0/users/{userUrn}/quotas: + $ref: "./qms/entity-quotas.yaml#/paths/user-quotas" + + /1.0.0/users/{userUrn}/groups: + $ref: "./user/user.yaml#/paths/groups" + +#### Group Endpoints #### + /1.0.0/groups: + $ref: "./ldap/group.yaml#/paths/groups" + + /1.0.0/groups/{groupUrn}: + $ref: "./ldap/group.yaml#/paths/group" + + /1.0.0/groups/{groupUrn}/users: + $ref: "./ldap/group.yaml#/paths/users" + + /1.0.0/groups/{groupUrn}/quotaPolicy: + $ref: "./qms/quota-policy-assignment.yaml#/paths/group-quota-policy-assignment" + + /1.0.0/groups/{groupUrn}/quotas: + $ref: "./qms/entity-quotas.yaml#/paths/group-quotas" + +##### VApp Endpoints #### + /1.0.0/vapps/{vappUrn}/quotaPolicy: + $ref: "./qms/quota-policy-assignment.yaml#/paths/vapp-quota-policy-assignment" + + /1.0.0/vapps/{vappUrn}/quotas: + $ref: "./qms/entity-quotas.yaml#/paths/vapp-quotas" + +#### SSL endpoints #### + /1.0.0/ssl/trustedCertificates: + $ref: "./ssl/trustedCertificates.yaml#/paths/trustedCertificates" + /1.0.0/ssl/trustedCertificates/{trustedCertificate}: + $ref: "./ssl/trustedCertificates.yaml#/paths/certificate" + /1.0.0/testConnection: + $ref: "./ssl/testConnection.yaml#/paths/test" + /1.0.0/ssl/settings: + $ref: "./ssl/sslSettings.yaml#/paths/sslSettings" + /1.0.0/ssl/certificateLibrary: + $ref: "./ssl/certificateLibrary.yaml#/paths/certificateLibrary" + /1.0.0/ssl/certificateLibrary/{id}: + $ref: "./ssl/certificateLibrary.yaml#/paths/certificateLibraryItem" + /1.0.0/ssl/certificateLibrary/{certLibraryItemId}/consumers: + $ref: "./ssl/certificateLibrary.yaml#/paths/certificateLibraryItemConsumers" + +### Access Levels ### + /1.0.0/accessLevels: + $ref: "./access-levels/accessLevels.yaml#/paths/accessLevels" + /1.0.0/accessLevels/{accessLevelUrn}: + $ref: "./access-levels/accessLevels.yaml#/paths/accessLevel" + +### Extensibility ### + /1.0.0/entityTypes/: + $ref: "./extensibility/definedEntityType.yaml#/paths/defined-entity-types" + /1.0.0/entityTypes/{id}: + $ref: "./extensibility/definedEntityType.yaml#/paths/defined-entity-type" + /1.0.0/entityTypes/{id}/behaviors: + $ref: "./extensibility/definedEntityType.yaml#/paths/behaviors" + /1.0.0/entityTypes/{id}/behaviors/{behaviorId}: + $ref: "./extensibility/definedEntityType.yaml#/paths/behavior" + /1.0.0/entityTypes/{id}/behaviorAccessControls: + $ref: "./extensibility/definedEntityType.yaml#/paths/defined-entity-type-behavior-access" + /1.0.0/entityTypes/{objectId}/accessControls: + $ref: "./extensibility/definedEntityType.yaml#/paths/defined-entity-type-accessControls" + /1.0.0/entityTypes/{objectId}/accessControls/{accessControlId}: + $ref: "./extensibility/definedEntityType.yaml#/paths/defined-entity-type-accessControl" + /1.0.0/interfaces: + $ref: "./extensibility/interface.yaml#/paths/interfaces" + /1.0.0/interfaces/{id}: + $ref: "./extensibility/interface.yaml#/paths/interface" + /1.0.0/interfaces/{id}/behaviors: + $ref: "./extensibility/interface.yaml#/paths/behaviors" + /1.0.0/interfaces/{id}/behaviors/{behaviorId}: + $ref: "./extensibility/interface.yaml#/paths/behavior" + /1.0.0/entities/{id}: + $ref: "./extensibility/definedEntity.yaml#/paths/defined-entity" + /1.0.0/entities/{id}/resolve: + $ref: "./extensibility/definedEntity.yaml#/paths/defined-entity-resolve" + /1.0.0/entities/{id}/metadata: + $ref: "./extensibility/metadata.yaml#/paths/entries" + /1.0.0/entities/{id}/metadata/{metadataId}: + $ref: "./extensibility/metadata.yaml#/paths/entry" + /1.0.0/entities/types/{vendor}/{nss}/{version}: + $ref: "./extensibility/definedEntity.yaml#/paths/defined-entities-by-type" + /1.0.0/entities/interfaces/{vendor}/{nss}/{version}: + $ref: "./extensibility/definedEntity.yaml#/paths/defined-entities-by-interface" + /1.0.0/entities/{id}/behaviors/{behaviorId}/invocations: + $ref: "./extensibility/definedEntity.yaml#/paths/defined-entity-behaviors" + /1.0.0/entities/{objectId}/accessControls: + $ref: "./extensibility/definedEntity.yaml#/paths/defined-entity-accessControls" + /1.0.0/entities/{objectId}/accessControls/{accessControlId}: + $ref: "./extensibility/definedEntity.yaml#/paths/defined-entity-accessControl" + +### Load Balancers ### + /1.0.0/loadBalancer/controllers: + $ref: "./networking/loadBalancerControllers.yaml#/paths/loadBalancerControllers" + + /1.0.0/loadBalancer/controllers/{loadBalancerControllerId}: + $ref: "./networking/loadBalancerControllers.yaml#/paths/loadBalancerController" + + /1.0.0/loadBalancer/clouds: + $ref: "./networking/loadBalancerClouds.yaml#/paths/loadBalancerClouds" + + /1.0.0/loadBalancer/clouds/{loadBalancerCloudId}: + $ref: "./networking/loadBalancerClouds.yaml#/paths/loadBalancerCloud" + + /1.0.0/loadBalancer/serviceEngineGroups: + $ref: "./networking/loadBalancerServiceEngineGroups.yaml#/paths/loadBalancerServiceEngineGroups" + + /1.0.0/loadBalancer/serviceEngineGroups/{loadBalancerServiceEngineGroupId}: + $ref: "./networking/loadBalancerServiceEngineGroups.yaml#/paths/loadBalancerServiceEngineGroup" + + /1.0.0/loadBalancer/serviceEngineGroups/{loadBalancerServiceEngineGroupId}/sync: + $ref: "./networking/loadBalancerServiceEngineGroups.yaml#/paths/loadBalancerServiceEngineGroupSync" + + /1.0.0/loadBalancer/serviceEngineGroups/assignments: + $ref: "./networking/loadBalancerServiceEngineGroups.yaml#/paths/assignments" + + /1.0.0/loadBalancer/serviceEngineGroups/assignments/{assignmentId}: + $ref: "./networking/loadBalancerServiceEngineGroups.yaml#/paths/assignment" + +### Security Tags for VM tagging ### + + /1.0.0/securityTags/values: + $ref: "./networking/securityTags.yaml#/paths/tag-values" + /1.0.0/securityTags/tag: + $ref: "./networking/securityTags.yaml#/paths/security-tag" + /1.0.0/securityTags/entities: + $ref: "./networking/securityTags.yaml#/paths/tagged-entities" + /1.0.0/securityTags/vm/{id}: + $ref: "./networking/securityTags.yaml#/paths/vm-tags" + +#### Site Settings and Configuration #### + /1.0.0/site/settings: + $ref: "./site/site-settings.yaml#/paths/siteSettings" + /1.0.0/site/settings/cors: + $ref: "./site/site-settings-cors.yaml#/paths/cors" + /1.0.0/site/configurations: + $ref: "./site/configuration.yaml#/paths/configurations" + /1.0.0/site/configurations/{name}: + $ref: "./site/configuration.yaml#/paths/configuration" + +#### K8s TKG and CSE native #### + /1.0.0/tkgClusters: + $ref: "./wcp/tkgcluster.yaml#/paths/tkgClusters" + + /1.0.0/tkgClusters/{urn}: + $ref: "./wcp/tkgcluster.yaml#/paths/tkgCluster" + + /1.0.0/tkgClusters/{urn}/kubeconfig: + $ref: "./wcp/tkgcluster.yaml#/paths/kubeconfig" + definitions: # Common ErrorType definition for exceptions emerging from openapi endpoints. Error: $ref: "./common/error.yaml#/definitions/Error" +securityDefinitions: + ApiKeyAuth: + type: apiKey + in: header + name: Authorization +security: + - ApiKeyAuth: [] diff --git a/schemas/openapi/src/main/resources/schemas/vdc/vdcCapabilities.yaml b/schemas/openapi/src/main/resources/schemas/vdc/vdcCapabilities.yaml new file mode 100644 index 00000000..daf2c87c --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/vdc/vdcCapabilities.yaml @@ -0,0 +1,38 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2011-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The vDC Capabilities API allows for determining the capabilities of an Organization vDC. + version: "1.0" + title: VDC Capabilities API + +paths: + capabilities: + + parameters: + - name: orgVdcId + in: path + required: true + type: string + + get: + x-vcloud-added-in: "32.0" + tags: + - capabilities + summary: Retrieves capabilities for the given Organization vDC. + operationId: getVdcCapabilities + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: './common/capability.yaml#/definitions/Capabilities' + 204: + description: No Content + diff --git a/schemas/openapi/src/main/resources/schemas/vdc/vdcs-2.0.0.yaml b/schemas/openapi/src/main/resources/schemas/vdc/vdcs-2.0.0.yaml new file mode 100644 index 00000000..44db1f98 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/vdc/vdcs-2.0.0.yaml @@ -0,0 +1,106 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2020-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The vDC API allows for management of an Organizaton vDC. + version: "2.0" + title: vDC API + +paths: + computePolicies: + parameters: + - name: orgVdcId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: vdc + + get: + x-vcloud-added-in: "35.0" + tags: + - vdc2 + summary: Retrieves all compute policies of a vDC + description: | + Retrieves all compute policies of a vDC + operationId: getComputePolicies + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/VdcComputePolicies2" + + vdc-max-compute-policy: + parameters: + - name: orgVdcId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: vdc + + put: + x-vcloud-added-in: "35.0" + tags: + - vdc2 + summary: Updates Max Compute Policy of the vDC. + description: | + Updates Max Compute Policy of the vDC. + Returns 400 if policy type is not VdcVmPolicy. + operationId: updateVdcMaxComputePolicy + consumes: + - application/json + parameters: + - name: newVdcComputePolicy2Params + in: body + required: true + schema: + $ref: "#/definitions/VdcComputePolicy2" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/VdcComputePolicy2" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + + get: + x-vcloud-added-in: "35.0" + tags: + - vdc2 + summary: Retrieves Max Compute Policy of the vDC. + description: | + Retrieves Max Compute Policy of the vDC. + operationId: getVdcMaxComputePolicy + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/VdcComputePolicy2" + +definitions: + VdcComputePolicies2: + $ref: "./compute-policy/compute-policy.yaml#/definitions/VdcComputePolicies2" + VdcComputePolicy2: + $ref: "./compute-policy/compute-policy.yaml#/definitions/VdcComputePolicy2" diff --git a/schemas/openapi/src/main/resources/schemas/vdc/vdcs.yaml b/schemas/openapi/src/main/resources/schemas/vdc/vdcs.yaml new file mode 100644 index 00000000..e2dfff17 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/vdc/vdcs.yaml @@ -0,0 +1,238 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2011-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The vDC API allows for management of an Organizaton vDC. + title: vDC API + +paths: + vdc-max-compute-policy: + parameters: + - name: orgVdcId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: vdc + + put: + x-vcloud-added-in: "33.0" + tags: + - vdc + summary: Updates Max Compute Policy of the vDC. + description: | + Updates Max Compute Policy of the vDC. + x-vcloud-deprecated-in: "35.0" + x-vcloud-deprecated-alternative: 2.0.0 version of API + operationId: updateVdcMaxComputePolicy + consumes: + - application/json + parameters: + - name: newVdcComputePolicyParams + in: body + required: true + schema: + $ref: "#/definitions/VdcComputePolicy" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/VdcComputePolicy" + + get: + x-vcloud-added-in: "33.0" + tags: + - vdc + summary: Retrieves Max Compute Policy of the vDC. + description: | + Retrieves Max Compute Policy of the vDC. + x-vcloud-deprecated-in: "35.0" + x-vcloud-deprecated-alternative: 2.0.0 version of API + operationId: getVdcMaxComputePolicy + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/VdcComputePolicy" + + vdc: + parameters: + - name: orgVdcId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: vdc + + get: + x-vcloud-added-in: "35.0" + tags: + - vdc + summary: Retrieves a specific vDC via URN. + operationId: getVdc + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/OrgVdc" + + vdcs: + get: + x-vcloud-added-in: "35.0" + tags: + - vdc + summary: Retrieves a list of vDCs + description: | + Retrieves a list of Org-scoped (if applicable) vDCs. + Results can be filtered by id, name, allocationType, and computePolicyType. + + Supported filters for computePolicyType are: + (computePolicyType==VdcKubernetesPolicy) - | + Returns a list of all vDCs that have a VdcKubernetesPolicy compute policy. + operationId: queryVdcs + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/OrgVdcs" + + computePolicies: + parameters: + - name: orgVdcId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: vdc + + get: + x-vcloud-added-in: "33.0" + tags: + - vdc + summary: Retrieves all compute policies of a vDC + description: | + Retrieves all compute policies of a vDC + x-vcloud-deprecated-in: "35.0" + x-vcloud-deprecated-alternative: 2.0.0 version of API + operationId: getComputePolicies + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/VdcComputePolicies" + +definitions: + OrgVdc: + x-vcloud-added-in: "35.0" + description: An object representing an Organization Virtual Datacenter in VCD. + type: object + properties: + id: + type: string + description: A unique identifier for the vdc. + name: + type: string + description: The name of the vdc. + description: + type: string + description: The description of the vdc. + allocationType: + type: string + description: | + The allocation type of the vdc, one of: + ALLOCATION_VAPP, + ALLOCATION_POOL, + RESERVATION_POOL, + FLEX + org: + description: The reference to the organization that the VDC belongs to + $ref: '#/definitions/EntityReference' + + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: Urn + args: + - arg: vdc + - constraint: NonSortable + description: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + org: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + x-vcloud-cross-references: + - cross-reference: + referenced-type: "./compute-policy/compute-policy-2.0.0.yaml#/definitions/VdcComputePolicy" + referenced-property: policyType + alias: computePolicyType + description: | + A filter to look up VDCs that contain certain compute policy types, cannot be used with + the computePolicyName filter + Supported filters: + computePolicyType==VdcKubernetesPolicy + - cross-reference: + referenced-type: "./compute-policy/compute-policy-2.0.0.yaml#/definitions/VdcComputePolicy" + referenced-property: name + alias: computePolicyName + description: | + A filter to look up VDCs that contain a VdcVmPolicy with a certain name. This does not + apply to Kubernetes policies and cannot be used with the computePolicyType filter + E.G: computePolicyName==someName + + OrgVdcs: + x-vcloud-added-in: "35.0" + description: | + List of vDCs. + allOf: + - $ref: "query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: "#/definitions/OrgVdc" + + VdcComputePolicy: + $ref: "./compute-policy/compute-policy.yaml#/definitions/VdcComputePolicy" + + VdcComputePolicies: + $ref: "./compute-policy/compute-policy.yaml#/definitions/VdcComputePolicies" + + EntityReference: + $ref: "./common/entity.yaml#/definitions/EntityReference" diff --git a/schemas/openapi/src/main/resources/schemas/vdcGroups/vdcGroupCandidates.yaml b/schemas/openapi/src/main/resources/schemas/vdcGroups/vdcGroupCandidates.yaml new file mode 100644 index 00000000..a9766dd3 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/vdcGroups/vdcGroupCandidates.yaml @@ -0,0 +1,138 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2011-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The Cloud Director vDC Group candidates API allows for retrieving a list of vDCs that can be part of the vDC groups. + vDCs that cannot be added to the same vDC group are filtered out. + An example is that a VDC can only be part of a group that has the same backing network broadcast domain. + version: "1.0" + title: vDC Group candidates API + +paths: + + networkingCandidateVdcs: + get: + x-vcloud-added-in: "35.0" + x-vcloud-multisite: true + tags: + - vdcGroupCandidates + summary: Get a list of candidate vDCs that can be added to a single vDC Group in the networking context. + description: | + Get a list of candidate vDCs. Results can be filtered by the type of vDC group and contexts of vDC ID or network pool ID. + Below are the supported contexts: +
        +
      • Local vDC Group(_context==LOCAL;_context==orgVdcId) - + Returns all vDCs that have the same network pool assigned to the org vDC. +
      • Universal vDC Group backed by NSX-V network provider (_context==UNIVERSAL;_context==orgVdcId;_context==networkPoolUniversalId) - + If the orgVdc is specified, returns all vDCs that have the same assigned universal network pool as that of the org vDC. + A universal network pool is backed by a broadcast domain that can stretch to multiple VMware Cloud Director sites. + If the org vDC is not specified or not found and the universal network pool is specified, return all vDCs whose network pool are backed + by that universal network pool. This case supports multisite/associated organization queries where user wants to retrieve remote vDCs + on different sites/associated organizations with same backing universal network pool. +
      • Existing vDC Group(_context==vdcGroupId;_context==networkPoolUniversalId) - + If vDC Group is specified, return all vDCs that have the same assigned network pool as that of the vDC Group and also all vDCs that are currently + participating in the vDC Group. The assigned network pool can also be universal if the vDC Group type is UNIVERSAL. + If vDC Group is not specified or not found and the universal network pool is specified, return all vDCs whose network pool are backed + by that universal network pool. This case supports multisite/associated organization queries where user wants to retrieve remote vDCs + on different sites/associated organizations with same backing universal network pool. +
      + Note that multisite calls to get the candidate vDCs for a local vDC Group will only return the vDCs of the local site's associated + organizations. Remote site's vDCs are not returned since the org vDC or the vDC group is not found there. + operationId: getNetworkingVdcGroupCandidates + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/NetworkingCandidateVdcs" + +definitions: + + NetworkingCandidateVdc: + x-vcloud-added-in: "35.0" + description: | + A candidate vDC that can be added to a vDC Group. + type: object + properties: + id: + type: string + description: The id of the candidate vDC. + name: + type: string + description: The name of the candidate vDC. + orgRef: + $ref: '#/definitions/EntityReference' + description: The reference to the organization this vDC is in. + siteRef: + $ref: '#/definitions/EntityReference' + description: The site ID that this vDC belongs to. + networkProviderScope: + type: string + description: The network provider scope of the vDC. + faultDomainTag: + type: string + description: | + Represents the fault domain of a given organization vDC. For NSX_V backed organization vDCs, this is the network provider scope. + For NSX_T backed organization vDCs, this can vary (for example name of the provider vDC or compute provider scope). + + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: Urn + args: + - arg: vdc + - constraint: NonSearchable + - constraint: NonSortable + - constraint: ReadOnly + name: + x-vcloud-constraints: + - constraint: ReadOnly + orgRef: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + - constraint: ReadOnly + siteRef: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + - constraint: ReadOnly + networkProviderScope: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + - constraint: ReadOnly + faultDomainTag: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + - constraint: ReadOnly + + NetworkingCandidateVdcs: + x-vcloud-added-in: "35.0" + description: | + List of candidate vDCs that can be added to a single vDC Group in the networking context. + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: './vdcGroups/vdcGroupCandidates.yaml#/definitions/NetworkingCandidateVdc' + + EntityReference: + $ref: "./common/entity.yaml#/definitions/EntityReference" + diff --git a/schemas/openapi/src/main/resources/schemas/vdcGroups/vdcGroups.yaml b/schemas/openapi/src/main/resources/schemas/vdcGroups/vdcGroups.yaml new file mode 100644 index 00000000..a3606e45 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/vdcGroups/vdcGroups.yaml @@ -0,0 +1,468 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2011-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + The Cloud Director vDC groups API allows for management of vDC groups. + Once a vDC group is created, user can create universal routers that span those vDCs. + There are two types of vDC groups: local vDC groups or universal vDC groups. + version: "1.0" + title: vDC Groups API + +paths: + + vdcGroups: + get: + x-vcloud-multisite: true + tags: + - vdcGroups + summary: Get a list of vDC Groups. + description: | + Get a list of vDC Groups. To find all vDC Groups that contains a specific Organization vDC, user can use the filter "participatingOrgVdcs.vdcRef.id" key. + operationId: getVdcGroups + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/VdcGroups" + post: + tags: + - vdcGroups + summary: Creates a vDC Group. A universal router will also be created if universalNetworkingEnabled is set to true. + operationId: createVdcGroup + consumes: + - application/json + parameters: + - name: vdcGroup + in: body + required: true + schema: + $ref: '#/definitions/VdcGroup' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + + vdcGroup: + parameters: + - name: vdcGroupId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: vdcGroup + + get: + tags: + - vdcGroup + summary: Retrieves a specific vDC Group. + operationId: getVdcGroup + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/VdcGroup' + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + put: + tags: + - vdcGroup + summary: Updates a specific vDC Group. Example is to add/remove a participarting vDC. + operationId: updateVdcGroup + consumes: + - application/json + parameters: + - name: vdcGroup + in: body + required: true + schema: + $ref: '#/definitions/VdcGroup' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + delete: + tags: + - vdcGroup + summary: Deletes a vDC Group + operationId: deleteVdcGroup + parameters: + - $ref: "./common/delete.yaml#/parameters/forceDelete" + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + sync: + parameters: + - name: vdcGroupId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: vdcGroup + + post: + tags: + - vdcGroup + summary: | + Sync/repair the vDC group. An example usage is to detect if a vDC still exists/is valid. + If an Organization vDC referenced by the VDC group is deleted or if it is not participating in universal networking, + it's status will be updated to OBJECT_NOT_FOUND and the vdc group will be marked as NOT_REALIZED. + This will also initiate a sync of associated router, if any. + The router entities like egress points and universal routes will also be marked as NOT_REALIZED + if they reference the removed Organization vDC. + operationId: syncVdcGroup + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + + capabilities: + parameters: + - name: vdcGroupId + in: path + required: true + type: string + x-vcloud-constraints: + - constraint: Urn + args: + - arg: vdcGroup + + get: + x-vcloud-added-in: "35.0" + tags: + - capabilities + summary: Retrieves the supported capabilities of the specified vDC Group. + operationId: getVdcGroupCapabilities + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: './common/capability.yaml#/definitions/Capabilities' + + settings: + get: + x-vcloud-added-in: "35.0" + tags: + - vdcGroupsSettings + summary: Retrieves the global vDC groups settings. These settings apply to all vDC Groups in the system and can only be retrieved by the provider. + operationId: getVdcGroupSettings + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/VdcGroupSettings" + put: + x-vcloud-added-in: "35.0" + tags: + - vdcGroupsSettings + summary: Updates the global vDC groups settings. These settings apply to all vDC Groups in the system and can only be updated by the provider. + operationId: updateVdcGroupSettings + consumes: + - application/json + parameters: + - name: vdcGroupSettings + in: body + required: true + schema: + $ref: '#/definitions/VdcGroupSettings' + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: "#/definitions/VdcGroupSettings" + +definitions: + + VdcGroup: + description: | + A vDC Group holds a list of vDCs that can have a network be stretched across the vDCs. + type: object + properties: + id: + type: string + description: The unique ID for the vDC Group (read-only). + orgId: + type: string + description: The organization that this group belongs to. + name: + type: string + description: The name of this group. The name must be unique. + description: + type: string + description: The description of this group. + localEgress: + type: boolean + default: false + description: | + Determines whether local egress is enabled for a universal router belonging to a universal vDC group. + This value is used on create if universalNetworkingEnabled is set to true. + This cannot be updated. This value is always false for local vDC groups. + participatingOrgVdcs: + type: array + description: The list of organization vDCs that are participating in this group. + items: + $ref: "#/definitions/ParticipatingVdcReference" + universalNetworkingEnabled: + type: boolean + description: True means that a vDC group router has been created. If set to true for vdc group creation, a universal router will also be created. + networkPoolUniversalId: + type: string + description: | + The network provider's universal id that is backing the universal network pool. + This field is read-only and is derived from the list of participating vDCs if a universal vDC group is created. + For universal vDC groups, each participating vDC should have a universal network pool that is backed by this same id. + networkPoolId: + type: string + description: | + ID of network pool to use if creating a local vDC group router. + Must be set if creating a local group. Ignored if creating a + universal group. + status: + $ref: '#/definitions/VdcGroupEntityStatus' + description: The status that the group can be in. + type: + type: string + enum: [LOCAL, UNIVERSAL] + default: 'UNIVERSAL' + description: | + Defines the group as LOCAL or UNIVERSAL. This cannot be changed. + Local vDC Groups can have networks stretched across multiple vDCs in a single Cloud Director instance. + Local vDC Groups share the same broadcast domain/transport zone and network provider scope. + Universal vDC groups can have networks stretched across multiple vDCs in a single or multiple Cloud Director instance(s). + Universal vDC groups are backed by a broadcast domain/transport zone that strectches across a single or multiple Cloud Director instance(s). + Local vDC groups are supported for both NSX-V and NSX-T Network Provider Types. Universal vDC Groups are supported for only NSX_V Network Provider Type. + networkProviderType: + type: string + default: NSX_V + description: | + The values currently supported are NSX_V and NSX_T. + Defines the networking provider backing the vDC Group. This is used on create. If not specified, NSX_V value will be used. + NSX_V is used for existing vDC Groups and vDC Groups where Cross-VC NSX is used for the underlying technology. + NSX_T is used when the networking provider type for the Organization vDCs in the group is NSX-T. NSX_T only supports groups of type LOCAL (single site). + dfwEnabled: + type: boolean + description: Whether Distributed Firewall is enabled for this vDC Group. Only applicable for NSX_T vDC Groups. + errorMessage: + type: string + description: If the group has an error status, a more detailed error message is set here. + required: + - participatingOrgVdcs + - name + - orgId + x-vcloud-property-annotations: + id: + x-vcloud-constraints: + - constraint: Urn + args: + - arg: vdcGroup + - constraint: ReadOnly + - constraint: NonSortable + orgId: + x-vcloud-constraints: + - constraint: NonSortable + description: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + localEgress: + x-vcloud-added-in: "34.0" + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + participatingOrgVdcs: + x-vcloud-constraints: + - constraint: NonSortable + universalNetworkingEnabled: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + networkPoolUniversalId: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + networkPoolId: + x-vcloud-added-in: "34.0" + x-vcloud-constraints: + - constraint: Urn + args: + - arg: networkpool + - constraint: NonSearchable + - constraint: NonSortable + status: + x-vcloud-constraints: + - constraint: NonSortable + errorMessage: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + type: + x-vcloud-added-in: "34.0" + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + networkProviderType: + x-vcloud-added-in: "35.0" + dfwEnabled: + x-vcloud-added-in: "35.0" + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + - constraint: ReadOnly + + ParticipatingVdcReference: + description: | + A participating vDC + type: object + properties: + vdcRef: + $ref: '#/definitions/EntityReference' + description: The reference to the vDC that is part of this a vDC group. + orgRef: + $ref: '#/definitions/EntityReference' + description: Read-only field that specifies what organization this vDC is in. + siteRef: + $ref: '#/definitions/EntityReference' + description: The site ID that this vDC belongs to. Required for universal vDC groups. + networkProviderScope: + type: string + description: Read-only field that specifies the network provider scope of the vDC. + faultDomainTag: + type: string + description: | + Represents the fault domain of a given organization vDC. For NSX_V backed organization vDCs, this is the network provider scope. + For NSX_T backed organization vDCs, this can vary (for example name of the provider vDC or compute provider scope). + remoteOrg: + type: boolean + description: Read-only field that specifies whether the vDC is local to this VCD site. + status: + $ref: '#/definitions/VdcGroupEntityStatus' + description: The status that the vDC can be in. An example is if the vDC has been deleted from the system but is still part of the group. + required: + - vdcRef + x-vcloud-property-annotations: + vdcRef: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + orgRef: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + - constraint: ReadOnly + siteRef: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + networkProviderScope: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + - constraint: ReadOnly + faultDomainTag: + x-vcloud-added-in: "35.0" + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + - constraint: ReadOnly + remoteOrg: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + - constraint: ReadOnly + status: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + VdcGroups: + description: | + List of vDC Groups. + allOf: + - $ref: "./common/query.yaml#/definitions/Page" + - type: object + properties: + values: + type: array + items: + $ref: '#/definitions/VdcGroup' + + VdcGroupEntityStatus: + description: | + Represents status of vDC group components such as participating vdc's + configured routing, egress points, etc. + type: object + enum: + - SAVING + - SAVED + - CONFIGURING + - REALIZED + - REALIZATION_FAILED + - DELETING + - DELETE_FAILED + - OBJECT_NOT_FOUND + - UNCONFIGURED + + VdcGroupSettings: + x-vcloud-added-in: "35.0" + description: | + Defines the global settings for all vDC Groups in the system. These can be changed by the provider only. + type: object + properties: + nsxTVdcGroupFaultDomainTagType: + type: string + default: COMPUTE_PROVIDER_SCOPE + description: | +
        + Defines the fault domain tag that will be shown for participating/candidate Organization vDCs during creation or update of a vDC Group whose networkProviderType is NSX_T. + The options a provider can choose from are COMPUTE_PROVIDER_SCOPE and NETWORK_PROVIDER_SCOPE. + This should be selected based on the provider's compute or networking infrastructure. + The default value is COMPUTE_PROVIDER_SCOPE. + +
      • NETWORK_PROVIDER_SCOPE: This represents the tenant-facing name of the backing network provider for the organization vDC (NSX-V/NSX-T manager). + This should be used when the fault domains in the provider infrastructure are separated by network provider.
      • +
      • COMPUTE_PROVIDER_SCOPE: This represents the tenant-facing name of the backing compute provider for the organization vDC (Provider VDC). + This should be used when the fault domains in the provider infrastructure are separated by compute provider.
      • +
      + x-vcloud-property-annotations: + nsxTVdcGroupFaultDomainTagType: + x-vcloud-constraints: + - constraint: NonSearchable + - constraint: NonSortable + + EntityReference: + $ref: "./common/entity.yaml#/definitions/EntityReference" + diff --git a/schemas/openapi/src/main/resources/schemas/vms/vmTags.yaml b/schemas/openapi/src/main/resources/schemas/vms/vmTags.yaml new file mode 100644 index 00000000..d64ede8a --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/vms/vmTags.yaml @@ -0,0 +1,71 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2021-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + API to manage tags for a Virtual Machine. + version: "1.0" + title: VM Tag API + +paths: + + vm-tags: + parameters: + - name: vmId + description: the URN of the VM to manage tag for. + in: path + required: true + type: string + + get: + x-vcloud-added-in: 36.0 + tags: + - vmTags + summary: Retrieves all the tags for the VM. + description: | + Retrieves all the tags for the VM. User can view the tags if user can view the VM. + operationId: getVmTags + produces: + - application/json + responses: + 200: + description: OK + schema: + $ref: '#/definitions/EntityTags' + + put: + x-vcloud-added-in: 36.0 + tags: + - vmTags + summary: Update the tag for the VM. + description: | + Update the tag for the VM. An empty list of tags means to delete all dags for the VM. + User can edit the tags if user can modify the VM. Note that if a VM tag has a scope of "vcd-security", + that tag value can be used when defining dynamic Security/Firewall Group to match the VM for DFW use-case. + operationId: updateVmTags + consumes: + - application/json + produces: + - application/json + parameters: + - name: EntityTags + in: body + description: the list of tags to update. + required: true + schema: + $ref: "#/definitions/EntityTags" + responses: + 200: + description: OK + schema: + $ref: "#/definitions/EntityTags" + +definitions: + + EntityTags: + $ref: "./tags/taggedEntities.yaml#/definitions/EntityTags" + diff --git a/schemas/openapi/src/main/resources/schemas/vro/customEntities.yaml b/schemas/openapi/src/main/resources/schemas/vro/customEntities.yaml index aafcee70..89fda850 100644 --- a/schemas/openapi/src/main/resources/schemas/vro/customEntities.yaml +++ b/schemas/openapi/src/main/resources/schemas/vro/customEntities.yaml @@ -1,8 +1,9 @@ -# ************************************************************************* +# ****************************************************************************** # * api-extension-template-vcloud-director -# * Copyright 2017-2018 VMware, Inc. All rights reserved. * +# * Copyright 2017-2021 VMware, Inc. All rights reserved. * # * SPDX-License-Identifier: BSD-2-Clause -# ************************************************************************* +# ****************************************************************************** + swagger: "2.0" info: description: | @@ -16,6 +17,8 @@ paths: tags: - customEntities summary: Get list of all custom entity types + x-vcloud-deprecated-in: "34.0" + x-vcloud-deprecated-alternative: definedEntities description: | Get list of custom entity types. operationId: queryCustomEntityTypes @@ -31,12 +34,14 @@ paths: 200: description: OK schema: - $ref: "./common/query.yaml#/definitions/QueryResults" + $ref: "#/definitions/CustomEntityTypes" post: tags: - customEntities summary: Creates a new custom entity type + x-vcloud-deprecated-in: "34.0" + x-vcloud-deprecated-alternative: definedEntities description: | Creates a new custom entity type operationId: createCustomEntityType @@ -66,6 +71,8 @@ paths: tags: - customEntities summary: Get specified custom entity type + x-vcloud-deprecated-in: "34.0" + x-vcloud-deprecated-alternative: definedEntities operationId: getCustomEntityType produces: - application/json @@ -80,6 +87,8 @@ paths: tags: - customEntities summary: Update specified custom entity type + x-vcloud-deprecated-in: "34.0" + x-vcloud-deprecated-alternative: definedEntities operationId: updateCustomEntityType consumes: - application/json @@ -100,6 +109,8 @@ paths: tags: - customEntities summary: Delete specified custom entity type. + x-vcloud-deprecated-in: "34.0" + x-vcloud-deprecated-alternative: definedEntities operationId: deleteCustomEntityType parameters: - name: "recursive" @@ -111,6 +122,173 @@ paths: 204: description: No Content + custom-entity-type-tenants: + parameters: + - name: customEntityTypeId + in: path + required: true + type: string + get: + tags: + - customEntities + summary: Retrieves list of tenants for whom the custom entity type is explicitly published + description: | + Retrieves list of item for whom the custom entity type is explicitly published + operationId: getCustomEntityTypeTenants + produces: + - application/json + responses: + 200: + description: OK + schema: + type: array + items: + $ref: '#/definitions/EntityReference' + + put: + tags: + - customEntities + summary: Resets list of tenants for whom the custom entity type is explicitly published + description: | + Resets list of tenants for whom the custom entity type is explicitly published + operationId: setCustomEntityTypeTenants + consumes: + - application/json + produces: + - application/json + parameters: + - name: publishTenantsBody + in: body + required: true + schema: + type: array + items: + $ref: '#/definitions/EntityReference' + + responses: + 200: + description: OK + schema: + type: array + items: + $ref: '#/definitions/EntityReference' + + custom-entity-type-tenants-publish: + parameters: + - name: customEntityTypeId + in: path + required: true + type: string + post: + tags: + - customEntities + summary: Publishes the custom entity type to the specified tenants + description: | + Publishes the custom entity type to the specified tenants + operationId: postCustomEntityTypePublish + consumes: + - application/json + produces: + - application/json + parameters: + - name: publishTenantsBody + in: body + required: true + schema: + type: array + items: + $ref: '#/definitions/EntityReference' + + responses: + 200: + description: OK + schema: + type: array + items: + $ref: '#/definitions/EntityReference' + + custom-entity-type-tenants-unpublish: + parameters: + - name: customEntityTypeId + in: path + required: true + type: string + post: + tags: + - customEntities + summary: Revokes publication of the custom entity type to the specified tenants + description: | + Revokes publication of the custom entity type to the specified tenants + operationId: postCustomEntityTypeUnpublish + consumes: + - application/json + produces: + - application/json + parameters: + - name: unpublishTenantsBody + in: body + required: true + schema: + type: array + items: + $ref: '#/definitions/EntityReference' + + responses: + 200: + description: OK + schema: + type: array + items: + $ref: '#/definitions/EntityReference' + + custom-entity-type-tenants-publish-all: + parameters: + - name: customEntityTypeId + in: path + required: true + type: string + post: + tags: + - customEntities + summary: Publishes the custom entity type to all tenants + description: | + Publishes the custom entity type to all tenants + operationId: postCustomEntityTypePublishAll + produces: + - application/json + + responses: + 200: + description: OK + schema: + type: array + items: + $ref: '#/definitions/EntityReference' + + custom-entity-type-tenants-unpublish-all: + parameters: + - name: customEntityTypeId + in: path + required: true + type: string + post: + tags: + - customEntities + summary: Unpublishes the custom entity type from all tenants + description: | + Unpublishes the custom entity type from all tenants + operationId: postCustomEntityTypeUnpublishAll + produces: + - application/json + + responses: + 200: + description: OK + schema: + type: array + items: + $ref: '#/definitions/EntityReference' + custom-entity-type-actions: parameters: - name: customEntityTypeId @@ -201,20 +379,24 @@ paths: summary: Get list of all custom entities description: | Get list of custom entities - operationId: queryCustomEntities + operationId: getCustomEntities parameters: - $ref: "./common/query.yaml#/parameters/queryFilter" - $ref: "./common/query.yaml#/parameters/querySortAsc" - $ref: "./common/query.yaml#/parameters/querySortDesc" - - $ref: "./common/query.yaml#/parameters/queryPage" - - $ref: "./common/query.yaml#/parameters/queryPageSize" produces: - application/json responses: 200: description: OK schema: - $ref: "./common/query.yaml#/definitions/QueryResults" + $ref: "#/definitions/CustomEntities" + '404': + description: Not Found + '401': + description: The user is not authorized + '403': + description: The user does not have 'read' access rights for custom entity custom-entity: parameters: @@ -275,6 +457,14 @@ definitions: required: - name + CustomEntities: + type: object + properties: + entities: + type: array + items: + $ref: '#/definitions/CustomEntity' + CustomEntityType: type: object properties: @@ -299,11 +489,35 @@ definitions: description: type: string default: "" - required: - - vroId - - vroDynamicType - - name - - nss + tenantScoped: + type: boolean + default: true + providerScoped: + type: boolean + default: true + publishAll: + description: | + Read-only value indicating publishAll state + type: boolean + default: false + required: + - vroId + - vroDynamicType + - name + - nss + + CustomEntityTypes: + description: | + A list of custom entity types. + allOf: + - $ref: '#/definitions/Page' + - type: object + properties: + values: + type: array + description: The current page of custom entity types. + items: + $ref: '#/definitions/CustomEntityType' CreateCustomEntityTypeAction: type: object @@ -346,3 +560,6 @@ definitions: type: array items: $ref: '#/definitions/CustomEntityTypeAction' + + EntityReference: + $ref: "./common/entity.yaml#/definitions/EntityReference" diff --git a/schemas/openapi/src/main/resources/schemas/vro/vro-catalog.yaml b/schemas/openapi/src/main/resources/schemas/vro/vro-catalog.yaml new file mode 100644 index 00000000..e8e1f3e1 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/vro/vro-catalog.yaml @@ -0,0 +1,469 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2021-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + vRealize Orchestrator Catalog Overlay API. + version: "1.0" + title: vRealize Orchestrator Catalog Overlay API + +paths: + vroServerCatalog: + get: + tags: + - vrealizeCatalog + summary: List vRO Server namespaces + description: A REST endpoint for listing all catalog entry points. + Each Orchestrator plug-in exposes its own catalog entry point that is accessible at /catalog/{pluginname}. + The Orchestrator server exposes a separate catalog entry point that is accessible at /catalog/System + operationId: getCatalogDetails + x-vcloud-added-in: "36.0" + produces: + - application/json + parameters: + - name: vroId + in: path + description: vRO Server Id + required: true + type: string + responses: + '200': + description: The request is successful + schema: + $ref: "#/definitions/CatalogWsInventoryItem" + + vroServerCatalogNamespace: + get: + tags: + - vrealizeCatalog + summary: List vRO Server namespace items + description: A REST endpoint for retrieving the root elements in a namespace. All Orchestrator plug-ins that have an inventory, + usually provide a single root element. The Orchestrator server does not have a single root. Instead, for the System namespace, + the Orchestrator REST API returns a list that contains links to all system types (workflows, tasks, etc.) + operationId: getInventoryItemByNamespace + x-vcloud-added-in: "36.0" + produces: + - application/json + parameters: + - name: vroId + in: path + description: vRO Server Id + required: true + type: string + - name: namespace + in: path + description: Namespace name + required: true + type: string + - $ref: "./vro/vro-catalog.yaml#/parameters/keys" + responses: + '200': + description: The request is successful + schema: + $ref: "#/definitions/CatalogWsInventoryItem" + + vroServerCatalogNamespaceType: + get: + tags: + - vrealizeCatalog + summary: List vRO Server namespace items + description: A REST endpoint for retrieving the root elements in a namespace. All Orchestrator plug-ins that have an inventory, + usually provide a single root element. The Orchestrator server does not have a single root. Instead, for the System namespace, + the Orchestrator REST API returns a list that contains links to all system types (workflows, tasks, etc.) + operationId: getInventoryItemsListByType + x-vcloud-added-in: "36.0" + produces: + - application/json + parameters: + - name: vroId + in: path + description: vRO Server Id + required: true + type: string + - name: namespace + in: path + description: Namespace name + required: true + type: string + - name: type + in: path + description: Item type + required: true + type: string + - $ref: "./vro/vro-catalog.yaml#/parameters/maxResult" + - $ref: "./vro/vro-catalog.yaml#/parameters/startIndex" + - $ref: "./vro/vro-catalog.yaml#/parameters/startFromId" + - $ref: "./vro/vro-catalog.yaml#/parameters/queryCount" + - $ref: "./vro/vro-catalog.yaml#/parameters/keys" + - $ref: "./vro/vro-catalog.yaml#/parameters/conditions" + - $ref: "./vro/vro-catalog.yaml#/parameters/sortOrders" + - $ref: "./vro/vro-catalog.yaml#/parameters/rootObject" + - $ref: "./vro/vro-catalog.yaml#/parameters/tags" + responses: + '200': + description: The request is successful + schema: + $ref: "#/definitions/CatalogInventoryItemsList" + + vroServerCatalogNamespaceTypeId: + get: + tags: + - vrealizeCatalog + summary: List vRO Server namespace items by id + description: A REST endpoint for retrieving an element by its type and ID. All Orchestrator objects can be accessed or + identified by their unique combination of namespace, type and ID. + operationId: getInventoryItemById + x-vcloud-added-in: "36.0" + produces: + - application/json + parameters: + - name: vroId + in: path + description: vRO Server Id + required: true + type: string + - name: namespace + in: path + description: Namespace name + required: true + type: string + - name: type + in: path + description: Item type + required: true + type: string + - name: id + in: path + description: Item type id + required: true + type: string + - $ref: "./vro/vro-catalog.yaml#/parameters/keys" + responses: + '200': + description: The request is successful + schema: + $ref: "#/definitions/CatalogWsInventoryItem" + + getByRelation: + get: + tags: + - vrealizeCatalog + summary: Find by relation + description: Every Orchestrator plug-in can define relations between its types. For example, + hierarchy structures can be defined as 'CHILDREN' relations between parent and children types. + If the request is successful, the API responds with an HTTP 200 OK status code and a list containing the child objects + that are accessible through a given relation, if any. + operationId: getInventoryItemsListByRelation + x-vcloud-added-in: "36.0" + produces: + - application/json + parameters: + - name: vroId + in: path + description: vRO Server Id + required: true + type: string + - name: namespace + in: path + description: Namespace name + required: true + type: string + - name: parentType + in: path + description: parentType + required: true + type: string + - name: parentId + in: path + description: parentId + required: true + type: string + - name: relationName + in: path + description: relationName + required: true + type: string + - $ref: "./vro/vro-catalog.yaml#/parameters/maxResult" + - $ref: "./vro/vro-catalog.yaml#/parameters/startIndex" + - $ref: "./vro/vro-catalog.yaml#/parameters/queryCount" + - $ref: "./vro/vro-catalog.yaml#/parameters/keys" + - $ref: "./vro/vro-catalog.yaml#/parameters/conditions" + - $ref: "./vro/vro-catalog.yaml#/parameters/sortOrders" + responses: + '200': + description: The request is successful + schema: + $ref: "#/definitions/CatalogInventoryItemsList" + + getNamespaceIcon: + get: + tags: + - vrealizeCatalog + summary: Download icon for module + description: If the request is successful, the API responds with an HTTP 200 OK status code and the requested icon image + as a downloadable attachment that has an 'image/png' MIME type. + operationId: getIconByNamespace + x-vcloud-added-in: "36.0" + produces: + - image/png + - image/jpeg + - image/svg+xml + parameters: + - name: vroId + in: path + description: vRO Server Id + required: true + type: string + - name: namespace + in: path + description: Namespace name + required: true + type: string + responses: + '200': + description: The request is successful + schema: + type: string + format: binary + + getNamespaceTypeIcon: + get: + tags: + - vrealizeCatalog + summary: Download icon for module type + description: If the request is successful, the API responds with an HTTP 200 OK status code and the requested icon image + as a downloadable attachment that has an 'image/png' MIME type. + operationId: getIconByNamespaceType + x-vcloud-added-in: "36.0" + produces: + - image/png + - image/jpeg + - image/svg+xml + parameters: + - name: vroId + in: path + description: vRO Server Id + required: true + type: string + - name: namespace + in: path + description: Namespace name + required: true + type: string + - name: type + in: path + description: Type + required: true + type: string + responses: + '200': + description: The request is successful + schema: + type: string + format: binary + + getCategoryById: + get: + tags: + - vrealizeCategory + summary: Get Category + description: Endpoint for retrieving details for a category. + operationId: getCategoryById + x-vcloud-added-in: "36.0" + produces: + - application/json + parameters: + - name: vroId + in: path + description: vRO Server Id + required: true + type: string + - name: id + in: path + description: Category Id + required: true + type: string + responses: + '200': + description: The request is successful + schema: + $ref: "#/definitions/WsCategory" + +parameters: + maxResult: + in: query + name: maxResult + required: false + type: integer + description: maxResult + x-vcloud-added-in: "36.0" + startIndex: + in: query + name: startIndex + required: false + type: integer + description: startIndex + x-vcloud-added-in: "36.0" + startFromId: + in: query + name: startFromId + required: false + type: string + description: startFromId + x-vcloud-added-in: "36.0" + queryCount: + in: query + name: queryCount + required: false + type: boolean + description: queryCount + x-vcloud-added-in: "36.0" + keys: + in: query + name: keys + required: false + type: array + items: + type: string + description: Keys + collectionFormat: multi + x-vcloud-added-in: "36.0" + conditions: + in: query + name: conditions + required: false + type: array + items: + type: string + description: conditions + collectionFormat: multi + x-vcloud-added-in: "36.0" + sortOrders: + in: query + name: sortOrders + required: false + type: array + items: + type: string + description: sortOrders + collectionFormat: multi + x-vcloud-added-in: "36.0" + rootObject: + in: query + name: rootObject + required: false + type: string + description: rootObject + x-vcloud-added-in: "36.0" + tags: + in: query + name: tags + required: false + type: array + items: + type: string + description: tags + collectionFormat: multi + x-vcloud-added-in: "36.0" + +definitions: + WsCategory: + x-vcloud-added-in: "36.0" + type: object + properties: + description: + type: string + href: + type: string + id: + type: string + name: + type: string + path: + type: string + pathIds: + type: array + items: + type: string + relations: + $ref: "#/definitions/CatalogRelations" + type: + type: string + description: | + Allowed values are: + - ResourceElementCategory + - ConfigurationElementCategory + - WorkflowCategory + - PolicyTemplateCategory + - ScriptModuleCategory + + CatalogWsInventoryItem: + x-vcloud-added-in: "36.0" + type: object + properties: + attributes: + type: array + items: + $ref: "#/definitions/CatalogWsAttribute" + href: + type: string + relations: + $ref: "#/definitions/CatalogRelations" + + CatalogInventoryItemsList: + x-vcloud-added-in: "36.0" + type: object + properties: + count: + type: integer + startIndex: + type: integer + lastItemToken: + type: string + link: + type: array + items: + $ref: "#/definitions/CatalogLink" + + CatalogWsAttribute: + x-vcloud-added-in: "36.0" + type: object + properties: + displayValue: + type: string + name: + type: string + value: + type: string + + CatalogRelations: + x-vcloud-added-in: "36.0" + type: object + properties: + count: + type: integer + startIndex: + type: integer + link: + type: array + items: + $ref: "#/definitions/CatalogLink" + + CatalogLink: + x-vcloud-added-in: "36.0" + type: object + properties: + attributes: + type: array + items: + $ref: "#/definitions/CatalogWsAttribute" + href: + type: string + rel: + type: string + type: + type: string diff --git a/schemas/openapi/src/main/resources/schemas/vro/vro-common.yaml b/schemas/openapi/src/main/resources/schemas/vro/vro-common.yaml index 89089c86..4a93f682 100644 --- a/schemas/openapi/src/main/resources/schemas/vro/vro-common.yaml +++ b/schemas/openapi/src/main/resources/schemas/vro/vro-common.yaml @@ -1,8 +1,9 @@ # ****************************************************************************** # * api-extension-template-vcloud-director -# * Copyright 2017-2018 VMware, Inc. All rights reserved. * +# * Copyright 2017-2021 VMware, Inc. All rights reserved. * # * SPDX-License-Identifier: BSD-2-Clause # ****************************************************************************** + swagger: "2.0" info: @@ -51,3 +52,4 @@ definitions: value: type: string + diff --git a/schemas/openapi/src/main/resources/schemas/vro/vro-forms.yaml b/schemas/openapi/src/main/resources/schemas/vro/vro-forms.yaml new file mode 100644 index 00000000..e1d817b6 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/vro/vro-forms.yaml @@ -0,0 +1,953 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2021-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + title: vCloud Director vRO Froms Overlay API + description: | + vCloud Director vRO Froms Overlay API + version: "1.0" + +paths: + workflow-forms: + get: + tags: + - vroFormsOverlay + summary: Forms API Execution + description: 'Retrieves a workflow schema and layout using vRO Forms API.' + operationId: getWorkflowFormsLayoutSchema + x-vcloud-added-in: "36.0" + produces: + - application/json + parameters: + - name: workflowId + in: path + description: workflowId + required: true + type: string + responses: + '200': + description: The request is successful + schema: + $ref: '#/definitions/FormDefinition' + + workflow-forms-eval-context: + get: + tags: + - vroFormsOverlay + summary: Forms API Execution + description: | + Retrieves a workflow evaluation context using vRO Forms API. Response type FormEvaluationContext. + operationId: getWorkflowFormsEvalContext + x-vcloud-added-in: "36.0" + produces: + - application/json + parameters: + - name: workflowId + in: path + description: workflowId + required: true + type: string + responses: + '200': + description: The request is successful. Response type FormEvaluationContext. + schema: + type: string + + workflow-forms-evaluations: + post: + tags: + - vroFormsOverlay + summary: Forms API Execution + description: | + Updates workflow evaluation context using vRO Forms API. Request body is from type BatchExecution. + operationId: updatesWorkflowFormsEvalContext + x-vcloud-added-in: "36.0" + consumes: + - application/json + produces: + - application/json + parameters: + - name: workflowId + in: path + description: workflowId + required: true + type: string + - name: evaluations + in: body + description: Request body is from type BatchExecution. + required: true + schema: + type: string + responses: + '200': + description: The request is successful + schema: + $ref: '#/definitions/BatchExecutionResult' + + workflow-forms-executions: + post: + tags: + - vroFormsOverlay + summary: Forms API Execution + description: | + Executes workflow using vRO Forms API. + Request body is from type ExecutionContextForms and the response type is WsWorkflowExecutionForms.' + operationId: executeWorkflowFormsAPI + x-vcloud-added-in: "36.0" + consumes: + - application/json + produces: + - application/json + parameters: + - name: workflowId + in: path + description: workflowId + required: true + type: string + - name: executionContext + in: body + description: Request body is from type ExecutionContextForms. + required: true + schema: + type: string + responses: + '200': + description: The request is successful. Response type WsWorkflowExecutionForms. + schema: + type: string + '201': + description: Created + '202': + description: The request is successful. Response type WsWorkflowExecutionForms. + schema: + type: string + + parameter-types-forms: + get: + tags: + - vroFormsOverlay + summary: This endpoint will not produce results. It is a placeholder to enforce code generation of ParameterTypesForms. + description: This endpoint will not produce results. It is a placeholder to enforce code generation of ParameterTypesForms. + operationId: getParameterTypesForms + x-vcloud-added-in: "36.0" + produces: + - application/json + responses: + '200': + description: The request is successful + schema: + $ref: '#/definitions/ParameterTypesForms' + '401': + description: The user is not authorized + '403': + description: Forbidden + +definitions: + FormDefinition: + x-vcloud-added-in: "36.0" + title: FormDefinition + type: object + properties: + itemId: + type: string + layout: + $ref: '#/definitions/Layout' + options: + $ref: '#/definitions/OptionsForms' + schema: + type: object + additionalProperties: + $ref: '#/definitions/FieldDefinition' + vroId: + type: string + + Layout: + x-vcloud-added-in: "36.0" + title: Layout + type: object + properties: + pages: + type: array + items: + $ref: '#/definitions/PageForms' + + PageForms: + x-vcloud-added-in: "36.0" + title: PageForms + type: object + properties: + id: + type: string + sections: + type: array + items: + $ref: '#/definitions/Section' + state: + type: object + title: + type: string + + Section: + x-vcloud-added-in: "36.0" + title: Section + type: object + properties: + fields: + type: array + items: + $ref: '#/definitions/FieldForms' + id: + type: string + state: + type: object + + FieldForms: + x-vcloud-added-in: "36.0" + type: object + properties: + display: + type: string + id: + type: string + rootElements: + type: object + state: + type: object + + OptionsForms: + x-vcloud-added-in: "36.0" + type: object + properties: + externalValidations: + type: array + items: + $ref: '#/definitions/ExternalValidation' + title: OptionsForms + + ExternalValidation: + x-vcloud-added-in: "36.0" + type: object + properties: + label: + type: string + source: + $ref: '#/definitions/DynamicValueDefinition' + target: + type: array + items: + type: string + title: ExternalValidation + + DynamicValueDefinition: + x-vcloud-added-in: "36.0" + type: object + properties: + id: + type: string + type: + type: string + title: DynamicValueDefinition + + FieldDefinition: + x-vcloud-added-in: "36.0" + type: object + properties: + constraints: + type: object + default: + type: object + id: + type: string + label: + type: string + type: + $ref: '#/definitions/FieldType' + valueList: + type: object + title: FieldDefinition + + FieldType: + x-vcloud-added-in: "36.0" + type: object + properties: + dataType: + type: string + fields: + type: array + items: + $ref: '#/definitions/FieldDefinition' + isMultiple: + type: boolean + referenceType: + type: string + title: FieldType + + FormEvaluationContext: + x-vcloud-added-in: "36.0" + type: object + properties: + actions: + type: object + additionalProperties: + $ref: '#/definitions/ActionForms' + context: + type: array + items: + $ref: '#/definitions/RunContextValue' + parameters: + type: array + items: + $ref: '#/definitions/WsParameterForms' + token: + type: string + title: FormEvaluationContext + + ActionForms: + x-vcloud-added-in: "36.0" + type: object + properties: + bundleHasContent: + type: boolean + description: + type: string + entryPoint: + type: string + fqn: + type: string + href: + type: string + iconId: + type: string + id: + type: string + inputParameters: + type: array + items: + $ref: '#/definitions/WsParameterForms' + module: + type: string + name: + type: string + outputParameterType: + type: string + relations: + $ref: '#/definitions/RelationsForms' + runtime: + type: string + runtimeMemoryLimit: + type: integer + format: int64 + runtimeTimeout: + type: integer + format: int64 + script: + type: string + version: + type: string + title: ActionForms + + WsParameterForms: + x-vcloud-added-in: "36.0" + type: object + properties: + description: + type: string + encryptValue: + type: boolean + name: + type: string + scope: + type: string + enum: + - local + - token + type: + type: string + updated: + type: boolean + value: + $ref: '#/definitions/Value' + title: WsParameterForms + + Value: + x-vcloud-added-in: "36.0" + type: object + discriminator: objectType + properties: + objectType: + type: string + title: Value + description: | + Value can be one of the following types: SDKObjectForms, StringObject, SecureStringObject, + PropertiesObject, NumberObject, ArrayForms, + MimeAttachment, DateObject, BooleanObject, + RegExObject, CompositeObject, EncryptedStringObject, AttributeReference}. + + + SDKObjectForms: + x-vcloud-added-in: "36.0" + title: SDKObjectForms + allOf: + - $ref: '#/definitions/Value' + - type: object + properties: + displayValue: + type: string + href: + type: string + id: + type: string + objectType: + type: string + type: + type: string + title: SDKObjectForms + description: SDKObjectForms + description: SDKObjectForms + + StringObject: + x-vcloud-added-in: "36.0" + title: StringObject + allOf: + - $ref: '#/definitions/Value' + - type: object + properties: + objectType: + type: string + value: + type: string + title: StringObject + description: StringObject + description: StringObject + + SecureStringObject: + x-vcloud-added-in: "36.0" + title: SecureStringObject + allOf: + - $ref: '#/definitions/Value' + - type: object + properties: + objectType: + type: string + plainText: + type: boolean + value: + type: string + title: SecureStringObject + description: Encoded string + description: Encoded string + + PropertiesObject: + x-vcloud-added-in: "36.0" + title: PropertiesObject + allOf: + - $ref: '#/definitions/Value' + - type: object + properties: + objectType: + type: string + properties: + type: array + items: + $ref: '#/definitions/KeyValuePairForms' + title: PropertiesObject + description: PropertiesObject is a list of key value pairs. + description: PropertiesObject is a list of key value pairs. + + KeyValuePairForms: + x-vcloud-added-in: "36.0" + type: object + properties: + key: + type: string + xml: + name: key + attribute: false + wrapped: false + value: + $ref: '#/definitions/Value' + title: KeyValuePairForms + + NumberObject: + x-vcloud-added-in: "36.0" + title: NumberObject + allOf: + - $ref: '#/definitions/Value' + - type: object + properties: + objectType: + type: string + value: + type: number + format: double + title: NumberObject + description: NumberObject + description: NumberObject + + ArrayForms: + x-vcloud-added-in: "36.0" + title: ArrayForms + allOf: + - $ref: '#/definitions/Value' + - type: object + properties: + elements: + type: array + items: + $ref: '#/definitions/Value' + objectType: + type: string + title: ArrayForms + description: Array with Value type elements + description: Array with Value type elements + + MimeAttachmentForms: + x-vcloud-added-in: "36.0" + title: MimeAttachment + allOf: + - $ref: '#/definitions/Value' + - type: object + properties: + content: + type: string + format: byte + mimeType: + type: string + name: + type: string + objectType: + type: string + title: MimeAttachment + description: MimeAttachment Forms API + description: MimeAttachmentForms + + DateObject: + x-vcloud-added-in: "36.0" + title: DateObject + allOf: + - $ref: '#/definitions/Value' + - type: object + properties: + objectType: + type: string + value: + type: string + format: date-time + title: DateObject + description: DateObject + description: DateObject + + BooleanObject: + x-vcloud-added-in: "36.0" + title: BooleanObject + allOf: + - $ref: '#/definitions/Value' + - type: object + properties: + objectType: + type: string + value: + type: boolean + title: BooleanObject + description: BooleanObject + description: BooleanObject + + RegExObject: + x-vcloud-added-in: "36.0" + title: RegExObject + allOf: + - $ref: '#/definitions/Value' + - type: object + properties: + objectType: + type: string + value: + type: string + title: RegExObject + description: RegExObject + description: RegExObject + + CompositeObject: + x-vcloud-added-in: "36.0" + title: CompositeObject + allOf: + - $ref: '#/definitions/Value' + - type: object + properties: + id: + type: string + objectType: + type: string + value: + $ref: '#/definitions/Value' + values: + type: array + items: + $ref: '#/definitions/CompositeObject' + title: CompositeObject + description: CompositeObject + description: CompositeObject + + EncryptedStringObject: + x-vcloud-added-in: "36.0" + title: EncryptedStringObject + allOf: + - $ref: '#/definitions/Value' + - type: object + properties: + objectType: + type: string + value: + type: string + title: EncryptedStringObject + description: EncryptedStringObject + description: EncryptedStringObject + + AttributeReference: + x-vcloud-added-in: "36.0" + title: AttributeReference + allOf: + - $ref: '#/definitions/Value' + - type: object + properties: + configurationElementId: + type: string + configurationElementKey: + type: string + configurationElementName: + type: string + objectType: + type: string + title: AttributeReference + description: AttributeReference + description: AttributeReference + + RelationsForms: + x-vcloud-added-in: "36.0" + type: object + properties: + count: + type: integer + format: int32 + links: + type: array + items: + $ref: '#/definitions/LinkForms' + startIndex: + type: integer + format: int32 + title: RelationsForms + + LinkForms: + x-vcloud-added-in: "36.0" + type: object + properties: + attributes: + type: array + items: + $ref: '#/definitions/WsAttributeForms' + href: + type: string + rel: + type: string + type: + type: string + title: LinkForms + + WsAttributeForms: + x-vcloud-added-in: "36.0" + type: object + properties: + displayValue: + type: string + name: + type: string + value: + type: string + title: WsAttributeForms + + RunContextValue: + x-vcloud-added-in: "36.0" + type: object + properties: + id: + type: string + type: + $ref: '#/definitions/FieldType' + value: + type: object + title: RunContextValue + + WsWorkflowExecutionForms: + x-vcloud-added-in: "36.0" + type: object + description: | + State property could be one of the following values: canceled, completed, running, suspended, waiting + , waiting-signal, failed, initializing. + properties: + businessState: + type: string + contentException: + type: string + currentItemDisplayName: + type: string + currentItemForDisplay: + type: string + endDate: + type: string + format: date-time + executionStack: + type: array + items: + $ref: '#/definitions/WsWorkflowExecutionStackItem' + formInputs: + type: array + items: + type: object + href: + type: string + id: + type: string + inputParameters: + type: array + items: + $ref: '#/definitions/WsParameterForms' + name: + type: string + outputParameters: + type: array + items: + $ref: '#/definitions/WsParameterForms' + relations: + $ref: '#/definitions/RelationsForms' + runningInstanceId: + type: string + startDate: + type: string + format: date-time + startedBy: + type: string + state: + type: string + statistic: + $ref: '#/definitions/WsWorkflowExecutionStatistics' + workflowAttributes: + type: array + items: + $ref: '#/definitions/WsParameterForms' + title: WsWorkflowExecutionForms + + WsWorkflowExecutionStackItem: + x-vcloud-added-in: "36.0" + type: object + properties: + attributes: + type: array + items: + $ref: '#/definitions/WsParameterForms' + displayName: + type: string + href: + type: string + name: + type: string + relations: + $ref: '#/definitions/RelationsForms' + workflowDisplayName: + type: string + title: WsWorkflowExecutionStackItem + + WsWorkflowExecutionStatistics: + x-vcloud-added-in: "36.0" + type: object + properties: + activities: + type: array + items: + $ref: '#/definitions/WsActivityStatistics' + id: + type: string + numberOfTransitions: + type: integer + format: int64 + plugins: + type: array + items: + $ref: '#/definitions/WsPluginStatistics' + tokenBlocked: + type: integer + format: int64 + tokenSize: + type: integer + format: int64 + tokenSystem: + type: integer + format: int64 + tokenUser: + type: integer + format: int64 + tokenWait: + type: integer + format: int64 + totalNumberOfTransitions: + type: integer + format: int64 + totalTime: + type: integer + format: int64 + title: WsWorkflowExecutionStatistics + + WsActivityStatistics: + x-vcloud-added-in: "36.0" + type: object + properties: + activities: + type: array + items: + $ref: '#/definitions/WsActivityStatistics' + id: + type: string + maxTime: + type: integer + format: int64 + numberOfExecutions: + type: integer + format: int64 + numberOfTransitions: + type: integer + format: int64 + totalTime: + type: integer + format: int64 + title: WsActivityStatistics + + WsPluginStatistics: + x-vcloud-added-in: "36.0" + type: object + properties: + numberOfExecutions: + type: integer + format: int64 + pluginName: + type: string + totalTime: + type: integer + format: int64 + title: WsPluginStatistics + + ExecutionContextForms: + x-vcloud-added-in: "36.0" + type: object + properties: + executionId: + type: string + parameters: + type: array + items: + $ref: '#/definitions/WsParameterForms' + profilerOptions: + $ref: '#/definitions/WsProfilerOptions' + title: ExecutionContextForms + + WsProfilerOptions: + x-vcloud-added-in: "36.0" + type: object + properties: + debuggerEnabled: + type: boolean + enabled: + type: boolean + tokenReplayEnabled: + type: boolean + title: WsProfilerOptions + + ParameterTypesForms: + x-vcloud-added-in: "36.0" + type: object + properties: + array: + $ref: '#/definitions/ArrayForms' + attributeReference: + $ref: '#/definitions/AttributeReference' + sdkObject: + $ref: '#/definitions/SDKObjectForms' + string: + $ref: '#/definitions/StringObject' + secureString: + $ref: '#/definitions/SecureStringObject' + number: + $ref: '#/definitions/NumberObject' + mimeAttachment: + $ref: '#/definitions/MimeAttachmentForms' + properties: + $ref: '#/definitions/PropertiesObject' + date: + $ref: '#/definitions/DateObject' + boolean: + $ref: '#/definitions/BooleanObject' + composite: + $ref: '#/definitions/CompositeObject' + regex: + $ref: '#/definitions/RegExObject' + encryptedString: + $ref: '#/definitions/EncryptedStringObject' + keyValuePairForms: + $ref: '#/definitions/KeyValuePairForms' + batchExecution: + $ref: '#/definitions/BatchExecution' + formEvaluationContext: + $ref: '#/definitions/FormEvaluationContext' + wsWorkflowExecutionForms: + $ref: '#/definitions/WsWorkflowExecutionForms' + executionContextForms: + $ref: '#/definitions/ExecutionContextForms' + formDefinition: + $reef: '#/definitions/FormDefinition' + + BatchExecution: + x-vcloud-added-in: "36.0" + type: object + properties: + executions: + type: array + items: + $ref: '#/definitions/Execution' + token: + type: string + title: BatchExecution + + Execution: + x-vcloud-added-in: "36.0" + type: object + properties: + actionId: + type: string + error: + type: string + inputs: + $ref: '#/definitions/ExecutionContextForms' + title: Execution + + BatchExecutionResult: + x-vcloud-added-in: "36.0" + type: object + properties: + results: + type: array + items: + $ref: '#/definitions/ScriptResult' + title: BatchExecutionResult + + ScriptResult: + x-vcloud-added-in: "36.0" + type: object + properties: + error: + type: string + result: + type: object + title: ScriptResult diff --git a/schemas/openapi/src/main/resources/schemas/vro/vro.yaml b/schemas/openapi/src/main/resources/schemas/vro/vro.yaml index c75ce82e..1452ed4e 100644 --- a/schemas/openapi/src/main/resources/schemas/vro/vro.yaml +++ b/schemas/openapi/src/main/resources/schemas/vro/vro.yaml @@ -1,8 +1,9 @@ -# ************************************************************************* +# ****************************************************************************** # * api-extension-template-vcloud-director -# * Copyright 2017-2018 VMware, Inc. All rights reserved. * +# * Copyright 2017-2021 VMware, Inc. All rights reserved. * # * SPDX-License-Identifier: BSD-2-Clause -# ************************************************************************* +# ****************************************************************************** + swagger: "2.0" info: description: | @@ -27,96 +28,82 @@ paths: - $ref: "./common/query.yaml#/parameters/queryFilter" - $ref: "./common/query.yaml#/parameters/querySortAsc" - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" produces: - application/json responses: 200: description: OK schema: - type: array - items: - $ref: '#/definitions/VroRemoteWorkflowItem' - 404: - description: Not Found + $ref: "#/definitions/VroRemoteWorkflowItems" - vroInventory: + pluginList: parameters: - name: vroId description: The ID of the server to browse inventory items on in: path required: true type: string - - name: any - description: Inventory search path to identify the VRO inventory node to get contents of - in: path - required: false - type: string get: tags: - vrealizeBrowse summary: Browse remote vRealize Orchestrator inventory - operationId: getRemoteInventory + operationId: getPluginList produces: - application/json responses: 200: description: OK schema: - $ref: '#/definitions/VroRemoteInventoryItem' + $ref: '#/definitions/VroRemotePluginItems' 404: description: Not Found - vroCatalogBase: + pluginTypeList: parameters: - name: vroId description: The ID of the server to browse inventory items on in: path required: true type: string + - name: pluginName + description: Inventory search path to identify the VRO inventory node to get contents of + in: path + required: true + type: string get: tags: - vrealizeBrowse summary: Browse remote vRealize Orchestrator inventory - operationId: getRemoteCatalog - parameters: - - $ref: "./common/query.yaml#/parameters/queryFilter" - - $ref: "./common/query.yaml#/parameters/querySortAsc" - - $ref: "./common/query.yaml#/parameters/querySortDesc" - - $ref: "./common/query.yaml#/parameters/queryPage" - - $ref: "./common/query.yaml#/parameters/queryPageSize" + operationId: getPluginTypeList produces: - application/json responses: 200: description: OK schema: - $ref: '#/definitions/VroRemoteInventoryItem' + $ref: '#/definitions/VroRemotePluginTypes' 404: description: Not Found - vroCatalogPlugin: + vroInventory: parameters: - name: vroId description: The ID of the server to browse inventory items on in: path required: true type: string - - name: plugin - description: The name of the plugin to search within the catalog + - name: any + description: Inventory search path to identify the VRO inventory node to get contents of in: path - required: true + required: false type: string get: tags: - vrealizeBrowse summary: Browse remote vRealize Orchestrator inventory - operationId: getRemoteCatalogPlugin - parameters: - - $ref: "./common/query.yaml#/parameters/queryFilter" - - $ref: "./common/query.yaml#/parameters/querySortAsc" - - $ref: "./common/query.yaml#/parameters/querySortDesc" - - $ref: "./common/query.yaml#/parameters/queryPage" - - $ref: "./common/query.yaml#/parameters/queryPageSize" + operationId: getRemoteInventory produces: - application/json responses: @@ -127,20 +114,15 @@ paths: 404: description: Not Found - vroCatalogPluginType: + vroSdkObjectsBase: parameters: - name: vroId description: The ID of the server to browse inventory items on in: path required: true type: string - - name: plugin - description: The name of the plugin to search within the catalog - in: path - required: true - type: string - - name: type - description: The datatype within the specified plugin + - name: target + description: The 'plugin[:type]' to serve as the starting point for the browsing in: path required: true type: string @@ -148,42 +130,35 @@ paths: tags: - vrealizeBrowse summary: Browse remote vRealize Orchestrator inventory - operationId: getRemoteCatalogPluginType + operationId: searchSdkObjects parameters: - - $ref: "./common/query.yaml#/parameters/queryFilter" - - $ref: "./common/query.yaml#/parameters/querySortAsc" - - $ref: "./common/query.yaml#/parameters/querySortDesc" - - $ref: "./common/query.yaml#/parameters/queryPage" - - $ref: "./common/query.yaml#/parameters/queryPageSize" + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" produces: - - application/json + - application/json responses: 200: description: OK schema: - $ref: './vro/vro-common.yaml#/definitions/Relations' + $ref: '#/definitions/VroRemoteItems' 404: description: Not Found - vroCatalogPluginTypeItem: + vroSdkObjectsBrowse: parameters: - name: vroId description: The ID of the server to browse inventory items on in: path required: true type: string - - name: plugin - description: The name of the plugin to search within the catalog + - name: target + description: The 'plugin[:type]' to serve as the starting point for the browsing in: path required: true type: string - - name: type - description: The datatype within the specified plugin - in: path - required: true - type: string - - name: itemId - description: Id of the specific item within the plugin's type catalog + - name: browsePaths + description: Inventory search path to identify the VRO inventory node to get contents of in: path required: true type: string @@ -191,23 +166,38 @@ paths: tags: - vrealizeBrowse summary: Browse remote vRealize Orchestrator inventory - operationId: getRemoteCatalogPluginTypeItem - parameters: - - $ref: "./common/query.yaml#/parameters/queryFilter" - - $ref: "./common/query.yaml#/parameters/querySortAsc" - - $ref: "./common/query.yaml#/parameters/querySortDesc" - - $ref: "./common/query.yaml#/parameters/queryPage" - - $ref: "./common/query.yaml#/parameters/queryPageSize" + operationId: browseSdkObjects produces: - - application/json + - application/json responses: 200: description: OK schema: - $ref: '#/definitions/VroRemoteInventoryItem' + $ref: '#/definitions/VroRemoteItems' 404: description: Not Found + discovery: + post: + tags: + - vRealizeOrchestrators + x-vcloud-added-in: "35.0" + summary: Discover vCenter to work with the provided vRealize Orchestrator service + operationId: discoverVroVcenter + consumes: + - application/json + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/VROServiceInfo' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + vros: get: tags: @@ -352,6 +342,107 @@ definitions: vroServerId: type: string + VroRemoteWorkflowItems: + description: | + A list of remote VRO workflows. + allOf: + - $ref: '#/definitions/Page' + - type: object + properties: + values: + type: array + description: The current page of remove VRO workflows. + items: + $ref: '#/definitions/VroRemoteWorkflowItem' + + VroRemoteItems: + description: | + A list of objects in vRealize orchestrator server + type: object + properties: + remoteItems: + type: array + items: + $ref: '#/definitions/VroRemoteItem' + resultTotal: + type: integer + pageCount: + type: integer + + VroRemoteItem: + description: | + Information about various objects in vRealize Orchestrator server + type: object + properties: + name: + type: string + description: + type: string + id: + type: string + vroServerId: + type: string + dunesId: + type: string + type: + type: string + selectable: + type: boolean + canHaveChildren: + type: boolean + href: + type: string + rel: + type: string + + VroRemotePluginItems: + description: | + List of plugin namespaces + type: object + properties: + items: + type: array + items: + $ref: '#/definitions/VroRemotePluginItem' + + VroRemotePluginItem: + description: | + A plugin namespaces for whom type information can be retrieved + type: object + properties: + name: + type: string + typeHref: + type: string + selectable: + type: boolean + canHaveChildren: + type: boolean + + VroRemotePluginTypes: + description: | + A list of defined types for a particular plugin namespace + type: object + properties: + types: + type: array + items: + $ref: '#/definitions/VroRemotePluginType' + namespace: + type: string + + VroRemotePluginType: + description: | + Type definition for a plugin namespace + type: object + properties: + name: + type: string + selectable: + type: boolean + canHaveChildren: + type: boolean + VroWorkflowServiceItem: allOf: - $ref: "./services/services.yaml#/definitions/ServiceItem" @@ -366,6 +457,9 @@ definitions: - vroWorkflowId - serviceItemType + EntityReference: + $ref: "./common/entity.yaml#/definitions/EntityReference" + VROServiceInfo: description: | Response type with meta information about a vRealize Orchestrator Service @@ -394,6 +488,16 @@ definitions: version: type: string trustAnchor: - description: | - SSL Certificate chain for the VRO endpoint - type: string \ No newline at end of file + description: SSL Certificate chain for the VRO endpoint (deprecated) + type: string + vcId: + $ref: '#/definitions/EntityReference' + description: Reference to the associated vCenter server. + x-vcloud-property-annotations: + trustAnchor: + x-vcloud-deprecated-in: "35.0" + x-vcloud-deprecated-alternative: see /1.0.0/ssl/trustedCertificates API + vcId: + x-vcloud-added-in: "35.0" + x-vcloud-constraints: + - constraint: NonSortable diff --git a/schemas/openapi/src/main/resources/schemas/vro/workflowExecution.yaml b/schemas/openapi/src/main/resources/schemas/vro/workflowExecution.yaml index 3429cd60..3498c744 100644 --- a/schemas/openapi/src/main/resources/schemas/vro/workflowExecution.yaml +++ b/schemas/openapi/src/main/resources/schemas/vro/workflowExecution.yaml @@ -1,8 +1,9 @@ -# ************************************************************************* +# ****************************************************************************** # * api-extension-template-vcloud-director -# * Copyright 2017-2018 VMware, Inc. All rights reserved. * +# * Copyright 2017-2021 VMware, Inc. All rights reserved. * # * SPDX-License-Identifier: BSD-2-Clause -# ************************************************************************* +# ****************************************************************************** + swagger: "2.0" info: title: vCloud Director Workflow Execution API @@ -44,6 +45,8 @@ paths: tags: - vroWorkflowExecution summary: Start workflow execution + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal description: | Instantiates a workflow run, by using the passed parameters. The workflow run is asynchronous, so the call returns a pointer to a task that can be used to track the workflow run. operationId: startWorkflowExecution @@ -205,8 +208,10 @@ paths: get: tags: - vroWorkflowExecution - summary: Get a list of supported parameter types - description: Retrieves the list of supported parameter types + summary: This endpoint will not produce results. It is a placeholder to enforce code generation of ParameterTypes. + description: This endpoint will not produce results. It is a placeholder to enforce code generation of ParameterTypes. + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal operationId: getParameterTypes produces: - application/json @@ -224,8 +229,10 @@ paths: get: tags: - vroWorkflowExecution - summary: Get a list of supported presentation elements - description: Retrieves the list of supported presentation elements + summary: This endpoint will not produce results. It is a placeholder to enforce code generation of SupportedPresentationElements. + description: This endpoint will not produce results. It is a placeholder to enforce code generation of SupportedPresentationElements. + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal operationId: getSupportedPresentationElements produces: - application/json @@ -243,8 +250,10 @@ paths: get: tags: - vroWorkflowExecution - summary: Get a list of supported decorators - description: Retrieves the list of supported decorators + summary: This endpoint will not produce results. It is a placeholder to enforce code generation of SupportedDecorators. + description: This endpoint will not produce results. It is a placeholder to enforce code generation of SupportedDecorators. + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal operationId: getSupportedDecorators produces: - application/json @@ -262,8 +271,10 @@ paths: get: tags: - vroWorkflowExecution - summary: Get a list of supported constraints - description: Retrieves the list of supported constraints + summary: This endpoint will not produce results. It is a placeholder to enforce code generation of SupportedConstraints. + description: This endpoint will not produce results. It is a placeholder to enforce code generation of SupportedConstraints. + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal operationId: getSupportedconstraints produces: - application/json @@ -283,6 +294,8 @@ paths: - vroWorkflowPresentation summary: Get presentation description: 'Retrieves the definition of a workflow presentation. To retrieve the workflow presentation definition localized, add Accept-Language header, with the appropriate locale. In advance, localization resource should be present for the workflow, otherwise it defaults to the standard workflow presentation definition.' + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal operationId: getWorkflowPresentation produces: - application/json @@ -310,6 +323,8 @@ paths: - vroWorkflowPresentation summary: Get all presentations description: 'Retrieves a list of the presentation instances for a workflow that you specify. To retrieve the list of workflow presentations, make an HTTP GET request at the workflow presentations list URL. The returned list contains all of the currently running workflow presentation instances, and all completed instances based on the data from the workflow executions. If the user has admin rights, all presentation instances for all users are returned.' + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal operationId: getAllWorkflowPresentationInstances produces: - application/json @@ -335,6 +350,8 @@ paths: - vroWorkflowPresentation summary: Start presentation description: ' Creates a new instance of the presentation of a workflow, by using the passed parameters. To create a new instance of a workflow presentation, make an HTTP GET request at the URL that contains the instances of the workflow presentation. Presentation''s fields are populated with input parameter values and are validated. If there are any validation errors, they are collected and attached to each field. The presentation is marked as invalid. In order the returned workflow presentation to be localized, add Accept-Language header, with the appropriate locale. In advance, localization resource should be present for the workflow, otherwise it defaults to the standard workflow presentation.' + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal operationId: startWorkflowPresentation consumes: - application/json @@ -374,6 +391,8 @@ paths: - vroWorkflowPresentation summary: Load Execution description: 'Retrieves a specific workflow presentation instance. Presentation instances are removed after the workflow starts. If the presentation instance under requested executionId does not exists, a new presentation instance is created by using the parameters from the workflow execution with the same ID. To retrieve the workflow presentation localized, add Accept-Language header, with the appropriate locale. In advance, localization resource should be present for the workflow, otherwise it defaults to the standard workflow presentation.' + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal operationId: getWorkflowPresentationInstance produces: - application/json @@ -403,6 +422,8 @@ paths: tags: - vroWorkflowPresentation summary: Update presentation + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal description: 'Update a specific workflow presentation instance. Presentation fields are populated with input parameter values and are validated. If there are any validation errors, they are collected and attached to each field. The presentation is marked as invalid. If the parameter''s ''updated'' flag is set to true, the dependent field values are recalculated.' operationId: updateWorkflowPresentationInstance consumes: @@ -444,6 +465,8 @@ paths: - vroWorkflowPresentation summary: Delete workflow presentation execution description: 'Cancels the execution of a workflow presentation instance. This API call cancels only the workflow presentation execution. To cancel the workflow execution, use APIs under /cloudapi/workflows/{workflowId}/instances.' + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal operationId: deleteWorkflowPresenationInstance parameters: - name: workflowId @@ -469,18 +492,22 @@ paths: definitions: ExecutionState: type: string + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal enum: - canceled - completed - running - suspended - waiting - - waitingSignal + - waiting-signal - failed - initializing ExecutionSummary: type: object + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal properties: id: type: string @@ -497,6 +524,8 @@ definitions: ExecutionContext: type: object + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal properties: parameters: type: array @@ -505,6 +534,8 @@ definitions: WsWorkflowExecution: type: object + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal properties: businessState: type: string @@ -539,6 +570,8 @@ definitions: WsParameter: type: object + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal properties: description: type: string @@ -560,6 +593,8 @@ definitions: PresentationExecutionsList: type: object + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal properties: total: type: integer @@ -574,6 +609,8 @@ definitions: Parameter: type: object + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal discriminator: inputType properties: inputType: @@ -582,6 +619,8 @@ definitions: - inputType SdkObject: + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal allOf: - $ref: '#/definitions/Parameter' - type: object @@ -596,6 +635,8 @@ definitions: type: string SecureString: + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal allOf: - $ref: '#/definitions/Parameter' - type: object @@ -606,6 +647,8 @@ definitions: type: boolean NumberParam: + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal allOf: - $ref: '#/definitions/Parameter' - type: object @@ -614,6 +657,8 @@ definitions: type: number MimeAttachment: + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal allOf: - $ref: '#/definitions/Parameter' - type: object @@ -627,6 +672,8 @@ definitions: type: string Properties: + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal allOf: - $ref: '#/definitions/Parameter' - type: object @@ -637,6 +684,8 @@ definitions: $ref: '#/definitions/KeyValuePair' DateParam: + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal allOf: - $ref: '#/definitions/Parameter' - type: object @@ -646,6 +695,8 @@ definitions: format: date-time BooleanParam: + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal allOf: - $ref: '#/definitions/Parameter' - type: object @@ -654,6 +705,8 @@ definitions: type: boolean StringParam: + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal allOf: - $ref: '#/definitions/Parameter' - type: object @@ -662,6 +715,8 @@ definitions: type: string Regex: + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal allOf: - $ref: '#/definitions/Parameter' - type: object @@ -670,6 +725,8 @@ definitions: type: string EncryptedString: + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal allOf: - $ref: '#/definitions/Parameter' - type: object @@ -678,6 +735,8 @@ definitions: type: string ArrayParam: + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal allOf: - $ref: '#/definitions/Parameter' - type: object @@ -688,6 +747,8 @@ definitions: $ref: '#/definitions/Parameter' CompositeType: + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal allOf: - $ref: '#/definitions/Parameter' - type: object @@ -700,6 +761,8 @@ definitions: type: string CompositeValue: + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal allOf: - $ref: '#/definitions/Parameter' - type: object @@ -710,6 +773,8 @@ definitions: $ref: '#/definitions/Parameter' KeyValuePair: + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal allOf: - $ref: '#/definitions/Parameter' - type: object @@ -720,6 +785,8 @@ definitions: $ref: '#/definitions/Parameter' ParameterTypes: + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal type: object properties: sdkObject: @@ -752,6 +819,8 @@ definitions: $ref: '#/definitions/ArrayParam' SupportedPresentationElements: + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal type: object properties: presentationElement: @@ -766,6 +835,8 @@ definitions: $ref: '#/definitions/PrimaryField' SupportedDecorators: + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal type: object properties: decorator: @@ -780,6 +851,8 @@ definitions: $ref: '#/definitions/DropDown' SupportedConstraints: + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal type: object properties: constraint: @@ -798,12 +871,16 @@ definitions: $ref: '#/definitions/NumberFormat' Presentation: + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal type: object properties: description: type: string id: type: string + vroId: + type: string inputParameters: type: array items: @@ -820,6 +897,8 @@ definitions: $ref: '#/definitions/StepInfo' StepInfo: + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal allOf: - $ref: '#/definitions/PresentationElement' - type: object @@ -833,6 +912,8 @@ definitions: PresentationMessageInfo: type: object + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal properties: code: type: string @@ -849,6 +930,8 @@ definitions: PresentationElement: type: object + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal discriminator: elementType properties: elementType: @@ -870,6 +953,8 @@ definitions: PresentationExecution: type: object + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal properties: description: type: string @@ -897,6 +982,8 @@ definitions: Errors: type: object + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal properties: allErrors: type: array @@ -930,6 +1017,8 @@ definitions: FieldError: type: object + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal properties: arguments: type: array @@ -954,6 +1043,8 @@ definitions: ObjectError: type: object + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal properties: arguments: type: array @@ -971,6 +1062,8 @@ definitions: type: string Group: + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal allOf: - $ref: '#/definitions/PresentationElement' - type: object @@ -981,6 +1074,8 @@ definitions: $ref: '#/definitions/PrimaryField' Field: + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal allOf: - $ref: '#/definitions/PresentationElement' - type: object @@ -1001,6 +1096,8 @@ definitions: type: string PrimaryField: + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal allOf: - $ref: '#/definitions/Field' - type: object @@ -1014,6 +1111,8 @@ definitions: Decorator: type: object + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal discriminator: decoratorType properties: decoratorType: @@ -1022,6 +1121,8 @@ definitions: - decoratorType Chooser: + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal allOf: - $ref: '#/definitions/Decorator' - type: object @@ -1032,10 +1133,14 @@ definitions: type: string RefreshOnChange: + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal allOf: - $ref: '#/definitions/Decorator' DropDown: + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal allOf: - $ref: '#/definitions/Decorator' - type: object @@ -1044,10 +1149,14 @@ definitions: $ref: '#/definitions/ArrayParam' MultiLine: + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal allOf: - $ref: '#/definitions/Decorator' Constraint: + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal type: object discriminator: constraintType properties: @@ -1057,18 +1166,26 @@ definitions: - constraintType Mandatory: + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal allOf: - $ref: '#/definitions/Constraint' RestrictDuplicates: + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal allOf: - $ref: '#/definitions/Constraint' CustomValidator: + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal allOf: - $ref: '#/definitions/Constraint' NumberRange: + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal allOf: - $ref: '#/definitions/Constraint' - type: object @@ -1079,6 +1196,8 @@ definitions: type: number NumberFormat: + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal allOf: - $ref: '#/definitions/Constraint' - type: object @@ -1087,9 +1206,11 @@ definitions: type: string Regexp: + x-vcloud-deprecated-in: "36.0" + x-vcloud-deprecated-alternative: vRO Forms Overlay API Marked As Internal allOf: - $ref: '#/definitions/Constraint' - type: object properties: expression: - type: string \ No newline at end of file + type: string diff --git a/schemas/openapi/src/main/resources/schemas/wcp/tkgcluster.yaml b/schemas/openapi/src/main/resources/schemas/wcp/tkgcluster.yaml new file mode 100644 index 00000000..079c7b84 --- /dev/null +++ b/schemas/openapi/src/main/resources/schemas/wcp/tkgcluster.yaml @@ -0,0 +1,240 @@ +# ****************************************************************************** +# * api-extension-template-vcloud-director +# * Copyright 2020-2021 VMware, Inc. All rights reserved. * +# * SPDX-License-Identifier: BSD-2-Clause +# ****************************************************************************** + +swagger: "2.0" +info: + description: | + This is an "alpha" API that provides vCD tenants a unified way to manage + all flavors of Kubernetes clusters that vCD supports. + title: Kubernetes API + +paths: + tkgClusters: + post: + x-vcloud-added-in: "ALPHA" + tags: + - k8sCluster + summary: | + Creates a new Kubernetes cluster. + This operation is asynchronous and returns a task that + you can monitor to track the progress of the request. + operationId: createK8sCluster + consumes: + - application/json + parameters: + - in: body + name: k8sCluster + description: | + Example Value for CSE Native cluster +
      +            {
      +              "metadata": {
      +                "name": "my-CSE-Native-cluster",
      +                "site": "",
      +                "orgName": "my-organization",
      +                "virtualDataCenterName": "my-org-vdc"
      +              },
      +              "apiVersion": "cse.vmware.com/v2.0",
      +              "kind": "native",
      +              "spec": {
      +                "expose": false,
      +                "settings": {
      +                  "sshKey": null,
      +                  "network": null,
      +                  "ovdcNetwork": "network-in-my-org-vdc",
      +                  "rollbackOnFailure": true
      +                },
      +                "topology": {
      +                  "workers": {
      +                    "count": 1
      +                  },
      +                  "controlPlane": {
      +                    "count": 1
      +                  }
      +                },
      +                "distribution": {
      +                  "templateName": "ubuntu-16.04_k8-1.18_weave-2.6.5",
      +                  "templateRevision": 2
      +                }
      +              }
      +            }
      +            
      + Example Value for TKGS cluster +
      +            {
      +              "kind": "TanzuKubernetesCluster",
      +              "metadata": {
      +                "name": "my-TKGS-cluster",
      +                "placementPolicy": "my-placement-policy",
      +                "virtualDataCenterName": "my-org-vdc"
      +              },
      +              "spec": {
      +                "distribution": {
      +                  "version": "v1.20.2"
      +                },
      +                "topology": {
      +                  "controlPlane": {
      +                    "class": "best-effort-xsmall",
      +                    "count": 1,
      +                    "storageClass": "my-storage-class"
      +                  },
      +                  "workers": {
      +                    "class": "best-effort-xsmall",
      +                    "count": 1,
      +                    "storageClass": "my-storage-class"
      +                  }
      +                }
      +              }
      +            }
      +            
      + required: true + schema: + $ref: '#/definitions/Cluster' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + get: + x-vcloud-added-in: "ALPHA" + x-vcloud-multisite: true + tags: + - k8sCluster + summary: Retrieves all K8s clusters + description: | + Retrieves all K8s clusters + operationId: queryK8sClusters + parameters: + - $ref: "./common/query.yaml#/parameters/queryFilter" + - $ref: "./common/query.yaml#/parameters/querySortAsc" + - $ref: "./common/query.yaml#/parameters/querySortDesc" + - $ref: "./common/query.yaml#/parameters/queryPage" + - $ref: "./common/query.yaml#/parameters/queryPageSize" + produces: + - application/json + responses: + 200: + schema: + $ref: '#/definitions/Clusters' + + kubeconfig: + parameters: + - name: urn + in: path + required: true + type: string + description: | + A URN corresponding to a Kubernetes cluster previously created by + a POST to OpenAPI tkgClusters endpoint. + example: urn:vcloud:entity:vmware.tkgcluster:1.0.0:d3b61159-f4c2-47dc-9ada-090ec1d45703 + post: + x-vcloud-added-in: "ALPHA" + tags: + - k8sCluster + summary: Generate kubeconfig file for corresponding cluster + operationId: generateKubeconfig + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + + tkgCluster: + parameters: + - name: urn + in: path + required: true + type: string + description: | + A URN corresponding to a Kubernetes cluster previously created by + a POST to OpenAPI tkgClusters endpoint. + example: urn:vcloud:entity:vmware.tkgcluster:1.0.0:d3b61159-f4c2-47dc-9ada-090ec1d45703 + get: + x-vcloud-added-in: "ALPHA" + tags: + - k8sCluster + summary: Get specified Kubernetes Cluster + operationId: getK8sCluster + produces: + - application/json + responses: + 200: + schema: + $ref: '#/definitions/Cluster' + 404: + description: Not Found + put: + x-vcloud-added-in: "ALPHA" + tags: + - k8sCluster + summary: | + Update the desired state of the Kubernetes cluster. + This operation is asynchronous and returns a task that + you can monitor to track the progress of the request. + operationId: updateK8sCluster + consumes: + - application/json + parameters: + - name: k8sCluster + in: body + required: true + schema: + $ref: '#/definitions/Cluster' + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + 400: + $ref: "./common/response.yaml#/components/responses/BadRequest" + 404: + $ref: "./common/response.yaml#/components/responses/NotFound" + delete: + tags: + - k8sCluster + x-vcloud-added-in: "ALPHA" + description: | + Deletes the Kubernetes cluster with the unique identifier (URN). + This operation is asynchronous and returns a task that + you can monitor to track the progress of the request. + operationId: deleteK8sCluster + responses: + 202: + $ref: "./common/response.yaml#/components/responses/Accepted" + +definitions: + Clusters: + x-vcloud-added-in: "ALPHA" + description: | + A list of Kubernetes clusters. + allOf: + - $ref: '#/definitions/Page' + - type: object + properties: + values: + type: array + description: The current page of Kubernetes clusters. + items: + $ref: '#/definitions/Cluster' + + Cluster: + x-vcloud-added-in: "ALPHA" + description: | + A Kubernetes cluster. + type: object + properties: + kind: + type: string + apiVersion: + type: string + metadata: + type: object + additionalProperties: + type: object + spec: + type: object + additionalProperties: + type: object + status: + type: object + additionalProperties: + type: object diff --git a/schemas/openapi/src/test/java/com/vmware/vcloud/rest/openapi/schemas/OpenApiVendorExtensionsValidator.java b/schemas/openapi/src/test/java/com/vmware/vcloud/rest/openapi/schemas/OpenApiVendorExtensionsValidator.java new file mode 100644 index 00000000..0c9cbf70 --- /dev/null +++ b/schemas/openapi/src/test/java/com/vmware/vcloud/rest/openapi/schemas/OpenApiVendorExtensionsValidator.java @@ -0,0 +1,187 @@ +/* ***************************************************************************** + * api-extension-template-vcloud-director + * Copyright 2019-2021 VMware, Inc. All rights reserved. * + * SPDX-License-Identifier: BSD-2-Clause + * *****************************************************************************/ + +package com.vmware.vcloud.rest.openapi.schemas; + +/*- + * #%L + * vcd-openapi-schemas :: vCloud Director OpenAPI Definitions + * %% + * Copyright (C) 2018 - 2021 VMware + * %% + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * #L% + */ + +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.StringWriter; +import java.net.URISyntaxException; +import java.net.URL; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Arrays; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; + +import com.fasterxml.jackson.databind.JsonNode; + +import org.testng.Assert; +import org.testng.annotations.Test; + +import io.swagger.util.Yaml; + + +/** + * Insert your comment for OpenApiVendorExtensionsValidator here + * + */ +public class OpenApiVendorExtensionsValidator { + private static final StringWriter MESSAGES = new StringWriter(); + private static final BufferedWriter OUT = new BufferedWriter(MESSAGES); + + private static final Path SCHEMAS = Path.of("schemas"); + + private static final class SwaggerObject { + final String filename; + final JsonNode node; + + SwaggerObject(String filename, JsonNode swaggerObject) { + this.filename = filename; + this.node = swaggerObject; + } + } + + private final Queue targets = new LinkedList<>(); + + private final List validators = Arrays.asList( + new SwaggerObjectIntrospector(), + new VersioningExtensionsValidator() + ); + + public OpenApiVendorExtensionsValidator() throws IOException, URISyntaxException { + System.out.println("Initializing constructor"); + ClassLoader loader = Thread.currentThread().getContextClassLoader(); + URL url = loader.getResource(SCHEMAS.toString()); + + System.out.println(url.toURI().toASCIIString()); + Files.find(Paths.get(url.toURI()), Integer.MAX_VALUE, (path, dontcare) -> path.toString().endsWith("yaml")).forEach(this::loadSchemaFile); + } + + @Test(groups = "Minimum") + public void verifyExtensions() { + SwaggerObject target; + while ((target = targets.poll()) != null) { + for (ValidationVisitor validator : validators) { + validator.validate(target); + } + } + + try { + OUT.flush(); + OUT.close(); + } catch (IOException e) { + // highly unlikely to get an IOException writing a StringWriter + } + String errorMessages = MESSAGES.toString(); + if (errorMessages == null || errorMessages.isBlank()) { + return; + } + + Assert.fail(errorMessages); + } + + private void loadSchemaFile(Path path) { + System.out.println("reading: " + path); + + JsonNode schema; + try { + InputStream inputStream = new FileInputStream(new File(path.toUri())); + schema = Yaml.mapper().readTree(inputStream); + } catch (Exception e) { + throw new RuntimeException("Error parsing schema file " + path.toAbsolutePath().toString(), e); + } + + targets.add(new SwaggerObject(path.toString(), schema)); + } + + interface ValidationVisitor { + boolean validate(SwaggerObject swaggerObject); + } + + class SwaggerObjectIntrospector implements ValidationVisitor { + @Override + public boolean validate(SwaggerObject swaggerObject) { + final JsonNode jsonNode = swaggerObject.node; + for (JsonNode child : jsonNode) { + if (child.isContainerNode()) { + targets.add(new SwaggerObject(swaggerObject.filename, child)); + } + } + return true; + } + } + + class VersioningExtensionsValidator implements ValidationVisitor { + + @Override + public boolean validate(SwaggerObject swaggerObject) { + JsonNode theNode = swaggerObject.node; + if (!theNode.isContainerNode()) { + return true; + } + + evaluateVersionExtension(swaggerObject, theNode, "x-vcloud-added-in"); + evaluateVersionExtension(swaggerObject, theNode, "x-vcloud-deprecated-in"); + evaluateVersionExtension(swaggerObject, theNode, "x-vcloud-removed-in"); + + return true; + } + + private void evaluateVersionExtension(SwaggerObject swaggerObject, JsonNode theNode, String versionExtensionName) { + if (!theNode.has(versionExtensionName)) { + return; + } + + final JsonNode xVloudAddedInNode = theNode.get(versionExtensionName); + if (xVloudAddedInNode.isTextual()) { + return; + } + + try { + OUT.write(String.format("[%s] detected %s: %s to be of type %s. Th version must be enclosed in double-quotes to be properly parsed as a String", + swaggerObject.filename, versionExtensionName, xVloudAddedInNode.asText(), xVloudAddedInNode.getNodeType())); + OUT.newLine(); + } catch (IOException e) { + // again ... highly unlikely to get an IOException writing a StringWriter + } + } + } +} diff --git a/schemas/openapi/src/test/resources/testng.xml b/schemas/openapi/src/test/resources/testng.xml new file mode 100644 index 00000000..637cbeec --- /dev/null +++ b/schemas/openapi/src/test/resources/testng.xml @@ -0,0 +1,36 @@ + + + + + + + + + diff --git a/schemas/rest-api/pom.xml b/schemas/rest-api/pom.xml index 14c907a9..dba1fab7 100644 --- a/schemas/rest-api/pom.xml +++ b/schemas/rest-api/pom.xml @@ -5,7 +5,7 @@ com.vmware.vcloud vcd-api-schemas-parent - 9.1.1 + 10.3.0 ../../pom.xml jar diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/admin/admin.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/admin/admin.xsd index aae16457..c133655f 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/admin/admin.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/admin/admin.xsd @@ -1,9 +1,9 @@ - + + + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/admin/amqp.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/admin/amqp.xsd index 05aac1c0..b7d90159 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/admin/amqp.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/admin/amqp.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,6 +28,7 @@ #L% --> + always - Accept all SSL certificates. Must be true if AmqpUseSSL is true. + This version of VMware Cloud Director will always verify the certificates of the AMQP server if SSL is enabled. - true + false + 36.0 + 36.0 diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/admin/blockingExtensions.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/admin/blockingExtensions.xsd index 6309f067..51e3b7fd 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/admin/blockingExtensions.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/admin/blockingExtensions.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,6 +28,7 @@ #L% --> + + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/admin/event.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/admin/event.xsd index 83714838..3cffcf40 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/admin/event.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/admin/event.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,6 +28,7 @@ #L% --> + + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/admin/providerVdc.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/admin/providerVdc.xsd index 1f3576ed..11da88e9 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/admin/providerVdc.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/admin/providerVdc.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,6 +28,7 @@ #L% --> + - + + @@ -202,7 +204,10 @@ resources you allocate are committed as a pool to the organization vDC. vApps in vDCs that support this allocation model can specify - values for resource and limit.) + values for resource and limit.)<br> + <b>FLEX</b> (A generic type + of VDC where all the settings are in full + control of the creator.) true @@ -413,6 +418,57 @@ false + + + + GENERIC_VDC_TYPE + none + + Default vDC compute policy in this vDC. It is mandatory + for FLEX type of VDCs. + + false + + + + + + GENERIC_VDC_TYPE + none + + Maximum compute policy in this vDC. If not specified then the + default policy would also be considered as maximum policy. + + false + + + + + + GENERIC_VDC_TYPE + always + + Set to true to indicate if the FLEX vDC is to + be elastic. This is an optional field and is useful + only for FLEX vDC creation. + + false + + + + + + GENERIC_VDC_TYPE + always + + Set to true to indicate if the FLEX vDC is to + include memory overhead into its accounting for admission control. + This is an optional field and is useful + only for FLEX vDC creation. + + false + + @@ -581,6 +637,33 @@ false + + + + GENERIC_VDC_TYPE + always + + Set to true to indicate if the FLEX vDC is to + be elastic. This is an optional field and is useful + only for FLEX vDC creation. + + false + + + + + + GENERIC_VDC_TYPE + always + + Set to true to indicate if the FLEX vDC is to + include memory overhead into its accounting for admission control. + This is an optional field and is useful + only for FLEX vDC creation. + + false + + @@ -778,6 +861,9 @@ + + application/vnd.vmware.admin.networkPool + 0.9 Represents a network pool. @@ -976,6 +1062,16 @@ false + + + + always + + True if this Org VDC storage profile should inheirt the default settings of the parent PVDC storage profile. + + false + + @@ -1068,4 +1164,74 @@ + + + + + + application/vnd.vmware.admin.pvdcComputePolicyType + + TENANT_VM_GROUP + + Represents provider vdc compute configuration policy. + + + + + + + + always + + Description of the provider vdc compute policy. + + true + + + + + + TENANT_VM_GROUP + + References to named VM group. + + true + + + + + + + + + + + + + application/vnd.vmware.admin.pvdcComputePoliciesType + + TENANT_VM_GROUP + + List of pvdc compute policies in given pvdc. + + + + + + + + always + TENANT_VM_GROUP + + List of pvdc compute policies in given pvdc. + + true + + + + + + + + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/admin/selectorExtensibility.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/admin/selectorExtensibility.xsd index c380a934..0b8d3b67 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/admin/selectorExtensibility.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/admin/selectorExtensibility.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,6 +28,8 @@ #L% --> + + - application/vnd.vmware.admin.extensibility.selector + application/vnd.vmware.admin.extensibility.phases OBJECT_EXTENSIBILITY @@ -259,3 +261,4 @@ + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/admin/upload.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/admin/upload.xsd index cc8553e0..d4b21e36 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/admin/upload.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/admin/upload.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,6 +28,7 @@ #L% --> + - + application/vnd.vmware.admin.sspiKeytabUpdateParams 5.1 + 34.0 + 36.0 - Parameters for SSPI keytab update. + Parameters for SSPI keytab update. <br> + <b> Kerberos support has been removed.</b> @@ -144,6 +148,7 @@ + 34.0 create Service provider name for SSPI. @@ -159,12 +164,15 @@ - + application/vnd.vmware.admin.sspiKeytabUploadSocketType 5.1 + 34.0 + 36.0 - Upload socket for SSPI keytab. + Upload socket for SSPI keytab. <br> + <b> Kerberos support has been removed.</b> @@ -180,7 +188,7 @@ application/vnd.vmware.admin.trustStoreUpdateParams 5.1 - + 34.0 Parameters for updating the truststore. @@ -218,3 +226,4 @@ + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/admin/user.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/admin/user.xsd index b7b8fb01..a21cfa42 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/admin/user.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/admin/user.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,6 +28,7 @@ #L% --> + false - - - always - - This field is unused and is deprecated. - (True if alerts are enabled for the user.) - - false - 6.0 - - - - - always - - This field is unused and is deprecated. - (String to prepend to alert message Subject line.) - - false - 6.0 - - - - - always - - This field is unused and is deprecated. - (True if this user should get alert email.) - - false - 6.0 - - always @@ -177,7 +145,7 @@ 5.1 always - Identity provider type for this this user. One of:<br> + Identity provider type for this user. One of:<br> <b>INTEGRATED</b> (The user is created locally or imported from LDAP.)<br> <b>SAML</b> (The user is imported @@ -190,17 +158,6 @@ false - - - always - - This field is unused and is deprecated. - (True if this user is cached by default.) - - false - 6.0 - - always @@ -218,6 +175,7 @@ Quota of vApps that this user can store. A value of 0 specifies an unlimited quota. + 35.0 false @@ -229,6 +187,7 @@ Quota of vApps that this user can deploy concurrently. A value of 0 specifies an unlimited quota. + 35.0 false @@ -314,12 +273,13 @@ 5.1 always - Identity provider type for this this group. - One of:<br> + Identity provider type for this group. One of:<br> <b>INTEGRATED</b> (The group is imported from LDAP.)<br> <b>SAML</b> (The group is imported from a SAML identity provider.)<br> + <b>OAUTH</b> (The group is imported + from an OAUTH identity provider.)<br> If missing or empty the default value is <b>INTEGRATED</b>. @@ -395,6 +355,7 @@ application/vnd.vmware.admin.right 0.9 + 33.0 Represents a right. @@ -403,6 +364,16 @@ + + + + none + + Assigns a RightType to the right + + true + + none @@ -442,6 +413,7 @@ 0.9 + 33.0 Container for references to rights. @@ -470,6 +442,7 @@ application/vnd.vmware.admin.role 0.9 + 33.0 A named collection of rights. @@ -495,6 +468,7 @@ 0.9 + 33.0 Container for references to roles. @@ -517,3 +491,4 @@ + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/admin/vCloudEntities.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/admin/vCloudEntities.xsd index b9f80a00..97b6b4ac 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/admin/vCloudEntities.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/admin/vCloudEntities.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,6 +28,7 @@ #L% --> + 0.9 + 36.0 Represents the admin view of this cloud. @@ -155,6 +157,7 @@ + 33.0 none A container for references to Right objects in the system. @@ -164,6 +167,7 @@ + 33.0 none A container for references to Role objects in the system. @@ -192,6 +196,7 @@ application/vnd.vmware.admin.organization 0.9 + 36.0 Represents the admin view of an organization. @@ -301,8 +306,8 @@ - ORG_RIGHTS_ROLES - + ORG_RIGHTS_ROLES + 31.0 none @@ -315,8 +320,8 @@ - ORG_RIGHTS_ROLES - + ORG_RIGHTS_ROLES + 31.0 none @@ -535,7 +540,34 @@ true - + + + + 35.0 + always + + Set to true to indicate if the FLEX vDC is to + be elastic. This field can only be set on input for FLEX vDC templates and Allocation VApp vDC templates. + However, this field will be returned properly when read. + + false + + + + + + 35.0 + always + + Set to true to indicate if the FLEX vDC is to + include memory overhead into its accounting for admission control. + This field can only be set on input for FLEX vDC templates and Allocation VApp vDC templates. + However, this field will be returned properly when read. + + false + + + @@ -621,7 +653,17 @@ 5.7 none - CPU allocation in Mhz + vCPU speed in Mhz + + + + + + 35.2 + 35.2 + none + + CPU limit in Mhz @@ -634,6 +676,16 @@ + + + 35.2 + 35.2 + none + + Memory limit in Mb + + + @@ -676,6 +728,16 @@ + + + 35.2 + 35.2 + none + + CPU limit in Mhz + + + 5.7 @@ -719,13 +781,13 @@ - + - + - Specification for a VDC template using the AllocationVApp allocation model. + Specification for a VDC template using the Flex allocation model. @@ -738,6 +800,21 @@ + + + + + + + Specification for a VDC template using the AllocationVApp allocation model. + + + + + + + + @@ -1307,15 +1384,46 @@ - + none - The expiration time of this org's certificate. + The expiration time of this org's certificate. Deprecated in favor of SigningCertificateExpiration and EncryptionCertificateExpiration 5.6 + 36.0 + false + + + + + + + + + none + + + The expiration time of this org's signing certificate. + + 36.0 + false + + + + + + + + + none + + + The expiration time of this org's encryption certificate. + + 36.0 false @@ -1337,16 +1445,32 @@ - + always - The name of the SAML attribute that returns the identifiers of all the - groups of which the user is a member. + The name of the SAML attribute that returns the identifiers of all + roles of the user. 7.0 + 31.0 + false + + + + + + none + + + The names of SAML attributes used to populate user profiles. + + + + + 31.0 false @@ -1354,14 +1478,38 @@ minOccurs="0" maxOccurs="1"> - + 24.0 + 36.0 update Container for an organization's PEM-encoded private key and certificate chain. The private key and the public key from the leaf certificate are used - during SAML message processing. Not returned on GET + during SAML message processing. Not returned on GET. Removed in 36.0 in favor of + SigningCertLibraryItemId + + false + + + + + + 36.0 + update + + UUID of a CertificateLibraryItem containing a certificate chain and private key for SAML signing + + false + + + + + + 36.0 + update + + UUID of a CertificateLibraryItem containing a certificate chain and private key for SAML encryption false @@ -1370,6 +1518,136 @@ + + + 31.0 + + + + + + application/vnd.vmware.vcloud.admin.samlAttributeMappingType + + + 31.0 + + Contains the names of the SAML attributes that are used to populate the user profiles. + + + + + + + + + + + + always + + + The name of the SAML attribute that returns the email address of the user. + + 31.0 + false + + + + + + + + + always + + + The name of the SAML attribute that returns the user name. + + 31.0 + false + + + + + + + + + always + + + The name of the SAML attribute that returns the first name of the user. + + 31.0 + false + + + + + + + + + always + + + The name of the SAML attribute that returns the surname of the user. + + 31.0 + false + + + + + + + + + always + + + The name of the SAML attribute that returns the full name of the user. + + 31.0 + false + + + + + + + + + always + + + The name of the SAML attribute that returns the identifiers of all the + groups of which the user is a member. + + 31.0 + false + + + + + + + + + always + + + The name of the SAML attribute that returns the identifiers of all + roles of the user. + + 31.0 + false + + + + + + @@ -1436,6 +1714,19 @@ + + + none + + OAuth redirect URI for this org. This value is read only + + 36.0 + false + + + + + always @@ -1468,6 +1759,244 @@ false + + + always + + Client Id for vCD to use when talking to the Identity Provider. + + + + + 31.0 + false + + + + + always + + Client Secret for vCD to use when talking to the Identity Provider. + + + + + 31.0 + false + + + + + always + + Identity Provider's OpenId Connect user authorization endpoint. + + + + + 31.0 + false + + + + + always + + Identity Provider's OpenId Connect access token endpoint. + + + + + 31.0 + false + + + + + always + + Identity Provider's OpenId Connect user info endpoint. + + + + + 31.0 + false + + + + + always + + Identity Provider's SCIM user information endpoint. + + + + + 31.0 + false + + + + + always + + Scope that vCD needs access to for authenticating the user. + + + + + 31.0 + false + + + + + + none + + + Custom claim keys for the /userinfo endpoint + + + + + 31.0 + false + + + + + always + + Allowed difference between token expiration and vCD system time in seconds. + + + + + 31.0 + false + + + + + + + + + + 31.0 + + + + + + + application/vnd.vmware.vcloud.admin.oidcAttributeMappingType + + + 31.0 + + Contains custom claim keys for the /userinfo endpoint + + + + + + + + always + + The name of the OIDC attribute used to get the username from the IDP's userInfo + + + + + 31.0 + false + + + + + always + + The name of the OIDC attribute used to get the email from the IDP's userInfo + + + + + 31.0 + false + + + + + always + + The name of the OIDC attribute used to get the full name from the IDP's userInfo. + The full name attribute overrides the use of the firstName and lastName attributes. + + + + + 31.0 + false + + + + + always + + The name of the OIDC attribute used to get the first name from the IDP's userInfo. + This is only used if the Full Name key is not specified. + + + + + 31.0 + false + + + + + always + + The name of the OIDC attribute used to get the last name from the IDP's userInfo. + This is only used if the Full Name key is not specified. + + + + + 31.0 + false + + + + + always + + The name of the OIDC attribute used to get the user's groups from the IDP's userInfo. + + + + + 31.0 + false + + + + + always + + The name of the OIDC attribute used to get the user's roles from the IDP's userInfo. + + + + + 31.0 + false + + @@ -1568,6 +2097,87 @@ + + + 36.0 + + + + + + application/vnd.vmware.vcloud.admin.openIdProviderInfo + + + 36.0 + + Information about the openId connect provider for creating initial org oauth settings + + + + + + + + always + + URL for the OAuth IDP well known openId connect configuration endpoint + + true + + + + + + + + + + 36.0 + + + + + + application/vnd.vmware.vcloud.admin.openIdProviderConfiguration + + + 36.0 + + Result from reading the IDP's openId provider config endpoint + + + + + + + + + none + + + OrgOauthSettings object configured using information from the IDP + + + + + 36.0 + false + + + + + always + + Raw response from the IDP's provider config endpoint + + false + + + + + + + 1.5 @@ -1674,10 +2284,32 @@ + + + always True if the LDAP service accepts all SSL certificates. + This has been removed in API version 36.0. In API versions + less than 36.0 this field will always return false. + + 36.0 + false + + + + + + 34.0 + + Optional Custom Truststore for the LDAP HostName. Until it is removed + the certificate can still be set here, however this field will + always be null on return. This field is under + accelerated deprecation and will be removed more quickly than the + normal deprecation cycle. In order to manage LDAP certificates, please + instead use the Centralized SSL management API. + always false @@ -1730,13 +2362,12 @@ <b>SIMPLE</b> (Simple authentication as specified in RFC 2251 and RFC 2829.)<br> - <b>KERBEROS</b> (Kerberos - authentication)<br> <b>MD5DIGEST</b> (Digest MD5 authentication as specified in RFC 2831.) <br> <b>NTLM</b> (Windows NTLM - authentication.) + authentication.)<br> + Kerberos support has been removed.</b> true @@ -1792,10 +2423,13 @@ - + + 34.0 + 36.0 always - Set to true to use an external Kerberos service. + Set to true to use an external Kerberos service. <em> Kerberos + support has been removed.</em> false @@ -2257,6 +2891,19 @@ false + + + + always + + Result of probing remote URL + + false + 31.0 + 35.0 + 35.0 + + @@ -2378,7 +3025,9 @@ always - Password required by the endpoint. + Password required when connecting to the endpoint. + Passing in six asterisks '******' indicates to keep current password. + Passing in null or empty string indicates to remove password. false @@ -2398,11 +3047,19 @@ always - If true, synchronization creates a local copy - of all items. Defaults to false, which - defers creation of the local copy until the - item is required by an operation such as - instantiation. + If true, subcription to a catalog creates a local copy + of all items. Defaults to false, which does not create + a local copy of catalogItems unless sync operation is performed. + + false + + + + + + always + + When library exists locally, include library id false @@ -2412,6 +3069,92 @@ + + + + + 31.0 + 35.0 + 35.0 + + The enumerated status of the remote URI probe result + + + + + + + + + + + + + + + + + + + application/vnd.vmware.admin.remoteProbeResult + + 31.0 + 35.0 + 35.0 + + Test the library subscription settings to make sure the remote endpoint exists, the password + matches (if set), and the SSL certificate is trusted (if necessary). + + + + + + + + + + always + + Result status of the remote uri probe + + true + + + + + + always + + Error message returned from remote URL + + false + + + + + + always + + Thumbprint of SSL certificate + + false + + + + + + always + + SSL Certificate, if required. XSD formats byte[] as base64binary + + false + + + + + + + @@ -2457,8 +3200,9 @@ always - Password required when connecting to the - endpoint. + Password required when connecting to the endpoint. + Passing in six asterisks '******' indicates to keep current password. + Passing in null or empty string indicates to remove password. false @@ -2473,6 +3217,8 @@ in transfer storage. If false, items are not placed in transfer storage until they are requested by a subscriber. + Note that access to this attribute is reserved to users with role + that includes the right 'Catalog: VCSP Publish Subscribe Caching'. false @@ -2576,7 +3322,7 @@ - application/vnd.vmware.admin.operationLimitsSettings + application/vnd.vmware.admin.orgOperationLimitsSettings Represents operation limits settings for an organization. An @@ -2674,6 +3420,7 @@ application/vnd.vmware.admin.org.rights ORG_RIGHTS_ROLES + 31.0 Represents all the rights that have been granted to an organization. @@ -2700,7 +3447,7 @@ - application/vnd.vmware.admin.org.rights + application/vnd.vmware.admin.org.roles ORG_RIGHTS_ROLES @@ -2725,3 +3472,4 @@ + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/extension/notification.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/extension/notification.xsd index b7feb226..38e65bb9 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/extension/notification.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/extension/notification.xsd @@ -1,9 +1,9 @@ - + + + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/extension/objectExtensibility.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/extension/objectExtensibility.xsd index 811af0f2..82a07709 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/extension/objectExtensibility.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/extension/objectExtensibility.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,6 +28,8 @@ #L% --> + + + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/extension/services.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/extension/services.xsd index da433a56..5ae9c1d7 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/extension/services.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/extension/services.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,6 +28,7 @@ #L% --> + @@ -1201,3 +1202,4 @@ + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/extension/settings.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/extension/settings.xsd index 6dd5e7ad..2279b4f0 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/extension/settings.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/extension/settings.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,6 +28,7 @@ #L% --> + - + + 34.0 5.1 + 36.0 - Kerberos settings. + Kerberos settings. <br> + <b> Kerberos support has been removed.</b> false - + 5.1 vSphere lookup service settings. + This element is deprecated and no longer required or used. false + 34.0 + 36.0 @@ -181,6 +188,16 @@ false + + + + 32.0 + + CPoM Settings. + + false + + @@ -422,13 +439,24 @@ true - + + + + none + + Flag to determine if LDAP sync is enabled + + false + + + always - Number of minutes to timeout client session. + Timestamp of next time LDAP syncs. As of API version 35.2, + this field will not be present if SyncEnabled is false. - true + false @@ -447,9 +475,11 @@ URL for VCD Web Console HTTP connections from the public side of a firewall, load-balancer, or proxy.<br> - Leave empty to clear the address. + Leave empty to clear the address.
      + No longer in use and has no effect.
      false + 36.0
      @@ -458,9 +488,11 @@ URL for VCD Web Console HTTPS connections from the public side of a firewall, load-balancer, or proxy.<br> - Leave empty to clear the address. + Leave empty to clear the address.
      + No longer in use and has no effect.
      false + 36.0
      @@ -472,9 +504,11 @@ If you specify an address in SystemExternalAddress, you must place the certificate chain for that address here. The certificate chain must consist of zero or more - PEM-encoded X.509 certificates. + PEM-encoded X.509 certificates.
      + No longer in use and has no effect.
      false + 36.0
      @@ -529,8 +563,11 @@ always Boolean flag to apply a strict trust check to vCenter certificates. + Notes: + - This field is deprecated. Use centralized SSL management API instead. true + 36.0 @@ -538,8 +575,14 @@ always Password for the vCenter truststore, if used. If empty or no password is passed then no update is performed. + vCenter truststore type (JKS, JCEKS, PKCS12). + Notes: + - This field is deprecated. Use /cloudapi/1.0.0/trustedCertificates instead. + - This field is input-only. Specified type assists in storing VcTruststoreContents properly, but the password is never returned. + - This field is inapplicable if VCD is operating in FIPS mode. If supplied, it will be ignored. false + 35.2 @@ -547,8 +590,13 @@ always vCenter truststore bytes (if used). + Notes: + - This field is deprecated. Use /cloudapi/1.0.0/trustedCertificates instead. + - This field is input-only. Supplied contents will be properly stored in system org's trusted certificates, but is never returned. + - This field is inapplicable if VCD is operating in FIPS mode. If supplied, it will be rejected and cause a bad request exception to be thrown. false + 35.2 @@ -556,8 +604,13 @@ always vCenter truststore type (JKS, JCEKS, PKCS12). + Notes: + - This field is deprecated. Use /cloudapi/1.0.0/trustedCertificates instead. + - This field is input-only. Specified type assists in storing VcTruststoreContents properly, but the type is never returned. + - This field is inapplicable if VCD is operating in FIPS mode. true + 35.2 @@ -571,11 +624,14 @@ + always - Boolean flag to apply a strict trust check to vShield Manager certificates. + This version of VMware Cloud Director will always verify the certificates + of NSX-V and NSX-T. false + 36.0 @@ -650,7 +706,6 @@ false - @@ -778,12 +833,14 @@ - + + 36.0 always - Accept all SSL certificates. Must be set to true in case of SSL enabled. + This version of VMware Cloud Director will always verify the certificates of the AMQP server if SSL is enabled. - true + false + 35.2 @@ -1032,13 +1089,36 @@ true - + + + + always True if the LDAP service accepts all SSL certificates. + This has been removed in API version 36.0. In API versions + less than 36.0 this field will always return false. true + 35.2 + 36.0 + + + + + + 34.0 + + Optional Custom Truststore for the LDAP HostName. Until it is removed + the certificate can still be set here, however this field will + always be null on return. This field is under + accelerated deprecation and will be removed more quickly than the + normal deprecation cycle. In order to manage LDAP certificates, please + instead use the Centralized SSL management API. + + always + false @@ -1172,12 +1252,15 @@ true - + - + 5.1 + 34.0 + 36.0 - Set to true to use an external Kerberos service. + Set to true to use an external Kerberos service. <em> Kerberos support + has been removed.</em> false @@ -1820,12 +1903,14 @@ + True if the SMTP server requires an SSL connection. false 11.0 + API_VERSION_POST9_1_UPDATE @@ -1877,13 +1962,16 @@ - + application/vnd.vmware.admin.kerberosSettings 5.1 + 34.0 + 36.0 - Global Kerberos settings. + Global Kerberos settings. <br> + <b> Kerberos support has been removed.</b> @@ -1911,10 +1999,13 @@ - + 5.1 + 34.0 + 36.0 - Kerberos realm information. + Kerberos realm information. <br> + <b> Kerberos support has been removed.</b> @@ -1959,12 +2050,14 @@ application/vnd.vmware.admin.lookupServiceSettings - + 5.1 + 34.0 + 36.0 Information that allows vCloud Director to connect to a - vSphere lookup service. + vSphere lookup service. This element is deprecated and no longer required or used. @@ -1989,9 +2082,11 @@ application/vnd.vmware.admin.lookupServiceParams - + 5.1 + 34.0 + 36.0 Parameters for a register or unregister Lookup Service request. If LookupServiceUrl is present and not empty, the request @@ -2005,9 +2100,10 @@ - + always 5.6 + API_VERSION_POST9_1_UPDATE The vCloud Director public login URL. This element is deprecated and should be left empty @@ -2145,6 +2241,16 @@ false + + + + none + + Date and Time at which the next synchronization will start. + + false + + always @@ -2245,4 +2351,76 @@ + + + + + + + application/vnd.vmware.admin.cpomSettings + + 32.0 + + Specifies default CPoM settings for all organizations in the system. + + + + + + + + + always + + Maximum number of active SDDC proxies allowed for the system. A value of -1 means there is no maximum. A value of 0 means the system cannot enable any SDDC proxies. + + false + + + + + + always + + Maximum number of active SDDC proxies per user allowed for the system. A value of -1 means there is no maximum. A value of 0 means the system cannot enable any SDDC proxies. + + false + + + + + + always + + Timeout value for connecting to an SDDC proxied host (in seconds). Any value less than 1 is invalid. + + false + + + + + + 33.0 + always + + True to allow VCs to be both provider scoped (used to back a PVDC), and tenant scoped (encapsulated within an SDDC). + + false + + + + + + always + + True to allow proxying over insecure HTTP in addition to HTTPS. It is recommended that insecure proxying be left disabled. + + false + + + + + +
      + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/extension/taskExtensionRequest.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/extension/taskExtensionRequest.xsd index ae7fec1a..91f742e1 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/extension/taskExtensionRequest.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/extension/taskExtensionRequest.xsd @@ -1,9 +1,9 @@ - + + + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/extension/vmwextensions.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/extension/vmwextensions.xsd index 369306f5..90df36bb 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/extension/vmwextensions.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/extension/vmwextensions.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,6 +28,7 @@ #L% --> + - + @@ -129,24 +130,28 @@ Parameters for preparing an ESX/ESXi host. + 31.0 + + This element is deprecated and no longer required or used. + - + always The user name to use for host preparation login. - true + false - + always The cleartext password to use for host preparation login. - true + false @@ -217,19 +222,49 @@ true - + always vShield manager administrator credentials. Required for register, modify. - true + false + + + + + + application/vnd.vmware.admin.networkManagers + + NSX_T_SUPPORT + + Represents parameters to register an NSX-T Manager. + + + + + + + + always + + NSX-T manager administrator credentials. Required for + register, modify. + + true + + + + + + @@ -254,6 +289,39 @@ true + + + + none + + vCenter root folder in which the vCloud Director system folder will + be created. This parameter only takes the folder name and not + directory structure. + + false + + + + + + none + + Network in Vcenter to be used as 'NONE' network by vCD. + + false + + + + + + none + + Public label of this vCenter server visible to all tenants. + If this is changed, the compute provider scope of all child Provider VDCs will be reset to the new value. + + false + + 1.0 @@ -285,6 +353,16 @@ false + + + + always + + Version of the NSX-V Manager + + false + + 1.5 @@ -335,6 +413,213 @@ false + + + + + + + none + + + True if the VIM server is scoped to tenants. Setting this to true + when registering a vCenter will result in the vCenter being scoped + as a dedicated vCenter (SDDC). After the vCenter is registered, this + is a read-only field and ignored on update. + + + false + + + + + + + + + + none + + + True if the VIM server is scoped to provider. This is a read-only + field, and ignored on update/edit. + + + false + + + + + + + none + + The vcenter listener state. One of { INITIAL, INVALID_SETTINGS, UNSUPPORTED, + DISCONNECTED, CONNECTING, CONNECTED_SYNCING, CONNECTED, STOP_REQ, + STOP_AND_PURGE_REQ, STOP_ACK }. + + false + + + + + + none + + The overall health status of clusters in this vCenter. One of {GRAY, RED, YELLOW, GREEN}. + + false + + + + + + always + + When present, indicates that a proxy exists within vCloud Director that proxies this vCenter server + for access by authorized end-users. Setting this field to true when registering a vCenter server + will result in a proxy being created for the vCenter server, and another + for the corresponding SSO endpoint (if different from the vCenter server's endpoint). + This field is immutable after the vCenter Server is registered, and will be updated by the system + when/if the proxy is removed. + + false + + + + + + 33.0 + none + + The number of clusters in this vCenter. + + false + + + + + + 33.0 + none + + The number of VMs in this vCenter. + + false + + + + + + 33.0 + none + + The number of powered-on VMs in this vCenter. + + false + + + + + + 33.0 + none + + The total memory (in MB) in this vCenter. + + false + + + + + + 33.0 + none + + The reserved memory (in MB) in this vCenter. + + false + + + + + + 33.0 + none + + The demanded memory (in MB) in this vCenter. + + false + + + + + + 33.0 + none + + The total CPU (in MHz) in this vCenter. + + false + + + + + + 33.0 + none + + The reserved CPU (in MHz) in this vCenter. + + false + + + + + + 33.0 + none + + The demanded CPU (in MHz) in this vCenter. + + false + + + + + + 33.0 + none + + The size (in MB) of all datastores in this vCenter. + + false + + + + + + 33.0 + none + + The size of free storage (in MB) of all datastores in this vCenter. + + false + + + + + + 33.0 + none + + The size of uncommitted storage (in MB) of all datastores in this vCenter. + + false + + @@ -369,6 +654,89 @@ + + + + + + application/vnd.vmware.admin.nsxTmanager + + NSX_T_SUPPORT + + Represents credentials to a NSX-T Manager. + + + + + + + + + none + SERVICE_APPS + + How the NSX-T Manager is deployed. + + false + + + + + + none + SERVICE_APPS + + Reference to linked VCenter for VMC. + + false + + + + + + none + SERVICE_APPS + + Reference to Service Application that owns this NSX-T Manager. + + false + + + + + + none + + Public label of this NSX-T server visible to all tenants. + + false + + + + + + none + + Version of the NsxT Manager. + + false + + + + + + none + + Reference to Proxy Configuration to use for contacting this NSX-T Manager. + + false + + + + + + + @@ -383,6 +751,16 @@ + + + + none + + Public label of this NSX server visible to all tenants. + + false + + always @@ -393,12 +771,12 @@ false - + - + always - Name of the resource pool to use for creating DLR virtual appliance. + Path to the resource pool to use for creating Control VM for Cross-VDC Networking. false @@ -408,7 +786,7 @@ always - Name of the Datastore to use for creating DLR virtual appliance. + Name of the Datastore to use for creating Control VM for Cross-VDC Networking. false @@ -418,7 +796,17 @@ always - Name of the management interface to use for creating DLR virtual appliance. + Name of the management interface to use for creating Control VM for Cross-VDC Networking. + + false + + + + + + always + + Version of the NSX-V Manager false @@ -498,7 +886,7 @@ - application/vnd.vmware.admin.vmObjectRef + application/vnd.vmware.admin.vmDiskObjectRef 5.6 @@ -930,13 +1318,15 @@ true - + always - Target vDC for imported vApp template. + Target vDC for imported vApp template. This is optional. If not provided, + catalog's VDC will be picked randomly if catalog is not specifically using + a VDC for storage. - true + false @@ -954,7 +1344,8 @@ always Catalog in which the imported vApp template - will be listed. + will be listed. This is optional, but either VDC or catalog + must be provided. false @@ -1079,13 +1470,14 @@ - + none Indicates whether the host is ready for use. - true + false + DEPRECATED_HOST_FEATURES @@ -1097,13 +1489,14 @@ true - + none Indicated whether the host is enabled for use. - true + false + DEPRECATED_HOST_FEATURES @@ -1115,14 +1508,15 @@ true - + none Indicates whether the host is enabled for host spanning. - true + false + DEPRECATED_HOST_FEATURES @@ -1134,6 +1528,26 @@ false + + + + none + + How many physical CPU cores the host has. + + true + + + + + + none + + How many logical CPU cores the host has. + + true + + none @@ -1146,8 +1560,12 @@ none + 35.2 - How many logical CPUs the host has. + How many physical CPU cores the host has. + + Note that this field is deprecated. Use NumOfCpuCoresPhysical and + NumOfCpuCoresLogical instead. true @@ -1360,6 +1778,17 @@ false + + + + none + + An optional reference to a registered NSX-T Manager to back + networking operations for this provider vDC. + + false + + none @@ -1383,6 +1812,29 @@ false + + + + ADDED_UNIVERSAL_NETWORK_POOL_TO_EXT_PVDC + none + + Selectable universal network reference. + + false + + + + + + 35.0 + always + + The compute provider scope represents the compute fault domain for this provider vDC. This value + is a tenant-facing tag that is shown to tenants when viewing fault domains of the child Organization vDCs (for ex. a VDC Group). + + false + + @@ -1431,18 +1883,45 @@ true + + + + none + + An optional reference to a Registered NSX-T Manager to back + networking operations for this Provider vDC. + + false + + VXLAN_NETWORK_POOL always + 33.0 + 33.0 + Deprecated. Use "NetworkPool" property. Reference to a VXLAN Network Pool to be assigned to this Provider VDC. Leave empty to have the system create the VXLAN pool and assign it to the Provider VDC. false + + + + 33.0 + always + + Reference to a Geneve or VXLAN Network Pool to be assigned to this Provider VDC. + Leave empty to have the system create a default VXLAN pool and + assign it to the Provider VDC. + + false + + @@ -1514,6 +1993,17 @@ false + + + + 36.0 + always + + If true, network pool is automatically created if no network pool is specified. Defaults to true. + + false + + @@ -1803,11 +2293,12 @@ - application/vnd.vmware.admin.fencePool - 20.0 + application/vnd.vmware.admin.fencePool + 20.0 + 31.0 1.0 - + Represents a network pool backed by one or more vSphere isolated networks. @@ -1941,11 +2432,60 @@ + + + + + application/vnd.vmware.admin.genevePool + + NSXT_ROUTER_IMPORT + + Represents a network pool using Geneve technology. + + + + + + + + + NSXT_ROUTER_IMPORT + create + Transport Zone Path of Geneve Network Pool. + + + + + + NSXT_ROUTER_IMPORT + create + + The NSX-T Manager that contains the transport zone. + + false + + + + + + NSXT_ROUTER_IMPORT + none + + This is a read-only indication of how many networks in this pool are in use. + + false + + + + + + + - application/vnd.vmware.admin.vxlanPool + application/vnd.vmware.admin.vdscontext 5.1 @@ -2596,6 +3136,18 @@ false + + + + + + 34.0 + + Capabilities supported by this storage profile. + + false + + @@ -2688,12 +3240,14 @@ + + application/vnd.vmware.admin.vmwProviderVdcResourcePool - 1.5 + 31.0 Represents backing resource pool for provider vDC. @@ -2725,6 +3279,46 @@ true + + + + none + + The resource pool's CPU usage in MHz. + + true + + + + + + none + + The total CPU capacity in MHz for the given resource pool. + + true + + + + + + none + + The resource pool's memory usage in MB. + + true + + + + + + none + + The total memory capacity in MB for the given resource pool. + + true + + @@ -2948,7 +3542,7 @@ - application/vnd.vmware.admin.strandedItemVimObjects + application/vnd.vmware.admin.strandedItemVimObject 5.1 @@ -3515,6 +4109,7 @@ + @@ -3538,6 +4133,24 @@ + + + + + + + Specification for a VDC template using the Flex allocation model. + + + + + + + + + + + @@ -3613,6 +4226,17 @@ true + + + + + + + Network backing type (example: NSX_V) supported by this VDC template. + Set during creation of template and cannot be modified. + + + @@ -3642,6 +4266,32 @@ + + + + 35.0 + + Network backing type of Vdc Template. + + + + + + + + + + + + + + + + + + + + @@ -3680,6 +4330,7 @@ template is instantiated, the Name is replaced by the network reference in the Value part of the Binding associated with the Provider VDC that the system selects during instantiation. + Supported binding values are references to External networks and Edge clusters. @@ -3688,6 +4339,31 @@ + + + + 35.2 + + Network Profile configuration that is applied to VDC instantiated from a template. + In NSX_V VDCs Primary and Secondary Edge Clusters can be configured and used for + Edge Gateway deployments. + In NSX_T VDC only Services Edge Cluster can be configured and used for deploying + DHCP/VApp services + + Binding name from the binding names needs to specified as ReferenceType to + PrimaryEdgeCluster SecondaryEdgeCluster and ServicesEdgeCluster properties + + When VDC is instantiated, based on PVDC and binding name appropriate binding + value is selected to configure network profiles. + + + + + + + + + 5.7 @@ -4106,3 +4782,4 @@ + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/internal/internal.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/internal/internal.xsd index 1954c64c..eb4fe37c 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/internal/internal.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/internal/internal.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,11 +28,6 @@ #L% --> - - - - - - application/vnd.vmware.admin.systemConfigurationSettings - - - - - Represents enumeration of system configuration settings. - - 1.5 - - - - - - - - - System configuration settings. - - - - - - - - - - - - - - - Represents a single system configuration setting. - - - - - - - - - - The name of the setting. - - - - - - - - The configuration settings section in which this setting appears. - - - - - - - - The current value of the configuration setting. - - - - - - - - - - - - - - - A value to be applied to a system configuration setting. - - - - - - - - - - The value to set. - - - - - - - - diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/master/driver.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/master/driver.xsd index d349c906..4f4958db 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/master/driver.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/master/driver.xsd @@ -1,9 +1,9 @@ - + + @@ -37,3 +38,4 @@ + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/master/master.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/master/master.xsd index e4e1e3bc..967fc1dd 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/master/master.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/master/master.xsd @@ -1,9 +1,9 @@ - + + + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/catalog.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/catalog.xsd index 8b7832c7..39659e27 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/catalog.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/catalog.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,6 +28,7 @@ #L% --> + + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/catalogItem.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/catalogItem.xsd index 96d63b13..86e4f7ca 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/catalogItem.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/catalogItem.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,6 +28,7 @@ #L% --> + + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/common.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/common.xsd index 37b13f51..05022a40 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/common.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/common.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,6 +28,7 @@ #L% --> + false + + + + 33.0 + always + + An optional element that can be used to hold the reference + of a result. + + false + + @@ -274,6 +287,21 @@ true + + + none + + + + 33.0 + + Defines the model expected for modification calls. This + field is populated when the href is expected to link to + a vCloud OpenApi endpoint. + + false + + @@ -628,6 +656,22 @@ false + + + 35.0 + none + + Reservation Capacity used. This field is returned + only if the VDC AllocationModel is + Flex type. This number represents the + reservation resources used in the given VDC. + + + + + false + + @@ -1232,4 +1276,22 @@ + + + + + + application/vnd.vmware.vcloud.schema + + 33.0 + + Provides links to various API schema documents + + + + + + + + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/disk.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/disk.xsd index b570a69f..6fa1bcf9 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/disk.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/disk.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,6 +28,7 @@ #L% --> + - + - + + 33.0 none - Size of the disk in bytes.<br> - <br> - You must supply this attribute in an update request, - but you cannot change its value after the object has - been created. + Size of the disk in bytes. + + false + + + + + + none + + Size of the disk in MB. - true + false @@ -109,6 +117,16 @@ false + + + + none + + True if disk is encrypted. This is a read-only attribute. + + false + + @@ -146,6 +164,47 @@ false + + + + 36.0 + none + + This attribute is immutable; used for create only. + If set true, a shareable disk is created. + Shareable and controllerSharing are mutually exclusive. + This attribute is deprecated; use sharingType instead. + + false + + + + + + none + + This attribute is immutable; used for create only. + This is the sharing type expressed as a string. + This attribute can only have values defined by DiskSharingType. + One of:<br/> + <b>None</b>&nbsp;&nbsp;Non shared disk(default)<br/> + <b>DiskSharing</b>&nbsp;&nbsp;Disk level shared disk<br/> + <b>ControllerSharing</b>&nbsp;&nbsp;Controller level shared disk<br/> + <br/> + + false + + + + + + none + + The UUID of this named disk's device backing. This is a read-only value. + + false + + @@ -196,7 +255,7 @@ - + @@ -252,4 +311,64 @@ + + + + + + application/vnd.vmware.vcloud.diskMoveParams + + DISK_MIGRATION + + Parameters for moving a named disk to a different Org VDC. + + + + + + + + + + DISK_MIGRATION + always + + A reference to the destination Org VDC. + + true + + + + + + DISK_MIGRATION + always + + A reference to the storage policy that will be + used for the disk in the destination Org VDC. + If unset, the default storage policy of the + destination Org VDC will be used. + + false + + + + + + DISK_MIGRATION + always + + The IOPS that should be set on the disk. If + unset, the default disk IOPS value of the + storage policy will be used. + + false + + + + + + + + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/entity.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/entity.xsd index df8345bf..47380711 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/entity.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/entity.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,6 +28,7 @@ #L% --> + + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/file.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/file.xsd index 24461e2b..f9f30025 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/file.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/file.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,6 +28,7 @@ #L% --> + + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/hybrid.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/hybrid.xsd index 280a8f3e..6a0a69f4 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/hybrid.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/hybrid.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,6 +28,7 @@ #L% --> + + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/media.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/media.xsd index bb59cc9e..73406c98 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/media.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/media.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,6 +28,7 @@ #L% --> + + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/metrics.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/metrics.xsd index dc252fd9..26dd67e3 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/metrics.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/metrics.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,6 +28,7 @@ #L% --> + + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/mksTicket.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/mksTicket.xsd index a907b046..aff528d9 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/mksTicket.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/mksTicket.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,6 +28,7 @@ #L% --> + + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/multiSite.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/multiSite.xsd index cf0cc3c9..7d687d04 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/multiSite.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/multiSite.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,6 +28,7 @@ #L% --> + true - + + + + MULTI_SITE + JWT_LOGIN_SUPPORT + + The base URI of the UI end-point for the site. + + always + true + + + MULTI_SITE + JWT_LOGIN_SUPPORT The URI of the Tenant UI end-point for the site. @@ -107,7 +121,7 @@ - + MULTI_SITE @@ -115,7 +129,7 @@ The URL that represents the entire multisite setup. always - true + false @@ -212,6 +226,7 @@ MULTI_SITE + 35.0 PEM-encoded public key for the remote site. @@ -276,6 +291,15 @@ none + + + + + Site database collation configuration + + none + + @@ -519,6 +543,16 @@ false + + + + 33.0 + + Highest API version supported by this location. + + false + + @@ -708,3 +742,4 @@ + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/network.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/network.xsd index f3979c05..40edaddf 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/network.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/network.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,6 +28,7 @@ #L% --> + always Encryption protocol to be used. One of: - AES, AES256, TRIPLEDES + AES, AES256, TRIPLEDES, AESGCM true @@ -1928,7 +1929,7 @@ always - Load balancer virtual server Ip Address. + Load balancer virtual server IP Address. true @@ -2173,7 +2174,7 @@ always - Ip Address for load balancer member. + IP Address for load balancer member. true @@ -2711,7 +2712,7 @@ - + always True if Advanced Networking has been enabled. @@ -2749,6 +2750,28 @@ false + + + + always + + True if Network is marked as connected in NSX. Defaults to true. + + false + + + + + + always + + True if Network is a dual stack network, false if not. + A dual stack network has both an IPv4 and an IPv6 subnet. + Defaults to false. + + false + + @@ -3040,6 +3063,15 @@ false + + + always + + Network mask. + + false + + always @@ -3176,7 +3208,7 @@ Tenant syslog server settings. If logging is configured for firewall rules, the logs will be directed to these syslog servers along with the provider syslog servers. - Only one tenant syslog server ip can be configured. + Only one tenant syslog server IP can be configured. @@ -3184,7 +3216,7 @@ always - syslog server ip address. + Syslog server IP address. false @@ -3256,10 +3288,8 @@ always - A reference to a VIRTUAL_WIRE object that + A reference to the network backing object (logical switch, portgroup, etc.) that exists on a vCenter server registered with the system. - Required on Create when AdvancedNetworkingEnabled has a value of true. - Ignored on update, or when AdvancedNetworkingEnabled has a value of false. true @@ -3336,6 +3366,67 @@ + + + + + + + Represents an EdgeGatewayType + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Represents an IP type, either IPv4 or IPv6 + + + + + + + + + + + + + + + + + + + + @@ -3361,6 +3452,18 @@ false + + + + + + always + + Represents a gateway. + + false + + @@ -3543,6 +3646,20 @@ false + + + + always + + Represents the Edge Cluster Configuration for a given Edge Gateway. + Can be changed if a gateway needs to be placed on a specific set of Edge Clusters. + For NSX-V Edges, if nothing is specified on create or update, the Org VDC Default will be used. + For NSX-T Edges, Open API must be used and this field is read only. + If there is no value, the gateway uses the Edge Cluster of the connected External Network's backing Tier-0 router. + + false + + @@ -3675,6 +3792,29 @@ false + + + + always + 33.0 + + True if interface is marked as connected in NSX + + false + + + + + + always + 33.0 + + If set on create or update api calls, the specified number of IP addresses will be additionally allocated for this uplink. + IPs will be allocated from multiple subnets if needed. + + false + + @@ -3771,6 +3911,53 @@ + + + + + + 34.0 + + Used for specifying specific Edge Cluster(s) for a given Edge Gateway. Specification is only applicable for NSX-V Edges, and if specified + this takes precedence over the Edge Cluster configuration on an Org vDC. For NSX-T Edges, this is only read-only and edge management must be done + via Cloud API. + + + + + + + + + always + + This is the reference to the Primary Edge Cluster used for the gateway. This refers to a VCD Edge Cluster, which can be setup by the provider. + This is required because if there is an Edge Cluster configuration, there must be some primary specified for deploying the Edge Gateway. + For NSX-V Edges, this means the primary appliance for the gateway. + For NSX-T, this means the Edge Cluster the Tier 1 SR resides on. + + true + + + + + + always + + This is the reference to the Secondary Edge Cluster used for the gateway. This refers to a VCD Edge Cluster, which can be setup by the provider. + It is only applicable for NSX-V Edges when High Availability is enabled. If HA is enabled and no secondary edge cluster is specified, + both appliances will be deployed on the primary edge cluster. If there is a specific secondary edge cluster, the standby/secondary appliance + will be deployed on the secondary edge cluster. + + false + + + + + + + + @@ -3793,7 +3980,7 @@ true - + always @@ -3803,12 +3990,24 @@ true + + + + + + always + + Subnet prefix length for IPv6 + + false + + always - Ip Address to be assigned. Keep empty or omit element for auto assignment + IP Address to be assigned. Keep empty or omit element for auto assignment false @@ -3833,8 +4032,31 @@ false + + + + 33.0 + always + + Total count of IP addresses in IP ranges for the subnet. Can be used to auto set IP ranges for subnet if AutoAllocateIpRanges set to true. + + false + + + + + + 33.0 + always + + Used for create and update api calls. If set to true, IP Ranges are automatically generated based on totalIpCount. + + false + + + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/organization.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/organization.xsd index 362f0546..c5b0cd75 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/organization.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/organization.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,6 +28,7 @@ #L% --> + application/vnd.vmware.vcloud.org 0.9 + 36.0 Represents the user view of a vCloud Director organization. @@ -88,3 +90,4 @@ + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/organizationList.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/organizationList.xsd index c16b4854..f12be179 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/organizationList.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/organizationList.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,6 +28,7 @@ #L% --> + application/vnd.vmware.vcloud.orgList 0.9 + 36.0 Represents a list of organizations. @@ -74,3 +76,4 @@ + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/productSectionList.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/productSectionList.xsd index 171ff17d..23eb24b3 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/productSectionList.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/productSectionList.xsd @@ -1,9 +1,9 @@ - + + + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/queryRecordView.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/queryRecordView.xsd index 0926da2f..335bd173 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/queryRecordView.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/queryRecordView.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -27,18 +27,9 @@ POSSIBILITY OF SUCH DAMAGE. #L% --> + - - - + Schema for the vCloud @@ -87,7 +78,7 @@ - + 1.5 @@ -178,8 +169,7 @@ - + 1.5 always @@ -308,12 +298,21 @@ + + + 36.0 + + none + + + + + - + 1.5 always @@ -348,7 +347,27 @@ none - + + + + + + + 31.0 + + none + + + + + + + + 31.0 + + none + + @@ -438,7 +457,8 @@ 1.5 - + + 30.0 none Storage allocation in MB @@ -499,6 +519,16 @@ + + + 31.0 + + none + + Number of Unmanaged vApps + + + 1.5 @@ -531,7 +561,8 @@ 1.5 - + + 30.0 none True if this VDC is used exclusively to support vShield Edge devices. @@ -597,8 +628,8 @@ - 30.0 - + 31.0 + none Associated universal network pool @@ -615,12 +646,41 @@ + + + 31.0 + + none + + Number of Deployed Unmanaged vApps + + + + + + 32.0 + + none + + True if Thin provisioning is enabled + + + + + + 32.0 + + none + + True if Fast Provisioning is Enabled + + + - + 1.5 always @@ -800,8 +860,7 @@ - + 1.5 always @@ -968,6 +1027,16 @@ + + + 36.0 + + none + + PUBLISHED if parent catalog published externally, SUBSCRIBED if parent catalog subscribed to an external catalog, UNPUBLISHED otherwise. + + + 30.0 @@ -992,8 +1061,7 @@ - + 1.5 always @@ -1040,6 +1108,15 @@ + + + 1.5 + none + + The description of this vApp. + + + 1.5 @@ -1094,6 +1171,16 @@ + + + 34.0 + + none + + memoryAllocationMB + + + 1.5 @@ -1132,12 +1219,51 @@ + + + 34.0 + + none + + number of vCpus + + + + + + 31.0 + + none + + True if snapshot exists + + + + + + 31.0 + + none + + Snapshot creation date + + + + + + 34.0 + + none + + Total storage allocated to VMs, disks, snapshots, and memory within this vApp (in MB) + + + - + 1.5 always @@ -1204,6 +1330,16 @@ + + + 36.0 + + none + + VDC name + + + 1.5 @@ -1213,6 +1349,25 @@ + + + 1.5 + none + + The description of this VM. + + + + + + 33.0 + + none + + VM unique ID within vApp + + + 1.5 @@ -1347,7 +1502,7 @@ none - + @@ -1380,6 +1535,26 @@ + + + 31.0 + + none + + + + + + + + 31.0 + + none + + + + + 13.0 @@ -1416,7 +1591,7 @@ none - + @@ -1426,7 +1601,87 @@ none - + + + + + + + 33.0 + + none + + True if VM is compliant with Compute Policy + + + + + + 33.0 + + none + + Vm Sizing Policy + + + + + + 33.0 + + none + + Vm Placement Policy + + + + + + 34.0 + + none + + True if VM is encrypted + + + + + + 34.0 + + none + + VM creation date + + + + + + 34.0 + + none + + Total storage allocated to disks, snapshots, and memory of this VM (in MB) + + + + + + 34.0 + + none + + True if VMs storage lease has expired. This value is obtained from VMs parent vApp (Even for stand-alone VMs whose enclosing vApp is not visible to users). + + + + + + 35.0 + + none + + Storage Policy name to be used upon instantiation if this is a template, or null for non-template VMs. @@ -1434,10 +1689,10 @@ - + 1.5 + 35.0 always A single orgNetwork query result in records format. @@ -1448,6 +1703,7 @@ 1.5 + 35.0 Type for a single orgNetwork query result in records format. @@ -1527,6 +1783,15 @@ + + + 1.5 + none + + Prefix length + + + 1.5 @@ -1567,11 +1832,9 @@ - + 1.5 - REMOVED_VERSION_15_51 always A single adminOrgNetwork query result in records format. @@ -1582,7 +1845,8 @@ 1.5 - + + 30.0 Type for a single adminOrgNetwork query result in records format. @@ -1671,6 +1935,15 @@ + + + 1.5 + none + + Prefix length + + + 1.5 @@ -1702,8 +1975,7 @@ - + 1.5 always @@ -1768,6 +2040,15 @@ + + + 1.5 + none + + Prefix length + + + 1.5 @@ -1826,8 +2107,7 @@ - + 1.5 always @@ -1871,7 +2151,7 @@ 1.5 none - True if this catalog is published. + True if this catalog is shared to all organizations. @@ -1968,12 +2248,21 @@ + + + 35.0 + + none + + True if Catalog belongs to organization, false when catalog is shared with other organization. + + + - + 1.5 always @@ -2008,7 +2297,27 @@ none - + + + + + + + 31.0 + + none + + + + + + + + 31.0 + + none + + @@ -2048,16 +2357,6 @@ - - - 30.0 - - none - - CPU overhead in Mhz - - - 1.5 @@ -2085,20 +2384,11 @@ - - - 30.0 - - none - - Memory overhead in MB - - - 1.5 - + + 30.0 none Storage allocation in MB @@ -2123,16 +2413,6 @@ - - - 30.0 - - none - - Storage overhead in MB - - - 1.5 @@ -2171,11 +2451,10 @@ - 30.0 - + 1.5 none - Resource allocation model for the VDC + allocationModel @@ -2188,6 +2467,16 @@ + + + 31.0 + + none + + Number of Unmanaged vApps + + + 1.5 @@ -2219,188 +2508,167 @@ - 30.0 - + 1.5 none - Name of Virtual Center associated with this VDC + vcName - - - 30.0 - - none - - Enabled status of the Virtual Center associated with this VDC - - - - + 1.5 - + + 30.0 none True if this VDC is used exclusively to support vShield Edge devices. - - - 30.0 - - none - - Task reference or id - - - - + - 30.0 - + 1.5 none - Task status + True if this entity is busy - + - 30.0 - + 1.5 none - Name of the task status + Status - + 1.5 none - True if this entity is busy + Network pool reference or id - + 1.5 none - Status + numberOfResourcePools - + - 30.0 - + 5.1 + none - taskDetails + Number of storage profiles - + - 1.5 + 32.0 + none - Network pool reference or id + Count of the used networks in the VDC - + 30.0 none - Virtual center reference or id + Number of VMs - + - 30.0 - + 31.0 + none - numberOfResourcePools + Associated universal network pool - + - 5.1 - + 30.0 + none - Number of storage profiles + Number of Running VMs - + 30.0 none - CPU reserved in Mhz + Number of Deployed vApps - + - 30.0 - + 31.0 + none - Memory reserved in MB + Number of Deployed Unmanaged vApps - + - 30.0 - + 32.0 + none - Number of VMs + True if Thin provisioning is enabled - + - 30.0 - + 32.0 + none - Associated universal network pool + True if Fast Provisioning is Enabled - + - 30.0 - + 33.0 + none - Number of Running VMs + The type of the network pool that backs this org vdc - + - 30.0 - + 35.0 + none - Number of Deployed vApps + Number of KubernetesPolicies @@ -2408,8 +2676,7 @@ - + 1.5 always @@ -2460,6 +2727,8 @@ 1.5 5.5 + + 31.0 none vCpu rating in Mhz @@ -2565,6 +2834,16 @@ + + + 35.0 + + none + + vcName + + + 1.5 @@ -2583,6 +2862,15 @@ + + + 1.5 + none + + + + + 5.1 @@ -2593,12 +2881,41 @@ + + + 35.0 + + none + + + + + + + + 35.0 + + none + + True if this entity is Kubernetes enabled + + + + + + 35.2 + + none + + The type of the network pool that backs this provider vdc + + + - + 1.5 always @@ -2654,6 +2971,15 @@ + + + 1.5 + none + + Prefix length for the network + + + 1.5 @@ -2694,8 +3020,7 @@ - + 1.5 always @@ -2724,6 +3049,16 @@ + + + 31.0 + + none + + + + + 1.5 @@ -2756,8 +3091,7 @@ - + 1.5 always @@ -2816,6 +3150,7 @@ 1.5 + 35.0 none Running VMs Quota @@ -2831,24 +3166,36 @@ - + 1.5 + 35.0 none - Stored VM Quota + 1.5 + 35.0 none If the identity provider type is INTEGRATED, true if the user was imported from LDAP + + + 35.0 + + none + + On creation, specifies whether this user should be imported from the organization's LDAP service or created locally. Ignored if ProviderType is SAML or OAUTH. On retrieval, indicates whether the user is local or imported. + + + 5.1 @@ -2859,12 +3206,31 @@ + + + 31.0 + + none + + True if user account is locked + + + + + + 31.0 + + none + + User role names + + + - + 1.5 always @@ -2943,8 +3309,7 @@ - + 1.5 always @@ -2973,6 +3338,16 @@ + + + 31.0 + + none + + The description of this role. + + + 1.5 @@ -2986,11 +3361,9 @@ - + 1.5 - REMOVED_VERSION_15_51 always A single allocatedExternalAddress query result in records format. @@ -3001,7 +3374,8 @@ 1.5 - + + 30.0 Type for a single allocatedExternalAddress query result in records format. @@ -3040,10 +3414,10 @@ - + 1.5 + 34.0 always A single event query result in records format. @@ -3054,6 +3428,7 @@ 1.5 + 34.0 Type for a single event query result in records format. @@ -3061,6 +3436,16 @@ + + + 31.0 + + none + + Event Id + + + 1.5 @@ -3124,6 +3509,26 @@ + + + 31.0 + + none + + Description + + + + + + 31.0 + + none + + Details + + + 5.1 @@ -3147,8 +3552,7 @@ - + 1.5 always @@ -3213,12 +3617,71 @@ + + + 32.0 + + none + + Provider VDC reference or id + + + + + + 32.0 + + none + + Provider VDC name + + + + + + 32.0 + + none + + True if this entity is enabled + + + + + + 32.0 + + none + + True if this is the primary resource pool for this Provider VDC. + + + + + + 33.0 + + none + + Cluster managed object reference + + + + + + 35.0 + + none + + True if this entity is Kubernetes enabled + + + - + 1.5 always @@ -3346,6 +3809,16 @@ + + + 36.0 + + none + + True if this storage container is a datastore cluster + + + 9.0 @@ -3370,8 +3843,7 @@ - + 1.5 always @@ -3409,43 +3881,80 @@ - + 1.5 none - True if this entity is busy + vcName - + - 30.0 - + 32.0 + none - cross-vc unique id for universal transport zone + Description of the network pool - - - - - - - 1.5 - always - - A single portgroup query result in records format. - - - - - - - 1.5 + + + 1.5 + none + + isVCEnabled + + + + + + 1.5 + none + + True if this entity is busy + + + + + + 32.0 + + none + + + + + + + + 31.0 + + none + + cross-vc unique id for universal transport zone + + + + + + + + + + 1.5 + always + + A single portgroup query result in records format. + + + + + + + 1.5 Type for a single portgroup query result in records format. @@ -3534,12 +4043,21 @@ + + + 35.2 + + none + + VLAN Id for the portgroup + + + - + 1.5 always @@ -3608,8 +4126,7 @@ - + 1.5 always @@ -3659,6 +4176,8 @@ 1.5 + + 34.0 none True if the cell is in vCenter inventory. @@ -3687,8 +4206,7 @@ - + 1.5 always @@ -3771,6 +4289,15 @@ + + + 1.5 + none + + vcproxy + + + 1.5 @@ -3809,12 +4336,213 @@ + + + 32.0 + + none + + True if this entity is tenant scoped. + + + + + + 32.0 + + none + + True if this entity is provider scoped. + + + + + + 33.0 + + none + + The overall health status of clusters in this vCenter. One of {GRAY, RED, YELLOW, GREEN}. + + + + + + 33.0 + + none + + The number of clusters in this vCenter. + + + + + + 33.0 + + none + + The number of VMs in this vCenter. + + + + + + 33.0 + + none + + The number of powered-on VMs in this vCenter. + + + + + + 33.0 + + none + + The total memory (in Mb) in this vCenter. + + + + + + 33.0 + + none + + The reserved memory (in Mb) in this vCenter. + + + + + + 33.0 + + none + + The demanded memory (in Mb) in this vCenter. + + + + + + 33.0 + + none + + The total CPU (in Mhz) in this vCenter. + + + + + + 33.0 + + none + + The reserved CPU (in Mhz) in this vCenter. + + + + + + 33.0 + + none + + The demanded CPU (in Mhz) in this vCenter. + + + + + + 33.0 + 36.0 + + none + + The disk size (in bytes) of all datastores in this vCenter. Since 36.0, this value may no longer be accurate. Use diskSizeMb. + + + + + + 33.0 + 36.0 + + none + + The free disk space (in bytes) on all datastores in this vCenter. Since 36.0, this value may no longer be accurate. Use diskFreeMb. + + + + + + 33.0 + + none + + The uncommitted disk space (in bytes) on all datastores in this vCenter. Since 36.0, this value may no longer be accurate. Use diskUncommittedMb. + + + + + + 36.0 + + none + + The disk size (in MB) of all datastores in this vCenter. + + + + + + 36.0 + + none + + The free disk space (in MB) on all datastores in this vCenter. + + + + + + 36.0 + + none + + The uncommitted disk space (in MB) on all datastores in this vCenter. + + + + + + 34.0 + + none + + If the VC is associated with an NSX-V Manager, the version of the NSX-V Manager. + + + + + + 34.0 + + none + + True if this server is proxied. + + + - + 1.5 always @@ -3846,6 +4574,8 @@ 1.5 + + 31.0 none True if this entity is enabled @@ -3873,6 +4603,8 @@ 1.5 + + 31.0 none True if this host is prepared @@ -3900,6 +4632,8 @@ 1.5 + + 31.0 none True if this host has an upgrade pending. @@ -3927,6 +4661,8 @@ 1.5 + + 31.0 none True if this host is cross-host enabled. @@ -3951,6 +4687,16 @@ + + + 34.0 + + none + + + + + 1.5 @@ -3973,8 +4719,7 @@ - + 1.5 always @@ -4039,6 +4784,15 @@ + + + 1.5 + none + + The description of this vApp. + + + 1.5 @@ -4087,6 +4841,7 @@ 1.5 + 34.0 none Storage in KB @@ -4105,7 +4860,8 @@ 1.5 - + + 30.0 none CPU allocation in Mhz @@ -4114,7 +4870,8 @@ - 1.5 + 34.0 + none Memory allocation in MB @@ -4159,12 +4916,31 @@ + + + 34.0 + + none + + number of vCpus + + + + + + 34.0 + + none + + Total storage allocated to VMs, disks, snapshots, and memory within this vApp (in MB) + + + - + 1.5 always @@ -4206,8 +4982,7 @@ - + 1.5 always @@ -4245,6 +5020,25 @@ + + + 1.5 + none + + The description of this VM. + + + + + + 33.0 + + none + + VM unique ID within vApp + + + 1.5 @@ -4263,6 +5057,16 @@ + + + 36.0 + + none + + VDC name + + + 1.5 @@ -4455,39 +5259,118 @@ - - - - - - - 1.5 - REMOVED_VERSION_15_51 - always - - A single adminAllocatedExternalAddress query result in records format. - - - - - - - 1.5 - - - Type for a single adminAllocatedExternalAddress query result in records format. - - - - - - + - 1.5 + 33.0 + none - Network reference or id + True if VM is compliant with Compute Policy + + + + + + 33.0 + + none + + Vm Sizing Policy + + + + + + 33.0 + + none + + Vm Placement Policy + + + + + + 33.0 + + none + + If configured, the IP Address of the VM on the primary network, otherwise empty. + + + + + + 34.0 + + none + + True if VM is encrypted + + + + + + 34.0 + + none + + VM creation date + + + + + + 34.0 + + none + + True if VMs storage lease has expired. This value is obtained from VMs parent vApp (Even for stand-alone VMs whose enclosing vApp is not visible to users). + + + + + + 35.0 + + none + + The name of this VM in vCenter Server + + + + + + + + + + 1.5 + always + + A single adminAllocatedExternalAddress query result in records format. + + + + + + + 1.5 + + 30.0 + + Type for a single adminAllocatedExternalAddress query result in records format. + + + + + + + + 1.5 + none + + Network reference or id @@ -4522,11 +5405,9 @@ - + 1.5 - REMOVED_VERSION_15_51 always A single vAppOrgNetworkRelation query result in records format. @@ -4537,7 +5418,8 @@ 1.5 - + + 30.0 Type for a single vAppOrgNetworkRelation query result in records format. @@ -4612,8 +5494,7 @@ - + 1.5 always @@ -4660,14 +5541,34 @@ + + + 32.0 + + none + + Virtual center name + + + + + + 32.0 + + none + + Resource pool name + + + - + 1.5 + 32.0 always A single providerVdcResourcePoolRelation query result in records format. @@ -4678,6 +5579,7 @@ 1.5 + 32.0 Type for a single providerVdcResourcePoolRelation query result in records format. @@ -4797,8 +5699,7 @@ - + 1.5 always @@ -4935,12 +5836,21 @@ + + + 36.0 + + none + + True if this storage container is a datastore cluster + + + - + 1.5 always @@ -5008,6 +5918,7 @@ 1.5 + 35.0 none Running VMs Quota @@ -5026,6 +5937,7 @@ 1.5 + 35.0 none Stored VM Quota @@ -5035,15 +5947,27 @@ 1.5 + 35.0 none If the identity provider type is INTEGRATED, shows whether the user was imported from LDAP + + + 35.0 + + none + + On creation, specifies whether this user should be imported from the organization's LDAP service or created locally. Ignored if ProviderType is SAML or OAUTH. On retrieval, indicates whether the user is local or imported. + + + 1.5 + 35.0 none Deployed VM quota rank @@ -5053,6 +5977,7 @@ 1.5 + 35.0 none Stored VM Quota rank @@ -5073,8 +5998,7 @@ - + 1.5 always @@ -5144,8 +6068,7 @@ - + 1.5 always @@ -5210,6 +6133,15 @@ + + + 1.5 + none + + Prefix length + + + 1.5 @@ -5268,8 +6200,7 @@ - + 1.5 always @@ -5379,12 +6310,21 @@ + + + 35.0 + + none + + True if Catalog belongs to organization, false when catalog is shared with other organization. + + + - + 1.5 always @@ -5552,8 +6492,7 @@ - + 1.5 always @@ -5712,8 +6651,7 @@ - + 1.5 always @@ -5882,8 +6820,7 @@ - + 1.5 always @@ -6079,8 +7016,7 @@ - + 1.5 always @@ -6130,7 +7066,8 @@ 1.5 - + + 30.0 none Shadow vApp reference or id @@ -6240,8 +7177,7 @@ - + 1.5 always @@ -6288,6 +7224,26 @@ + + + 30.0 + + none + + The full human readable name of this task. + + + + + + 32.0 + + none + + message + + + 1.5 @@ -6375,8 +7331,7 @@ - + 1.5 always @@ -6423,6 +7378,16 @@ + + + 30.0 + + none + + The full human readable name of this task. + + + 1.5 @@ -6538,8 +7503,7 @@ - + 1.5 always @@ -6649,6 +7613,16 @@ + + + 32.0 + + none + + Description of the blocking task. + + + 1.5 @@ -6672,8 +7646,7 @@ - + 5.1 always @@ -6687,7 +7660,6 @@ 5.1 - Type for a single disk query result in records format. @@ -6715,16 +7687,68 @@ - + 5.1 none + + + + + + + + 5.1 + 33.0 + + 33.0 + none Size of the disk in bytes + + + 33.0 + + none + + Size of the disk in MB + + + + + + 34.0 + + none + + IOPS of the disk + + + + + + 34.0 + + none + + True if disk is encrypted + + + + + + 36.0 + + none + + UUID of the named disk's device backing + + + 5.1 @@ -6835,6 +7859,16 @@ + + + 5.1 + + none + + Number of VMs the disk is attached to + + + 5.1 @@ -6845,12 +7879,32 @@ + + + 35.0 + 36.0 + + none + + + + + + + + 36.0 + + none + + Sharing type of the named disk + + + - + 5.1 always @@ -6864,7 +7918,6 @@ 5.1 - Type for a single vmDiskRelation query result in records format. @@ -6906,8 +7959,7 @@ - + 5.1 always @@ -6921,7 +7973,6 @@ 5.1 - Type for a single adminDisk query result in records format. @@ -6935,7 +7986,7 @@ none - + @@ -6949,13 +8000,65 @@ - + 5.1 none - Size of disk in bytes + + + + + + + 5.1 + 33.0 + + 33.0 + none + + Size of the disk in bytes + + + + + + 33.0 + + none + + Size of the disk in MB + + + + + + 36.0 + + none + + IOPS of the disk + + + + + + 36.0 + + none + + True if disk is encrypted + + + + + + 36.0 + + none + + UUID of the named disk's device backing @@ -7089,6 +8192,16 @@ + + + 5.1 + + none + + Number of VMs the disk is attached to + + + 5.1 @@ -7099,12 +8212,32 @@ + + + 36.0 + + + none + + + + + + + + 36.0 + + none + + Sharing type of the named disk + + + - + 5.1 always @@ -7118,7 +8251,6 @@ 5.1 - Type for a single adminVMDiskRelation query result in records format. @@ -7160,10 +8292,10 @@ - + 5.1 + 35.0 always A single condition query result in records format. @@ -7174,8 +8306,8 @@ 5.1 + 35.0 - Type for a single condition query result in records format. @@ -7247,8 +8379,7 @@ - + 5.1 always @@ -7262,7 +8393,6 @@ 5.1 - Type for a single adminEvent query result in records format. @@ -7350,6 +8480,26 @@ + + + 31.0 + + none + + Description + + + + + + 31.0 + + none + + Details + + + 5.1 @@ -7394,8 +8544,7 @@ - + 5.1 always @@ -7409,7 +8558,6 @@ 5.1 - Type for a single strandedItem query result in records format. @@ -7427,6 +8575,16 @@ + + + 32.0 + + none + + Description for the stranded item. + + + 5.1 @@ -7457,6 +8615,16 @@ + + + 5.1 + + none + + message + + + 5.1 @@ -7481,8 +8649,7 @@ - + 5.1 always @@ -7496,7 +8663,6 @@ 5.1 - Type for a single adminService query result in records format. @@ -7588,8 +8754,7 @@ - + 5.1 always @@ -7603,7 +8768,6 @@ 5.1 - Type for a single service query result in records format. @@ -7645,8 +8809,7 @@ - + 5.1 always @@ -7660,7 +8823,6 @@ 5.1 - Type for a single serviceLink query result in records format. @@ -7732,8 +8894,132 @@ - + + + 32.0 + always + + A single storageProfile query result in records format. + + + + + + + 32.0 + + + Type for a single storageProfile query result in records format. + + + + + + + + 32.0 + + none + + Name of the storage profile + + + + + + 32.0 + + none + + Number of provider VDCs that have access to this profile + + + + + + 32.0 + + none + + Number of Organization VDCs that have access to this profile + + + + + + 32.0 + + none + + Number of datastores associated with this profile + + + + + + 32.0 + + none + + Storage requested by all vms for this storage profile in mega bytes + + + + + + 32.0 + + none + + Total storage for this storage profile in mega bytes + + + + + + 32.0 + + none + + Storage used by entities associated with this storage profile in mega bytes + + + + + + 32.0 + + none + + Provisioned storage for this storage profile in mega bytes + + + + + + 34.0 + + none + + Comma-separated list of capabilities supported by this storage profile + + + + + + 34.0 + + none + + Number of capabilities supported by this storage profile + + + + + + + + 5.1 always @@ -7747,7 +9033,6 @@ 5.1 - Type for a single orgVdcStorageProfile query result in records format. @@ -7785,7 +9070,7 @@ - + 5.1 @@ -7795,7 +9080,7 @@ - + 5.1 @@ -7865,12 +9150,81 @@ + + + 5.5 + + none + + True if IOPS has been enabled for the storage profile + + + + + + 5.5 + + none + + Default IOPS to apply to all disks associated with the storage profile + + + + + + 5.5 + + none + + Max IOPS for any disk associated with the storge profile + + + + + + 5.5 + + none + + Max size (in GB) to IOPS ratio for any disk associated with the storage profile + + + + + + 35.0 + + none + + True if VCD IOPS placement should be ignored for disks using this storage profile + + + + + + 34.0 + + none + + Number of capabilities supported by this storage profile + + + + + + 35.0 + + none + + True if this storage profile inherits the settings of the parent PVDC storage profile + + + - + 5.1 always @@ -7884,7 +9238,6 @@ 5.1 - Type for a single adminOrgVdcStorageProfile query result in records format. @@ -7922,7 +9275,7 @@ - + 5.1 @@ -7932,7 +9285,7 @@ - + 5.1 @@ -8022,12 +9375,81 @@ + + + 34.0 + + none + + True if IOPS has been enabled for the storage profile + + + + + + 34.0 + + none + + Default IOPS to apply to all disks associated with the storage profile + + + + + + 34.0 + + none + + Max IOPS for any disk associated with the storge profile + + + + + + 34.0 + + none + + Max size in (GB) to IOPS ratio for any disk associated with the storage profile + + + + + + 35.0 + + none + + True if VCD IOPS placement should be ignored for disks using this storage profile + + + + + + 34.0 + + none + + Number of capabilities supported by this storage profile + + + + + + 35.0 + + none + + True if this storage profile inherits the default settings of the parent PVDC storage profile + + + - + 5.1 always @@ -8041,7 +9463,6 @@ 5.1 - Type for a single providerVdcStorageProfile query result in records format. @@ -8085,7 +9506,7 @@ none - + @@ -8095,7 +9516,7 @@ none - + @@ -8105,7 +9526,7 @@ none - + @@ -8169,12 +9590,31 @@ + + + 34.0 + + none + + Number of capabilities supported by this storage profile + + + + + + 35.0 + + none + + True if this PVDC storage profile has IOPS limiting enabled by default + + + - + 5.1 always @@ -8188,7 +9628,6 @@ 5.1 - Type for a single apiFilter query result in records format. @@ -8220,8 +9659,7 @@ - + 5.1 always @@ -8235,7 +9673,6 @@ 5.1 - Type for a single adminApiDefinition query result in records format. @@ -8327,8 +9764,7 @@ - + 5.1 always @@ -8342,7 +9778,6 @@ 5.1 - Type for a single apiDefinition query result in records format. @@ -8434,8 +9869,7 @@ - + 5.1 always @@ -8449,7 +9883,6 @@ 5.1 - Type for a single adminFileDescriptor query result in records format. @@ -8571,8 +10004,7 @@ - + 5.1 always @@ -8586,7 +10018,6 @@ 5.1 - Type for a single fileDescriptor query result in records format. @@ -8708,8 +10139,7 @@ - + 5.1 always @@ -8723,7 +10153,6 @@ 5.1 - Type for a single resourceClassAction query result in records format. @@ -8775,8 +10204,7 @@ - + 5.1 always @@ -8790,7 +10218,6 @@ 5.1 - Type for a single aclRule query result in records format. @@ -8892,8 +10319,7 @@ - + 5.1 always @@ -8907,7 +10333,6 @@ 5.1 - Type for a single resourceClass query result in records format. @@ -8979,8 +10404,7 @@ - + 5.1 always @@ -8994,7 +10418,6 @@ 5.1 - Type for a single serviceResource query result in records format. @@ -9046,8 +10469,7 @@ - + 5.1 always @@ -9061,7 +10483,6 @@ 5.1 - Type for a single edgeGateway query result in records format. @@ -9119,13 +10540,33 @@ + + + 32.0 + + none + + + + + 29.0 none - + + + + + + + 32.0 + + none + + Organization name @@ -9145,7 +10586,7 @@ none - + @@ -9179,14 +10620,44 @@ + + + 31.0 + + none + + Id of the egress point using this gateway + + + + + + 35.0 + + none + + VDC Group Id + + + + + + 35.0 + + none + + VDC Group Name + + + - + 5.1 + 35.0 always A single orgVdcNetwork query result in records format. @@ -9197,8 +10668,8 @@ 5.1 + 35.0 - Type for a single orgVdcNetwork query result in records format. @@ -9236,6 +10707,16 @@ + + + 5.1 + + none + + Prefix length + + + 5.1 @@ -9368,21 +10849,31 @@ - 30.0 - + 31.0 + none Owner cross-vdc network Id - + - 30.0 - + 31.0 + none - Site Id of owning cross-vdc network + vDC Group Id of owning cross-vdc network + + + + + + 31.0 + + none + + Org and Site Ids of cross-vdc network @@ -9390,8 +10881,7 @@ - + 5.1 always @@ -9405,7 +10895,6 @@ 5.1 - Type for a single vAppOrgVdcNetworkRelation query result in records format. @@ -9487,8 +10976,7 @@ - + 5.1 always @@ -9502,7 +10990,6 @@ 5.1 - Type for a single externalLocalization query result in records format. @@ -9554,8 +11041,7 @@ - + 5.1 always @@ -9569,7 +11055,6 @@ 5.1 - Type for a single resourcePoolVmList query result in records format. @@ -9651,8 +11136,7 @@ - + 5.5 always @@ -9666,7 +11150,6 @@ 5.5 - Type for a single vmGroupVms query result in records format. @@ -9788,8 +11271,7 @@ - + 27.0 always @@ -9803,7 +11285,6 @@ 27.0 - Type for a single vmGroups query result in records format. @@ -9841,6 +11322,16 @@ + + + 33.0 + + none + + The name of the cluster containing the VM group. + + + 27.0 @@ -9851,12 +11342,21 @@ + + + 33.0 + + none + + The ID of the NamedVMGroup for this vmGroup. + + + - + 27.0 always @@ -9870,7 +11370,6 @@ 27.0 - Type for a single adminRole query result in records format. @@ -9884,7 +11383,7 @@ none - + @@ -9894,7 +11393,7 @@ none - + @@ -9904,7 +11403,7 @@ none - + @@ -9914,7 +11413,470 @@ none + + + + + + + + + + + 31.0 + always + + A single nsxTManager query result in records format. + + + + + + + 31.0 + + + Type for a single nsxTManager query result in records format. + + + + + + + + 31.0 + + none + + The name of this manager. + + + + + + 31.0 + + none + + Url + + + + + + 34.0 + + none + + NSX-T Manager Version. + + + + + + + + + + 1.5 + always + + A single adminOrgVdcTemplate query result in records format. + + + + + + + 1.5 + + Type for a single adminOrgVdcTemplate query result in records format. + + + + + + + + 31.0 + + none + + The name of this template. + + + + + + 31.0 + + none + + The description of this template. + + + + + + 31.0 + + none + + The tenant-visible name of this template. + + + + + + 31.0 + + none + + The tenant-visible description of this template. + + + + + + 35.0 + + none + + Network backing type of Vdc Template. + + + + + + + + + + 1.5 + always + + A single orgVdcTemplate query result in records format. + + + + + + + 1.5 + + Type for a single orgVdcTemplate query result in records format. + + + + + + + + 31.0 + + none + + The name of this template. + + + + + + 31.0 + + none + + The description of this template. + + + + + + 31.0 + + none + + + + + + + + + + + + 32.0 + always + + A single gatewayUplinks query result in records format. + + + + + + + 32.0 + + + Type for a single gatewayUplinks query result in records format. + + + + + + + + 32.0 + + none + + IP address + + + + + + 32.0 + + none + + ID of the gateway that has consumed the ipAddress + + + + + + 32.0 + + none + + name of the network from which the ipAddress is consumed + + + + + + 32.0 + + none + + Category under which the ipAddress is consumed + + + + + + + + + + 36.0 + always + + A single site query result in records format. + + + + + + + 36.0 + + + Type for a single site query result in records format. + + + + + + + + 36.0 + + none + + The name of the site + + + + + + 36.0 + + none + + The REST API endpoint of the site + + + + + + 36.0 + + none + + The UI endpoint of the site + + + + + + + + + + 36.0 + always + + A single siteAssociation query result in records format. + + + + + + + 36.0 + + + Type for a single siteAssociation query result in records format. + + + + + + + + 36.0 + + none + + The name of the associated site + + + + + + 36.0 + + none + + The ID of the associated site + + + + + + 36.0 + + none + + The REST API endpoint of the associated site + + + + + + 36.0 + + none + + The UI endpoint of the associated site + + + + + + 36.0 + + none + + The status of the association + + + + + + + + + + 36.0 + always + + A single orgAssociation query result in records format. + + + + + + + 36.0 + + + Type for a single orgAssociation query result in records format. + + + + + + + 36.0 + + none + + The ID of the associated site + + + + + + 36.0 + + none + + The ID of the local organization + + + + + + 36.0 + + none + + The ID of the associated organization + + + + + + 36.0 + + none + + The name of the associated site + + + + + + 36.0 + + none + + The name of the associated organization + + + + + + 36.0 + + none + + The status of the association diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/queryReferenceView.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/queryReferenceView.xsd index e01e4007..cf88cce6 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/queryReferenceView.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/queryReferenceView.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -27,12 +27,11 @@ POSSIBILITY OF SUCH DAMAGE. #L% --> - - + - + Schema for the entities returned by the referenceView query handler. @@ -41,7 +40,7 @@ - A container for organization query results in references format. + A container for organization query results in references format. @@ -49,7 +48,7 @@ - A single organization query result in reference format. + A single organization query result in reference format. @@ -57,7 +56,7 @@ - A container for orgVdc query results in references format. + A container for orgVdc query results in references format. @@ -65,7 +64,7 @@ - A single orgVdc query result in reference format. + A single orgVdc query result in reference format. @@ -73,7 +72,7 @@ - A container for media, adminMedia query results in references format. + A container for media, adminMedia query results in references format. @@ -81,7 +80,7 @@ - A single media, adminMedia query result in reference format. + A single media, adminMedia query result in reference format. @@ -89,7 +88,7 @@ - A container for vAppTemplate, adminVAppTemplate query results in references format. + A container for vAppTemplate, adminVAppTemplate query results in references format. @@ -97,7 +96,7 @@ - A single vAppTemplate, adminVAppTemplate query result in reference format. + A single vAppTemplate, adminVAppTemplate query result in reference format. @@ -105,7 +104,7 @@ - A container for vApp, adminVApp query results in references format. + A container for vApp, adminVApp query results in references format. @@ -113,7 +112,7 @@ - A single vApp, adminVApp query result in reference format. + A single vApp, adminVApp query result in reference format. @@ -121,7 +120,7 @@ - A container for vm, adminVM, adminShadowVM, resourcePoolVmList query results in references format. + A container for vm, adminVM, adminShadowVM, resourcePoolVmList query results in references format. @@ -129,7 +128,7 @@ - A single vm, adminVM, adminShadowVM, resourcePoolVmList query result in reference format. + A single vm, adminVM, adminShadowVM, resourcePoolVmList query result in reference format. @@ -137,7 +136,7 @@ - A container for orgNetwork, adminOrgNetwork query results in references format. + A container for orgNetwork, adminOrgNetwork query results in references format. @@ -145,7 +144,7 @@ - A single orgNetwork, adminOrgNetwork query result in reference format. + A single orgNetwork, adminOrgNetwork query result in reference format. @@ -153,7 +152,7 @@ - A container for vAppNetwork, adminVAppNetwork query results in references format. + A container for vAppNetwork, adminVAppNetwork query results in references format. @@ -161,7 +160,7 @@ - A single vAppNetwork, adminVAppNetwork query result in reference format. + A single vAppNetwork, adminVAppNetwork query result in reference format. @@ -169,7 +168,7 @@ - A container for catalog, adminCatalog query results in references format. + A container for catalog, adminCatalog query results in references format. @@ -177,7 +176,7 @@ - A single catalog, adminCatalog query result in reference format. + A single catalog, adminCatalog query result in reference format. @@ -185,7 +184,7 @@ - A container for adminOrgVdc query results in references format. + A container for adminOrgVdc query results in references format. @@ -193,7 +192,7 @@ - A single adminOrgVdc query result in reference format. + A single adminOrgVdc query result in reference format. @@ -201,7 +200,7 @@ - A container for providerVdc query results in references format. + A container for providerVdc query results in references format. @@ -209,7 +208,7 @@ - A single providerVdc query result in reference format. + A single providerVdc query result in reference format. @@ -217,7 +216,7 @@ - A container for externalNetwork query results in references format. + A container for externalNetwork query results in references format. @@ -225,7 +224,7 @@ - A single externalNetwork query result in reference format. + A single externalNetwork query result in reference format. @@ -233,7 +232,7 @@ - A container for group, adminGroup query results in references format. + A container for group, adminGroup query results in references format. @@ -241,7 +240,7 @@ - A single group, adminGroup query result in reference format. + A single group, adminGroup query result in reference format. @@ -249,7 +248,7 @@ - A container for user, strandedUser, adminUser query results in references format. + A container for user, strandedUser, adminUser query results in references format. @@ -257,7 +256,7 @@ - A single user, strandedUser, adminUser query result in reference format. + A single user, strandedUser, adminUser query result in reference format. @@ -265,7 +264,7 @@ - A container for role or adminRole query results in references format. + A container for role, adminRole query results in references format. @@ -273,7 +272,23 @@ - A single role, adminRole query result in reference format. + A single role, adminRole query result in reference format. + + + + + + + + A container for resourcePool query results in references format. + + + + + + + + A single resourcePool query result in reference format. @@ -281,7 +296,7 @@ - A container for datastore query results in references format. + A container for datastore query results in references format. @@ -289,7 +304,7 @@ - A single datastore query result in reference format. + A single datastore query result in reference format. @@ -297,7 +312,7 @@ - A container for networkPool query results in references format. + A container for networkPool query results in references format. @@ -305,7 +320,7 @@ - A single networkPool query result in reference format. + A single networkPool query result in reference format. @@ -313,7 +328,7 @@ - A container for virtualCenter query results in references format. + A container for virtualCenter query results in references format. @@ -321,7 +336,7 @@ - A single virtualCenter query result in reference format. + A single virtualCenter query result in reference format. @@ -329,7 +344,7 @@ - A container for host query results in references format. + A container for host query results in references format. @@ -337,7 +352,7 @@ - A single host query result in reference format. + A single host query result in reference format. @@ -345,7 +360,7 @@ - A container for right query results in references format. + A container for right query results in references format. @@ -353,7 +368,7 @@ - A single right query result in reference format. + A single right query result in reference format. @@ -361,7 +376,7 @@ - A container for vAppOrgNetworkRelation query results in references format. + A container for vAppOrgNetworkRelation query results in references format. @@ -369,7 +384,7 @@ - A single vAppOrgNetworkRelation query result in reference format. + A single vAppOrgNetworkRelation query result in reference format. @@ -377,7 +392,7 @@ - A container for adminCatalogItem, catalogItem query results in references format. + A container for adminCatalogItem, catalogItem query results in references format. @@ -385,7 +400,7 @@ - A single adminCatalogItem, catalogItem query result in reference format. + A single adminCatalogItem, catalogItem query result in reference format. @@ -393,7 +408,7 @@ - A container for task, adminTask query results in references format. + A container for task, adminTask query results in references format. @@ -401,7 +416,7 @@ - A single task, adminTask query result in reference format. + A single task, adminTask query result in reference format. @@ -409,7 +424,7 @@ - A container for blockingTask query results in references format. + A container for blockingTask query results in references format. @@ -417,7 +432,7 @@ - A single blockingTask query result in reference format. + A single blockingTask query result in reference format. @@ -425,7 +440,7 @@ - A container for disk query results in references format. + A container for disk query results in references format. @@ -433,7 +448,7 @@ - A single disk query result in reference format. + A single disk query result in reference format. @@ -441,7 +456,7 @@ - A container for adminDisk query results in references format. + A container for adminDisk query results in references format. @@ -449,7 +464,7 @@ - A single adminDisk query result in reference format. + A single adminDisk query result in reference format. @@ -457,7 +472,7 @@ - A container for adminEvent query results in references format. + A container for adminEvent query results in references format. @@ -465,7 +480,7 @@ - A single adminEvent query result in reference format. + A single adminEvent query result in reference format. @@ -473,7 +488,7 @@ - A container for strandedItem query results in references format. + A container for strandedItem query results in references format. @@ -481,7 +496,7 @@ - A single strandedItem query result in reference format. + A single strandedItem query result in reference format. @@ -489,7 +504,7 @@ - A container for adminService query results in references format. + A container for adminService query results in references format. @@ -497,7 +512,7 @@ - A single adminService query result in reference format. + A single adminService query result in reference format. @@ -505,7 +520,7 @@ - A container for service query results in references format. + A container for service query results in references format. @@ -513,7 +528,7 @@ - A single service query result in reference format. + A single service query result in reference format. @@ -521,7 +536,7 @@ - A container for serviceLink query results in references format. + A container for serviceLink query results in references format. @@ -529,7 +544,23 @@ - A single serviceLink query result in reference format. + A single serviceLink query result in reference format. + + + + + + + + A container for storageProfile query results in references format. + + + + + + + + A single storageProfile query result in reference format. @@ -537,7 +568,7 @@ - A container for orgVdcStorageProfile query results in references format. + A container for orgVdcStorageProfile query results in references format. @@ -545,7 +576,7 @@ - A single orgVdcStorageProfile query result in reference format. + A single orgVdcStorageProfile query result in reference format. @@ -553,7 +584,7 @@ - A container for adminOrgVdcStorageProfile query results in references format. + A container for adminOrgVdcStorageProfile query results in references format. @@ -561,7 +592,7 @@ - A single adminOrgVdcStorageProfile query result in reference format. + A single adminOrgVdcStorageProfile query result in reference format. @@ -569,7 +600,7 @@ - A container for providerVdcStorageProfile query results in references format. + A container for providerVdcStorageProfile query results in references format. @@ -577,7 +608,7 @@ - A single providerVdcStorageProfile query result in reference format. + A single providerVdcStorageProfile query result in reference format. @@ -585,7 +616,7 @@ - A container for apiFilter query results in references format. + A container for apiFilter query results in references format. @@ -593,7 +624,7 @@ - A single apiFilter query result in reference format. + A single apiFilter query result in reference format. @@ -601,7 +632,7 @@ - A container for adminApiDefinition query results in references format. + A container for adminApiDefinition query results in references format. @@ -609,7 +640,7 @@ - A single adminApiDefinition query result in reference format. + A single adminApiDefinition query result in reference format. @@ -617,7 +648,7 @@ - A container for apiDefinition query results in references format. + A container for apiDefinition query results in references format. @@ -625,7 +656,7 @@ - A single apiDefinition query result in reference format. + A single apiDefinition query result in reference format. @@ -633,7 +664,7 @@ - A container for adminFileDescriptor query results in references format. + A container for adminFileDescriptor query results in references format. @@ -641,7 +672,7 @@ - A single adminFileDescriptor query result in reference format. + A single adminFileDescriptor query result in reference format. @@ -649,7 +680,7 @@ - A container for resourceClassAction query results in references format. + A container for resourceClassAction query results in references format. @@ -657,7 +688,7 @@ - A single resourceClassAction query result in reference format. + A single resourceClassAction query result in reference format. @@ -665,7 +696,7 @@ - A container for aclRule query results in references format. + A container for aclRule query results in references format. @@ -673,7 +704,7 @@ - A single aclRule query result in reference format. + A single aclRule query result in reference format. @@ -681,7 +712,7 @@ - A container for resourceClass query results in references format. + A container for resourceClass query results in references format. @@ -689,7 +720,7 @@ - A single resourceClass query result in reference format. + A single resourceClass query result in reference format. @@ -697,7 +728,7 @@ - A container for serviceResource query results in references format. + A container for serviceResource query results in references format. @@ -705,7 +736,7 @@ - A single serviceResource query result in reference format. + A single serviceResource query result in reference format. @@ -713,7 +744,7 @@ - A container for edgeGateway query results in references format. + A container for edgeGateway query results in references format. @@ -721,7 +752,7 @@ - A single edgeGateway query result in reference format. + A single edgeGateway query result in reference format. @@ -729,7 +760,7 @@ - A container for orgVdcNetwork query results in references format. + A container for orgVdcNetwork query results in references format. @@ -737,7 +768,7 @@ - A single orgVdcNetwork query result in reference format. + A single orgVdcNetwork query result in reference format. @@ -745,7 +776,7 @@ - A container for vAppOrgVdcNetworkRelation query results in references format. + A container for vAppOrgVdcNetworkRelation query results in references format. @@ -753,7 +784,7 @@ - A single vAppOrgVdcNetworkRelation query result in reference format. + A single vAppOrgVdcNetworkRelation query result in reference format. @@ -761,7 +792,7 @@ - A container for vmGroupVms query results in references format. + A container for vmGroupVms query results in references format. @@ -769,7 +800,7 @@ - A single vmGroupVms query result in reference format. + A single vmGroupVms query result in reference format. @@ -777,7 +808,7 @@ - A container for vmGroups query results in references format. + A container for vmGroups query results in references format. @@ -785,7 +816,119 @@ - A single vmGroups query result in reference format. + A single vmGroups query result in reference format. + + + + + + + + A container for nsxTManager query results in references format. + + + + + + + + A single nsxTManager query result in reference format. + + + + + + + + A container for adminOrgVdcTemplate query results in references format. + + + + + + + + A single adminOrgVdcTemplate query result in reference format. + + + + + + + + A container for orgVdcTemplate query results in references format. + + + + + + + + A single orgVdcTemplate query result in reference format. + + + + + + + + A container for gatewayUplinks query results in references format. + + + + + + + + A single gatewayUplinks query result in reference format. + + + + + + + + A container for site query results in references format. + + + + + + + + A single site query result in reference format. + + + + + + + + A container for siteAssociation query results in references format. + + + + + + + + A single siteAssociation query result in reference format. + + + + + + + + A container for orgAssociation query results in references format. + + + + + + + + A single orgAssociation query result in reference format. diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/resourceEntity.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/resourceEntity.xsd index 7288f00b..3922952b 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/resourceEntity.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/resourceEntity.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,6 +28,7 @@ #L% --> + + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/screenTicket.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/screenTicket.xsd index 75e26546..33adec0d 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/screenTicket.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/screenTicket.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,6 +28,7 @@ #L% --> + + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/services.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/services.xsd index 9fee74a4..6506e9e7 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/services.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/services.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,6 +28,7 @@ #L% --> + + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/session.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/session.xsd index c39866d3..ca25e0fa 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/session.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/session.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,6 +28,7 @@ #L% --> + application/vnd.vmware.vcloud.session 1.5 + 33.0 Represents a vCloud Session. @@ -63,18 +65,22 @@ - + - - none - - - The locations, both local and remote, that can be accessed by this user in this session. - - - false - - + + + + MULTI_SITE + + none + + + The locations, both local and remote, that can be accessed by this user in this session. + + + false + + @@ -130,3 +136,4 @@ + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/task.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/task.xsd index d081355a..f632d141 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/task.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/task.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,6 +28,7 @@ #L% --> + false + + + + 33.0 + none + + List of Virtual Center tasks related to this vCD task. + + false + + @@ -162,8 +174,6 @@ success.)<br> <b>error</b> (The task encountered an error while running.)<br> - <b>canceled</b> (The task was canceled by the owner or an - administrator.)<br> <b>aborted</b> (The task was aborted by an administrative action.) @@ -253,34 +263,92 @@ application/vnd.vmware.admin.taskOperationList - - List of operation names. - - 1.5 + + List of operation names. + + 1.5 - - 1.5 - - An operation that will be enabled as a blocking - task. See the vCloud API Programming Guide for - the operation names. - - false - + + + + + 1.5 + + An operation that will be enabled as a blocking + task. See the vCloud API Programming Guide for + the operation names. + + false + + + + + + + + 9.8 + + An operation, along with its category, + that will be enabled as a blocking task. + See the vCloud API Programming Guide for + the operation names. + + false + always + + + + + application/vnd.vmware.admin.taskOperation + + + + A task operation with it's associated category. + + 33.0 + + + + + + 33.0 + + A category to which an operation is assigned. + + false + none + + + + + 33.0 + + An operation that will be enabled, each operation name + must be unique. + See the vCloud API Programming Guide for + the operation names. + + true + none + + + + + - + application/vnd.vmware.vcloud.taskPrototype @@ -324,4 +392,127 @@ + + + + 33.0 + + + Container for Virtual Center tasks. + + + + + + + + 33.0 + + none + true + + + + + + + + + + 33.0 + + + Virtual Center task. + + + + + + 33.0 + none + false + + + + + + 33.0 + none + false + + + + + + 33.0 + none + false + + + + + + 33.0 + none + false + + + + + + 33.0 + none + false + + + + + + 33.0 + none + false + + + + + + 33.0 + none + false + + + + + + 33.0 + none + false + + + + + + 33.0 + none + false + + + + + + 33.0 + none + false + + + + + + 33.0 + none + false + + + + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/tasksList.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/tasksList.xsd index d7c39427..fedefe4e 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/tasksList.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/tasksList.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,6 +28,7 @@ #L% --> + + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/vApp.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/vApp.xsd index dac2951b..b9345a46 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/vApp.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/vApp.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,12 +28,10 @@ #L% --> + false + + + + 31.0 + 33.0 + always + + A reference to a vdc compute policy. A VM will always belong + to vdc compute policy. The specified vDC compute policy must exist + in organization vDC. If not specified, default vDC compute policy + will be used. + + false + + + + + + VM_SIZING_POLICY + always + + A reference to a vdc compute policy. This contains VM's actual + vdc compute policy reference and also optionally an add-on + policy which always defines VM's sizing. + + false + + + + + + VM_SIZING_POLICY + always + + This element shows VM's non compliance details against a + given compute policy. + + false + + + + + + 33.0 + none + + True if VM is compliant with the associated compute policies + + false + + @@ -195,6 +244,16 @@ + + + + none + + True if VM is encrypted. This is a read-only value. + + false + + none @@ -348,6 +407,135 @@ + + + + + + application/vnd.vmware.vcloud.computePolicySection + + VM_SIZING_POLICY + + Compute policy details of the VM. + + + + + + + + + + + always + + VdcComputePolicy that defines VM's placement on a host through + various affinity constraints. + + false + + + + + + + + always + + True indicates that the placement policy cannot be removed from a VM that is + instantiated with it. This value defaults to false. + + false + + + + + + + + always + + VdcComputePolicy that defines VM's sizing and resource allocation. + + false + + + + + + + + always + + True indicates that the sizing policy cannot be removed from a VM that is + instantiated with it. This value defaults to false. + + false + + + + + + + + + + + + + application/vnd.vmware.vcloud.computePolicyComplianceSection + + VM_SIZING_POLICY + + Compute policy compliance details of the VM. + + + + + + + + + + + none + + Time when last compliance check for this VM for this policy was done. + This is a read-only value. + + true + + + + + + + + none + + Name of the policy whose compliance details are presented here. + This is a read-only value. + + true + + + + + + + + none + + Detailed reason about non-compliance of the VM. This is a read-only value. + + true + + + + + + + @@ -457,6 +645,7 @@ false + @@ -799,6 +988,37 @@ + + + + + Type of the IP address assigned to this NIC. + + false + + + + + + always + + + Secondary IP address associated with this NIC. + + + + + + + + + Type of the secondary IP address assigned to this NIC. This will be populated with 'IPv6' + for dual stack networks, even if there is no secondary IP. + + false + + + none @@ -835,23 +1055,40 @@ false - + always IP address allocation mode for this connection. - One of:<br> - <b>POOL</b> (A static IP address is allocated - automatically from a pool of addresses.)<br> - <b>DHCP</b> (The IP address is obtained from a DHCP - service.)<br> - <b>MANUAL</b> (The IP address is assigned manually in - the IpAddress element.)<br> - <b>NONE</b> (No IP addressing mode specified.) + One of: + POOL (A static IP address is allocated + automatically from a pool of addresses.), + DHCP (The IP address is obtained from a DHCP + service.), + MANUAL (The IP address is assigned manually in + the IpAddress element.), + NONE (No IP addressing mode specified.) true + + + always + + + Secondary IP address allocation mode for the secondary IP address associated with this connection. + One of: + POOL (A static IP address is allocated + automatically from a pool of addresses.), + DHCP (The IP address is obtained from a DHCP + service.), + MANUAL (The IP address is assigned manually in + the IpAddress element.), + NONE (No IP addressing mode specified.) + + + @@ -866,6 +1103,7 @@ <b>VMXNET2 (based on the VMXNET adapter but provides some high-performance features)</b><br> <b>VMXNET3 (next generation of a paravirtualized NIC designed for performance; not related to VMXNET or VMXNET2)</b><br> <b>FLEXIBLE (identifies itself as a Vlance adapter when a virtual machine boots, but initializes itself and functions as either a Vlance or a VMXNET adapter, depending on which driver initializes it)</b><br> + <b>SRIOVETHERNETCARD (Single Root I/O Virtualization virtual NIC, see https://kb.vmware.com/s/article/2038739)</b><br> false @@ -897,13 +1135,12 @@ - CREATE_BLANK_VM - Xxxxx. One of:<br> - 32 -- xxxx<br> - 64 -- xxxx + Describes virtualCpu type of VM. + VM32 -- for VMs which do not support longMode; + VM64 -- for VMs which support longMode. @@ -914,13 +1151,10 @@ - CREATE_BLANK_VM - Xxxxx. One of:<br> - xx -- xxxx<br> - xx -- xxxx + Represents media supported by VM. This can be an ISO image and/or floppy. @@ -931,7 +1165,6 @@ - CREATE_BLANK_VM @@ -956,11 +1189,10 @@ - CREATE_BLANK_VM - TBD + Describes a media in a VM device and what media is attached to it. @@ -970,7 +1202,9 @@ none - TBD + Describes the media device whose media mount is being specified here. + This deviceId must match the RASD.InstanceID attribute in the + VirtualHardwareSection of the vApp's OVF description. false @@ -1039,7 +1273,6 @@ - CREATE_BLANK_VM @@ -1164,20 +1397,82 @@ false + + + 34.0 + + none + + True if the disk can be grown. This is a read-only value. + + false + + + + + 34.0 + + none + + True if the disk is encrypted. This is a read-only value. + + false + + + + + 35.0 + 36.0 + + none + + True if the disk is shareable. This is a read-only value. + This attribute is deprecated; use sharingType instead. + + false + + + + + 36.0 + + none + + Sharing type of the disk. This attribute is immutable. + This attribute can only have values defined by DiskSharingType. + + false + + + + + + 36.0 + + Sharing type of named disks. + + + + + + + + + - CREATE_BLANK_VM - Xxxxx. One of:<br> - xx -- xxxx<br> - xx -- xxxx + Allocation level for how much of a resource can be consumed by the + underlying virtualization infrastructure. These levels map to a + pre-determined set of numeric values for shares. Custom shares can be + specified by using ResourceShareLevel as Custom. @@ -1190,11 +1485,11 @@ - CREATE_BLANK_VM - xxxx + The section of the VM representation that has to do with the VM's media + devices (floppies and CDROM) @@ -1204,7 +1499,7 @@ always - xxx. + Describes a media in a VM device and what media is attached to it. true @@ -1216,11 +1511,10 @@ - CREATE_BLANK_VM - xxxx + The section of the VM representation that has to do with the VM's disks. @@ -1230,7 +1524,7 @@ always - xxx. + A description of a virtual disk of a VM. true @@ -1242,11 +1536,11 @@ - CREATE_BLANK_VM - xxxx + Stores the configured value, reservation, shares and limit for compute + resources such CPU and Memory for a virtualized workload. @@ -1256,7 +1550,7 @@ always - xxx. + The amount of resource configured on the virtual machine. true @@ -1265,7 +1559,8 @@ always - xxx. + The amount of reservation of this resource on the underlying + virtualization infrastructure. false @@ -1274,7 +1569,9 @@ always - xxx. + The limit for how much of this resource can be consumed on the + underlying virtualization infrastructure. This is only valid when + the resource allocation is not unlimited. false @@ -1283,7 +1580,9 @@ always - xxx. + Pre-determined relative priorities according to which the + non-reserved portion of this resource is made available to the + virtualized workload. false @@ -1292,7 +1591,8 @@ always - xxx. + Custom priority for the resource. This is a read-only, unless the + share level is CUSTOM. false @@ -1302,7 +1602,16 @@ - + + + + + + + + + + @@ -1310,9 +1619,12 @@ Represents a supported virtual hardware version. + + + - + @@ -1334,13 +1646,12 @@ - + - application/vnd.vmware.vcloud.simpleVirtualHardwareSection @@ -2190,6 +2501,36 @@ + + + + 31.0 + always + 33.0 + + A reference to a vdc compute policy. A VM will always belong + to vdc compute policy. The specified vDC compute policy must exist + in organization vDC. If not specified, default vDC compute policy + will be used. + + false + + + + + + + + VM_SIZING_POLICY + always + + A reference to a vdc compute policy. This contains VM's actual + vdc compute policy reference and also optionally an add-on + policy which always defines VM's sizing. + + false + + @@ -2258,10 +2599,8 @@ INSTANTIATE_VM_TEMPLATE - Represents an existing VM template from a Catalog. - Internal use only. @@ -2374,10 +2713,8 @@ INSTANTIATE_VM_TEMPLATE - Represents VM template instantiation parameters. - Internal use only. @@ -2415,6 +2752,21 @@ false + + + + + + VM_SIZING_POLICY + always + + A reference to a vdc compute policy. This contains VM's actual + vdc compute policy reference and also optionally an add-on + policy which always defines VM's sizing. + + false + + @@ -2563,7 +2915,6 @@ application/vnd.vmware.vcloud.CreateVmParams - CREATE_BLANK_VM @@ -2968,9 +3319,10 @@ - 5.6 - + 5.1 + 5.6 + API_VERSION_POST9_1_UPDATE Represents instantiation parameters. Deprecated in favor of SourcedCompositionItemParamType @@ -3079,13 +3431,14 @@ + 5.6 - always Represents virtual machine instantiation parameters. false + API_VERSION_POST9_1_UPDATE @@ -3528,6 +3881,65 @@ + + + + + + application/vnd.vmware.vcloud.moveVAppParams + + 34.0 + + Parameters for a MoveVApp request. + + + + + + + + + + always + + A reference to a source vApp that will be moved. + + true + + + + + + + always + + An ovf:Section_Type element that specifies vApp + configuration on instantiate, compose, or + recompose. + + + [http://www.vmware.com/vcloud/v1.5] NetworkConfigSection + + false + + + + + + + always + + Represents VM instantiation parameters of the VMs in the source vApp. + SourceDelete is always ignored in the Move vApp context. + + false + + + + + + + @@ -3674,7 +4086,13 @@ true - + + + always + Params to customize template VM during capture + false + + always @@ -3686,8 +4104,8 @@ + 5.5 - always A reference to the storage profile to be @@ -3695,6 +4113,7 @@ capture. Ignored by vCloud Director 5.5 and later. false + API_VERSION_POST9_1_UPDATE @@ -3715,6 +4134,47 @@ + + + + application/vnd.vmware.vcloud.captureVmParams + + 0.9 + + Parameters for a VM which is being captured. + + + + + + + + + + 31.0 + always + A reference to VM being captured. + true + + + + + + 31.0 + always + 33.0 + + A reference to a vdc compute policy for template VM. During instantiation + this vdc compute policy should be present in destination vDC. + + false + + + + + + + @@ -3993,3 +4453,4 @@ + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/vAppTemplate.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/vAppTemplate.xsd index f599b147..785299a7 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/vAppTemplate.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/vAppTemplate.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,6 +28,7 @@ #L% --> + false + + + + 31.0 + always + 33.0 + + A reference to a vdc compute policy for template VM. During instantiation + this vdc compute policy should be present in destination vDC. + + false + + + + + + + + 33.0 + always + + A reference to a vDC compute policy. This contains VM's actual + vdc compute policy reference and also optionally an add-on + policy which can only define VM's sizing. + + false + + @@ -377,3 +406,4 @@ + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/vcloud.xjb b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/vcloud.xjb index cabfa408..5a2bc351 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/vcloud.xjb +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/vcloud.xjb @@ -10,7 +10,7 @@ - + + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/vcloud.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/vcloud.xsd index 76cf8213..899e3140 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/vcloud.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/vcloud.xsd @@ -1,9 +1,9 @@ - + + + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/vdc.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/vdc.xsd index 517b7125..180bae39 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/vdc.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/vdc.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,6 +28,7 @@ #L% --> + + + + + none + + A label which uniquely identifies the compute source of this VDC. + + false + + + + + + none + + A label which uniquely identifies the network provider source of this VDC. + + false + + always @@ -159,7 +180,15 @@ resources you allocate are committed as a pool to the organization vDC. vApps in vDCs that support this allocation model can specify - values for resource and limit.) + values for resource and limit.)<br> + <b>Flex</b> (Only a + percentage of the resources you allocate are + committed to the organization vDC. You can + allocate zero resources also and make it behave + like a Pay-As-You-Go type. Based on the values + chosen for allocated resources and limits, this + vDC can be made to behave as any of the existing + three types.) false @@ -274,6 +303,28 @@ false + + + + TENANT_VM_GROUP + none + + Default vDC compute policy in this organization vDC. + + false + + + + + + GENERIC_VDC_TYPE + none + + Max vDC compute policy in this organization vDC. + + false + + + true + + + + always + + True if VCD IOPs placement should be ignored for all disks using this + storage policy. + + false + + @@ -224,6 +236,16 @@ false + + + + always + + True if this Org VDC storage profile should inherit the default settings of the parent PVDC storage profile. + + false + + @@ -249,3 +271,4 @@ + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/vendorServices.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/vendorServices.xsd index ed791f74..8ae8ed99 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/vendorServices.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/vendorServices.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,6 +28,7 @@ #L% --> + + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/vmAffinityRule.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/vmAffinityRule.xsd index 3cb5017c..bc31a566 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/vmAffinityRule.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/vmAffinityRule.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,6 +28,8 @@ #L% --> + + + diff --git a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/vms.xsd b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/vms.xsd index 754d2706..f1fdb6c2 100644 --- a/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/vms.xsd +++ b/schemas/rest-api/src/main/resources/etc/1.5/schemas/vcloud/vms.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,6 +28,7 @@ #L% --> + true + + + + none + + Reserved combination of bus-number/unit-number. + + false + + @@ -297,6 +308,33 @@ + + + + + A combination of bus and unit number. + + + + + none + + Bus Number. + + true + + + + + none + + Unit Number. + + true + + + + @@ -439,11 +477,23 @@ + 31.0 none True if this operating system is supported for use in this organization. + false + + + + + + none + + One of the strings "Supported", "Legacy", "Deprecated", "Terminated", or "Unsupported". + See https://kb.vmware.com/s/article/2015161 + true @@ -604,3 +654,4 @@ + diff --git a/schemas/rest-api/src/main/resources/etc/schemas/versioning/versions.xsd b/schemas/rest-api/src/main/resources/etc/schemas/versioning/versions.xsd index d2095a79..631ce2b7 100644 --- a/schemas/rest-api/src/main/resources/etc/schemas/versioning/versions.xsd +++ b/schemas/rest-api/src/main/resources/etc/schemas/versioning/versions.xsd @@ -3,7 +3,7 @@ #%L vcd-rest-api-schemas :: vCloud Director REST API schemas %% - Copyright (C) 2013 - 2018 VMware + Copyright (C) 2013 - 2021 VMware %% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,7 +28,11 @@ #L% --> - + + @@ -47,6 +51,8 @@ + + @@ -72,8 +78,21 @@ none - Login URL for the version. + Login URL for the version, + (Starting API v36.0, this URL is for tenants only. Provider's must use the dedicated provider login) + + + + + + 36.0 + none + + Provider's Login URL for the version. + + + @@ -83,6 +102,7 @@ Media type mapping. This element is not present when the API version is 5.7 or higher. + 33.0 @@ -105,6 +125,7 @@ Mapping of a content media type to a xsd complex type. + 33.0 @@ -136,3 +157,4 @@ +