[pve-devel] [PATCH v2 qemu-server 04/18] overwrite load_current_config from AbstractConfig
Oguz Bektas
o.bektas at proxmox.com
Mon Sep 30 14:44:36 CEST 2019
we overwrite the load_current_config method from AbstractConfig, in
order to handle cipassword.
Signed-off-by: Oguz Bektas <o.bektas at proxmox.com>
---
PVE/QemuConfig.pm | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/PVE/QemuConfig.pm b/PVE/QemuConfig.pm
index edbf1a7..7f229b3 100644
--- a/PVE/QemuConfig.pm
+++ b/PVE/QemuConfig.pm
@@ -397,6 +397,20 @@ sub __snapshot_foreach_volume {
PVE::QemuServer::foreach_drive($conf, $func);
}
+
+sub load_current_config {
+ my ($class, $vmid, $snapname, $current) = @_;
+
+ my $conf = $class->SUPER::load_current_config($vmid, $snapname, $current);
+
+ if ($conf->{cipassword}) {
+ $conf->{cipassword} = '**********';
+ }
+
+ return $conf;
+}
+
+
# END implemented abstract methods from PVE::AbstractConfig
1;
--
2.20.1
More information about the pve-devel
mailing list