github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/command/volume_snapshot.go (about) 1 package command 2 3 import ( 4 "strings" 5 6 "github.com/mitchellh/cli" 7 ) 8 9 type VolumeSnapshotCommand struct { 10 Meta 11 } 12 13 func (f *VolumeSnapshotCommand) Name() string { return "snapshot" } 14 15 func (f *VolumeSnapshotCommand) Run(args []string) int { 16 return cli.RunResultHelp 17 } 18 19 func (f *VolumeSnapshotCommand) Synopsis() string { 20 return "Interact with volume snapshots" 21 } 22 23 func (f *VolumeSnapshotCommand) Help() string { 24 helpText := ` 25 Usage: nomad volume snapshot <subcommand> [options] [args] 26 27 This command groups subcommands for interacting with CSI volume snapshots. 28 29 Create a snapshot of an external storage volume: 30 31 $ nomad volume snapshot create <volume id> 32 33 Display a list of CSI volume snapshots along with their 34 source volume ID as known to the external storage provider. 35 36 $ nomad volume snapshot list -plugin <plugin id> 37 38 Delete a snapshot of an external storage volume: 39 40 $ nomad volume snapshot delete <snapshot id> 41 42 Please see the individual subcommand help for detailed usage information. 43 ` 44 return strings.TrimSpace(helpText) 45 }