Skip to content
This repository was archived by the owner on Aug 12, 2025. It is now read-only.

Commit f3f8deb

Browse files
committed
Move useragent constants to vars
Signed-off-by: Chris Privitere <[email protected]>
1 parent 9bf9522 commit f3f8deb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pkg/cloud/packet/client.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ import (
3838

3939
const (
4040
apiTokenVarName = "PACKET_API_KEY" //nolint:gosec
41-
clientName = "CAPP-v1beta1"
42-
clientUAFormat = "cluster-api-provider-packet/%s %s"
4341
ipxeOS = "custom_ipxe"
4442
envVarLocalASN = "METAL_LOCAL_ASN"
4543
envVarBGPPass = "METAL_BGP_PASS" //nolint:gosec
4644
DefaultLocalASN = 65000
4745
)
4846

4947
var (
48+
clientName = "CAPP-v1beta1"
49+
clientUAFormat = "cluster-api-provider-packet/%s %s"
5050
ErrControlPlanEndpointNotFound = errors.New("control plane not found")
5151
ErrElasticIPQuotaExceeded = errors.New("could not create an Elastic IP due to quota limits on the account, please contact Equinix Metal support")
5252
ErrInvalidIP = errors.New("invalid IP")
@@ -241,6 +241,9 @@ func (p *Client) CreateIP(namespace, clusterName, projectID, facility string) (n
241241

242242
// enableBGP enable bgp on the project
243243
func (p *Client) EnableProjectBGP(projectID string) error {
244+
fmt.Println("DEBUG USER AGENT", p.UserAgent)
245+
fmt.Println("DEBUG CONSUMER TOKEN", p.ConsumerToken)
246+
244247
// first check if it is enabled before trying to create it
245248
bgpConfig, _, err := p.BGPConfig.Get(projectID, &packngo.GetOptions{})
246249
// if we already have a config, just return

0 commit comments

Comments
 (0)