add volume remount
This commit is contained in:
@@ -5,6 +5,7 @@ exports = module.exports = {
|
||||
get,
|
||||
del,
|
||||
list,
|
||||
remount,
|
||||
getStatus,
|
||||
removePrivateFields,
|
||||
|
||||
@@ -109,6 +110,17 @@ async function add(volume, auditSource) {
|
||||
return id;
|
||||
}
|
||||
|
||||
async function remount(volume, auditSource) {
|
||||
assert.strictEqual(typeof volume, 'object');
|
||||
assert.strictEqual(typeof auditSource, 'object');
|
||||
|
||||
eventlog.add(eventlog.ACTION_VOLUME_REMOUNT, auditSource, { volume });
|
||||
|
||||
if (!mounts.isMountProvider(volume.mountType)) throw new BoxError(BoxError.NOT_SUPPORTED, 'Volume does not support remount');
|
||||
|
||||
mounts.remount(volume);
|
||||
}
|
||||
|
||||
async function getStatus(volume) {
|
||||
assert.strictEqual(typeof volume, 'object');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user