Skip to content

Commit

Permalink
Added support for xArchive
Browse files Browse the repository at this point in the history
  • Loading branch information
XiaoningLiu authored and vinjiang committed Aug 23, 2017
1 parent 611a9e9 commit 2a443b9
Show file tree
Hide file tree
Showing 12 changed files with 1,937 additions and 8 deletions.
5 changes: 5 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Note: This is an Azure Storage only package. The all up Azure node sdk still has the old storage bits in there. In a future release, those storage bits will be removed and an npm dependency to this storage node sdk will
be taken. This is a GA release and the changes described below indicate the changes from the Azure node SDK 0.9.8 available here - https://github.com/Azure/azure-sdk-for-node.

2017.08 Version 2.4.0

BLOB
* Added support for getting and setting a tier for a block blob under a LRS Blob Storage Account from tiers hot, cool and archive.

2017.08 Version 2.3.0

ALL
Expand Down
4 changes: 4 additions & 0 deletions browser/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Note: This is the change log file for Azure Storage JavaScript Client Library.

2017.08 Version 0.2.4-preview.10

* Generated browser compatible JavaScript files based on Microsoft Azure Storage SDK for Node.js 2.4.0.

2017.08 Version 0.2.3-preview.9

* Generated browser compatible JavaScript files based on Microsoft Azure Storage SDK for Node.js 2.3.0.
Expand Down
14 changes: 12 additions & 2 deletions lib/common/util/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ var Constants = {
* @const
* @type {string}
*/
USER_AGENT_PRODUCT_VERSION: '2.3.0',
USER_AGENT_PRODUCT_VERSION: '2.4.0',

/**
* The number of default concurrent requests for parallel operation.
Expand Down Expand Up @@ -1828,7 +1828,17 @@ var Constants = {
* @const
* @type {string}
*/
ACCESS_TIER_INFERRED: 'x-ms-access-tier-inferred'
ACCESS_TIER_INFERRED: 'x-ms-access-tier-inferred',

/**
* For BlobStorage LRS accounts, the header is returned if archive tier is set
* and rehydrate operation is pending for the request version is 2017-04-17 or later.
* The valid values are rehydrate-pending-to-hot or rehydrate-pending-to-cool.
*
* @const
* @type {string}
*/
ARCHIVE_STATUS: 'x-ms-archive-status'
},

QueryStringConstants: {
Expand Down
5 changes: 4 additions & 1 deletion lib/common/util/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,10 @@ exports.blobTierNameIsValid = function (blobTier, callback) {
return fail(new ArgumentNullError('blobTier', 'Blob tier is not specified.'));
}

if (!_.chain(_.union(_.values(BlobUtilities.BlobTier.PremiumPageBlobTier)))
if (!_.chain(_.union(
_.values(BlobUtilities.BlobTier.PremiumPageBlobTier),
_.values(BlobUtilities.BlobTier.StandardBlobTier)
))
.map(function (val) { return val.toString().toUpperCase(); })
.contains(blobTier.toString().toUpperCase())
.value()) {
Expand Down
4 changes: 2 additions & 2 deletions lib/services/blob/blobservice.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,12 +240,12 @@ BlobService.prototype.setServiceProperties = function (serviceProperties, option
};

/**
* Sets the tier of a pageblob under a premium storage account.
* Sets the tier of a blockblob under a blob storage LRS account, or the tier of a pageblob under a premium storage account.
*
* @this {BlobService}
* @param {string} container The container name.
* @param {string} blob The blob name.
* @param {string} blobTier Please see BlobUtilities.BlobTier.PremiumPageBlobTier for possible values.
* @param {string} blobTier Please see BlobUtilities.BlobTier.StandardBlobTier or BlobUtilities.BlobTier.PremiumPageBlobTier for possible values.
* @param {LocationMode} [options.locationMode] Specifies the location mode used to decide which location the request should be sent to.
* Please see StorageUtilities.LocationMode for the possible values.
* @param {int} [options.timeoutIntervalInMs] The server timeout interval, in milliseconds, to use for the request.
Expand Down
9 changes: 9 additions & 0 deletions lib/services/blob/blobutilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ var BlobUtilities = {
* @property {string} PremiumPageBlobTier.P40
* @property {string} PremiumPageBlobTier.P50
* @property {string} PremiumPageBlobTier.P60
* @property {object} StandardBlobTier Candidate values for standard blobs tiers.
* @property {string} StandardBlobTier.HOT
* @property {string} StandardBlobTier.COOL
* @property {string} StandardBlobTier.ARCHIVE
*/
BlobTier: {
PremiumPageBlobTier: {
Expand All @@ -119,6 +123,11 @@ var BlobUtilities = {
P40: 'P40',
P50: 'P50',
P60: 'P60'
},
StandardBlobTier: {
HOT: 'Hot',
COOL: 'Cool',
ARCHIVE: 'Archive'
}
}
};
Expand Down
1 change: 1 addition & 0 deletions lib/services/blob/models/blobresult.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ var headersForProperties = {

'accessTier': 'ACCESS_TIER',
'accessTierInferred': 'ACCESS_TIER_INFERRED',
'archiveStatus': 'ARCHIVE_STATUS',

'isIncrementalCopy': 'INCREMENTAL_COPY',

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "azure-storage",
"author": "Microsoft Corporation",
"version": "2.3.0",
"version": "2.4.0",
"description": "Microsoft Azure Storage Client Library for Node.js",
"typings": "typings/azure-storage/azure-storage.d.ts",
"tags": [
Expand Down
4 changes: 4 additions & 0 deletions test/framework/test-suite.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ function TestSuite(testPrefix, env, forceMocked) {
name: 'AZURE_STORAGE_CONNECTION_STRING_PREMIUM_ACCOUNT',
secure: stripAccessKey,
optional: true
},{
name: 'AZURE_STORAGE_CONNECTION_STRING_BLOB_ACCOUNT_LRS',
secure: stripAccessKey,
optional: true
},{
name: 'AZURE_STORAGE_CONNECTION_STRING_SSE_ENABLED_ACCOUNT',
secure: stripAccessKey,
Expand Down
Loading

0 comments on commit 2a443b9

Please sign in to comment.