"""
rgw routines
"""
+from io import BytesIO
import argparse
import contextlib
import logging
# add the ssl certificate path
frontends += ' ssl_certificate={}'.format(endpoint.cert.certificate)
frontends += ' ssl_port={}'.format(endpoint.port)
+ path = 'lib/security/cacerts'
+ ctx.cluster.only(client).run(
+ args=['sudo',
+ 'keytool',
+ '-import', '-alias', '{alias}'.format(
+ alias=endpoint.hostname),
+ '-keystore',
+ run.Raw(
+ '$(readlink -e $(dirname $(readlink -e $(which keytool)))/../{path})'.format(path=path)),
+ '-file', endpoint.cert.certificate,
+ '-storepass', 'changeit',
+ ],
+ stdout=BytesIO()
+ )
+
else:
frontends += ' port={}'.format(endpoint.port)
stdout=BytesIO()
)
- endpoint = self.ctx.rgw.role_endpoints[client]
- if endpoint.cert:
- path = 'lib/security/cacerts'
- self.ctx.cluster.only(client).run(
- args=['sudo',
- 'keytool',
- '-import', '-alias', '{alias}'.format(
- alias=endpoint.hostname),
- '-keystore',
- run.Raw(
- '$(readlink -e $(dirname $(readlink -e $(which keytool)))/../{path})'.format(path=path)),
- '-file', endpoint.cert.certificate,
- '-storepass', 'changeit',
- ],
- stdout=BytesIO()
- )
-
def create_users(self):
"""
Create a main and an alternative s3 user.