We use delete_task(depot) API call [ref] from vCenter to delete the download source.
From the doc, I understand this API does 2 things:
Deletes the created download source
Removes content imported from the download source.
In our case, when the delete_task(depot) was called, there was no imported content present on the vCenter. Below error was thrown:
A general system error occurred: Cannot find the content of online depot 'https://depot-url/index.xml'. Either the depot's content has not been imported yet or has already been deleted or the depot was migrated from an old version of vSphere Lifecycle Manager that does not support this operation.
The error occurs only when the user tries to delete a download source with no imported content. In case, vLCM has imported/synched the content from depot, delete_task(depot) runs without error.
Reproduction steps
Create a online depot without any content
Go to Lifecycle Manager -> Actions -> Sync Updates
Call delete_task(depot)
Expected behavior
In case, when the delete_task(depot) is called for an online depot with no imported content present; an error should not be thrown, since there is nothing to delete. You can mark this task as completed and add in the message that no content available for deletion.
Additional context
Use list() [ref] to get a list of depots present on the vCenter server.
Describe the bug
We use
delete_task(depot)
API call [ref] from vCenter to delete the download source.From the doc, I understand this API does 2 things:
In our case, when the
delete_task(depot)
was called, there was no imported content present on the vCenter. Below error was thrown:The error occurs only when the user tries to delete a download source with no imported content. In case, vLCM has imported/synched the content from depot,
delete_task(depot)
runs without error.Reproduction steps
delete_task(depot)
Expected behavior
In case, when the
delete_task(depot)
is called for an online depot with no imported content present; an error should not be thrown, since there is nothing to delete. You can mark this task as completed and add in the message that no content available for deletion.Additional context
Use
list()
[ref] to get a list of depots present on the vCenter server.