class StorageRelease extends BaculumAPI {
public function get() {
$storageid = intval($this->Request['id']);
+ $drive = intval($this->Request['drive']);
+
$storage = $this->getModule('storage')->getStorageById($storageid);
if(!is_null($storage)) {
- $storageRelease = $this->getModule('bconsole')->bconsoleCommand($this->director, array('release', 'storage="' . $storage->name . '"'), $this->user);
+ $storageRelease = $this->getModule('bconsole')->bconsoleCommand($this->director, array('release', 'storage="' . $storage->name . '"', 'drive="' . $drive . '"'), $this->user);
$this->output = $storageRelease->output;
$this->error = (integer)$storageRelease->exitcode;
} else {
}
}
-?>
\ No newline at end of file
+?>
<url ServiceParameter="API.StorageStatus" pattern="storages/status/{id}/" parameters.id="\d+" />
<url ServiceParameter="API.StorageMount" pattern="storages/mount/{id}/{drive}/{slot}/" parameters.id="\d+" parameters.drive="\d+" parameters.slot="\d+" />
<url ServiceParameter="API.StorageUmount" pattern="storages/umount/{id}/{drive}/" parameters.id="\d+" parameters.drive="\d+" />
- <url ServiceParameter="API.StorageRelease" pattern="storages/release/{id}/" parameters.id="\d+" />
+ <url ServiceParameter="API.StorageRelease" pattern="storages/release/{id}/{drive}/" parameters.id="\d+" parameters.drive="\d+" />
<!-- END Storages (storage daemons) -->
<!-- START Volumes (media) -->
<url ServiceParameter="API.Volumes" pattern="volumes/" />