Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var (

includes *[]string // nolint:unused
excludes *[]string // nolint:unused

search string
)

// rootCmd represents the base command when called without any subcommands
Expand Down Expand Up @@ -79,6 +79,7 @@ func init() {

includes = rootCmd.PersistentFlags().StringSlice("include", nil, "Comma seperated Href references to expand in results, may be dotted three levels deep")
excludes = rootCmd.PersistentFlags().StringSlice("exclude", nil, "Comma seperated Href references to collapse in results, may be dotted three levels deep")
rootCmd.PersistentFlags().StringVar(&search, "search", "", "Search keyword for use in 'get' actions. Search is not supported by all resources.")

rootCmd.Version = Version
}
Expand All @@ -96,6 +97,9 @@ func listOptions(defaultIncludes, defaultExcludes []string) *packngo.ListOptions
if rootCmd.Flags().Changed("exclude") {
listOptions.Excludes = *excludes
}
if rootCmd.Flags().Changed("search") {
listOptions.Search = search
}

return listOptions
}
Expand Down
1 change: 1 addition & 0 deletions docs/packet.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Command line interface for Equinix Metal
-h, --help help for packet
--include strings Comma seperated Href references to expand in results, may be dotted three levels deep
-j, --json JSON output
--search string Search keyword for use in 'get' actions. Search is not supported by all resources.
-y, --yaml YAML output
```

Expand Down
1 change: 1 addition & 0 deletions docs/packet_2fa.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Two Factor Authentication operations: enable, disable, receive
--exclude strings Comma seperated Href references to collapse in results, may be dotted three levels deep
--include strings Comma seperated Href references to expand in results, may be dotted three levels deep
-j, --json JSON output
--search string Search keyword for use in 'get' actions. Search is not supported by all resources.
-y, --yaml YAML output
```

Expand Down
1 change: 1 addition & 0 deletions docs/packet_2fa_disable.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ packet 2fa disable [flags]
--exclude strings Comma seperated Href references to collapse in results, may be dotted three levels deep
--include strings Comma seperated Href references to expand in results, may be dotted three levels deep
-j, --json JSON output
--search string Search keyword for use in 'get' actions. Search is not supported by all resources.
-y, --yaml YAML output
```

Expand Down
1 change: 1 addition & 0 deletions docs/packet_2fa_enable.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ packet 2fa enable [flags]
--exclude strings Comma seperated Href references to collapse in results, may be dotted three levels deep
--include strings Comma seperated Href references to expand in results, may be dotted three levels deep
-j, --json JSON output
--search string Search keyword for use in 'get' actions. Search is not supported by all resources.
-y, --yaml YAML output
```

Expand Down
1 change: 1 addition & 0 deletions docs/packet_2fa_receive.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ packet 2fa receive [flags]
--exclude strings Comma seperated Href references to collapse in results, may be dotted three levels deep
--include strings Comma seperated Href references to expand in results, may be dotted three levels deep
-j, --json JSON output
--search string Search keyword for use in 'get' actions. Search is not supported by all resources.
-y, --yaml YAML output
```

Expand Down
1 change: 1 addition & 0 deletions docs/packet_capacity.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Capacities operations: get, check
--exclude strings Comma seperated Href references to collapse in results, may be dotted three levels deep
--include strings Comma seperated Href references to expand in results, may be dotted three levels deep
-j, --json JSON output
--search string Search keyword for use in 'get' actions. Search is not supported by all resources.
-y, --yaml YAML output
```

Expand Down
1 change: 1 addition & 0 deletions docs/packet_capacity_check.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ packet capacity check [flags]
--exclude strings Comma seperated Href references to collapse in results, may be dotted three levels deep
--include strings Comma seperated Href references to expand in results, may be dotted three levels deep
-j, --json JSON output
--search string Search keyword for use in 'get' actions. Search is not supported by all resources.
-y, --yaml YAML output
```

Expand Down
1 change: 1 addition & 0 deletions docs/packet_capacity_get.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ packet capacity get [flags]
--exclude strings Comma seperated Href references to collapse in results, may be dotted three levels deep
--include strings Comma seperated Href references to expand in results, may be dotted three levels deep
-j, --json JSON output
--search string Search keyword for use in 'get' actions. Search is not supported by all resources.
-y, --yaml YAML output
```

