Compare commits

...

1 Commits

Author SHA1 Message Date
Rahul Padigela b6bb53ae4f ft: support multiple storage classes 2017-12-19 16:52:43 -08:00
1 changed files with 4 additions and 3 deletions

View File

@ -283,8 +283,10 @@ class ReplicationConfiguration {
_parseStorageClass(destination) {
const storageClass = destination.StorageClass &&
destination.StorageClass[0];
const storageClassArr = storageClass.split(',');
if (!this._config) {
return validStorageClasses.includes(storageClass);
return storageClassArr.every(i => validStorageClasses.includes(i));
}
const replicationEndpoints = this._config.replicationEndpoints
.map(endpoint => endpoint.site);
@ -304,7 +306,6 @@ class ReplicationConfiguration {
!validStorageClasses.includes(storageClass)) {
return errors.MalformedXML;
}
this._prevStorageClass = storageClass;
return undefined;
}
@ -357,7 +358,7 @@ class ReplicationConfiguration {
if (!dest) {
return errors.MalformedXML;
}
const err = this._parseBucket(dest) || this._parseStorageClass(dest);
const err = this._parseBucket(dest) || this._parseStorageClasses(dest);
if (err) {
return err;
}