vmware / go-vcloud-director

Golang SDK for VMware Cloud Director
Other
80 stars 76 forks source link

Add ability to ignore metadata to SDK client configuration #581

Closed adambarreiro closed 1 year ago

adambarreiro commented 1 year ago

Context

This PR implements the foundational logic to be able to implement metadata ignoring in the VCD Terraform Provider: https://github.com/vmware/terraform-provider-vcd/pull/1057

Description

The metadata to ignore lives inside the SDK Client as a slice of a new structure called IgnoredMetadata. This slice can be populated with the new WithIgnoredMetadata function.

The IgnoredMetadata slice is then read in all metadata_v2.go methods. There are three methods to filter metadata: