MCPcopy Index your code
hub / github.com/scality/cloudserver / createEncryptedBucket

Function createEncryptedBucket

lib/kms/utilities.js:74–98  ·  view source on GitHub ↗

* This function is used as a binary to send a request to S3 and create an * encrypted bucket, because most of the s3 tools don't support custom * headers * * @return {undefined}

()

Source from the content-addressed store, hash-verified

72 * @return {undefined}
73 */
74function createEncryptedBucket() {
75 commander
76 .version('0.0.1')
77 .option('-a, --access-key <accessKey>', 'Access key id')
78 .option('-k, --secret-key <secretKey>', 'Secret access key')
79 .option('-b, --bucket <bucket>', 'Name of the bucket')
80 .option('-h, --host <host>', 'Host of the server')
81 .option('-p, --port <port>', 'Port of the server')
82 .option('-s, --ssl', 'Enable ssl')
83 .option('-v, --verbose')
84 .option('-l, --location-constraint <locationConstraint>',
85 'location Constraint')
86 .parse(process.argv);
87
88 const { host, port, accessKey, secretKey, bucket, verbose, ssl,
89 locationConstraint } = commander;
90
91 if (!host || !port || !accessKey || !secretKey || !bucket) {
92 logger.error('missing parameter');
93 commander.outputHelp();
94 process.exit(1);
95 }
96 _createEncryptedBucket(host, port, bucket, accessKey, secretKey, verbose,
97 ssl, locationConstraint);
98}
99
100module.exports = {
101 createEncryptedBucket,

Callers

nothing calls this directly

Calls 2

_createEncryptedBucketFunction · 0.85
errorMethod · 0.80

Tested by

no test coverage detected