Revert "free: added snapshot parameter"
This reverts commit a26e1abc70.
This commit is contained in:
committed by
Dietmar Maurer
parent
b57a863a0f
commit
cd0b3d5bc2
@ -258,12 +258,6 @@ __PACKAGE__->register_method ({
|
|||||||
type => 'string',
|
type => 'string',
|
||||||
completion => \&PVE::Storage::complete_volume,
|
completion => \&PVE::Storage::complete_volume,
|
||||||
},
|
},
|
||||||
snapshot => {
|
|
||||||
description => "Delete a snapshot instead of the entire disk.",
|
|
||||||
type => 'string',
|
|
||||||
pattern => qr/[a-z0-9_\-]{1,40}/,
|
|
||||||
optional => 1,
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
returns => { type => 'null' },
|
returns => { type => 'null' },
|
||||||
@ -285,12 +279,7 @@ __PACKAGE__->register_method ({
|
|||||||
$rpcenv->check($authuser, "/storage/$storeid", ['Datastore.Allocate']);
|
$rpcenv->check($authuser, "/storage/$storeid", ['Datastore.Allocate']);
|
||||||
}
|
}
|
||||||
|
|
||||||
my $snapshot = $param->{snapshot};
|
PVE::Storage::vdisk_free ($cfg, $volid);
|
||||||
if (defined($snapshot)) {
|
|
||||||
PVE::Storage::volume_snapshot_delete($cfg, $volid, $snapshot, 0);
|
|
||||||
} else {
|
|
||||||
PVE::Storage::vdisk_free($cfg, $volid);
|
|
||||||
}
|
|
||||||
|
|
||||||
return undef;
|
return undef;
|
||||||
}});
|
}});
|
||||||
|
|||||||
Reference in New Issue
Block a user