$fileids = property_exists($params, 'fileid') ? $params->fileid : null;
$dirids = property_exists($params, 'dirid') ? $params->dirid : null;
$findexes = property_exists($params, 'findex') ? $params->findex : null;
+ $objectids = property_exists($params, 'objectid') ? $params->objectid : null;
$path = property_exists($params, 'path') ? $params->path : null;
if (!is_null($jobids) && !$misc->isValidIdsList($jobids)) {
$this->error = BVFSError::ERROR_INVALID_FILEINDEX_LIST;
return;
}
+ if (!is_null($objectids) && !$misc->isValidIdsList($objectids)) {
+ $this->output = BVFSError::MSG_ERROR_INVALID_OBJECTID_LIST;
+ $this->error = BVFSError::ERROR_INVALID_OBJECTID_LIST;
+ return;
+ }
if (!is_null($path) && !$misc->isValidBvfsPath($path)) {
$this->output = BVFSError::MSG_ERROR_INVALID_RPATH;
if (is_string($findexes)) {
array_push($cmd, 'hardlink="' . $findexes . '"');
}
+ if (is_string($objectids)) {
+ array_push($cmd, 'objectid="' . $objectids . '"');
+ }
$result = $this->getModule('bconsole')->bconsoleCommand($this->director, $cmd);
$this->output = $result->output;
"error": {
"type": "integer",
"description": "Error code",
- "enum": [0, 1, 2, 3, 4, 5, 6, 7, 11, 71, 73, 74, 75, 76, 1000]
+ "enum": [0, 1, 2, 3, 4, 5, 6, 7, 11, 71, 73, 74, 75, 76, 79, 1000]
}
}
}
"schema": {
"type": "string"
}
+ },
+ {
+ "name": "objectid",
+ "in": "body",
+ "description": "Comma seprated object identifiers",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
}
]
}
const ERROR_INVALID_DIRID_LIST = 76;
const ERROR_INVALID_CLIENT = 77;
const ERROR_INVALID_JOBID = 78;
+ const ERROR_INVALID_OBJECTID_LIST = 79;
const MSG_ERROR_INVALID_RPATH = 'Inputted path for restore is invalid. Proper format is b2[0-9]+.';
const MSG_ERROR_INVALID_RESTORE_PATH = 'Inputted BVFS path param is invalid.';
const MSG_ERROR_INVALID_DIRID_LIST = 'Invalid dirid list.';
const MSG_ERROR_INVALID_CLIENT = 'Invalid client name.';
const MSG_ERROR_INVALID_JOBID = 'Invalid jobid.';
+ const MSG_ERROR_INVALID_OBJECTID_LIST = 'Invalid objectid list.';
}