Skip to content

Commit

Permalink
Merge branch 'main' into dscott/expose-additional-template-props
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanrhysscott authored Feb 25, 2025
2 parents 23d79c8 + e0a4005 commit 17143be
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions partner_interconnect_attachments.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -285,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 {
Expand All @@ -311,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)
Expand Down
4 changes: 3 additions & 1 deletion partner_interconnect_attachments_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}
Expand Down Expand Up @@ -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"
}
Expand Down

0 comments on commit 17143be

Please sign in to comment.