vmware / go-vcloud-director

Golang SDK for VMware Cloud Director
Other
82 stars 75 forks source link

Add support of Content Library Items #717

Open adambarreiro opened 1 month ago

adambarreiro commented 1 month ago

This PR adds the following new types:

And methods:

The peculiar logic resides in ContentLibrary.CreateContentLibraryItem, where a new file upload mechanism is implemented.

Here, Tenant Manager orchestrates how API consumer should upload the files. First, a POST call creates the ContentLibraryItem object, with no files, in an "incomplete" state. Next, a GET request to that Content Library Item /files path will reveal that API consumer must upload the descriptor.ovf. When that file is uploaded, subsequent calls to /files will reveal which files must be uploaded next. When done, the associated task (that was created with initial POST call) will be completed.