Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated metal-go client for OS, Metros, Plans #275

Merged
merged 2 commits into from
Jun 13, 2023

Conversation

codinja1188
Copy link
Contributor

@codinja1188 codinja1188 commented Jun 6, 2023

Breakout from #270

What this PR does / why we need it:

This PR replaces packngo with metal-go for all interactions with the Equinix Metal API specifically for OS, Metros, Plans.

internal/init/init.go Outdated Show resolved Hide resolved
internal/cli/root.go Outdated Show resolved Hide resolved
internal/cli/root.go Outdated Show resolved Hide resolved
internal/cli/root.go Outdated Show resolved Hide resolved
@displague
Copy link
Member

Something that is not apparent in the PRs, that we'll need to be aware of with the metal-go conversions, is that the -o yaml and -o json formats will be different based on packngo or metal-go type definitions.

Generally, we should be getting more fields from the metal-go exports, but we may experience some renamed fields. Users that depend on metal get ... -o json format will need to be aware of this in the release notes. (TritonDataCenter/triton#325 for example)

@codinja1188 codinja1188 force-pushed the os-metros-plan branch 2 times, most recently from 3d47945 to 437c889 Compare June 13, 2023 12:16
internal/metros/retrieve.go Outdated Show resolved Hide resolved
internal/os/retrieve.go Outdated Show resolved Hide resolved
internal/plans/retrieve.go Outdated Show resolved Hide resolved
Copy link
Contributor

@ctreatma ctreatma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! I built and ran each of these subcommands locally and compared the JSON output to the latest release of metal-go, and the only differences I saw were additional fields from the metal-go-based commands.

@ctreatma ctreatma merged commit 91ee878 into equinix:main Jun 13, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants