/usr/share/perl5/PVE/VZDump/Plugin.pm is in vzdump 1.2.6-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | package PVE::VZDump::Plugin;
# Copyright (C) 2007-2009 Proxmox Server Solutions GmbH
#
# Copyright: vzdump is under GNU GPL, the GNU General Public License.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 dated June, 1991.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the
# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
# MA 02110-1301, USA.
#
# Author: Dietmar Maurer <dietmar@proxmox.com>
use strict;
use warnings;
sub set_logfd {
my ($self, $logfd) = @_;
$self->{logfd} = $logfd;
}
sub cmd {
my ($self, $cmdstr, $input) = @_;
return PVE::VZDump::run_command ($self->{logfd}, $cmdstr, $input);
}
sub cmd_noerr {
my ($self, $cmdstr, $input) = @_;
my $res;
eval { $res = $self->cmd ($cmdstr, $input); };
$self->logerr ($@) if $@;
return $res;
}
sub loginfo {
my ($self, $msg) = @_;
PVE::VZDump::debugmsg ('info', $msg, $self->{logfd}, 0);
}
sub logerr {
my ($self, $msg) = @_;
PVE::VZDump::debugmsg ('err', $msg, $self->{logfd}, 0);
}
sub type {
return 'unknown';
};
sub vmlist {
my ($self) = @_;
return [ keys %{$self->{vmlist}} ] if $self->{vmlist};
return [];
}
sub vm_status {
my ($self, $vmid) = @_;
die "internal error"; # implement in subclass
}
sub prepare {
my ($self, $task, $vmid, $mode) = @_;
die "internal error"; # implement in subclass
}
sub lock_vm {
my ($self, $vmid) = @_;
die "internal error"; # implement in subclass
}
sub unlock_vm {
my ($self, $vmid) = @_;
die "internal error"; # implement in subclass
}
sub stop_vm {
my ($self, $task, $vmid) = @_;
die "internal error"; # implement in subclass
}
sub start_vm {
my ($self, $task, $vmid) = @_;
die "internal error"; # implement in subclass
}
sub suspend_vm {
my ($self, $task, $vmid) = @_;
die "internal error"; # implement in subclass
}
sub resume_vm {
my ($self, $task, $vmid) = @_;
die "internal error"; # implement in subclass
}
sub snapshot {
my ($self, $task, $vmid) = @_;
die "internal error"; # implement in subclass
}
sub copy_data_phase2 {
my ($self, $task, $vmid) = @_;
die "internal error"; # implement in subclass
}
sub assemble {
my ($self, $task, $vmid) = @_;
die "internal error"; # implement in subclass
}
sub archive {
my ($self, $task, $vmid, $filename) = @_;
die "internal error"; # implement in subclass
}
sub cleanup {
my ($self, $task, $vmid) = @_;
die "internal error"; # implement in subclass
}
1;
|