Expand Down
1 change: 1 addition & 0 deletions docs/packet_device.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Device operations: create, delete, update, start/stop, reboot and get.
--exclude strings Comma seperated Href references to collapse in results, may be dotted three levels deep
--include strings Comma seperated Href references to expand in results, may be dotted three levels deep
-j, --json JSON output
--search string Search keyword for use in 'get' actions. Search is not supported by all resources.
-y, --yaml YAML output
```

Expand Down
1 change: 1 addition & 0 deletions docs/packet_device_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ packet device create [flags]
--exclude strings Comma seperated Href references to collapse in results, may be dotted three levels deep
--include strings Comma seperated Href references to expand in results, may be dotted three levels deep
-j, --json JSON output
--search string Search keyword for use in 'get' actions. Search is not supported by all resources.
-y, --yaml YAML output
```

Expand Down
1 change: 1 addition & 0 deletions docs/packet_device_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ packet device delete [flags]
--exclude strings Comma seperated Href references to collapse in results, may be dotted three levels deep
--include strings Comma seperated Href references to expand in results, may be dotted three levels deep
-j, --json JSON output
--search string Search keyword for use in 'get' actions. Search is not supported by all resources.
-y, --yaml YAML output
```

Expand Down
1 change: 1 addition & 0 deletions docs/packet_device_get.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ packet device get [flags]
--exclude strings Comma seperated Href references to collapse in results, may be dotted three levels deep
--include strings Comma seperated Href references to expand in results, may be dotted three levels deep
-j, --json JSON output
--search string Search keyword for use in 'get' actions. Search is not supported by all resources.
-y, --yaml YAML output
```

Expand Down
1 change: 1 addition & 0 deletions docs/packet_device_reboot.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ packet device reboot [flags]
--exclude strings Comma seperated Href references to collapse in results, may be dotted three levels deep
--include strings Comma seperated Href references to expand in results, may be dotted three levels deep
-j, --json JSON output
--search string Search keyword for use in 'get' actions. Search is not supported by all resources.
-y, --yaml YAML output
```

Expand Down
1 change: 1 addition & 0 deletions docs/packet_device_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ packet device start [flags]
--exclude strings Comma seperated Href references to collapse in results, may be dotted three levels deep
--include strings Comma seperated Href references to expand in results, may be dotted three levels deep
-j, --json JSON output
--search string Search keyword for use in 'get' actions. Search is not supported by all resources.
-y, --yaml YAML output
```

Expand Down
1 change: 1 addition & 0 deletions docs/packet_device_stop.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ packet device stop [flags]
--exclude strings Comma seperated Href references to collapse in results, may be dotted three levels deep
--include strings Comma seperated Href references to expand in results, may be dotted three levels deep
-j, --json JSON output
--search string Search keyword for use in 'get' actions. Search is not supported by all resources.
-y, --yaml YAML output
```

Expand Down
1 change: 1 addition & 0 deletions docs/packet_device_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ packet device update [flags]
--exclude strings Comma seperated Href references to collapse in results, may be dotted three levels deep
--include strings Comma seperated Href references to expand in results, may be dotted three levels deep
-j, --json JSON output
--search string Search keyword for use in 'get' actions. Search is not supported by all resources.
-y, --yaml YAML output
```

Expand Down
1 change: 1 addition & 0 deletions docs/packet_event.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Events operations: get
--exclude strings Comma seperated Href references to collapse in results, may be dotted three levels deep
--include strings Comma seperated Href references to expand in results, may be dotted three levels deep
-j, --json JSON output
--search string Search keyword for use in 'get' actions. Search is not supported by all resources.
-y, --yaml YAML output
```

Expand Down
1 change: 1 addition & 0 deletions docs/packet_event_get.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ packet event get [flags]
--exclude strings Comma seperated Href references to collapse in results, may be dotted three levels deep
--include strings Comma seperated Href references to expand in results, may be dotted three levels deep
-j, --json JSON output
--search string Search keyword for use in 'get' actions. Search is not supported by all resources.
-y, --yaml YAML output
```

Expand Down
1 change: 1 addition & 0 deletions docs/packet_facilities.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Facility operations: get
--exclude strings Comma seperated Href references to collapse in results, may be dotted three levels deep
--include strings Comma seperated Href references to expand in results, may be dotted three levels deep
-j, --json JSON output
--search string Search keyword for use in 'get' actions. Search is not supported by all resources.
-y, --yaml YAML output
```

Expand Down
1 change: 1 addition & 0 deletions docs/packet_facilities_get.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ packet facilities get [flags]
--exclude strings Comma seperated Href references to collapse in results, may be dotted three levels deep
--include strings Comma seperated Href references to expand in results, may be dotted three levels deep
-j, --json JSON output
--search string Search keyword for use in 'get' actions. Search is not supported by all resources.
-y, --yaml YAML output
```

