qemu-server/PVE/QemuConfig/NoWrite.pm
Fabian Grünbichler 275a6f477c config: revamp NoWrite interface
instead of blessing a passed-in config and returning it, explicitly only bless
without returning to make it more obvious to callers that this affects the
argument.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
2025-02-18 15:06:04 +01:00

24 lines
343 B
Perl

package PVE::QemuConfig::NoWrite;
use strict;
use warnings;
use PVE::RESTEnvironment qw(log_warn);
use base qw(PVE::QemuConfig);
sub mark_config {
my ($class, $conf) = @_;
bless($conf, $class);
}
sub write_config {
my ($class, $vmid, $conf) = @_;
log_warn("refusing to write temporary configuration");
return;
}
1;