Skip to content

Commit

Permalink
create partner interconnect attachment support (#1646)
Browse files Browse the repository at this point in the history
* add create partner interconnect attachment support

* spelling fix

* fix bgp config nil pointer exception

* fix ColMap and KV methods

* bump up godo version

* VPC-4180: update parent command

* added tests

* VPC-4180: address feedback & add integration tests

---------

Co-authored-by: Anna Lushnikova <loosla@users.noreply.github.com>
  • Loading branch information
apinonformoso and loosla authored Feb 6, 2025
1 parent a24ecf6 commit faafd1a
Show file tree
Hide file tree
Showing 17 changed files with 836 additions and 164 deletions.
21 changes: 21 additions & 0 deletions args.go
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,27 @@ const (
// ArgVPCPeeringVPCID is id of the VPC.
ArgVPCPeeringVPCID = "vpc-id"

// ArgInterconnectAttachmentType is the type of the Interconnect Attachment e.g. "partner".
ArgInterconnectAttachmentType = "type"
// ArgPartnerInterconnectAttachmentName is a name of the Partner Interconnect Attachment.
ArgPartnerInterconnectAttachmentName = "name"
// ArgPartnerInterconnectAttachmentConnectionBandwidthInMbps is the connection bandwidth in megabits per second.
ArgPartnerInterconnectAttachmentConnectionBandwidthInMbps = "connection-bandwidth-in-mbps"
// ArgPartnerInterconnectAttachmentRegion is the region slug.
ArgPartnerInterconnectAttachmentRegion = "region"
// ArgPartnerInterconnectAttachmentNaaSProvider is the name of the Network as a Service provider
ArgPartnerInterconnectAttachmentNaaSProvider = "naas-provider"
// ArgPartnerInterconnectAttachmentVPCIDs are the IDs of the VPCs which the Partner Interconnect Attachment is connected
ArgPartnerInterconnectAttachmentVPCIDs = "vpc-ids"
// ArgPartnerInterconnectAttachmentBGPLocalASN is the BGP Autonomous System Number (ASN) of the local device
ArgPartnerInterconnectAttachmentBGPLocalASN = "bgp-local-asn"
// ArgPartnerInterconnectAttachmentBGPLocalRouterIP is the BGP IP address of the local device
ArgPartnerInterconnectAttachmentBGPLocalRouterIP = "bgp-local-router-ip"
// ArgPartnerInterconnectAttachmentBGPPeerASN is the BGP Autonomous System Number (ASN) of the peer device
ArgPartnerInterconnectAttachmentBGPPeerASN = "bgp-peer-asn"
// ArgPartnerInterconnectAttachmentBGPPeerIPAddress is the BGP IP address of the peer device
ArgPartnerInterconnectAttachmentBGPPeerRouterIP = "bgp-peer-router-ip"

// ArgReadWrite indicates a generated token should be read/write.
ArgReadWrite = "read-write"
// ArgRegistry indicates the name of the registry.
Expand Down
76 changes: 40 additions & 36 deletions commands/command_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,42 +38,43 @@ type CmdConfig struct {
componentBuilderFactory builder.ComponentBuilderFactory

// services
Keys func() do.KeysService
Sizes func() do.SizesService
Regions func() do.RegionsService
Images func() do.ImagesService
ImageActions func() do.ImageActionsService
LoadBalancers func() do.LoadBalancersService
ReservedIPs func() do.ReservedIPsService
ReservedIPActions func() do.ReservedIPActionsService
ReservedIPv6s func() do.ReservedIPv6sService
Droplets func() do.DropletsService
DropletActions func() do.DropletActionsService
DropletAutoscale func() do.DropletAutoscaleService
Domains func() do.DomainsService
Actions func() do.ActionsService
Account func() do.AccountService
Balance func() do.BalanceService
BillingHistory func() do.BillingHistoryService
Invoices func() do.InvoicesService
Tags func() do.TagsService
UptimeChecks func() do.UptimeChecksService
Volumes func() do.VolumesService
VolumeActions func() do.VolumeActionsService
Snapshots func() do.SnapshotsService
Certificates func() do.CertificatesService
Firewalls func() do.FirewallsService
CDNs func() do.CDNsService
Projects func() do.ProjectsService
Kubernetes func() do.KubernetesService
Databases func() do.DatabasesService
Registry func() do.RegistryService
VPCs func() do.VPCsService
OneClicks func() do.OneClickService
Apps func() do.AppsService
Monitoring func() do.MonitoringService
Serverless func() do.ServerlessService
OAuth func() do.OAuthService
Keys func() do.KeysService
Sizes func() do.SizesService
Regions func() do.RegionsService
Images func() do.ImagesService
ImageActions func() do.ImageActionsService
LoadBalancers func() do.LoadBalancersService
ReservedIPs func() do.ReservedIPsService
ReservedIPActions func() do.ReservedIPActionsService
ReservedIPv6s func() do.ReservedIPv6sService
Droplets func() do.DropletsService
DropletActions func() do.DropletActionsService
DropletAutoscale func() do.DropletAutoscaleService
Domains func() do.DomainsService
Actions func() do.ActionsService
Account func() do.AccountService
Balance func() do.BalanceService
BillingHistory func() do.BillingHistoryService
Invoices func() do.InvoicesService
Tags func() do.TagsService
UptimeChecks func() do.UptimeChecksService
Volumes func() do.VolumesService
VolumeActions func() do.VolumeActionsService
Snapshots func() do.SnapshotsService
Certificates func() do.CertificatesService
Firewalls func() do.FirewallsService
CDNs func() do.CDNsService
Projects func() do.ProjectsService
Kubernetes func() do.KubernetesService
Databases func() do.DatabasesService
Registry func() do.RegistryService
VPCs func() do.VPCsService
OneClicks func() do.OneClickService
Apps func() do.AppsService
Monitoring func() do.MonitoringService
Serverless func() do.ServerlessService
OAuth func() do.OAuthService
PartnerInterconnectAttachments func() do.PartnerInterconnectAttachmentsService
}

// NewCmdConfig creates an instance of a CmdConfig.
Expand Down Expand Up @@ -130,6 +131,9 @@ func NewCmdConfig(ns string, dc doctl.Config, out io.Writer, args []string, init
return do.NewServerlessService(godoClient, getServerlessDirectory(), accessToken)
}
c.OAuth = func() do.OAuthService { return do.NewOAuthService(godoClient) }
c.PartnerInterconnectAttachments = func() do.PartnerInterconnectAttachmentsService {
return do.NewPartnerInterconnectAttachmentsService(godoClient)
}

return nil
},
Expand Down
Loading

0 comments on commit faafd1a

Please sign in to comment.