Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add viewPoint parameter to Service Profiles Data Resource (#418)
* Fabric 4.10 added viewPoint query parameter to serviceProfilesSearch Endpoint * Fabric-Go SDK upgrade to v0.7.0 included the update to the method * Terraform data source updated to reflect the changes in Fabric OAS 4.10 Testing with the cloudRouter2azure/two-connections E2E example: TF_LOG Output: Value not in main.tf: ``` ---[ REQUEST ]--------------------------------------- POST /fabric/v4/serviceProfiles/search HTTP/1.1 Host: uatapi.equinix.com User-Agent: equinix/fabric-go Content-Length: 79 Accept: application/json Authorization: Bearer 132E2S7hPtnrsk1GswoyDNoffwkK Content-Type: application/json X-Correlation-Id: 2@884TGRom#Fs#Ike9&35xDdO X-Source: API Accept-Encoding: gzip { "filter": { "property": "/name", "operator": "=", "values": [ "Azure ExpressRoute" ] } } ``` Value set to "": ``` ---[ REQUEST ]--------------------------------------- POST /fabric/v4/serviceProfiles/search HTTP/1.1 Host: uatapi.equinix.com User-Agent: equinix/fabric-go Content-Length: 79 Accept: application/json Authorization: Bearer 132E2S7hPtnrsk1GswoyDNoffwkK Content-Type: application/json X-Correlation-Id: 2@884TGRom#Fs#Ike9&35xDdO X-Source: API Accept-Encoding: gzip { "filter": { "property": "/name", "operator": "=", "values": [ "Azure ExpressRoute" ] } } ``` Value set but not aSide or zSide: ``` Error: view_point can only be set to aSide or zSide. Omitting it will default to aSide │ │ with data.equinix_fabric_service_profiles.azure, │ on main.tf line 6, in data "equinix_fabric_service_profiles" "azure": │ 6: data "equinix_fabric_service_profiles" "azure" { │ ``` Value set to zSide: ``` ---[ REQUEST ]--------------------------------------- POST /fabric/v4/serviceProfiles/search?viewPoint=zSide HTTP/1.1 Host: uatapi.equinix.com User-Agent: equinix/fabric-go Content-Length: 79 Accept: application/json Authorization: Bearer 1pqZsRWG9HYtuTL2VGJ1V0Q7PA6C Content-Type: application/json X-Correlation-Id: os8YFHaIdXE6Aamj1LGgZFzh@ X-Source: API Accept-Encoding: gzip { "filter": { "property": "/name", "operator": "=", "values": [ "Azure ExpressRoute" ] } } ``` Value set to aSide: ``` ---[ REQUEST ]--------------------------------------- POST /fabric/v4/serviceProfiles/search?viewPoint=aSide HTTP/1.1 Host: uatapi.equinix.com User-Agent: equinix/fabric-go Content-Length: 79 Accept: application/json Authorization: Bearer dwr7wjdxVfT2weqzWZEQGX9xwh9G Content-Type: application/json X-Correlation-Id: zxcTgWhhQOtVYgGTPaPAMURtu X-Source: API Accept-Encoding: gzip { "filter": { "property": "/name", "operator": "=", "values": [ "Azure ExpressRoute" ] } } ```
- Loading branch information