From 6f764116922ecdb6e8bb124fa32839853f01b17c Mon Sep 17 00:00:00 2001 From: Alberto Pinon Formoso Date: Fri, 21 Feb 2025 12:41:40 -0600 Subject: [PATCH 1/2] add auth_key field and fix json tags --- partner_interconnect_attachments.go | 6 ++++-- partner_interconnect_attachments_test.go | 8 +++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/partner_interconnect_attachments.go b/partner_interconnect_attachments.go index df21c92..e5b1bc0 100644 --- a/partner_interconnect_attachments.go +++ b/partner_interconnect_attachments.go @@ -93,13 +93,15 @@ type PartnerInterconnectAttachmentSetRoutesRequest struct { // BGP represents the BGP configuration of a Partner Interconnect Attachment. type BGP struct { // LocalASN is the local ASN - LocalASN int `json:"local_asn,omitempty"` + LocalASN int `json:"local_router_asn,omitempty"` // LocalRouterIP is the local router IP LocalRouterIP string `json:"local_router_ip,omitempty"` // PeerASN is the peer ASN - PeerASN int `json:"peer_asn,omitempty"` + PeerASN int `json:"peer_router_asn,omitempty"` // PeerRouterIP is the peer router IP PeerRouterIP string `json:"peer_router_ip,omitempty"` + // AuthKey is the authentication key + AuthKey string `json:"auth_key,omitempty"` } // ServiceKey represents the service key of a Partner Interconnect Attachment. diff --git a/partner_interconnect_attachments_test.go b/partner_interconnect_attachments_test.go index 9ca04d6..41777a5 100644 --- a/partner_interconnect_attachments_test.go +++ b/partner_interconnect_attachments_test.go @@ -24,6 +24,7 @@ var vInterconnectTestObj = &PartnerInterconnectAttachment{ LocalRouterIP: "169.250.0.1", PeerASN: 133937, PeerRouterIP: "169.250.0.6", + AuthKey: "my-auth-key", }, CreatedAt: time.Date(2024, 12, 26, 21, 48, 40, 995304079, time.UTC), } @@ -49,10 +50,11 @@ var vInterconnectTestJSON = ` "naas_provider":"MEGAPORT", "vpc_ids":["f5a0c5e4-7537-47de-bb8d-46c766f89ffb"], "bgp":{ - "local_asn":64532, + "local_router_asn":64532, "local_router_ip":"169.250.0.1", - "peer_asn":133937, - "peer_router_ip":"169.250.0.6" + "peer_router_asn":133937, + "peer_router_ip":"169.250.0.6", + "auth_key":"my-auth-key" }, "created_at":"2024-12-26T21:48:40.995304079Z" } From 87ac9b6e6cc5b48dee33c2a15e3547f4b550812f Mon Sep 17 00:00:00 2001 From: Alberto Pinon Formoso Date: Fri, 21 Feb 2025 12:46:16 -0600 Subject: [PATCH 2/2] fix conflicts --- partner_interconnect_attachments.go | 2 +- partner_interconnect_attachments_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/partner_interconnect_attachments.go b/partner_interconnect_attachments.go index 670d4cb..a87c5fb 100644 --- a/partner_interconnect_attachments.go +++ b/partner_interconnect_attachments.go @@ -95,7 +95,7 @@ type PartnerInterconnectAttachmentSetRoutesRequest struct { // BGP represents the BGP configuration of a Partner Interconnect Attachment. type BGP struct { // LocalASN is the local ASN - LocalASN int `json:"local_router_asn,omitempty"` + LocalASN int `json:"local_asn,omitempty"` // LocalRouterIP is the local router IP LocalRouterIP string `json:"local_router_ip,omitempty"` // PeerASN is the peer ASN diff --git a/partner_interconnect_attachments_test.go b/partner_interconnect_attachments_test.go index d2a653b..d104b3d 100644 --- a/partner_interconnect_attachments_test.go +++ b/partner_interconnect_attachments_test.go @@ -50,7 +50,7 @@ var vInterconnectTestJSON = ` "naas_provider":"MEGAPORT", "vpc_ids":["f5a0c5e4-7537-47de-bb8d-46c766f89ffb"], "bgp":{ - "local_router_asn":64532, + "local_asn":64532, "local_router_ip":"169.250.0.1", "peer_router_asn":133937, "peer_router_ip":"169.250.0.6",