Compare commits

...

2 Commits

Author SHA1 Message Date
philipyoo 3badc450ad test 2018-07-20 10:52:36 -07:00
philipyoo 00e3d168f2 test 2018-07-20 09:57:42 -07:00
1 changed files with 6 additions and 0 deletions

View File

@ -2,6 +2,9 @@ const s3config = require('../../../Config').config;
const constants = require('../../../../constants'); const constants = require('../../../../constants');
function _getBackend(objectMD, site) { function _getBackend(objectMD, site) {
console.log('\nIn S3 getBackend');
console.log('objectMD:', objectMD);
console.log('site:', site);
const backends = objectMD ? objectMD.replicationInfo.backends : []; const backends = objectMD ? objectMD.replicationInfo.backends : [];
const backend = backends.find(o => o.site === site); const backend = backends.find(o => o.site === site);
// If the backend already exists, just update the status. // If the backend already exists, just update the status.
@ -16,6 +19,7 @@ function _getBackend(objectMD, site) {
} }
function _getStorageClasses(rule) { function _getStorageClasses(rule) {
console.log('\nIn _getStorageClasses');
if (rule.storageClass) { if (rule.storageClass) {
return rule.storageClass.split(','); return rule.storageClass.split(',');
} }
@ -24,8 +28,10 @@ function _getStorageClasses(rule) {
if (replicationEndpoints.length > 1) { if (replicationEndpoints.length > 1) {
const endPoint = const endPoint =
replicationEndpoints.find(endpoint => endpoint.default); replicationEndpoints.find(endpoint => endpoint.default);
console.log('endPoint:', endPoint)
return [endPoint.site]; return [endPoint.site];
} }
console.log('end:', replicationEndpoints[0])
return [replicationEndpoints[0].site]; return [replicationEndpoints[0].site];
} }