Expand Down
1 change: 1 addition & 0 deletions docs/packet_hardware-reservation.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Hardware reservation operations: get, move
--exclude strings Comma seperated Href references to collapse in results, may be dotted three levels deep
--include strings Comma seperated Href references to expand in results, may be dotted three levels deep
-j, --json JSON output
--search string Search keyword for use in 'get' actions. Search is not supported by all resources.
-y, --yaml YAML output
```

Expand Down
1 change: 1 addition & 0 deletions docs/packet_hardware-reservation_get.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ packet hardware-reservation get [flags]
--exclude strings Comma seperated Href references to collapse in results, may be dotted three levels deep
--include strings Comma seperated Href references to expand in results, may be dotted three levels deep
-j, --json JSON output
--search string Search keyword for use in 'get' actions. Search is not supported by all resources.
-y, --yaml YAML output
```

Expand Down
1 change: 1 addition & 0 deletions docs/packet_hardware-reservation_move.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ packet hardware-reservation move [flags]
--exclude strings Comma seperated Href references to collapse in results, may be dotted three levels deep
--include strings Comma seperated Href references to expand in results, may be dotted three levels deep
-j, --json JSON output
--search string Search keyword for use in 'get' actions. Search is not supported by all resources.
-y, --yaml YAML output
```

Expand Down
1 change: 1 addition & 0 deletions docs/packet_ip.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ IP address, reservations and assignment operations: assign, unassign, remove, av
--exclude strings Comma seperated Href references to collapse in results, may be dotted three levels deep
--include strings Comma seperated Href references to expand in results, may be dotted three levels deep
-j, --json JSON output
--search string Search keyword for use in 'get' actions. Search is not supported by all resources.
-y, --yaml YAML output
```

Expand Down
1 change: 1 addition & 0 deletions docs/packet_ip_assign.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ packet ip assign [flags]
--exclude strings Comma seperated Href references to collapse in results, may be dotted three levels deep
--include strings Comma seperated Href references to expand in results, may be dotted three levels deep
-j, --json JSON output
--search string Search keyword for use in 'get' actions. Search is not supported by all resources.
-y, --yaml YAML output
```

Expand Down
1 change: 1 addition & 0 deletions docs/packet_ip_available.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ packet ip available [flags]
--exclude strings Comma seperated Href references to collapse in results, may be dotted three levels deep
--include strings Comma seperated Href references to expand in results, may be dotted three levels deep
-j, --json JSON output
--search string Search keyword for use in 'get' actions. Search is not supported by all resources.
-y, --yaml YAML output
```

Expand Down
1 change: 1 addition & 0 deletions docs/packet_ip_get.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ packet ip get [flags]
--exclude strings Comma seperated Href references to collapse in results, may be dotted three levels deep
--include strings Comma seperated Href references to expand in results, may be dotted three levels deep
-j, --json JSON output
--search string Search keyword for use in 'get' actions. Search is not supported by all resources.
-y, --yaml YAML output
```

Expand Down
1 change: 1 addition & 0 deletions docs/packet_ip_remove.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ packet ip remove [flags]
--exclude strings Comma seperated Href references to collapse in results, may be dotted three levels deep
--include strings Comma seperated Href references to expand in results, may be dotted three levels deep
-j, --json JSON output
--search string Search keyword for use in 'get' actions. Search is not supported by all resources.
-y, --yaml YAML output
```

Expand Down
1 change: 1 addition & 0 deletions docs/packet_ip_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ packet ip request [flags]
--exclude strings Comma seperated Href references to collapse in results, may be dotted three levels deep
--include strings Comma seperated Href references to expand in results, may be dotted three levels deep
-j, --json JSON output
--search string Search keyword for use in 'get' actions. Search is not supported by all resources.
-y, --yaml YAML output
```

Expand Down
1 change: 1 addition & 0 deletions docs/packet_ip_unassign.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ packet ip unassign [flags]
--exclude strings Comma seperated Href references to collapse in results, may be dotted three levels deep
--include strings Comma seperated Href references to expand in results, may be dotted three levels deep
-j, --json JSON output
--search string Search keyword for use in 'get' actions. Search is not supported by all resources.
-y, --yaml YAML output
```

