def prepare_api_response(self, root_path):
path = pathlib.PosixPath(root_path)
config = self.config
response = {}
for basename, content in self.keyrings.items():
response[str(path.joinpath(basename))] = content
config += "\n{0}\nkeyring = {1}\n".format(
content.split("\n", 1)[0],
path.joinpath(basename)
)
response[str(path.joinpath("ceph.conf"))] = config
return response
评论列表
文章目录