Skip to content

Commit 12862de

Browse files
fix(deps): update module github.com/equinix-labs/metal-go to v0.29.0 (#379)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/equinix-labs/metal-go](https://github.com/equinix-labs/metal-go) | require | minor | `v0.26.0` -> `v0.29.0` | --- ### Release Notes <details> <summary>equinix-labs/metal-go (github.com/equinix-labs/metal-go)</summary> ### [`v0.29.0`](https://github.com/equinix-labs/metal-go/releases/tag/v0.29.0) [Compare Source](https://github.com/equinix-labs/metal-go/compare/v0.28.0...v0.29.0) ##### Features - patch bgpsession spec to remove status enum ([#&#8203;178](https://github.com/equinix-labs/metal-go/issues/178)) ([cd21e3a](https://github.com/equinix-labs/metal-go/commit/cd21e3ae50c62304b11e4a55a263f85f9ccbd8d4)) ### [`v0.28.0`](https://github.com/equinix-labs/metal-go/releases/tag/v0.28.0) [Compare Source](https://github.com/equinix-labs/metal-go/compare/v0.27.0...v0.28.0) ##### Features - API Sync by GitHub Action (2023-11-08) ([#&#8203;171](https://github.com/equinix-labs/metal-go/issues/171)) ([ad2dc45](https://github.com/equinix-labs/metal-go/commit/ad2dc4553f61a02d6021890ad52cf045ba6b0535)) ##### Bug Fixes - avoid nil pointer error when debugging requests with no body ([#&#8203;176](https://github.com/equinix-labs/metal-go/issues/176)) ([d87441c](https://github.com/equinix-labs/metal-go/commit/d87441ceae54e4c83dfdba0b2950b7a50c64e884)) ### [`v0.27.0`](https://github.com/equinix-labs/metal-go/releases/tag/v0.27.0) [Compare Source](https://github.com/equinix-labs/metal-go/compare/v0.26.0...v0.27.0) ##### Features - upgrade openapi-generator to v7.1.0 ([#&#8203;172](https://github.com/equinix-labs/metal-go/issues/172)) ([d09946e](https://github.com/equinix-labs/metal-go/commit/d09946e09f2c71d5eb261beee58f5ad061cb718f)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/equinix/metal-cli). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMS41IiwidXBkYXRlZEluVmVyIjoiMzcuODcuMiIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Charles Treatman <[email protected]>
1 parent d6a683a commit 12862de

File tree

8 files changed

+32
-7
lines changed

8 files changed

+32
-7
lines changed

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/equinix/metal-cli
33
go 1.19
44

55
require (
6-
github.com/equinix-labs/metal-go v0.26.0
6+
github.com/equinix-labs/metal-go v0.29.0
77
github.com/olekukonko/tablewriter v0.0.5
88
github.com/packethost/packngo v0.30.0
99
github.com/pkg/errors v0.9.1

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m
6060
github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po=
6161
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
6262
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
63-
github.com/equinix-labs/metal-go v0.26.0 h1:0rBTyjF8j58dg++kMFLRi9Jhs5gng5BFn5Y0bl5NPtM=
64-
github.com/equinix-labs/metal-go v0.26.0/go.mod h1:SmxCklxW+KjmBLVMdEXgtFO5gD5/b4N0VxcNgUYbOH4=
63+
github.com/equinix-labs/metal-go v0.29.0 h1:dTi48+ni4Xbey0VJjHrkoAOxJvVPl9ukA/6DoJv6o8s=
64+
github.com/equinix-labs/metal-go v0.29.0/go.mod h1:SmxCklxW+KjmBLVMdEXgtFO5gD5/b4N0VxcNgUYbOH4=
6565
github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY=
6666
github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
6767
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=

internal/organizations/create.go

+8-1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ func (c *Client) Create() *cobra.Command {
5151
RunE: func(cmd *cobra.Command, args []string) error {
5252
cmd.SilenceUsage = true
5353

54+
// API spec says organization address.address is required,
55+
// but the address is not included by default
56+
defaultIncludes := []string{"address", "billing_address"}
57+
58+
include := c.Servicer.Includes(defaultIncludes)
59+
exclude := c.Servicer.Excludes(nil)
60+
5461
req := metal.NewOrganizationInput()
5562
req.Name = &name
5663

@@ -70,7 +77,7 @@ func (c *Client) Create() *cobra.Command {
7077
req.Logo = &logo
7178
}
7279

73-
org, _, err := c.Service.CreateOrganization(context.Background()).OrganizationInput(*req).Include(c.Servicer.Includes(nil)).Exclude(c.Servicer.Excludes(nil)).Execute()
80+
org, _, err := c.Service.CreateOrganization(context.Background()).OrganizationInput(*req).Include(include).Exclude(exclude).Execute()
7481
if err != nil {
7582
return fmt.Errorf("Could not create Organization: %w", err)
7683
}

internal/organizations/retrieve.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,12 @@ func (c *Client) Retrieve() *cobra.Command {
4444

4545
RunE: func(cmd *cobra.Command, args []string) error {
4646
cmd.SilenceUsage = true
47-
include := c.Servicer.Includes(nil)
47+
48+
// API spec says organization address.address is required,
49+
// but the address is not included by default
50+
defaultIncludes := []string{"address", "billing_address"}
51+
52+
include := c.Servicer.Includes(defaultIncludes)
4853
exclude := c.Servicer.Excludes(nil)
4954

5055
if organizationID == "" {

internal/organizations/update.go

+8-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ func (c *Client) Update() *cobra.Command {
4242
cmd.SilenceUsage = true
4343
req := metal.NewOrganizationInput()
4444

45+
// API spec says organization address.address is required,
46+
// but the address is not included by default
47+
defaultIncludes := []string{"address", "billing_address"}
48+
49+
include := c.Servicer.Includes(defaultIncludes)
50+
exclude := c.Servicer.Excludes(nil)
51+
4552
if name != "" {
4653
req.Name = &name
4754
}
@@ -62,7 +69,7 @@ func (c *Client) Update() *cobra.Command {
6269
req.Website = &website
6370
}
6471

65-
org, _, err := c.Service.UpdateOrganization(context.Background(), organizationID).OrganizationInput(*req).Execute()
72+
org, _, err := c.Service.UpdateOrganization(context.Background(), organizationID).OrganizationInput(*req).Include(include).Exclude(exclude).Execute()
6673
if err != nil {
6774
return fmt.Errorf("Could not update Organization: %w", err)
6875
}

test/e2e/gateways/create_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ func TestGateways_Create(t *testing.T) {
7676
apiClient := helper.TestClient()
7777
gateways, _, err := apiClient.MetalGatewaysApi.
7878
FindMetalGatewaysByProject(context.Background(), projectId).
79+
Include([]string{"ip_reservation"}).
7980
Execute()
8081
if err != nil {
8182
t.Error(err)

test/e2e/gateways/delete_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ func TestGateways_Delete(t *testing.T) {
9393
apiClient := helper.TestClient()
9494
gateways, _, err := apiClient.MetalGatewaysApi.
9595
FindMetalGatewayById(context.Background(), metalGateway.GetId()).
96+
Include([]string{"ip_reservation"}).
9697
Execute()
9798
if err != nil && !strings.Contains(err.Error(), "Not Found") {
9899
t.Error(err)

test/helper/helper.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,11 @@ func CreateTestOrganization(name string) (string, error) {
377377
addr.SetZipCode("02108")
378378
organizationInput.Address = addr
379379

380-
resp, _, err := TestApiClient.OrganizationsApi.CreateOrganization(context.Background()).OrganizationInput(*organizationInput).Execute()
380+
// API spec says organization address.address is required,
381+
// but the address is not included by default
382+
defaultIncludes := []string{"address", "billing_address"}
383+
384+
resp, _, err := TestApiClient.OrganizationsApi.CreateOrganization(context.Background()).OrganizationInput(*organizationInput).Include(defaultIncludes).Execute()
381385
if err != nil {
382386
fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsApi.CreateOrganization``: %v\n", err)
383387
return "", err

0 commit comments

Comments
 (0)