Skip to content

Commit

Permalink
Used facility.metro in case of command output
Browse files Browse the repository at this point in the history
  • Loading branch information
aayushrangwala committed Aug 9, 2023
1 parent 8739050 commit 79f8ab4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/hardware/retrieve.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,14 @@ func (c *Client) Retrieve() *cobra.Command {

header := []string{"ID", "Facility", "Metro", "Plan", "Created"}

inc := []string{"facility"}
inc := []string{}

// only fetch extra details when rendered
switch c.Servicer.Format() {
case outputs.FormatJSON, outputs.FormatYAML:
inc = append(inc, "project", "facility", "device")
default:
inc = []string{"facility.metro"}
}

listOpt := c.Servicer.ListOptions(inc, nil)
Expand Down

0 comments on commit 79f8ab4

Please sign in to comment.