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;
$this->validateMethodContext($context, array("role" => OMV_ROLE_ADMINISTRATOR));
$objects = array();
switch ($params['type']) {
$this->validateMethodContext($context, array("role" => OMV_ROLE_ADMINISTRATOR));
$objects = array();
switch ($params['type']) {
$bgOutputFilename = $this->createBgProcOutput();
$this->updateBgProcStatus($bgStatusFilename, "outputfilename", $bgOutputFilename);
switch ($params['type']) {
$bgOutputFilename = $this->createBgProcOutput();
$this->updateBgProcStatus($bgStatusFilename, "outputfilename", $bgOutputFilename);
switch ($params['type']) {
// Prepare the configuration object. Use the name of the shared
// folder as the relative directory name of the share.
switch ($params['type']) {
// Prepare the configuration object. Use the name of the shared
// folder as the relative directory name of the share.
switch ($params['type']) {