MCPcopy
hub / github.com/scality/cloudserver / _checkBackendVersioningImplemented

Function _checkBackendVersioningImplemented

lib/api/bucketPutVersioning.js:70–86  ·  view source on GitHub ↗
(bucket)

Source from the content-addressed store, hash-verified

68}
69
70function _checkBackendVersioningImplemented(bucket) {
71 const bucketLocation = bucket.getLocationConstraint();
72 const bucketLocationType = config.getLocationConstraintType(bucketLocation);
73
74 // backend types known not to support versioning
75 if (versioningNotImplBackends[bucketLocationType]) {
76 return false;
77 }
78
79 // versioning disabled per-location constraint
80 const lc = config.getLocationConstraint(bucketLocation);
81 if (lc.details && !lc.details.supportsVersioning) {
82 return false;
83 }
84
85 return true;
86}
87
88/**
89 * Bucket Put Versioning - Create or update bucket Versioning

Callers 1

bucketPutVersioningFunction · 0.85

Calls 2

getLocationConstraintMethod · 0.80

Tested by

no test coverage detected