Skip to content

Commit

Permalink
revise device example snippets to match markdown changes
Browse files Browse the repository at this point in the history
Signed-off-by: Marques Johansson <[email protected]>
  • Loading branch information
displague committed Jun 16, 2022
1 parent acd469d commit dce7f70
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions internal/devices/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import (
)

func (c *Client) Create() *cobra.Command {

var (
projectID string
metro string
Expand All @@ -55,15 +54,15 @@ func (c *Client) Create() *cobra.Command {
terminationTime string
)

var createDeviceCmd = &cobra.Command{
createDeviceCmd := &cobra.Command{
Use: `create -p <project_id> (-m <metro> | -f <facility>) -P <plan> -H <hostname> -O <operating_system> [-u <userdata> | --userdata-file <filepath>] [-c <customdata>] [-t <tags>] [-r <hardware_reservation_id>] [-I <ipxe_script_url>] [--always-pxe] [--spot-instance] [--spot-price-max=<max_price>]`,
Short: "Creates a device.",
Long: "Creates a device in the specified project. A plan, hostname, operating system, and either metro or facility is required.",
Example: ` # Provisions a c3.small.x86 in the Dallas metro running Ubuntu 20.04:
metal device create -p $METAL_PROJECT_ID -p c3.small.x86 -m da -H test-staging-2 -O ubuntu_20_04,
metal device create -p $METAL_PROJECT_ID -P c3.small.x86 -m da -H test-staging-2 -O ubuntu_20_04
# Provisions a c3.medium.x86 in Silicon Valley, running Rocky Linux, from a hardware reservation:
metal device create -p $METAL_PROJECT_ID -p c3.medium.x86 -m sv -H test-rocky -O rocky_8 -r 47161704-1715-4b45-8549-fb3f4b2c32c7`,
metal device create -p $METAL_PROJECT_ID -P c3.medium.x86 -m sv -H test-rocky -O rocky_8 -r 47161704-1715-4b45-8549-fb3f4b2c32c7`,

RunE: func(cmd *cobra.Command, args []string) error {
var endDt *packngo.Timestamp
Expand Down
2 changes: 1 addition & 1 deletion internal/devices/retrieve.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
)

func (c *Client) Retrieve() *cobra.Command {
var retrieveDeviceCmd = &cobra.Command{
retrieveDeviceCmd := &cobra.Command{
Use: `get [-p <project_id>] | [-i <device_id>]`,
Aliases: []string{"list"},
Short: "Retrieves device list or device details.",
Expand Down

0 comments on commit dce7f70

Please sign in to comment.