Merge "Enable object versioning for a container"

This commit is contained in:
Zuul 2021-06-11 14:41:29 +00:00 committed by Gerrit Code Review
commit d99b2d6ba4
4 changed files with 15 additions and 0 deletions

View File

@ -500,3 +500,12 @@ options:
description: |
Value of bluestore compression max blob size for solid state media on
pools requested by this charm.
rgw-swift-versioning-enabled:
type: boolean
default: False
description: |
If True, swift object versioning will be enabled for radosgw.
NOTE: X-Versions-Location is the only versioning-related header that
radosgw interprets. X-History-Location, supported by native OpenStack
Swift, is currently not supported by radosgw.

View File

@ -207,6 +207,7 @@ class MonContext(context.CephContext):
# not available externally). ~tribaal
'unit_public_ip': unit_public_ip(),
'fsid': fsid,
'rgw_swift_versioning': config('rgw-swift-versioning-enabled'),
}
# NOTE(dosaboy): these sections must correspond to what is supported in

View File

@ -14,6 +14,7 @@ debug rgw = {{ loglevel }}/5
{% if ipv6 -%}
ms bind ipv6 = true
{% endif %}
rgw swift versioning enabled = {{ rgw_swift_versioning }}
{% if global -%}
# The following are user-provided options provided via the config-flags charm option.
# User-provided [global] section config

View File

@ -384,6 +384,7 @@ class MonContextTest(CharmTestCase):
'ipv6': False,
'rgw_zone': 'default',
'fsid': 'testfsid',
'rgw_swift_versioning': False,
}
self.assertEqual(expect, mon_ctxt())
self.assertFalse(mock_ensure_rsv_v6.called)
@ -432,6 +433,7 @@ class MonContextTest(CharmTestCase):
'ipv6': False,
'rgw_zone': 'default',
'fsid': 'testfsid',
'rgw_swift_versioning': False,
}
self.assertEqual(expect, mon_ctxt())
self.assertFalse(mock_ensure_rsv_v6.called)
@ -489,6 +491,7 @@ class MonContextTest(CharmTestCase):
'ipv6': False,
'rgw_zone': 'default',
'fsid': 'testfsid',
'rgw_swift_versioning': False,
}
self.assertEqual(expect, mon_ctxt())
@ -528,6 +531,7 @@ class MonContextTest(CharmTestCase):
'ipv6': False,
'rgw_zone': 'default',
'fsid': 'testfsid',
'rgw_swift_versioning': False,
}
self.assertEqual(expect, mon_ctxt())