github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/command/volume.go (about)

     1  package command
     2  
     3  import (
     4  	"strings"
     5  
     6  	"github.com/mitchellh/cli"
     7  )
     8  
     9  type VolumeCommand struct {
    10  	Meta
    11  }
    12  
    13  func (c *VolumeCommand) Help() string {
    14  	helpText := `
    15  Usage: nomad volume <subcommand> [options]
    16  
    17    volume groups commands that interact with volumes.
    18  
    19    Register a new volume or update an existing volume:
    20  
    21        $ nomad volume register <input>
    22  
    23    Examine the status of a volume:
    24  
    25        $ nomad volume status <id>
    26  
    27    Deregister an unused volume:
    28  
    29        $ nomad volume deregister <id>
    30  
    31    Detach an unused volume:
    32  
    33        $ nomad volume detach <vol id> <node id>
    34  
    35    Create an external volume and register it:
    36  
    37        $ nomad volume create <input>
    38  
    39    Delete an external volume and deregister it:
    40  
    41        $ nomad volume delete <external id>
    42  
    43    Please see the individual subcommand help for detailed usage information.
    44  `
    45  	return strings.TrimSpace(helpText)
    46  }
    47  
    48  func (c *VolumeCommand) Name() string {
    49  	return "volume"
    50  }
    51  
    52  func (c *VolumeCommand) Synopsis() string {
    53  	return "Interact with volumes"
    54  }
    55  
    56  func (c *VolumeCommand) Run(args []string) int {
    57  	return cli.RunResultHelp
    58  }