mgr/dashboard: Improve SSL certificate import to no longer require a Mgr restart
Now that https://github.com/ceph/ceph/pull/22634 has been merged into master, the process for importing SSL certificates into the dashboard module commands should be improved to no longer require restarting the Ceph Manager. According to John Spray, we need to "implement new commands in the dashboard module to accept the certificate input, and then in the handle_command function consume the inbuf field."
Here's an unmerged example, called directly from handle_command():
def do_post(self, cmd, inbuf): try: metadata = Module.validate_crash_metadata(inbuf) except Exception as e: return errno.EINVAL, '', 'malformed crash metadata: %s' % e crashid = metadata['crash_id'] key = 'crash/%s' % crashid if self.get_store(key): return errno.EADDRINUSE, '', 'crash id %s already saved' % crashid self.set_store(key, inbuf) return 0, '', 'Posted %s' % crashid