MCPcopy
hub / github.com/lxc/incus / command

Method command

cmd/incus/storage_volume.go:63–165  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

61}
62
63func (c *cmdStorageVolume) command() *cobra.Command {
64 cmd := &cobra.Command{}
65 cmd.Use = cli.U("volume")
66 cmd.Short = i18n.G("Manage storage volumes")
67 cmd.Long = cli.FormatSection(color.DescriptionPrefix, i18n.G(
68 `Manage storage volumes
69
70Unless specified through a prefix, all volume operations affect "custom" (user created) volumes.`,
71 ))
72
73 // Attach
74 storageVolumeAttachCmd := cmdStorageVolumeAttach{global: c.global, storage: c.storage, storageVolume: c}
75 cmd.AddCommand(storageVolumeAttachCmd.command())
76
77 // Attach profile
78 storageVolumeAttachProfileCmd := cmdStorageVolumeAttachProfile{global: c.global, storage: c.storage, storageVolume: c}
79 cmd.AddCommand(storageVolumeAttachProfileCmd.command())
80
81 // Copy
82 storageVolumeCopyCmd := cmdStorageVolumeCopy{global: c.global, storage: c.storage, storageVolume: c}
83 cmd.AddCommand(storageVolumeCopyCmd.command())
84
85 // Create
86 storageVolumeCreateCmd := cmdStorageVolumeCreate{global: c.global, storage: c.storage, storageVolume: c}
87 cmd.AddCommand(storageVolumeCreateCmd.command())
88
89 // Delete
90 storageVolumeDeleteCmd := cmdStorageVolumeDelete{global: c.global, storage: c.storage, storageVolume: c}
91 cmd.AddCommand(storageVolumeDeleteCmd.command())
92
93 // Detach
94 storageVolumeDetachCmd := cmdStorageVolumeDetach{global: c.global, storage: c.storage, storageVolume: c}
95 cmd.AddCommand(storageVolumeDetachCmd.command())
96
97 // Detach profile
98 storageVolumeDetachProfileCmd := cmdStorageVolumeDetachProfile{global: c.global, storage: c.storage, storageVolume: c, storageVolumeDetach: &storageVolumeDetachCmd}
99 cmd.AddCommand(storageVolumeDetachProfileCmd.command())
100
101 // Edit
102 storageVolumeEditCmd := cmdStorageVolumeEdit{global: c.global, storage: c.storage, storageVolume: c}
103 cmd.AddCommand(storageVolumeEditCmd.command())
104
105 // Export
106 storageVolumeExportCmd := cmdStorageVolumeExport{global: c.global, storage: c.storage, storageVolume: c}
107 cmd.AddCommand(storageVolumeExportCmd.command())
108
109 // Get
110 storageVolumeGetCmd := cmdStorageVolumeGet{global: c.global, storage: c.storage, storageVolume: c}
111 cmd.AddCommand(storageVolumeGetCmd.command())
112
113 // Import
114 storageVolumeImportCmd := cmdStorageVolumeImport{global: c.global, storage: c.storage, storageVolume: c}
115 cmd.AddCommand(storageVolumeImportCmd.command())
116
117 // Info
118 storageVolumeInfoCmd := cmdStorageVolumeInfo{global: c.global, storage: c.storage, storageVolume: c}
119 cmd.AddCommand(storageVolumeInfoCmd.command())
120

Callers 1

commandMethod · 0.95

Calls 15

commandMethod · 0.95
commandMethod · 0.95
commandMethod · 0.95
commandMethod · 0.95
commandMethod · 0.95
commandMethod · 0.95
commandMethod · 0.95
commandMethod · 0.95
commandMethod · 0.95
commandMethod · 0.95
commandMethod · 0.95
commandMethod · 0.95

Tested by

no test coverage detected