Closed coudi3bm closed 2 years ago
Hi @coudi3bm could you share details of which VCD version you use and logs? I couldn't reproduce the issue.
VMware Cloud Director version: 10.3.2.19173133
2022/02/01 14:14:09 [DEBUG] Update call function for version 32.0
2022/02/01 14:14:09 [TRACE] updateVdcV97 called govcd.AdminVdc{AdminVdc:(*types.AdminVdc)(0xc0007a4380), client:(*govcd.Client)(0xc0001a6f00), parent:(*govcd.AdminOrg)(0xc000787230)}
2022/02/01 14:14:09 [TRACE] updateVdcAsyncV97 called govcd.AdminVdc{AdminVdc:(*types.AdminVdc)(0xc0007a4380), client:(*govcd.Client)(0xc0001a6f00), parent:(*govcd.AdminOrg)(0xc000787230)}
2022/02/01 14:14:09 --------------------------------------------------------------------------------
2022/02/01 14:14:09 Request caller: govcd.updateVdcAsyncV97-->govcd.(*Client).executeTaskRequest-->govcd.executeRequestWithApiVersion-->govcd.executeRequestCustomErr-->govcd.(*Client).NewRequestWithApiVersion-->govcd.(*Client).newRequest
2022/02/01 14:14:09 PUT https://[DATA DELETED]/api/admin/vdc/fd6b04a3-0fb2-493b-80ab-f58ecece1f46
2022/02/01 14:14:09 --------------------------------------------------------------------------------
2022/02/01 14:14:09 Req header:
2022/02/01 14:14:09 User-Agent: [DATA DELETED]
2022/02/01 14:14:09 X-Vmware-Vcloud-Access-Token: [********]
2022/02/01 14:14:09 Accept: [application/*+xml;version=35.0]
2022/02/01 14:14:09 X-Vmware-Vcloud-Token-Type: [Bearer]
2022/02/01 14:14:09 Authorization: [********]
2022/02/01 14:14:09 Request data: [18067]
<?xml version="1.0" encoding="UTF-8"?>
<AdminVdc xmlns="http://www.vmware.com/vcloud/v1.5" href="https://[DATA DELETED]/api/admin/vdc/fd6b04a3-0fb2-493b-80ab-f58ecece1f46" type="application/vnd.vmware.admin.vdc+xml" id="urn:vcloud:vdc:fd6b04a3-0fb2-493b-80ab-f58ecece1f46" name="test-description" status="1">
<Link href="https://[DATA DELETED]/api/admin/org/db616717-b3c3-4e1f-9261-a6e5ccfbec08" type="application/vnd.vmware.admin.organization+xml" rel="up"></Link>
<Link href="https://[DATA DELETED]/api/admin/org/db616717-b3c3-4e1f-9261-a6e5ccfbec08" type="application/vnd.vmware.admin.organization+json" rel="up"></Link>
<Link href="https://[DATA DELETED]/api/admin/vdc/fd6b04a3-0fb2-493b-80ab-f58ecece1f46/metadata" type="application/vnd.vmware.vcloud.metadata+xml" rel="down"></Link>
<Link href="https://[DATA DELETED]/api/admin/vdc/fd6b04a3-0fb2-493b-80ab-f58ecece1f46/metadata" type="application/vnd.vmware.vcloud.metadata+json" rel="down"></Link>
<Link href="https://[DATA DELETED]/api/admin/vdc/fd6b04a3-0fb2-493b-80ab-f58ecece1f46" rel="remove"></Link>
<Link href="https://[DATA DELETED]/api/admin/vdc/fd6b04a3-0fb2-493b-80ab-f58ecece1f46" type="application/vnd.vmware.admin.vdc+xml" rel="edit"></Link>
<Link href="https://[DATA DELETED]/api/admin/vdc/fd6b04a3-0fb2-493b-80ab-f58ecece1f46" type="application/vnd.vmware.admin.vdc+json" rel="edit"></Link>
<Link href="https://[DATA DELETED]/api/admin/vdc/fd6b04a3-0fb2-493b-80ab-f58ecece1f46/action/disable" rel="disable"></Link>
<Link href="https://[DATA DELETED]/api/admin/vdc/fd6b04a3-0fb2-493b-80ab-f58ecece1f46/action/registerVApp" type="application/vnd.vmware.admin.registerVAppParams+xml" rel="add"></Link>
<Link href="https://[DATA DELETED]/api/admin/vdc/fd6b04a3-0fb2-493b-80ab-f58ecece1f46/action/registerVApp" type="application/vnd.vmware.admin.registerVAppParams+json" rel="add"></Link>
<Link href="https://[DATA DELETED]/api/admin/vdc/fd6b04a3-0fb2-493b-80ab-f58ecece1f46/computePolicies" type="application/vnd.vmware.vcloud.vdcComputePolicyReferences+xml" rel="down"></Link>
<Link href="https://[DATA DELETED]/api/admin/vdc/fd6b04a3-0fb2-493b-80ab-f58ecece1f46/computePolicies" type="application/vnd.vmware.vcloud.vdcComputePolicyReferences+json" rel="down"></Link>
<Link href="https://[DATA DELETED]/api/vdc/fd6b04a3-0fb2-493b-80ab-f58ecece1f46/controlAccess/" type="application/vnd.vmware.vcloud.controlAccess+xml" rel="down"></Link>
<Link href="https://[DATA DELETED]/api/vdc/fd6b04a3-0fb2-493b-80ab-f58ecece1f46/controlAccess/" type="application/vnd.vmware.vcloud.controlAccess+json" rel="down"></Link>
<Link href="https://[DATA DELETED]/api/vdc/fd6b04a3-0fb2-493b-80ab-f58ecece1f46/action/controlAccess" type="application/vnd.vmware.vcloud.controlAccess+xml" rel="controlAccess"></Link>
<Link href="https://[DATA DELETED]/api/vdc/fd6b04a3-0fb2-493b-80ab-f58ecece1f46/action/controlAccess" type="application/vnd.vmware.vcloud.controlAccess+json" rel="controlAccess"></Link>
<Link href="https://[DATA DELETED]/cloudapi/1.0.0/vdcs/urn:vcloud:vdc:fd6b04a3-0fb2-493b-80ab-f58ecece1f46/networkProfile" type="application/json" rel="down:vdcNetworkProfile"></Link>
<Link href="https://[DATA DELETED]/cloudapi/1.0.0/vdcs/urn:vcloud:vdc:fd6b04a3-0fb2-493b-80ab-f58ecece1f46/capabilities" type="application/json" rel="vdcCapabilities"></Link>
<Link href="https://[DATA DELETED]/cloudapi/1.0.0/firewallGroups" type="application/json" rel="down:firewallGroups"></Link>
<Link href="https://[DATA DELETED]/cloudapi/1.0.0/applicationPortProfiles" type="application/json" rel="down:appPortProfiles"></Link>
<Link href="https://[DATA DELETED]/cloudapi/1.0.0/vdcs/urn:vcloud:vdc:fd6b04a3-0fb2-493b-80ab-f58ecece1f46/maxComputePolicy" type="application/json" rel="down"></Link>
<Link href="https://[DATA DELETED]/cloudapi/1.0.0/vdcs/urn:vcloud:vdc:fd6b04a3-0fb2-493b-80ab-f58ecece1f46/maxComputePolicy" type="application/json" rel="edit"></Link>
<Link href="https://[DATA DELETED]/cloudapi/1.0.0/vdcs/urn:vcloud:vdc:fd6b04a3-0fb2-493b-80ab-f58ecece1f46/computePolicies" type="application/json" rel="down"></Link>
<Link href="https://[DATA DELETED]/cloudapi/2.0.0/vdcs/urn:vcloud:vdc:fd6b04a3-0fb2-493b-80ab-f58ecece1f46/computePolicies" type="application/json" rel="down"></Link>
<Link href="https://[DATA DELETED]/api/admin/vdc/fd6b04a3-0fb2-493b-80ab-f58ecece1f46" type="application/vnd.vmware.admin.vdc+xml" rel="alternate"></Link>
<Link href="https://[DATA DELETED]/api/admin/vdc/fd6b04a3-0fb2-493b-80ab-f58ecece1f46" type="application/vnd.vmware.admin.vdc+json" rel="alternate"></Link>
<Link href="https://[DATA DELETED]/api/vdc/fd6b04a3-0fb2-493b-80ab-f58ecece1f46/vmAffinityRules/" type="application/vnd.vmware.vcloud.vmaffinityrule+xml" rel="add"></Link>
<Link href="https://[DATA DELETED]/api/vdc/fd6b04a3-0fb2-493b-80ab-f58ecece1f46/vmAffinityRules/" type="application/vnd.vmware.vcloud.vmaffinityrule+json" rel="add"></Link>
<Link href="https://[DATA DELETED]/api/vdc/fd6b04a3-0fb2-493b-80ab-f58ecece1f46/vmAffinityRules/" type="application/vnd.vmware.vcloud.vmaffinityrules+xml" rel="down"></Link>
<Link href="https://[DATA DELETED]/api/vdc/fd6b04a3-0fb2-493b-80ab-f58ecece1f46/vmAffinityRules/" type="application/vnd.vmware.vcloud.vmaffinityrules+json" rel="down"></Link>
<Link href="https://[DATA DELETED]/cloudapi/1.0.0/edgeGateways" type="application/json" rel="add"></Link>
<Link href="https://[DATA DELETED]/api/vdc/fd6b04a3-0fb2-493b-80ab-f58ecece1f46" type="application/vnd.vmware.vcloud.vdc+xml" rel="alternate"></Link>
<Link href="https://[DATA DELETED]/api/vdc/fd6b04a3-0fb2-493b-80ab-f58ecece1f46" type="application/vnd.vmware.vcloud.vdc+json" rel="alternate"></Link>
<Link href="https://[DATA DELETED]/api/admin/vdc/fd6b04a3-0fb2-493b-80ab-f58ecece1f46/edgeGateways" type="application/vnd.vmware.vcloud.query.records+xml" rel="edgeGateways"></Link>
<Link href="https://[DATA DELETED]/api/admin/vdc/fd6b04a3-0fb2-493b-80ab-f58ecece1f46/edgeGateways" type="application/vnd.vmware.vcloud.query.records+json" rel="edgeGateways"></Link>
<Link href="https://[DATA DELETED]/api/admin/vdc/fd6b04a3-0fb2-493b-80ab-f58ecece1f46/networks" type="application/vnd.vmware.vcloud.orgVdcNetwork+xml" rel="add"></Link>
<Link href="https://[DATA DELETED]/api/admin/vdc/fd6b04a3-0fb2-493b-80ab-f58ecece1f46/networks" type="application/vnd.vmware.vcloud.orgVdcNetwork+json" rel="add"></Link>
<Link href="https://[DATA DELETED]/network/orgvdcnetworks/import?orgVdc=fd6b04a3-0fb2-493b-80ab-f58ecece1f46" type="application/*+xml" rel="import:network"></Link>
<Link href="https://[DATA DELETED]/network/orgvdcnetworks/importableswitches?orgVdc=fd6b04a3-0fb2-493b-80ab-f58ecece1f46" type="application/*+xml" rel="down:importableSwitches"></Link>
<Link href="https://[DATA DELETED]/api/admin/vdc/fd6b04a3-0fb2-493b-80ab-f58ecece1f46/networks" type="application/vnd.vmware.vcloud.query.records+xml" rel="orgVdcNetworks"></Link>
<Link href="https://[DATA DELETED]/api/admin/vdc/fd6b04a3-0fb2-493b-80ab-f58ecece1f46/networks" type="application/vnd.vmware.vcloud.query.records+json" rel="orgVdcNetworks"></Link>
<Link href="https://[DATA DELETED]/api/admin/extension/vdc/fd6b04a3-0fb2-493b-80ab-f58ecece1f46/resourcePools" type="application/vnd.vmware.admin.OrganizationVdcResourcePoolSet+xml" rel="down"></Link>
<Link href="https://[DATA DELETED]/api/admin/extension/vdc/fd6b04a3-0fb2-493b-80ab-f58ecece1f46/resourcePools" type="application/vnd.vmware.admin.OrganizationVdcResourcePoolSet+json" rel="down"></Link>
<Link href="https://[DATA DELETED]/api/admin/vdc/fd6b04a3-0fb2-493b-80ab-f58ecece1f46/vdcStorageProfiles" type="application/vnd.vmware.admin.updateVdcStorageProfiles+xml" rel="edit"></Link>
<Link href="https://[DATA DELETED]/api/admin/vdc/fd6b04a3-0fb2-493b-80ab-f58ecece1f46/vdcStorageProfiles" type="application/vnd.vmware.admin.updateVdcStorageProfiles+json" rel="edit"></Link>
<Link href="https://[DATA DELETED]/api/admin/vdc/fd6b04a3-0fb2-493b-80ab-f58ecece1f46/extension" type="application/vnd.vmware.admin.extensibility.selectors+xml" rel="down"></Link>
<Link href="https://[DATA DELETED]/api/admin/vdc/fd6b04a3-0fb2-493b-80ab-f58ecece1f46/extension" type="application/vnd.vmware.admin.extensibility.selectors+json" rel="down"></Link>
<Description>testing</Description>
<Tasks>
<Task href="https://[DATA DELETED]/api/task/24943d7e-2238-4405-ab4a-db394577e453" type="application/vnd.vmware.vcloud.task+xml" id="urn:vcloud:task:24943d7e-2238-4405-ab4a-db394577e453" name="task" status="error" operation="Updated Storage Policies for Virtual Datacenter test-description(fd6b04a3-0fb2-493b-80ab-f58ecece1f46)" operationName="vdcUpdateStorageProfiles" serviceNamespace="com.vmware.vcloud" startTime="2022-02-01T11:12:32.780Z" endTime="2022-02-01T11:12:34.755Z" expiryTime="2022-05-02T11:12:32.780Z">
<Details>[ 892ca04b-92c8-48c6-959b-12a78fc68304 ] Storage policy "Silver+" cannot be deleted since it is currently in use.</Details>
<Error message="[ 892ca04b-92c8-48c6-959b-12a78fc68304 ] Storage policy "Silver+" cannot be deleted since it is currently in use." majorErrorCode="400" minorErrorCode="BAD_REQUEST" stackTrace="com.vmware.vcloud.api.presentation.service.BadRequestException: Storage policy "Silver+" cannot be deleted since it is currently in use.
	at com.vmware.vcloud.api.presentation.service.impl.VdcServiceAdapterImpl.updateVdcStorageClassesTask(VdcServiceAdapterImpl.java:944)
	at com.vmware.vcloud.api.presentation.service.impl.VdcServiceAdapterImpl.executeTask(VdcServiceAdapterImpl.java:3143)
	at com.vmware.vcloud.backendbase.management.system.TaskActivity$ExecutePhase$1.doInSecurityContext(TaskActivity.java:828)
	at com.vmware.vcloud.backendbase.management.system.TaskActivity$ExecutePhase$1.doInSecurityContext(TaskActivity.java:823)
	at com.vmware.vcloud.backendbase.management.system.SecurityContextTemplate.executeForOrgAndUser(SecurityContextTemplate.java:48)
	at com.vmware.vcloud.backendbase.management.system.TaskActivity$ExecutePhase.execute(TaskActivity.java:830)
	at com.vmware.vcloud.backendbase.management.system.TaskActivity$ExecutePhase.invokeInner(TaskActivity.java:726)
	at com.vmware.vcloud.backendbase.management.system.TaskActivity$TaskActivityBasePhase.invoke(TaskActivity.java:342)
	at com.vmware.vcloud.activity.executors.ActivityRunner.runPhase(ActivityRunner.java:175)
	at com.vmware.vcloud.activity.executors.ActivityRunner.run(ActivityRunner.java:112)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
"></Error>
<Link href="https://[DATA DELETED]/api/task/24943d7e-2238-4405-ab4a-db394577e453" type="application/vnd.vmware.vcloud.task+json" name="task" rel="edit"></Link>
<Organization href="https://[DATA DELETED]/api/org/db616717-b3c3-4e1f-9261-a6e5ccfbec08" id="urn:vcloud:org:db616717-b3c3-4e1f-9261-a6e5ccfbec08" type="application/vnd.vmware.vcloud.org+xml" name="test-org"></Organization>
<Owner href="https://[DATA DELETED]/api/admin/vdc/fd6b04a3-0fb2-493b-80ab-f58ecece1f46" id="urn:vcloud:vdc:fd6b04a3-0fb2-493b-80ab-f58ecece1f46" type="application/vnd.vmware.admin.vdc+xml" name="test-description"></Owner>
<User href="https://[DATA DELETED]/api/admin/user/97d7f6be-2210-49ca-907f-4334f35af274" id="urn:vcloud:user:97d7f6be-2210-49ca-907f-4334f35af274" type="application/vnd.vmware.admin.user+xml" name="coudi3bm"></User>
</Task>
</Tasks>
<AllocationModel>Flex</AllocationModel>
<ComputeCapacity>
<Cpu>
<Units>MHz</Units>
<Allocated>0</Allocated>
<Limit>0</Limit>
<Used>4000</Used>
</Cpu>
<Memory>
<Units>MB</Units>
<Allocated>0</Allocated>
<Limit>0</Limit>
<Used>8192</Used>
</Memory>
</ComputeCapacity>
<ResourceEntities>
<ResourceEntity href="https://[DATA DELETED]/api/vAppTemplate/vappTemplate-500b6367-bc63-4110-94fb-8cce810cdfba" id="urn:vcloud:vapptemplate:500b6367-bc63-4110-94fb-8cce810cdfba" type="application/vnd.vmware.vcloud.vAppTemplate+xml" name="test"></ResourceEntity>
<ResourceEntity href="https://[DATA DELETED]/api/vApp/vapp-42b7cb21-98b0-4703-9cc6-d5768338fd65" id="urn:vcloud:vapp:42b7cb21-98b0-4703-9cc6-d5768338fd65" type="application/vnd.vmware.vcloud.vApp+xml" name="test-b50e6f72-22bb-454b-bfed-cadf115eb6e3"></ResourceEntity>
<ResourceEntity href="https://[DATA DELETED]/api/vApp/vapp-44f1861b-f275-4f74-88d2-6674e396548d" id="urn:vcloud:vapp:44f1861b-f275-4f74-88d2-6674e396548d" type="application/vnd.vmware.vcloud.vApp+xml" name="test-2-8a42d0cd-d562-4f5d-8800-64d191e0fc41"></ResourceEntity>
<ResourceEntity href="https://[DATA DELETED]/api/vApp/vapp-64cca0e6-b0b4-472b-836b-556ffe887b54" id="urn:vcloud:vapp:64cca0e6-b0b4-472b-836b-556ffe887b54" type="application/vnd.vmware.vcloud.vApp+xml" name="test-3-edf9116c-11b2-445d-8903-8a9bbd9d28c7"></ResourceEntity>
</ResourceEntities>
<AvailableNetworks>
<Network href="https://[DATA DELETED]/api/admin/network/48c1ea7e-3f03-402d-beae-639e3d7b60b4" id="urn:vcloud:network:48c1ea7e-3f03-402d-beae-639e3d7b60b4" type="application/vnd.vmware.admin.network+xml" name="test-description-network-default"></Network>
</AvailableNetworks>
<Capabilities>
<SupportedHardwareVersions>
<SupportedHardwareVersion>vmx-04</SupportedHardwareVersion>
<SupportedHardwareVersion>vmx-07</SupportedHardwareVersion>
<SupportedHardwareVersion>vmx-08</SupportedHardwareVersion>
<SupportedHardwareVersion>vmx-09</SupportedHardwareVersion>
<SupportedHardwareVersion>vmx-10</SupportedHardwareVersion>
<SupportedHardwareVersion>vmx-11</SupportedHardwareVersion>
<SupportedHardwareVersion>vmx-12</SupportedHardwareVersion>
<SupportedHardwareVersion>vmx-13</SupportedHardwareVersion>
<SupportedHardwareVersion>vmx-14</SupportedHardwareVersion>
<SupportedHardwareVersion>vmx-15</SupportedHardwareVersion>
<SupportedHardwareVersion>vmx-16</SupportedHardwareVersion>
<SupportedHardwareVersion>vmx-17</SupportedHardwareVersion>
<SupportedHardwareVersion>vmx-18</SupportedHardwareVersion>
</SupportedHardwareVersions>
</Capabilities>
<NicQuota>0</NicQuota>
<NetworkQuota>1000</NetworkQuota>
<UsedNetworkCount>1</UsedNetworkCount>
<VmQuota>100</VmQuota>
<IsEnabled>true</IsEnabled>
<VdcStorageProfiles>
<VdcStorageProfile href="https://[DATA DELETED]/api/admin/vdcStorageProfile/9737bc6e-3ae5-4f94-b994-41846c23ff92" id="urn:vcloud:vdcstorageProfile:9737bc6e-3ae5-4f94-b994-41846c23ff92" type="application/vnd.vmware.admin.vdcStorageProfile+xml" name="Silver+"></VdcStorageProfile>
<VdcStorageProfile href="https://[DATA DELETED]/api/admin/vdcStorageProfile/d3480f28-dc48-49e5-bfc7-c3013da65146" id="urn:vcloud:vdcstorageProfile:d3480f28-dc48-49e5-bfc7-c3013da65146" type="application/vnd.vmware.admin.vdcStorageProfile+xml" name="Silver"></VdcStorageProfile>
</VdcStorageProfiles>
<DefaultComputePolicy href="https://[DATA DELETED]/cloudapi/1.0.0/vdcComputePolicies/urn:vcloud:vdcComputePolicy:103059a7-90ab-44b0-8e70-00a5502eb81c" id="urn:vcloud:vdcComputePolicy:103059a7-90ab-44b0-8e70-00a5502eb81c" type="application/json" name="System Default"></DefaultComputePolicy>
<VCpuInMhz2>1000</VCpuInMhz2>
<ResourceGuaranteedMemory>0</ResourceGuaranteedMemory>
<ResourceGuaranteedCpu>0</ResourceGuaranteedCpu>
<VCpuInMhz>1000</VCpuInMhz>
<IsThinProvision>false</IsThinProvision>
<NetworkPoolReference href="https://[DATA DELETED]/api/admin/extension/networkPool/880b1709-a360-42d1-944c-e1f9c8a21084" id="urn:vcloud:networkpool:880b1709-a360-42d1-944c-e1f9c8a21084" type="application/vnd.vmware.admin.networkPool+xml"></NetworkPoolReference>
<ProviderVdcReference href="https://[DATA DELETED]/api/admin/providervdc/5fcd5e96-d130-46af-9247-28b26c1cbabb" id="urn:vcloud:providervdc:5fcd5e96-d130-46af-9247-28b26c1cbabb" type="application/vnd.vmware.admin.providervdc+xml" name="[DATA DELETED]"></ProviderVdcReference>
<UsesFastProvisioning>false</UsesFastProvisioning>
<IsElastic>true</IsElastic>
<IncludeMemoryOverhead>false</IncludeMemoryOverhead>
</AdminVdc>
2022/02/01 14:14:09 ################################################################################
2022/02/01 14:14:09 Response caller govcd.updateVdcAsyncV97-->govcd.(*Client).executeTaskRequest-->govcd.executeRequestWithApiVersion-->govcd.executeRequestCustomErr-->govcd.checkRespWithErrType-->govcd.ParseErr-->govcd.decodeBody
2022/02/01 14:14:09 Response status 400 Bad Request
2022/02/01 14:14:09 ################################################################################
2022/02/01 14:14:09 Response header:
2022/02/01 14:14:09 X-Vmware-Vcloud-Ceip-Id: [5386f7e3-256d-43f8-ae94-78a51b7fa877]
2022/02/01 14:14:09 Content-Type: [application/vnd.vmware.vcloud.error+xml;version=35.0]
2022/02/01 14:14:09 X-Vmware-Vcloud-Request-Execution-Time: [15,15]
2022/02/01 14:14:09 Cache-Control: [no-store, must-revalidate]
2022/02/01 14:14:09 Date: [Tue, 01 Feb 2022 11:14:09 GMT]
2022/02/01 14:14:09 X-Vmware-Vcloud-Request-Id: [a499c313-f862-4586-9615-48cfdf57a0b9]
2022/02/01 14:14:09 Response text: [12123]
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Error xmlns="http://www.vmware.com/vcloud/v1.5" xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" xmlns:common="http://schemas.dmtf.org/wbem/wscim/1/common" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:vmw="http://www.vmware.com/schema/ovf" xmlns:ovfenv="http://schemas.dmtf.org/ovf/environment/1" xmlns:ns9="http://www.vmware.com/vcloud/versions" stackTrace="javax.ws.rs.BadRequestException: HTTP 400 Bad Request at org.apache.cxf.jaxrs.utils.SpecExceptions.toBadRequestException(SpecExceptions.java:84) at org.apache.cxf.jaxrs.utils.ExceptionUtils.toBadRequestException(ExceptionUtils.java:120) at org.apache.cxf.jaxrs.provider.AbstractJAXBProvider.handleExceptionEnd(AbstractJAXBProvider.java:727) at org.apache.cxf.jaxrs.provider.AbstractJAXBProvider.handleJAXBException(AbstractJAXBProvider.java:753) at org.apache.cxf.jaxrs.provider.JAXBElementProvider.readFrom(JAXBElementProvider.java:205) at org.apache.cxf.jaxrs.provider.JAXBElementTypedProvider.readFrom(JAXBElementTypedProvider.java:41) at org.apache.cxf.jaxrs.provider.JAXBElementTypedProvider.readFrom(JAXBElementTypedProvider.java:34) at org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBodyReader(JAXRSUtils.java:1500) at org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBody(JAXRSUtils.java:1452) at org.apache.cxf.jaxrs.utils.JAXRSUtils.processRequestBodyParameter(JAXRSUtils.java:950) at org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameters(JAXRSUtils.java:881) at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:283) at com.vmware.vcloud.api.rest.jaxrs.ContextClassLoaderInvoker.invoke(ContextClassLoaderInvoker.java:27) at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:104) at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59) at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:265) at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234) at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208) at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160) at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:225) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:298) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPut(AbstractHTTPServlet.java:234) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:273) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:848) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1780) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320) at com.vmware.vcloud.api.framework.web.ExtensibilityFilter.doFilter(ExtensibilityFilter.java:159) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) at com.vmware.vcloud.security.filters.ValidityExceptionFilter.doFilterHttp(ValidityExceptionFilter.java:47) at com.vmware.vcloud.security.filters.HttpFilterBean.doFilter(HttpFilterBean.java:35) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) at com.vmware.vcloud.security.web.RestSessionFilter.doFilter(RestSessionFilter.java:235) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) at com.vmware.vcloud.security.web.CellLivenessCheckFilter.doFilter(CellLivenessCheckFilter.java:54) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) at com.vmware.vcloud.security.web.SecurityContextCleanerFilter.doFilter(SecurityContextCleanerFilter.java:32) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) at com.vmware.vcloud.api.rest.versioning.AcceptHeaderFilter.doFilter(AcceptHeaderFilter.java:78) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) at com.vmware.vcloud.security.filters.ConversationFilter$1.run(ConversationFilter.java:39) at com.vmware.vcloud.security.filters.ConversationFilter$1.run(ConversationFilter.java:37) at com.vmware.vcloud.common.persist.ConversationContextExecutor.execute(ConversationContextExecutor.java:67) at com.vmware.vcloud.security.filters.ConversationFilter.doFilter(ConversationFilter.java:45) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:358) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:271) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759) at com.vmware.vcloud.common.web.deployment.impl.HostCheckerFilter.doFilter(HostCheckerFilter.java:107) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1767) at com.vmware.vcloud.common.web.deployment.impl.RequestDiagnosticFilter.doFilter(RequestDiagnosticFilter.java:139) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1767) at com.vmware.vcloud.common.web.deployment.impl.ConfigurableSniffyFilter.doFilter(ConfigurableSniffyFilter.java:48) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1767) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:513) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213) at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119) at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:493) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:335) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) at org.eclipse.jetty.server.Server.handle(Server.java:539) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:333) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:108) at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:312) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:108) at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93) at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303) at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148) at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) at com.vmware.vcloud.common.threading.ExtendedJettyQueuedThreadPool.runJob(ExtendedJettyQueuedThreadPool.java:40) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: org.xml.sax.SAXParseException; lineNumber: 54; columnNumber: 15; cvc-complex-type.2.4.a: Invalid content was found starting with element '{"http://www.vmware.com/vcloud/v1.5":Error}'. One of '{"http://www.vmware.com/vcloud/v1.5":VcTaskList, "http://www.vmware.com/vcloud/v1.5":Result}' is expected. at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:204) at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:135) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:396) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:284) at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:511) at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3587) at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1971) at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:829) at java.xml/com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorHandlerImpl.startElement(ValidatorHandlerImpl.java:570) at com.sun.xml.bind.v2.runtime.unmarshaller.ValidatingUnmarshaller.startElement(ValidatingUnmarshaller.java:101) at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleStartElement(StAXStreamConnector.java:246) at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:180) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:415) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:394) at org.apache.cxf.jaxrs.provider.JAXBElementProvider.readFrom(JAXBElementProvider.java:184) ... 86 more " message="[ a499c313-f862-4586-9615-48cfdf57a0b9 ] HTTP 400 Bad Request - cvc-complex-type.2.4.a: Invalid content was found starting with element '{"http://www.vmware.com/vcloud/v1.5":Error}'. One of '{"http://www.vmware.com/vcloud/v1.5":VcTaskList, "http://www.vmware.com/vcloud/v1.5":Result}' is expected." majorErrorCode="400" minorErrorCode="BAD_REQUEST"/>
Fixed.
Describe the bug
I think Task structure have invalid order.
If we change it like in the xml example from the docs.
adminVDC.Update() will work how we expected.
Second solution is to set
adminVDC.AdminVdc.Vdc.Tasks = nil
.Reproduction steps
I am trying to update VDC description with following code:
and got error:
Expected behavior
It updates VDC description
Additional context
No response