Fix some non-cumulative queries to get all paginated elements
Add functions to create, update, and delete a Provider VDC
Testing:
go test -tags 'providervdc vsphere' -check.vv -timeout 0
go test -tags 'providervdc vsphere' -vcd-verbose -check.f TestVCD.Test_ProviderVdcCRUD -check.vv -timeout 0
START: api_vcd_test.go:518: TestVCD.SetUpSuite
Running on VCD https://xxxxxxxx.com/api (version 10.4.0.20079017 built at 2022-07-08 22:20:22 +0000 UTC)
as user administrator@System (using password)
Skipping all vapp tests because one of the following wasn't given: Network, StorageProfile, Catalog, Catalogitem
PASS: api_vcd_test.go:518: TestVCD.SetUpSuite 8.243s
START: provider_vdc_test.go:186: TestVCD.Test_ProviderVdcCRUD
*** ProviderVDC with network pool
creating provider VDC 'TestVCD.Test_ProviderVdcCRUD' using resource pool 'resource-pool-for-vcd-01' and storage profile '*'
renaming provider VDC to 'TestNewName'
renaming back provider VDC to 'TestVCD.Test_ProviderVdcCRUD'
adding resource pool 'resource-pool-for-vcd-02' to provider VDC
removing resource pool 'resource-pool-for-vcd-02' from provider VDC
adding storage profile 'Development2' to provider VDC
removing storage profile 'Development2' from provider VDC
disabling provider VDC 'TestVCD.Test_ProviderVdcCRUD'
removing provider VDC 'TestVCD.Test_ProviderVdcCRUD'
*** ProviderVDC without network pool
creating provider VDC 'TestVCD.Test_ProviderVdcCRUD' using resource pool 'resource-pool-for-vcd-01' and storage profile '*'
renaming provider VDC to 'TestNewName'
renaming back provider VDC to 'TestVCD.Test_ProviderVdcCRUD'
adding resource pool 'resource-pool-for-vcd-02' to provider VDC
removing resource pool 'resource-pool-for-vcd-02' from provider VDC
adding storage profile 'Development2' to provider VDC
removing storage profile 'Development2' from provider VDC
disabling provider VDC 'TestVCD.Test_ProviderVdcCRUD'
removing provider VDC 'TestVCD.Test_ProviderVdcCRUD'
*** ProviderVDC with automatic network pool
creating provider VDC 'TestVCD.Test_ProviderVdcCRUD' using resource pool 'resource-pool-for-vcd-01' and storage profile '*'
renaming provider VDC to 'TestNewName'
renaming back provider VDC to 'TestVCD.Test_ProviderVdcCRUD'
adding resource pool 'resource-pool-for-vcd-02' to provider VDC
removing resource pool 'resource-pool-for-vcd-02' from provider VDC
adding storage profile 'Development2' to provider VDC
removing storage profile 'Development2' from provider VDC
disabling provider VDC 'TestVCD.Test_ProviderVdcCRUD'
removing provider VDC 'TestVCD.Test_ProviderVdcCRUD'
PASS: provider_vdc_test.go:186: TestVCD.Test_ProviderVdcCRUD 153.484s
Note: you need to have at least one free resource pool to test provider VDC creation, and at least two of them to test update.
Testing:
go test -tags 'providervdc vsphere' -check.vv -timeout 0
Note: you need to have at least one free resource pool to test provider VDC creation, and at least two of them to test update.