require_once("zfs/Dataset.php");
require_once("zfs/Snapshot.php");
require_once("zfs/Zvol.php");
require_once("zfs/Dataset.php");
require_once("zfs/Snapshot.php");
require_once("zfs/Zvol.php");
class OMVRpcServiceZFS extends OMVRpcServiceAbstract {
public function getName() { return "ZFS";} // RPC Service name. Same as in .js files
class OMVRpcServiceZFS extends OMVRpcServiceAbstract {
public function getName() { return "ZFS";} // RPC Service name. Same as in .js files
public function addObject($params, $context) {
$this->validateMethodContext($context, array("role" => OMV_ROLE_ADMINISTRATOR));
switch ($params['type']) {
public function addObject($params, $context) {
$this->validateMethodContext($context, array("role" => OMV_ROLE_ADMINISTRATOR));
switch ($params['type']) {
$name = $params['path'] . "/" . $params['name'];
$tmp = new OMVModuleZFSZvol($name);
$tmp->create($params['size']);
break;
$name = $params['path'] . "/" . $params['name'];
$tmp = new OMVModuleZFSZvol($name);
$tmp->create($params['size']);
break;