Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add viewPoint parameter to Service Profiles Data Resource #418

Merged
merged 2 commits into from
Oct 17, 2023

Conversation

thogarty
Copy link
Contributor

  • 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"
  ]
 }
}

@thogarty thogarty temporarily deployed to internal October 17, 2023 21:26 — with GitHub Actions Inactive
@thogarty
Copy link
Contributor Author

@displague , FYI about the service profiles search update from the Fabric-Go SDK.

@thogarty thogarty temporarily deployed to internal October 17, 2023 21:37 — with GitHub Actions Inactive
Copy link
Contributor

@srushti-patl srushti-patl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thogarty thogarty merged commit 437a56b into main Oct 17, 2023
4 of 5 checks passed
@thogarty thogarty deleted the CXF-79238-data-service-profiles-search branch October 17, 2023 21:42
thogarty added a commit that referenced this pull request Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants