(objectMD, site)
| 3 | const { replicationBackends } = require('arsenal').constants; |
| 4 | |
| 5 | function _getBackend(objectMD, site) { |
| 6 | const backends = objectMD ? objectMD.replicationInfo.backends : []; |
| 7 | const backend = backends.find(o => o.site === site); |
| 8 | // If the backend already exists, just update the status. |
| 9 | if (backend) { |
| 10 | return Object.assign({}, backend, { status: 'PENDING' }); |
| 11 | } |
| 12 | return { |
| 13 | site, |
| 14 | status: 'PENDING', |
| 15 | dataStoreVersionId: '', |
| 16 | }; |
| 17 | } |
| 18 | |
| 19 | function _getStorageClasses(s3config, rule) { |
| 20 | if (rule.storageClass) { |
no outgoing calls
no test coverage detected