]> git.datanom.net - omvzfs.git/commitdiff
Added getSnapshots method to Zvol class.
authorNiclas Berglind <nb@kjam.se>
Fri, 4 Apr 2014 22:14:41 +0000 (00:14 +0200)
committerMichael Rasmussen <mir@datanom.net>
Sat, 12 Apr 2014 13:20:04 +0000 (15:20 +0200)
Signed-off-by: Niclas Berglind <nb@kjam.se>
src/Zvol.php

index fb86eeb4715b6e43b01031918c8a64fa3c000d7c..e35af5ab0e8c874b424519696b550e98d0b43c6c 100644 (file)
@@ -121,6 +121,20 @@ class OMVModuleZFSZvol {
                return $this->size;
        }
 
+       /**
+        * Get all Snapshots associated with the Zvol
+        * 
+        * @return array $snapshots
+        * @access public
+        */
+       public function getSnapshots() {
+               if (isset($this->snapshots)) {
+                       return $this->snapshots;
+               } else {
+                       return array();
+               }
+       }
+
        /**
         * Sets a number of Zvol properties. If a property is already set it will be updated with the new value.
         * 
This page took 0.031784 seconds and 5 git commands to generate.