mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-10-04 13:16:05 +08:00
feat: enable snapshot and clone for LHv2 (#379)
Now that Longhorn supports volume clone with the V2 data engine, we can enable volume snapshot and clone. Related issue: https://github.com/harvester/harvester/issues/6710 Signed-off-by: Tim Serong <tserong@suse.com>
This commit is contained in:
@@ -35,15 +35,10 @@ export default class HciPv extends HarvesterResource {
|
||||
get availableActions() {
|
||||
let out = super._availableActions;
|
||||
|
||||
// Longhorn V2 provisioner do not support volume clone feature yet
|
||||
if (this.isLonghornV2) {
|
||||
out = out.filter((action) => action.action !== 'goToClone');
|
||||
} else {
|
||||
const clone = out.find((action) => action.action === 'goToClone');
|
||||
const clone = out.find((action) => action.action === 'goToClone');
|
||||
|
||||
if (clone) {
|
||||
clone.action = 'goToCloneVolume';
|
||||
}
|
||||
if (clone) {
|
||||
clone.action = 'goToCloneVolume';
|
||||
}
|
||||
|
||||
const exportImageAction = {
|
||||
@@ -65,10 +60,6 @@ export default class HciPv extends HarvesterResource {
|
||||
takeSnapshotAction,
|
||||
...out
|
||||
];
|
||||
// TODO: remove this block if Longhorn V2 engine supports restore volume snapshot
|
||||
if (this.isLonghornV2) {
|
||||
out = out.filter((action) => action.action !== takeSnapshotAction.action);
|
||||
}
|
||||
} else { // v1.4 / v1.3
|
||||
if (!this.isLonghorn || !this.isLonghornV2) {
|
||||
out = [
|
||||
|
||||
Reference in New Issue
Block a user