metal-cli
metal-cli copied to clipboard
improve experience around metal port commands with port_id argument
Specifying port id for metal port commands requires an additional lookup through metal device and filtering using a tool like jq.
Ways to improve this experience could include:
- offering a way to list metal ports on a device:
metal port list-device-ports --device_id={device_id}ormetal device list-ports --device-id={device_id} - offering an alternative to
port_idinmetal portcommands, such as the combination of the following arguments:-d [device_id] -p [port_name]
Originally posted by @displague in https://github.com/equinix/metal-cli/issues/104#issuecomment-1163829244
An example of getting the port_id from device_id and port_name is here: https://github.com/equinix/terraform-provider-equinix/blob/eae28ceefb9c2a1f575d6d6bf8549bbbbfa6b17d/equinix/resource_metal_port_vlan_attachment.go#L259-L264