{"body":"from keystoneclient.auth import conf\r\n\r\n\r\nclass OpenStackClients(object):\r\n    \"\"\"Convenience class to create and cache client instance.\"\"\"\r\n\r\n    def __init__(self, context=None):\r\n        self._context = context\r\n        self.reset_clients()\r\n\r\n        conf.register_conf_options(cfg.CONF, \"keystone_authtoken\")\r\n        auth_plugin_name = cfg.CONF.keystone_authtoken.auth_plugin\r\n        if auth_plugin_name == 'password':\r\n            plugin_options = conf.get_plugin_options(auth_plugin_name)\r\n            cfg.CONF.register_opts(plugin_options, \"keystone_authtoken\")\r\n        else:\r\n            raise exception.AuthorizationFailure(\r\n                message=(_(\r\n                    \"auth_plugin (%(auth_plugin)s) is not valid. \"\r\n                    \"Only 'password' auth plugin is supported.\") %\r\n                        {'auth_plugin': auth_plugin_name}))\r\n\r\n\r\n...\r\n\r\n    def _get_admin_credentials(self):\r\n\r\n        creds = {'auth_url': cfg.CONF.keystone_authtoken.auth_url,\r\n                 'username': cfg.CONF.keystone_authtoken.username,\r\n                 'password': cfg.CONF.keystone_authtoken.password,\r\n                 'project_name': cfg.CONF.keystone_authtoken.project_name}\r\n\r\n","name":"","extension":"txt","url":"https://www.irccloud.com/pastebin/5SPioRkS","modified":1454341370,"id":"5SPioRkS","size":1199,"lines":32,"own_paste":false,"theme":"","date":1454341370}