[pve-devel] [PATCH container 0/4] Config and snapshot refactoring
Fabian Grünbichler
f.gruenbichler at proxmox.com
Wed Mar 2 14:03:48 CET 2016
This patch series moves a lot of common code shared with
QemuServer.pm into a new abstract class AbstractConfig
in pve-common.
Furthermore, most other code that is only related to the PVE
config files for an LXC guest is moved to PVE::LXC::Config,
which implements PVE::AbstractConfig.
All of the methods in PVE::LXC::Config are static class methods,
except for write_pct_config and parse_pct_config (which are
used by the code in pve-cluster to translate config file content
to config hashes) and verify_lxc_mp_string, which is used by
the JSON parser.
There are four related patches, one for pve-common which contains
the AbstractConfig.pm file, and three for calls to moved methods
by code in pve-ha-manager, pve-firewall and pve-manager. The patch
for pve-common should be applied before, the other three after
this patch series.
Fabian Grünbichler (4):
Refactor config-related methods into AbstractConfig
Rework snapshot code, has_feature
Refactor mountpoint and general conf methods
Move JSONFormat code to PVE::LXC::Config
src/PVE/API2/LXC.pm | 82 +--
src/PVE/API2/LXC/Config.pm | 16 +-
src/PVE/API2/LXC/Snapshot.pm | 18 +-
src/PVE/API2/LXC/Status.pm | 34 +-
src/PVE/CLI/pct.pm | 38 +-
src/PVE/LXC.pm | 1554 ++----------------------------------------
src/PVE/LXC/Config.pm | 1126 ++++++++++++++++++++++++++++++
src/PVE/LXC/Create.pm | 20 +-
src/PVE/LXC/Makefile | 2 +-
src/PVE/LXC/Migrate.pm | 22 +-
src/PVE/LXC/Setup/Alpine.pm | 4 +-
src/PVE/LXC/Setup/Base.pm | 4 +-
src/PVE/LXC/Setup/Debian.pm | 4 +-
src/PVE/LXC/Setup/Redhat.pm | 2 +-
src/PVE/LXC/Setup/SUSE.pm | 2 +-
src/PVE/LXC/Setup/Ubuntu.pm | 2 +-
src/PVE/VZDump/LXC.pm | 34 +-
src/gen-pct-conf-pod.pl | 4 +-
src/lxc-pve-poststop-hook | 4 +-
src/lxc-pve-prestart-hook | 14 +-
src/lxcnetaddbr | 4 +-
src/test/run_setup_tests.pl | 2 +-
src/test/snapshot-test.pm | 79 ++-
23 files changed, 1365 insertions(+), 1706 deletions(-)
create mode 100644 src/PVE/LXC/Config.pm
--
2.1.4
More information about the pve-devel
mailing list