Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public class CopySnapshotCmd extends BaseAsyncCmd implements UserCmd {
"The snapshot will always be made available in the zone in which the volume is present. Currently supported for StorPool only")
protected List<Long> storagePoolIds;

@Parameter (name = ApiConstants.USE_STORAGE_REPLICATION, type=CommandType.BOOLEAN, required = false, since = "4.21.0", description = "This parameter enables the option the snapshot to be copied to supported primary storage")
@Parameter (name = ApiConstants.USE_STORAGE_REPLICATION, type=CommandType.BOOLEAN, since = "4.21.0", description = "Enables the snapshot to be copied to the supported primary storages when the config 'use.storage.replication' set to true for the storage or globally. Supports only StorPool storage for now.")
protected Boolean useStorageReplication;

/////////////////////////////////////////////////////
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public class CreateSnapshotCmd extends BaseAsyncCreateCmd {
since = "4.21.0")
protected List<Long> storagePoolIds;

@Parameter (name = ApiConstants.USE_STORAGE_REPLICATION, type=CommandType.BOOLEAN, required = false, description = "This parameter enables the option the snapshot to be copied to supported primary storage")
@Parameter (name = ApiConstants.USE_STORAGE_REPLICATION, type=CommandType.BOOLEAN, description = "Enables the snapshot to be copied to the supported primary storages when the config 'use.storage.replication' set to true for the storage or globally. Supports only StorPool storage for now.")
protected Boolean useStorageReplication;

private String syncObjectType = BaseAsyncCmd.snapshotHostSyncObject;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public class CreateSnapshotPolicyCmd extends BaseCmd {
since = "4.21.0")
protected List<Long> storagePoolIds;

@Parameter (name = ApiConstants.USE_STORAGE_REPLICATION, type=CommandType.BOOLEAN, required = false, since = "4.21.0", description = "This parameter enables the option the snapshot to be copied to supported primary storage")
@Parameter (name = ApiConstants.USE_STORAGE_REPLICATION, type=CommandType.BOOLEAN, since = "4.21.0", description = "Enables the snapshot to be copied to the supported primary storages when the config 'use.storage.replication' set to true for the storage or globally. Supports only StorPool storage for now.")
protected Boolean useStorageReplication;
/////////////////////////////////////////////////////
/////////////////// Accessors ///////////////////////
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public interface SnapshotManager extends Configurable {
"Whether to show chain size (sum of physical size of snapshot and all its parents) for incremental snapshots in the snapshot response",
true, ConfigKey.Scope.Global, null);

public static final ConfigKey<Boolean> UseStorageReplication = new ConfigKey<Boolean>(Boolean.class, "use.storage.replication", "Snapshots", "false", "For snapshot copy to another primary storage in a different zone. Supports only StorPool storage for now", true, ConfigKey.Scope.StoragePool, null);
ConfigKey<Boolean> UseStorageReplication = new ConfigKey<>(Boolean.class, "use.storage.replication", "Snapshots", "false", "For snapshot copy to another primary storage in a different zone. Supports only StorPool storage for now", true, ConfigKey.Scope.StoragePool, null);

void deletePoliciesForVolume(Long volumeId);

Expand Down
8 changes: 7 additions & 1 deletion ui/src/views/storage/FormSchedule.vue
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,10 @@
</a-form-item>
</a-col>
<a-col :md="24" :lg="24" v-if="resourceType === 'Volume'">
<a-form-item :label="$t('label.usestoragereplication')" name="useStorageReplication" ref="useStorageReplication">
<a-form-item name="useStorageReplication" ref="useStorageReplication">
<template #label>
<tooltip-label :title="$t('label.usestoragereplication')" :tooltip="apiParams.usestoragereplication.description" />
</template>
<a-switch v-model:checked="form.useStorageReplication" />
</a-form-item>
<a-form-item v-if="isAdmin && form.useStorageReplication" ref="storageids" name="storageids">
Expand Down Expand Up @@ -306,6 +309,9 @@ export default {
storagePools: []
}
},
beforeCreate () {
this.apiParams = this.$getApiParams('createSnapshotPolicy')
},
created () {
this.initForm()
this.volumeId = this.resource.id
Expand Down
5 changes: 4 additions & 1 deletion ui/src/views/storage/SnapshotZones.vue
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,10 @@
</a-select-option>
</a-select>
</a-form-item>
<a-form-item :label="$t('label.usestoragereplication')" name="useStorageReplication" ref="useStorageReplication">
<a-form-item name="useStorageReplication" ref="useStorageReplication">
<template #label>
<tooltip-label :title="$t('label.usestoragereplication')" :tooltip="apiParams.usestoragereplication.description" />
</template>
<a-switch v-model:checked="form.useStorageReplication" />
</a-form-item>
<a-form-item v-if="isAdmin && form.useStorageReplication" ref="storageid" name="storageid" :label="$t('label.storagepools')">
Expand Down
10 changes: 8 additions & 2 deletions ui/src/views/storage/TakeSnapshot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@
</a-select-option>
</a-select>
</a-form-item>
<a-form-item :label="$t('label.usestoragereplication')" name="useStorageReplication" ref="useStorageReplication">
<a-form-item name="useStorageReplication" ref="useStorageReplication">
<template #label>
<tooltip-label :title="$t('label.usestoragereplication')" :tooltip="apiParams.usestoragereplication.description" />
</template>
<a-switch v-model:checked="form.useStorageReplication" />
</a-form-item>
<a-form-item v-if="isAdmin && form.useStorageReplication" ref="storageids" name="storageids">
Expand All @@ -93,7 +96,10 @@
</a-select-option>
</a-select>
</a-form-item>
<a-form-item :label="$t('label.asyncbackup')" name="asyncbackup" ref="asyncbackup" v-if="!supportsStorageSnapshot">
<a-form-item name="asyncbackup" ref="asyncbackup" v-if="!supportsStorageSnapshot">
<template #label>
<tooltip-label :title="$t('label.asyncbackup')" :tooltip="apiParams.asyncbackup.description" />
</template>
<a-switch v-model:checked="form.asyncbackup" />
</a-form-item>
<a-form-item :label="$t('label.quiescevm')" name="quiescevm" ref="quiescevm" v-if="quiescevm && hypervisorSupportsQuiesceVm">
Expand Down
Loading