packngo
packngo copied to clipboard
A Golang client for the Equinix Metal API. (Packet is now Equinix Metal)
TODO * tests should unmarshal the new structs (fix the ipnet tests) * provide examples of the new structures in the text fixture * provide comments for each field (and...
[](https://renovatebot.com) Welcome to [Renovate](https://togithub.com/renovatebot/renovate)! This is an onboarding PR to help you understand and configure settings before regular Pull Requests begin. 🚦 To activate Renovate, merge this Pull Request....
With the old (apparently deprecated) syntax, creating a bonded network can be done like so: `metalClient.DevicePorts.DeviceToNetworkType(dev.ID, "hybrid-bonded")` Now, with the new metalClient.Ports object, you can ConvertToLayerTwo() and ConvertToLayerThree() but not...
The API will accept and return CustomData with any JSON value or structure. The previous type (map[string]interface{}) did not allow for string only values, which are acceptable, as are ints,...
Currently, it would appear I get DEBUG logging no matter what environment variables are set. This is when using the Pulumi provider, via. the Terraform provider. I have no `METAL_`,...
Handle pagination in /ips GET responses. This is a recent addition to the API. The default pagination count is high enough to not affect existing projects. Related to https://github.com/packethost/packngo/issues/63
[Go 1.18](https://go.dev/blog/go1.18) introduced [generics](https://go.dev/blog/why-generics). [Generics](https://go.dev/doc/tutorial/generics) allow for common patterns to be reused across types. Today in packngo, we see duplication between ServiceOp types ([devices](https://github.com/packethost/packngo/blob/master/devices.go#L500-L556) and [vlans](https://github.com/packethost/packngo/blob/master/virtualnetworks.go#L39-L117), for example), effectively copy/pasting...
How should packngo clients change to work with Equinix Metal? --- The conversation below originates on https://github.com/packethost/terraform-provider-packet/issues/279#issuecomment-718950776 > equinix-go-sdk? There are a few rename options, `github.com/equinixmetal/equinix-metal-go/` or perhaps `equinixmetal/equinix-metal-sdks/go` (one...
Usage information is not readily available outside of the Equinix Metal console. The API exposes this information via the project scoped "usages" endpoint: https://metal.equinix.com/developers/api/usages/#retrieve-all-usages-for-project Related https://github.com/equinix/metal-cli/issues/181
Alternate base URLs, such as the legacy https://api.packet.net, may be useful during testing. `PACKNGO_API_BASE_URL` could be used to configure such a change. No other mechanism currently exists. If packngo supported...