[pve-devel] [PATCH v4 guest-common 03/27] Add interfaces for volume-related helpers

Fabian Ebner f.ebner at proxmox.com
Thu Mar 26 09:09:33 CET 2020


Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
 PVE/AbstractConfig.pm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/PVE/AbstractConfig.pm b/PVE/AbstractConfig.pm
index ee00486..6148271 100644
--- a/PVE/AbstractConfig.pm
+++ b/PVE/AbstractConfig.pm
@@ -368,6 +368,36 @@ sub check_protection {
     }
 }
 
+# Returns a list of keys where used volumes can be located
+sub valid_volume_keys {
+    my ($class, $reverse) = @_;
+
+    die "implement me - abstract method\n";
+}
+
+# Returns a hash with the information from $volume_string
+# $key is used to determine the format of the string
+sub parse_volume {
+    my ($class, $key, $volume_string, $noerr) = @_;
+
+    die "implement me - abstract method\n";
+}
+
+# Returns a string with the information from $volume
+# $key is used to determine the format of the string
+sub print_volume {
+    my ($class, $key, $volume) = @_;
+
+    die "implement me - abstract method\n";
+}
+
+# The key under which the volume ID is located in volume hashes
+sub volid_key {
+    my ($class) = @_;
+
+    die "implement me - abstract method\n";
+}
+
 # Adds an unused volume to $config, if possible.
 sub add_unused_volume {
     my ($class, $config, $volid) = @_;
-- 
2.20.1





More information about the pve-devel mailing list