From d6c98384dda3b233f706dc36bbe4dbd7420201d1 Mon Sep 17 00:00:00 2001 From: apinonformoso <143539236+apinonformoso@users.noreply.github.com> Date: Fri, 21 Feb 2025 14:45:32 -0600 Subject: [PATCH 1/2] add auth_key field (#793) --- partner_interconnect_attachments.go | 2 ++ partner_interconnect_attachments_test.go | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/partner_interconnect_attachments.go b/partner_interconnect_attachments.go index e0a439f..a87c5fb 100644 --- a/partner_interconnect_attachments.go +++ b/partner_interconnect_attachments.go @@ -102,6 +102,8 @@ type BGP struct { 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 fc8441f..d104b3d 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), } @@ -52,7 +53,8 @@ var vInterconnectTestJSON = ` "local_asn":64532, "local_router_ip":"169.250.0.1", "peer_router_asn":133937, - "peer_router_ip":"169.250.0.6" + "peer_router_ip":"169.250.0.6", + "auth_key":"my-auth-key" }, "created_at":"2024-12-26T21:48:40.995304079Z" } From e0a40053f51c1167856cdf285e341f2b6874a7bc Mon Sep 17 00:00:00 2001 From: Bruno Grasselli <67680+brunograsselli@users.noreply.github.com> Date: Mon, 24 Feb 2025 14:23:06 +0100 Subject: [PATCH 2/2] Update partner interconnect attachment comments (#794) Clarify in the comments that `ListRoutes` returns only remote routes, not local ones (vpc routes). --- partner_interconnect_attachments.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/partner_interconnect_attachments.go b/partner_interconnect_attachments.go index a87c5fb..3ac05c7 100644 --- a/partner_interconnect_attachments.go +++ b/partner_interconnect_attachments.go @@ -287,7 +287,7 @@ func (s *PartnerInterconnectAttachmentsServiceOp) GetServiceKey(ctx context.Cont return root.ServiceKey, resp, nil } -// ListRoutes lists all routes for a Partner Interconnect Attachment. +// ListRoutes lists all remote routes for a Partner Interconnect Attachment. func (s *PartnerInterconnectAttachmentsServiceOp) ListRoutes(ctx context.Context, id string, opt *ListOptions) ([]*RemoteRoute, *Response, error) { path, err := addOptions(fmt.Sprintf("%s/%s/remote_routes", partnerInterconnectAttachmentsBasePath, id), opt) if err != nil { @@ -313,7 +313,7 @@ func (s *PartnerInterconnectAttachmentsServiceOp) ListRoutes(ctx context.Context return root.RemoteRoutes, resp, nil } -// SetRoutes updates specific properties of a Partner Interconnect Attachment. +// SetRoutes updates specific properties of a Partner Interconnect Attachment. func (s *PartnerInterconnectAttachmentsServiceOp) SetRoutes(ctx context.Context, id string, set *PartnerInterconnectAttachmentSetRoutesRequest) (*PartnerInterconnectAttachment, *Response, error) { path := fmt.Sprintf("%s/%s/remote_routes", partnerInterconnectAttachmentsBasePath, id) req, err := s.client.NewRequest(ctx, http.MethodPut, path, set)