Expand Down
1 change: 1 addition & 0 deletions docs/packet_operating-systems.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Operating system operations: get
--exclude strings Comma seperated Href references to collapse in results, may be dotted three levels deep
--include strings Comma seperated Href references to expand in results, may be dotted three levels deep
-j, --json JSON output
--search string Search keyword for use in 'get' actions. Search is not supported by all resources.
-y, --yaml YAML output
```

Expand Down
1 change: 1 addition & 0 deletions docs/packet_operating-systems_get.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ packet operating-systems get [flags]
--exclude strings Comma seperated Href references to collapse in results, may be dotted three levels deep
--include strings Comma seperated Href references to expand in results, may be dotted three levels deep
-j, --json JSON output
--search string Search keyword for use in 'get' actions. Search is not supported by all resources.
-y, --yaml YAML output
```

Expand Down
1 change: 1 addition & 0 deletions docs/packet_organization.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Organization operations: create, update, delete and get
--exclude strings Comma seperated Href references to collapse in results, may be dotted three levels deep
--include strings Comma seperated Href references to expand in results, may be dotted three levels deep
-j, --json JSON output
--search string Search keyword for use in 'get' actions. Search is not supported by all resources.
-y, --yaml YAML output
```

Expand Down
1 change: 1 addition & 0 deletions docs/packet_organization_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ packet organization create [flags]
--exclude strings Comma seperated Href references to collapse in results, may be dotted three levels deep
--include strings Comma seperated Href references to expand in results, may be dotted three levels deep
-j, --json JSON output
--search string Search keyword for use in 'get' actions. Search is not supported by all resources.
-y, --yaml YAML output
```

Expand Down
1 change: 1 addition & 0 deletions docs/packet_organization_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ packet organization delete [flags]
--exclude strings Comma seperated Href references to collapse in results, may be dotted three levels deep
--include strings Comma seperated Href references to expand in results, may be dotted three levels deep
-j, --json JSON output
--search string Search keyword for use in 'get' actions. Search is not supported by all resources.
-y, --yaml YAML output
```

Expand Down
1 change: 1 addition & 0 deletions docs/packet_organization_get.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ packet organization get [flags]
--exclude strings Comma seperated Href references to collapse in results, may be dotted three levels deep
--include strings Comma seperated Href references to expand in results, may be dotted three levels deep
-j, --json JSON output
--search string Search keyword for use in 'get' actions. Search is not supported by all resources.
-y, --yaml YAML output
```

Expand Down
1 change: 1 addition & 0 deletions docs/packet_organization_get_payment-methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ packet organization get payment-methods [flags]
--exclude strings Comma seperated Href references to collapse in results, may be dotted three levels deep
--include strings Comma seperated Href references to expand in results, may be dotted three levels deep
-j, --json JSON output
--search string Search keyword for use in 'get' actions. Search is not supported by all resources.
-y, --yaml YAML output
```

Expand Down
1 change: 1 addition & 0 deletions docs/packet_organization_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ packet organization update [flags]
--exclude strings Comma seperated Href references to collapse in results, may be dotted three levels deep
--include strings Comma seperated Href references to expand in results, may be dotted three levels deep
-j, --json JSON output
--search string Search keyword for use in 'get' actions. Search is not supported by all resources.
-y, --yaml YAML output
```

Expand Down
1 change: 1 addition & 0 deletions docs/packet_plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Plan operations: get
--exclude strings Comma seperated Href references to collapse in results, may be dotted three levels deep
--include strings Comma seperated Href references to expand in results, may be dotted three levels deep
-j, --json JSON output
--search string Search keyword for use in 'get' actions. Search is not supported by all resources.
-y, --yaml YAML output
```

Expand Down
1 change: 1 addition & 0 deletions docs/packet_plan_get.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ packet plan get [flags]
--exclude strings Comma seperated Href references to collapse in results, may be dotted three levels deep
--include strings Comma seperated Href references to expand in results, may be dotted three levels deep
-j, --json JSON output
--search string Search keyword for use in 'get' actions. Search is not supported by all resources.
-y, --yaml YAML output
```

Expand Down
1 change: 1 addition & 0 deletions docs/packet_project.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Project operations: create, delete, update and get
--exclude strings Comma seperated Href references to collapse in results, may be dotted three levels deep
--include strings Comma seperated Href references to expand in results, may be dotted three levels deep
-j, --json JSON output
--search string Search keyword for use in 'get' actions. Search is not supported by all resources.
-y, --yaml YAML output
```

Expand Down
Loading