]>
git.datanom.net - omvzfs.git/blob - src/Zvol.php
a26224113bd1491d1ae4d47f4bcdefd414ca0f44
4 * XXX detailed description
10 class OMVModuleZFSZvol
{
30 * Mountpoint of the Zvol
32 * @var string $mountPoint
38 * Array with properties assigned to the Zvol
40 * @var array $properties
49 * Return name of the Zvol
51 * @return string $name
54 public function getName() {
59 * Get the mountpoint of the Zvol
61 * @return string $mountPoint
64 public function getMountPoint() {
65 return $this->mountPoint
;
69 * Get a single property value associated with the Zvol
71 * @param string $property Name of the property to fetch
72 * @return array The returned array with the property. The property is an associative array with
73 * two elements, <value> and <source>.
76 public function getProperty($property) {
77 return $this->properties
["$property"];
81 * Get an associative array of all properties associated with the Zvol
83 * @return array $properties Each entry is an associative array with two elements
84 * <value> and <source>
87 public function getProperties() {
88 return $this->properties
;
98 public function getSize() {
99 trigger_error('Not Implemented!', E_USER_WARNING
);
105 * @param $list<Feature> XXX
109 public function setProperties($properties) {
110 trigger_error('Not Implemented!', E_USER_WARNING
);
114 * Helper function to execute a command and throw an exception on error
115 * (requires stderr redirected to stdout for proper exception message).
117 * @param string $cmd Command to execute
118 * @param array &$out If provided will contain output in an array
119 * @param int &$res If provided will contain Exit status of the command
120 * @return string Last line of output when executing the command
121 * @throws OMVModuleZFSException
124 private function exec($cmd, &$out = null, &$res = null) {
125 $tmp = OMVUtil
::exec($cmd, $out, $res);
127 throw new OMVModuleZFSException(implode("\n", $out));
This page took 0.066435 seconds and 4 git commands to generate.