metal-cli icon indicating copy to clipboard operation
metal-cli copied to clipboard

improve experience around metal port commands with port_id argument

Open displague opened this issue 3 years ago • 1 comments

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} or metal device list-ports --device-id={device_id}
  • offering an alternative to port_id in metal port commands, 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

displague avatar Jul 12 '22 16:07 displague

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

displague avatar Dec 19 '22 14:12 displague