Add volume and image encryption feature

Signed-off-by: andy.lee <andy.lee@suse.com>
This commit is contained in:
andy.lee
2024-10-23 17:01:27 +02:00
committed by Francesco Torchia
parent 68b264dca1
commit 7f72fdf2c5
10 changed files with 340 additions and 30 deletions
@@ -37,7 +37,7 @@ export default class HciPv extends HarvesterResource {
return [
{
action: 'exportImage',
enabled: this.hasAction('export'),
enabled: this.hasAction('export') && !this.isEncrypted,
icon: 'icon icon-copy',
label: this.t('harvester.action.exportImage')
},
@@ -213,6 +213,14 @@ export default class HciPv extends HarvesterResource {
return false;
}
get isEncrypted() {
const inStore = this.$rootGetters['currentProduct'].inStore;
const longhornVolume = this.$rootGetters[`${ inStore }/all`](LONGHORN.VOLUMES).find(v => v.metadata?.name === this.spec?.volumeName);
return longhornVolume?.spec.encrypted || false;
}
get longhornVolume() {
const inStore = this.$rootGetters['currentProduct'].inStore;