MCPcopy
hub / github.com/scality/cloudserver / makeVeeamRequest

Function makeVeeamRequest

tests/sur/routeVeeam.js:119–135  ·  view source on GitHub ↗

makeVeeamRequest - utility function to generate a request going * through veeam route * @param {object} params - params for making request * @param {string} params.method - request method * @param {string} params.bucket - bucket name * @param {string} params.objectKey - object key * @param {ob

(params, callback)

Source from the content-addressed store, hash-verified

117 * @return {undefined} - and call callback
118 */
119function makeVeeamRequest(params, callback) {
120 const { method, headers, bucket, objectKey,
121 authCredentials, requestBody, queryObj } = params;
122 const options = {
123 authCredentials,
124 hostname: ipAddress,
125 port: 8000,
126 method,
127 headers,
128 path: `/_/veeam/${bucket}/${objectKey}`,
129 urlForSignature: `/${bucket}/${objectKey}`,
130 requestBody,
131 jsonResponse: false,
132 queryObj,
133 };
134 makeRequest(options, callback);
135}
136
137(process.env.S3METADATA === 'mongodb' ? describe : describe.skip)('Veeam routes:', () => {
138 let scuba;

Callers 1

routeVeeam.jsFile · 0.85

Calls 1

makeRequestFunction · 0.50

Tested by

no test coverage detected