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

Method RebuildStoragePoolVolume

client/incus_storage_volumes.go:924–939  ·  view source on GitHub ↗

RebuildStoragePoolVolume rebuilds an existing custom storage volume as empty.

(pool string, volType string, name string, volume api.StorageVolumeRebuildPost)

Source from the content-addressed store, hash-verified

922
923// RebuildStoragePoolVolume rebuilds an existing custom storage volume as empty.
924func (r *ProtocolIncus) RebuildStoragePoolVolume(pool string, volType string, name string, volume api.StorageVolumeRebuildPost) (Operation, error) {
925 err := r.CheckExtension("storage_volumes_rebuild")
926 if err != nil {
927 return nil, err
928 }
929
930 path := fmt.Sprintf("/storage-pools/%s/volumes/%s/%s/rebuild", url.PathEscape(pool), url.PathEscape(volType), url.PathEscape(name))
931
932 // Send the request.
933 op, _, err := r.queryOperation("POST", path, volume, "")
934 if err != nil {
935 return nil, err
936 }
937
938 return op, nil
939}
940
941// RenameStoragePoolVolume renames a storage volume.
942func (r *ProtocolIncus) RenameStoragePoolVolume(pool string, volType string, name string, volume api.StorageVolumePost) error {

Callers

nothing calls this directly

Calls 2

CheckExtensionMethod · 0.95
queryOperationMethod · 0.95

Tested by

no test coverage detected