Signed-off-by: Fabian Ebner <f.eb...@proxmox.com>
---
 src/PVE/LXC/Config.pm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm
index e88ba0b..abaae54 100644
--- a/src/PVE/LXC/Config.pm
+++ b/src/PVE/LXC/Config.pm
@@ -1076,6 +1076,30 @@ sub print_ct_mountpoint {
     return PVE::JSONSchema::print_property_string($info, $mp_desc, $skip);
 }
 
+sub parse_volume {
+    my ($class, $key, $volume_string, $noerr) = @_;
+
+    if ($key eq 'rootfs') {
+       return $class->parse_ct_rootfs($volume_string, $noerr);
+    } elsif ($key =~ m/^mp\d+$/ || $key =~ m/^unused\d+$/) {
+       return $class->parse_ct_mountpoint($volume_string, $noerr);
+    }
+
+    die "parse_volume - unknown type: $key\n";
+}
+
+sub print_volume {
+    my ($class, $key, $volume) = @_;
+
+    return $class->print_ct_mountpoint($volume, $key eq 'rootfs');
+}
+
+sub volid_key {
+    my ($class) = @_;
+
+    return 'volume';
+}
+
 sub print_lxc_network {
     my ($class, $net) = @_;
     return PVE::JSONSchema::print_property_string($net, $netconf_desc);
-- 
2.20.1


_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to