getModule('pool')->getPoolById($id); if(!is_null($pool)) { $voldata = $this->getModule('volume')->getVolumesByPoolId($pool->poolid); if(!is_null($voldata)) { $poolUpdateVolumes = $this->getModule('bconsole')->bconsoleCommand($this->director, array('update', 'volume="' . $voldata->volumename . '"', 'allfrompool="' . $pool->name . '"'), $this->user); $this->output = $poolUpdateVolumes->output; $this->error = (integer)$poolUpdateVolumes->exitcode; } else { $this->output = PoolError::MSG_ERROR_NO_VOLUMES_IN_POOL_TO_UPDATE; $this->error = PoolError::ERROR_NO_VOLUMES_IN_POOL_TO_UPDATE; } } else { $this->output = PoolError::MSG_ERROR_POOL_DOES_NOT_EXISTS; $this->error = PoolError::ERROR_POOL_DOES_NOT_EXISTS; } } } ?>