[pve-devel] [PATCH qemu-server 1/2] api2: use firewall helpers

Alexandre Derumier aderumier at odiso.com
Wed Jun 29 11:08:28 CEST 2022


Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/API2/Qemu.pm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index 99b426e..fe1465e 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -31,7 +31,7 @@ use PVE::RPCEnvironment;
 use PVE::AccessControl;
 use PVE::INotify;
 use PVE::Network;
-use PVE::Firewall;
+use PVE::Firewall::Helpers qw(remove_vmfw_conf clone_vmfw_conf);
 use PVE::API2::Firewall::VM;
 use PVE::API2::Qemu::Agent;
 use PVE::VZDump::Plugin;
@@ -1911,7 +1911,7 @@ __PACKAGE__->register_method({
 		);
 
 		PVE::AccessControl::remove_vm_access($vmid);
-		PVE::Firewall::remove_vmfw_conf($vmid);
+		remove_vmfw_conf($vmid);
 		if ($param->{purge}) {
 		    print "purging VM $vmid from related configurations..\n";
 		    PVE::ReplicationConfig::remove_vmid_jobs($vmid);
@@ -3416,7 +3416,7 @@ __PACKAGE__->register_method({
 	    # FIXME use PVE::QemuConfig->create_and_lock_config and adapt code
 	    PVE::Tools::file_set_contents($conffile, "# qmclone temporary file\nlock: clone\n");
 
-	    PVE::Firewall::clone_vmfw_conf($vmid, $newid);
+	    clone_vmfw_conf($vmid, $newid);
 
 	    my $newvollist = [];
 	    my $jobs = {};
@@ -3512,7 +3512,7 @@ __PACKAGE__->register_method({
 		    warn $@ if $@;
 		}
 
-		PVE::Firewall::remove_vmfw_conf($newid);
+		remove_vmfw_conf($newid);
 
 		unlink $conffile; # avoid races -> last thing before die
 
-- 
2.30.2




More information about the pve-devel mailing list