- Added functions to retrieve and use VCD version
client.GetVcdVersion
,client.GetVcdShortVersion
,client.GetVcdFullVersion
,client.VersionEqualOrGreater
#339 - Added methods
VM.UpdateStorageProfile
,VM.UpdateStorageProfileAsync
#338 - Added methods
adminVdc.UpdateStorageProfile
#340 - Added transparent support for bearer tokens #341
- Added transparent connection using
cloudapi/1.0.0/sessions
when access throughapi/sessions
is disabled
BREAKING CHANGES:
- type.VdcConfiguration (used for creation) changed the type for storage profile from
[]*VdcStorageProfile
to[]*VdcStorageProfileConfiguration
- Improved testing tags isolation #320
- Added command
make tagverify
to check tags isolation tests #320 - Added methods
Client.GetAccessControl
,Client.SetAccessControl
#329 - Added methods
VApp.GetAccessControl
,VApp.SetAccessControl
,VApp.RemoveAccessControl
,VApp.IsShared
#329 - Added methods
AdminCatalog.GetAccessControl
,AdminCatalog.SetAccessControl
,AdminCatalog.RemoveAccessControl
,AdminCatalog.IsShared
#329 - Added methods
Catalog.GetAccessControl
,Catalog.SetAccessControl
,Catalog.RemoveAccessControl
,Catalog.IsShared
#329 - Added methods
Vdc.GetVappAccessControl
,AdminOrg.GetCatalogAccessControl
,Org.GetCatalogAccessControl
#329 - Added methods
Vdc.QueryVappList
,Vdc.GetVappList
,AdminVdc.GetVappList
,client.GetQueryType
#329 - Added VM and vApp to search query engine #329
- Added tenant context for access control methods #329
- Loosen up
Test_LBAppRule
for invalid application script check to work with different error engine in VCD 10.2 #326 - Update VDC dynamic func to handle API version 35.0 #327
- Added methods
vm.UpdateVmCpuAndMemoryHotAdd
andvm.UpdateVmCpuAndMemoryHotAddAsyc
#324 - Introduce low level OpenAPI client functions
OpenApiGetAllItems
,OpenApiPostItemSync
,OpenApiPostItemAsync
,OpenApiPostItem
,OpenApiGetItem
,OpenApiPutItem
,OpenApiPutItemSync
,OpenApiPutItemAsync
,OpenApiDeleteItem
,OpenApiIsSupported
,OpenApiBuildEndpoints
#325, #333 - Add OVF file upload support in UploadOvf function besides OVA. The input should be OVF file path inside the OVF folder. It will check if input file is XML content type, if yes, skip some OVA steps (like unpacking), if not, keep the old logic. #323
- Dropped support for VMware Cloud Director 9.5 #330
- Deprecated Vdc.UploadMediaImage because it no longer works with API V32.0+ #330
- Add methods
vapp.AddNewVMWithComputePolicy
,org.GetVdcComputePolicyById
,adminOrg.GetVdcComputePolicyById
,org.GetAllVdcComputePolicies
,adminOrg.GetAllVdcComputePolicies
,adminOrg.CreateVdcComputePolicy
,vdcComputePolicy.Update
,vdcComputePolicy.Delete
,adminVdc.GetAllAssignedVdcComputePolicies
andadminVdc.SetAssignedComputePolicies
[#334] (vmware#334) - Introduce NSX-T support for adminOrg.CreateOrgVdc() #332
- Introduce NSX-T support for external network using OpenAPI endpoint and
ExternalNetworkV2
type methods includingCreateExternalNetworkV2
,GetExternalNetworkById
,GetAllExternalNetworks
,ExternalNetworkV2.Update
, andExternalNetworkV2.DELETE
#335 - Introduce NSX-T Query functions
client.QueryNsxtManagerByName
andclient.GetImportableNsxtTier0RouterByName
#335 - Add HTTP User-Agent header
go-vcloud-director
to all API calls and allow to customize it usingWithHttpUserAgent
configuration options function #336
- Changed signature for
FindAdminCatalogRecords
, which now returns normalized type[]*types.CatalogRecord
#298 - Added methods
catalog.QueryVappTemplateList
,catalog.QueryCatalogItemList
,client.queryWithMetadataFields
,client.queryByMetadataFilter
#298 - Added query engine based on
client.SearchByFilter
, typeFilterDef
, and interfaceQueryItem
#298 - Added methods
adminOrg.QueryCatalogList
andorg.QueryCatalogList
#298 - Removed code that handled specific cases for API 29.0 and 30.0. This library now supports VCD versions from 9.5 to 10.1 included.
- Added
vdc.QueryVappVmTemplate
and changedvapp.AddNewVMWithStorageProfile
to allow creating VM from VM template. - Enhanced tests command line with flags that can be used instead of environment variables. #305
- Improve logging security of debug output for API requests and responses #306
- Append log files by default instead of overwriting.
GOVCD_LOG_OVERWRITE=true
environment variable can set to overwrite log file on every initialization #307 - Add configuration option
WithSamlAdfs
toNewVCDClient()
to support SAML authentication using Active Directory Federations Services (ADFS) as IdP using WS-TRUST auth endpoint "/adfs/services/trust/13/usernamemixed" #304 - Implemented VM affinity rules CRUD:
vdc.CreateVmAffinityRuleAsync
,vdc. CreateVmAffinityRule
,vdc.GetAllVmAffinityRuleList
,vdc.GetVmAffinityRuleList
,vdc.GetVmAntiAffinityRuleList
vdc.GetVmAffinityRuleByHref
,vdc.GetVmAffinityRulesByName
,vdc.GetVmAffinityRuleById
,vdc.GetVmAffinityRuleByNameOrId
,VmAffinityRule.Delete
,VmAffinityRule.Update
,VmAffinityRule.SetMandatory
,VmAffinityRule.SetEnabled
,VmAffinityRule.Refresh
#313 - Add method
client.QueryVmList
#313 - Add support for group management using
CreateGroup
,GetGroupByHref
,GetGroupById
,GetGroupByName
,GetGroupByNameOrId
,Delete
,Update
,NewGroup
functions #314 - Add LDAP administration functions for Org
LdapConfigure
,GetLdapConfiguration
, andLdapDisable
#314 - Added methods
vapp.UpdateNetworkFirewallRules
,vapp.UpdateNetworkFirewallRulesAsync
,vapp.GetVappNetworkById
,vapp.GetVappNetworkByName
andvapp.GetVappNetworkByNameOrId
#308 - Added methods
vapp.UpdateNetworkNatRulesAsync
,vapp.UpdateNetworkNatRulesAsync
,vapp.RemoveAllNetworkFirewallRules
andvapp.RemoveAllNetworkNatRules
#316 - Added methods
vapp.UpdateNetworkStaticRouting
,vapp.UpdateNetworkStaticRoutingAsync
andvapp.RemoveAllNetworkStaticRoutes
#318
- Added methods
OrgVdcNetwork.Update
,OrgVdcNetwork.UpdateAsync
, andOrgVdcNetwork.Rename
#292 - Added methods
EdgeGateway.Update
andEdgeGateway.UpdateAsync
#292 - Increment vCD API version used from 29.0 to 31.0
- Add fields
AdminVdc.UniversalNetworkPoolReference and VM.Media
- Add fields
- Added methods
vapp.AddEmptyVm
,vapp.AddEmptyVmAsync
andvdc.QueryAllMedia
#296
NOTES:
- Improved test in function
deleteVapp()
to avoid deletion errors during test suite run #297
BUGS FIXED:
- Fix issue in Queries with vCD 10 version, which do not return network pool or provider VDC#293
- Session timeout for media, catalog item upload #294
- Fix
vapp.RemoveNetwork
,vapp.RemoveNetworkAsync
to useDELETE
API call instead of update which can apply incorrect remaining vApp network configurations #299
- Moved
VCDClient.supportedVersions
toVCDClient.Client.supportedVersions
#274 - Added methods
VM.AddInternalDisk
,VM.GetInternalDiskById
,VM.DeleteInternalDisk
,VM.UpdateInternalDisks
andVM.UpdateInternalDisksAsync
#272 - Added methods
vdc.GetEdgeGatewayReferenceList
andcatalog.GetVappTemplateByHref
#278 - Improved functions to not expect XML namespaces provided in argument structure #284
- Change
int
andbool
fields from types.VAppTemplateLeaseSettings and VAppLeaseSettings into pointers - Added method
catalog.GetVappTemplateByHref
, and expose methodsvdc.GetEdgeGatewayByHref
andvdc.GetEdgeGatewayRecordsType
- Added methods
adminOrg.CreateOrgVdc
,adminOrg.CreateOrgVdcAsync
and improved existing to support Flex VDC model. These new methods are dynamic as they change invocation behind the scenes based on vCD version #285 - Deprecated functions
adminOrg.CreateVdc
andadminOrg.CreateVdcWait
#285 - Added methods
EdgeGateway.GetAllNsxvDhcpLeases()
,EdgeGateway.GetNsxvActiveDhcpLeaseByMac()
VM.WaitForDhcpIpByNicIndexes()
,VM.GetParentVApp()
,VM.GetParentVdc()
#283 types.GetGuestCustomizationSection
now uses pointers for all bool values to distinguish between empty and false value #291- Deprecated functions
Vapp.Customize()
andVM.Customize()
in favor ofvm.SetGuestCustomizationSection
#291 - Added methods
vapp.AddNetwork
,vapp.AddNetworkAsync
,vapp.AddOrgNetwork
,vapp.AddOrgNetworkAsync
,vapp.UpdateNetwork
,vapp.UpdateNetworkAsync
,vapp.UpdateOrgNetwork
,vapp.UpdateOrgNetworkAsync
,vapp.RemoveNetwork
,vapp.RemoveNetworkAsync
andGetUuidFromHref
#289 - Deprecated functions
vapp.RemoveIsolatedNetwork
,vapp.AddRAWNetworkConfig
andvapp.AddIsolatedNetwork
#289
BUGS FIXED:
- A data race in catalog/media item upload status reporting #288
Vapp.Customize()
andVM.Customize()
ignoreschangeSid
value and always set it to true #291
BUGS FIXED:
- Fix a bug where functions
GetAnyVnicIndexByNetworkName
andGetVnicIndexByNetworkNameAndType
would not find vNic index when user is authenticated as org admin (not sysadmin) #275
- Change fields ResourceGuaranteedCpu, VCpuInMhz, IsThinProvision, NetworkPoolReference, ProviderVdcReference and UsesFastProvisioning in AdminVdc to pointers to allow understand if value was returned or not.
- Added method VApp.AddNewVMWithStorageProfile that adds a VM with custom storage profile.
- Added command
make static
to run staticcheck on all packages - Added
make static
to Travis regular checks - Added ability to connect to the vCD using an authorization token
- Added method
VCDClient.SetToken
- Added method
VCDClient.GetAuthResponse
- Added script
scripts/get_token.sh
- Increment vCD API version used from 27.0 to 29.0
- Remove fields
VdcEnabled
,VAppParentHREF
,VAppParentName
,HighestSupportedVersion
,VmToolsVersion
,TaskHREF
,TaskStatusName
,TaskDetails
,TaskStatus
fromQueryResultVMRecordType
- Add fields
ID, Type, ContainerName, ContainerID, OwnerName, Owner, NetworkHref, IpAddress, CatalogName, VmToolsStatus, GcStatus, AutoUndeployDate, AutoDeleteDate, AutoUndeployNotified, AutoDeleteNotified, Link, MetaData
toQueryResultVMRecordType
,DistributedInterface
toNetworkConfiguration
andRegenerateBiosUuid
toVMGeneralParams
- Change to pointers
DistributedRoutingEnabled
inGatewayConfiguration
andDistributedInterface
inNetworkConfiguration
- Remove fields
- Add new field to type
GatewayConfiguration
:FipsModeEnabled
- #267 - Change bool to bool pointer for fields in type
GatewayConfiguration
:HaEnabled
,UseDefaultRouteForDNSRelay
,AdvancedNetworkingEnabled
- #267 - Added method
EdgeGateway.GetLbVirtualServers
that gets all virtual servers configured on NSX load balancer. #266 - Added method
EdgeGateway.GetLbServerPools
that gets all pools configured on NSX load balancer. #266 - Added method
EdgeGateway.GetLbServiceMonitors
that gets all service monitors configured on NSX load balancer. #266 - Added field
SubInterface
toNetworkConfiguration
. #321 - Added methods
Vdc.FindEdgeGatewayNameByNetwork
andVdc.GetNetworkList
- Added IP set handling functions
CreateNsxvIpSet
,UpdateNsxvIpSet
,GetNsxvIpSetByName
,GetNsxvIpSetById
,GetNsxvIpSetByNameOrId
,GetAllNsxvIpSets
,DeleteNsxvIpSetById
,DeleteNsxvIpSetByName
#269 - Added
UpdateDhcpRelay
,GetDhcpRelay
andResetDhcpRelay
methods for Edge Gatway DHCP relay management #271 - Added methods which allow override API versions
NewRequestWitNotEncodedParamsWithApiVersion
,ExecuteTaskRequestWithApiVersion
,ExecuteRequestWithoutResponseWithApiVersion
,ExecuteRequestWithApiVersion
#274
BUGS FIXED:
- Remove parentheses from filtering since they weren't treated correctly in some environment [#256] (vmware#256)
- Take into account all subnets (SubnetParticipation) on edge gateway interface instead of the first one #260
- Fix
OrgVdcNetwork
data structure to retrieve description. Previously, the description would not be retrieved because it was misplaced in the sequence.
- Deprecated functions
GetOrgByName
andGetAdminOrgByName
- Deprecated methods
AdminOrg.FetchUserByName
,AdminOrg.FetchUserById
,AdminOrg.FetchUserByNameOrId
,AdminOrg.GetRole
. - Added method
VCDClient.GetOrgByName
and relatedGetOrgById
,GetOrgByNameOrId
- Added method
VCDClient.GetAdminOrgByName
and relatedGetAdminOrgById
,GetAdminOrgByNameOrId
- Added methods
AdminOrg.GetUserByName
,GetUserById
,GetUserByNameOrId
,GetRoleReference
. - Added method
VCDClient.QueryProviderVdcs
- Added method
VCDClient.QueryProviderVdcStorageProfiles
- Added method
VCDClient.QueryNetworkPools
- Added get/add/delete metadata functions for vApp template and media item #225.
- Added
UpdateNetworkConnectionSection
for updating VM network configuration [#229](https://gifiltering which in some env wasn'tthub.com/vmware/pull/229) - Added
PowerOnAndForceCustomization
,GetGuestCustomizationStatus
,BlockWhileGuestCustomizationStatus
#229 - Deprecated methods
AdminOrg.GetAdminVdcByName
,AdminOrg.GetVdcByName
,AdminOrg.FindAdminCatalog
,AdminOrg.FindCatalog
- Deprecated methods
Catalog.FindCatalogItem
,Org.FindCatalog
,Org.GetVdcByName
- Deprecated function
GetExternalNetwork
- Added methods
Org.GetCatalogByName
and relatedOrg.GetCatalogById
,GetCatalogItemByNameOrId
- Added methods
VCDClient.GetExternalNetworkByName
and relatedGetExternalNetworkById
andGetExternalNetworkByNameOrId
- Added methods
AdminOrg.GetCatalogByName
and relatedOrg.GetCatalogById
,GetCatalogByNameOrId
- Added methods
AdminOrg.GetAdminCatalogByName
and relatedOrg.GetAdminCatalogById
,GetAdminCatalogByNameOrId
- Added methods
Org.GetVDCByName
and relatedGetVDCById
,GetVDCByNameOrId
- Added methods
AdminOrg.GetVDCByName
and relatedGetVDCById
,GetVDCByNameOrId
- Added methods
AdminOrg.GetAdminVDCByName
and relatedGetAdminVDCById
,GetAdminVDCByNameOrId
- Added methods
Catalog.Refresh
andAdminCatalog.Refresh
- Added method
vm.GetVirtualHardwareSection
to retrieve virtual hardware items #200 - Added methods
vm.SetProductSectionList
andvm.GetProductSectionList
allowing to manipulate VM guest properties #235 - Added methods
vapp.SetProductSectionList
andvapp.GetProductSectionList
allowing to manipulate vApp guest properties #235 - Added method GetStorageProfileByHref
- Added methods
CreateNsxvNatRule()
,UpdateNsxvNatRule()
,GetNsxvNatRuleById()
,DeleteNsxvNatRuleById()
which use the proxied NSX-V API of advanced edge gateway for handling NAT rules #241 - Added methods
GetVnicIndexByNetworkNameAndType()
andGetNetworkNameAndTypeByVnicIndex()
#241 - Added methods
Vdc.GetVappByHref
,Vdc.GetVAppByName
and relatedGetVAppById
,GetVAppByNameOrId
- Added methods
Client.GetVMByHref
Vapp.GetVAMByName
and relatedGetVMById
,GetVAMByNameOrId
- Deprecated methods
Client.FindVMByHREF
,Vdc.FindVMByName
,Vdc.FindVAppByID
, andVdc.FindVAppByName
- Added methods
Vm.GetGuestCustomizationSection
andVm.SetGuestCustomizationSection
- Added methods
CreateNsxvFirewallRule()
,UpdateNsxvFirewallRule()
,GetNsxvFirewallRuleById()
,DeleteNsxvFirewallRuleById()
which use the proxied NSX-V API of advanced edge gateway for handling firewall rules #247 - Added methods
GetFirewallParams()
,UpdateFirewallParams()
for changing global firewall settings #247 - Added method
GetAnyVnicIndexByNetworkName()
to for easier interface (vNic) lookup in edge gateway #247 - Added method
ExecuteParamRequestWithCustomError()
which adds query parameter support on top ofExecuteRequestWithCustomError()
#247 - Deprecated methods
VDC.FindDiskByHREF
andFindDiskByHREF
- Added methods
VDC.GetDiskByHref
VDC.GetDisksByName
and relatedGetDiskById
- Added new methods
Catalog.QueryMedia
,Catalog.GetMediaByName
,Catalog.GetMediaById
,Catalog.GetMediaByNameOrId
,AdminCatalog.QueryMedia
,AdminCatalog.GetMediaByName
,AdminCatalog.GetMediaById
,AdminCatalog.GetMediaByNameOrId
,MediaRecord.Refresh
,MediaRecord.Delete
,MediaRecord.GetMetadata
,MediaRecord.AddMetadata
,MediaRecord.AddMetadataAsync
,MediaRecord.DeleteMetadata
,MediaRecord.DeleteMetadataAsync
,Media.GetMetadata
,Media.AddMetadata
,Media.AddMetadataAsync
,Media.DeleteMetadata
,Media.DeleteMetadataAsync
#245 - Deprecated methods
Vdc.FindMediaImage
,MediaItem
,RemoveMediaImageIfExists
,MediaItem.Delete
,FindMediaAsCatalogItem
,*MediaItem.Refresh
,MediaItem.GetMetadata
,MediaItem.AddMetadata
,MediaItem.AddMetadataAsync
,MediaItem.DeleteMetadata
,MediaItem.DeleteMetadataAsync
#245 - Added method
VDC.QueryDisks
#255
IMPROVEMENTS:
- Move methods for
AdminOrg
,AdminCatalog
,AdminVdc
to new filesadminorg.go
,admincatalog.go
,adminvdc.go
. - Added default value for HTTP timeout (600s) which is configurable
BUGS FIXED:
- Fix bug in AdminOrg.Update, where OrgGeneralSettings would not update correctly if it contained only one property
- Fix bug in External network creation and get when description wasn't populated.
- Fix bug in VDC creation when name with space caused an error
- Fix bug in Org Delete, which would remove catalogs shared from other organizations.
- Fix Vcd.StorageProfiles type from array to single.
- Fix AdminOrg.CreateUserSimple, where the Telephone field was ignored.
BUG FIXES:
- Remove
omitempty
struct tags from load balancer component boolean fields to allow sendingfalse
values to API #222
- Added edge gateway create/delete functions #130.
- Added edge gateway global load balancer configuration support (e.g. enable/disable) #219
- Added load balancer service monitor #196
- Added load balancer server pool #205
- Added load balancer application profile #208
- Added load balancer application rule #212
- Added load balancer virtual server #215
- Added functions for refreshing, getting and update Org VDC #206
- Added VDC meta data create/get/delete functions #203
- Added org user create/delete/update functions #18
- Added load balancer application profile #208
- Added edge gateway SNAT/DNAT rule functions which support org VDC network and external network #225
- Added edge gateway SNAT/DNAT rule functions which work with IDs #244
FEATURES:
- Added external network get/create/delete functions
- Added metadata add/remove functions to VM.
- Added ability to do vCD version checks and comparison #174 using VCDClient.APIVCDMaxVersionIs(string) and VCDClient.APIClientVersionIs(string).
- Added ability to override currently used vCD API version WithAPIVersion(string) #174.
- Added ability to enable nested hypervisor option for VM with VM.ToggleNestedHypervisor(bool) #219.
BREAKING CHANGES:
- vApp metadata now is attached to the vApp rather to first VM in vApp.
- vApp metadata is no longer added to first VM in vApp it will be added to vApp directly instead.
IMPROVEMENTS:
- Refactored code by introducing helper function to handle API calls. New functions ExecuteRequest, ExecuteTaskRequest, ExecuteRequestWithoutResponse
- Add authorization request header for media file and catalog item upload
- Tests files are now all tagged. Running them through Makefile works as before, but manual execution requires specific tags. Run
go test -v .
for tags list.
ARCHITECTURAL:
- Project switched to using Go modules. It is worth having a look at README.md to understand how Go modules impact build and development.
FEATURES:
- New insert and eject media functions
IMPROVEMENTS:
- vApp vapp.PowerOn() implicitly waits for vApp to exit "UNRESOLVED" state which occurs shortly after creation and causes vapp.PowerOn() failure.
- VM has new functions which allows to configure cores for CPU. VM.ChangeCPUCountWithCore()
BREAKING CHANGES:
- Deprecate vApp.ChangeCPUCountWithCore() and vApp.ChangeCPUCount()