Skip to content

Commit

Permalink
merge #1031
Browse files Browse the repository at this point in the history
  • Loading branch information
ironman-machine authored and Cloud User committed Dec 5, 2017
2 parents db57966 + 023f687 commit e57b821
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"cdmi": {
"host": "localhost",
"port": 81,
"path": "/dewpoint"
"path": "/dewpoint",
"readonly": true
},
"bucketd": {
"bootstrap": ["localhost"]
Expand Down
8 changes: 8 additions & 0 deletions lib/Config.js
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,14 @@ class Config extends EventEmitter {
'bad config: cdmi.path is empty');
assert(config.cdmi.path.charAt(0) === '/',
'bad config: cdmi.path should start with a "/"');
this.cdmi.path = config.cdmi.path;
}
if (config.cdmi.readonly !== undefined) {
assert(typeof config.cdmi.readonly === 'boolean',
'bad config: cdmi.readonly must be a boolean');
this.cdmi.readonly = config.cdmi.readonly;
} else {
this.cdmi.readonly = true;
}
}

Expand Down
1 change: 1 addition & 0 deletions lib/data/wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ if (config.backends.data === 'mem') {
path: config.cdmi.path,
host: config.cdmi.host,
port: config.cdmi.port,
readonly: config.cdmi.readonly,
});
implName = 'cdmi';
}
Expand Down
1 change: 1 addition & 0 deletions lib/metadata/wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ if (config.backends.metadata === 'mem') {
path: config.cdmi.path,
host: config.cdmi.host,
port: config.cdmi.port,
readonly: config.cdmi.readonly,
});
implName = 'cdmi';
}
Expand Down

0 comments on commit e57b821

Please sign in to comment.