Compare commits

...

3 Commits

Author SHA1 Message Date
Nicolas Humbert f5368bb283 update dependencies 2021-12-13 16:21:52 -05:00
Nicolas Humbert 0a2acd60f2 add new azure client: storage-blob 2021-12-13 16:00:52 -05:00
Nicolas Humbert 12727d9fe6 manage Azure access tier 2021-12-10 17:25:21 -05:00
5 changed files with 1480 additions and 965 deletions

View File

@ -39,6 +39,7 @@ function patchLocations(overlayLocations, creds, log) {
azureStorageAccessKey: decryptSecret(creds, azureStorageAccessKey: decryptSecret(creds,
l.details.secretKey), l.details.secretKey),
azureContainerName: l.details.bucketName, azureContainerName: l.details.bucketName,
azureAccessTier: l.details.azureAccessTier,
}; };
} }
break; break;

View File

@ -139,6 +139,7 @@ function parseLC(config, vault) {
azureStorageCredentials, azureStorageCredentials,
azureContainerName: locationObj.details.azureContainerName, azureContainerName: locationObj.details.azureContainerName,
bucketMatch: locationObj.details.bucketMatch, bucketMatch: locationObj.details.bucketMatch,
azureAccessTier: locationObj.details.azureAccessTier,
dataStoreName: location, dataStoreName: location,
proxy: proxyParams, proxy: proxyParams,
}); });

View File

@ -25,6 +25,7 @@ class AzureClient {
this._azureStorageCredentials.storageAccessKey, this._azureStorageCredentials.storageAccessKey,
this._azureStorageEndpoint); this._azureStorageEndpoint);
this._client.enableGlobalHttpAgent = true; this._client.enableGlobalHttpAgent = true;
this._azureAccessTier = config.azureAccessTier;
this._dataStoreName = config.dataStoreName; this._dataStoreName = config.dataStoreName;
this._bucketMatch = config.bucketMatch; this._bucketMatch = config.bucketMatch;
if (config.proxy && config.proxy.url) { if (config.proxy && config.proxy.url) {
@ -141,6 +142,8 @@ class AzureClient {
undefined, undefined,
contentEncoding: keyContext.contentEncoding || undefined, contentEncoding: keyContext.contentEncoding || undefined,
}, },
// DOES NOT WORK
blobTier: this._azureAccessTier,
}; };
if (size === 0) { if (size === 0) {
return this._errorWrapper('put', 'createBlockBlobFromText', return this._errorWrapper('put', 'createBlockBlobFromText',

View File

@ -17,16 +17,16 @@
}, },
"homepage": "https://github.com/scality/Arsenal#readme", "homepage": "https://github.com/scality/Arsenal#readme",
"dependencies": { "dependencies": {
"@azure/storage-blob": "^12.8.0",
"@hapi/joi": "^15.1.0", "@hapi/joi": "^15.1.0",
"JSONStream": "^1.0.0",
"agentkeepalive": "^4.1.3", "agentkeepalive": "^4.1.3",
"ajv": "6.12.2", "ajv": "6.12.2",
"async": "~2.6.1", "async": "~2.6.1",
"aws-sdk": "2.80.0", "aws-sdk": "2.80.0",
"azure-storage": "2.10.3", "azure-storage": "2.10.3",
"backo": "^1.1.0", "backo": "^1.1.0",
"base62": "2.0.1",
"base-x": "3.0.8", "base-x": "3.0.8",
"base62": "2.0.1",
"bson": "4.0.0", "bson": "4.0.0",
"debug": "~4.1.0", "debug": "~4.1.0",
"diskusage": "^1.1.1", "diskusage": "^1.1.1",
@ -35,6 +35,7 @@
"https-proxy-agent": "^2.2.0", "https-proxy-agent": "^2.2.0",
"ioredis": "4.9.5", "ioredis": "4.9.5",
"ipaddr.js": "1.9.1", "ipaddr.js": "1.9.1",
"JSONStream": "^1.0.0",
"level": "~5.0.1", "level": "~5.0.1",
"level-sublevel": "~6.6.5", "level-sublevel": "~6.6.5",
"mongodb": "^3.0.1", "mongodb": "^3.0.1",

2435
yarn.lock

File diff suppressed because it is too large Load Diff