{"action":"opened","issue":{"url":"https://api.github.com/repos/rcbops/rpc-openstack/issues/471","labels_url":"https://api.github.com/repos/rcbops/rpc-openstack/issues/471/labels{/name}","comments_url":"https://api.github.com/repos/rcbops/rpc-openstack/issues/471/comments","events_url":"https://api.github.com/repos/rcbops/rpc-openstack/issues/471/events","html_url":"https://github.com/rcbops/rpc-openstack/issues/471","id":110481340,"number":471,"title":"Split out auth_ref file creation from keystone_auth to a separate file","user":{"login":"sigmavirus24","id":240830,"avatar_url":"https://avatars.githubusercontent.com/u/240830?v=3","gravatar_id":"","url":"https://api.github.com/users/sigmavirus24","html_url":"https://github.com/sigmavirus24","followers_url":"https://api.github.com/users/sigmavirus24/followers","following_url":"https://api.github.com/users/sigmavirus24/following{/other_user}","gists_url":"https://api.github.com/users/sigmavirus24/gists{/gist_id}","starred_url":"https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sigmavirus24/subscriptions","organizations_url":"https://api.github.com/users/sigmavirus24/orgs","repos_url":"https://api.github.com/users/sigmavirus24/repos","events_url":"https://api.github.com/users/sigmavirus24/events{/privacy}","received_events_url":"https://api.github.com/users/sigmavirus24/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rcbops/rpc-openstack/labels/affects-maas","name":"affects-maas","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-08T15:53:54Z","updated_at":"2015-10-08T15:53:54Z","closed_at":null,"body":"We should split out the part of `keystone_auth` that saves the auth_ref to a json file so that the function can be reused by other consumers of `maas_common`. This allows others to take advantage of the function and reuse it without being forced to use keystone_auth. Example:\r\n\r\n```py\r\ndef save_auth_ref(auth_ref, filename, filemode='w'):\r\n    try:\r\n        with open(filename, filemode) as fd:\r\n            json.dump(auth_ref, fd)\r\n     except IOError as e:\r\n         logging.exception('Could not save auth_ref file: {}'.format(e))\r\n```"}}