Skip to content

Commit

Permalink
add auth_key field and fix json tags
Browse files Browse the repository at this point in the history
  • Loading branch information
apinonformoso committed Feb 21, 2025
1 parent c35cc9d commit 6f76411
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions partner_interconnect_attachments.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 5 additions & 3 deletions 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 All @@ -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"
}
Expand Down

0 comments on commit 6f76411

Please sign in to comment.