{"action":"created","comment":{"url":"https://api.github.com/repos/blueboxgroup/ursula-cli/pulls/comments/65582152","id":65582152,"diff_hunk":"@@ -192,10 +192,13 @@ def _run_heat(args, hot):\n         LOG.error(\"You must have python-heatclient in your python path\")\n         raise Exception(e)\n \n+    tenant_var = \"OS_TENANT_NAME\"\n+    if 'OS_TENANT_NAME' not in os.environ:\n+        tenant_var = 'OS_PROJECT_NAME'\n     CREDS = {\n         'username': os.environ['OS_USERNAME'],\n         'password': os.environ['OS_PASSWORD'],\n-        'tenant_name': os.environ['OS_TENANT_NAME'],\n+        'tenant_name': os.environ[tenant_var],","path":"ursula_cli/shell.py","position":11,"original_position":11,"commit_id":"a25916dd8c5d1d2486ae277576bdd0d30950cc62","original_commit_id":"a25916dd8c5d1d2486ae277576bdd0d30950cc62","user":{"login":"j2sol","id":523287,"avatar_url":"https://avatars.githubusercontent.com/u/523287?v=3","gravatar_id":"","url":"https://api.github.com/users/j2sol","html_url":"https://github.com/j2sol","followers_url":"https://api.github.com/users/j2sol/followers","following_url":"https://api.github.com/users/j2sol/following{/other_user}","gists_url":"https://api.github.com/users/j2sol/gists{/gist_id}","starred_url":"https://api.github.com/users/j2sol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j2sol/subscriptions","organizations_url":"https://api.github.com/users/j2sol/orgs","repos_url":"https://api.github.com/users/j2sol/repos","events_url":"https://api.github.com/users/j2sol/events{/privacy}","received_events_url":"https://api.github.com/users/j2sol/received_events","type":"User","site_admin":false},"body":"I think you can simplify with just this:\r\n\r\n`'tenant_name': os.environ.get('OS_TENANT_NAME', os.environ['OS_PROJECT_NAME'])`\r\n\r\nIf `OS_TENANT_NAME` key doesn't exist in the environ, the fallback option is used (which also may not exist, so the whole thing should be in a try: except: wrapper but that could be a follow up PR).","created_at":"2016-06-02T17:23:50Z","updated_at":"2016-06-02T17:23:50Z","html_url":"https://github.com/blueboxgroup/ursula-cli/pull/47#discussion_r65582152","pull_request_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/pulls/47","_links":{"self":{"href":"https://api.github.com/repos/blueboxgroup/ursula-cli/pulls/comments/65582152"},"html":{"href":"https://github.com/blueboxgroup/ursula-cli/pull/47#discussion_r65582152"},"pull_request":{"href":"https://api.github.com/repos/blueboxgroup/ursula-cli/pulls/47"}}},"pull_request":{"url":"https://api.github.com/repos/blueboxgroup/ursula-cli/pulls/47","id":72383430,"html_url":"https://github.com/blueboxgroup/ursula-cli/pull/47","diff_url":"https://github.com/blueboxgroup/ursula-cli/pull/47.diff","patch_url":"https://github.com/blueboxgroup/ursula-cli/pull/47.patch","issue_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/issues/47","number":47,"state":"open","locked":false,"title":"add fallback to os_project_name envvar","user":{"login":"zfeldstein","id":2438783,"avatar_url":"https://avatars.githubusercontent.com/u/2438783?v=3","gravatar_id":"","url":"https://api.github.com/users/zfeldstein","html_url":"https://github.com/zfeldstein","followers_url":"https://api.github.com/users/zfeldstein/followers","following_url":"https://api.github.com/users/zfeldstein/following{/other_user}","gists_url":"https://api.github.com/users/zfeldstein/gists{/gist_id}","starred_url":"https://api.github.com/users/zfeldstein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zfeldstein/subscriptions","organizations_url":"https://api.github.com/users/zfeldstein/orgs","repos_url":"https://api.github.com/users/zfeldstein/repos","events_url":"https://api.github.com/users/zfeldstein/events{/privacy}","received_events_url":"https://api.github.com/users/zfeldstein/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-02T17:11:40Z","updated_at":"2016-06-02T17:23:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7e26dc5649c06d18bab197bc0a11b3b77fafb4e6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/pulls/47/commits","review_comments_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/pulls/47/comments","review_comment_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/issues/47/comments","statuses_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/statuses/a25916dd8c5d1d2486ae277576bdd0d30950cc62","head":{"label":"zfeldstein:tenant-fix","ref":"tenant-fix","sha":"a25916dd8c5d1d2486ae277576bdd0d30950cc62","user":{"login":"zfeldstein","id":2438783,"avatar_url":"https://avatars.githubusercontent.com/u/2438783?v=3","gravatar_id":"","url":"https://api.github.com/users/zfeldstein","html_url":"https://github.com/zfeldstein","followers_url":"https://api.github.com/users/zfeldstein/followers","following_url":"https://api.github.com/users/zfeldstein/following{/other_user}","gists_url":"https://api.github.com/users/zfeldstein/gists{/gist_id}","starred_url":"https://api.github.com/users/zfeldstein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zfeldstein/subscriptions","organizations_url":"https://api.github.com/users/zfeldstein/orgs","repos_url":"https://api.github.com/users/zfeldstein/repos","events_url":"https://api.github.com/users/zfeldstein/events{/privacy}","received_events_url":"https://api.github.com/users/zfeldstein/received_events","type":"User","site_admin":false},"repo":{"id":60282560,"name":"ursula-cli","full_name":"zfeldstein/ursula-cli","owner":{"login":"zfeldstein","id":2438783,"avatar_url":"https://avatars.githubusercontent.com/u/2438783?v=3","gravatar_id":"","url":"https://api.github.com/users/zfeldstein","html_url":"https://github.com/zfeldstein","followers_url":"https://api.github.com/users/zfeldstein/followers","following_url":"https://api.github.com/users/zfeldstein/following{/other_user}","gists_url":"https://api.github.com/users/zfeldstein/gists{/gist_id}","starred_url":"https://api.github.com/users/zfeldstein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zfeldstein/subscriptions","organizations_url":"https://api.github.com/users/zfeldstein/orgs","repos_url":"https://api.github.com/users/zfeldstein/repos","events_url":"https://api.github.com/users/zfeldstein/events{/privacy}","received_events_url":"https://api.github.com/users/zfeldstein/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zfeldstein/ursula-cli","description":"A command line wrapper for ansible","fork":true,"url":"https://api.github.com/repos/zfeldstein/ursula-cli","forks_url":"https://api.github.com/repos/zfeldstein/ursula-cli/forks","keys_url":"https://api.github.com/repos/zfeldstein/ursula-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zfeldstein/ursula-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zfeldstein/ursula-cli/teams","hooks_url":"https://api.github.com/repos/zfeldstein/ursula-cli/hooks","issue_events_url":"https://api.github.com/repos/zfeldstein/ursula-cli/issues/events{/number}","events_url":"https://api.github.com/repos/zfeldstein/ursula-cli/events","assignees_url":"https://api.github.com/repos/zfeldstein/ursula-cli/assignees{/user}","branches_url":"https://api.github.com/repos/zfeldstein/ursula-cli/branches{/branch}","tags_url":"https://api.github.com/repos/zfeldstein/ursula-cli/tags","blobs_url":"https://api.github.com/repos/zfeldstein/ursula-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zfeldstein/ursula-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zfeldstein/ursula-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/zfeldstein/ursula-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zfeldstein/ursula-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/zfeldstein/ursula-cli/languages","stargazers_url":"https://api.github.com/repos/zfeldstein/ursula-cli/stargazers","contributors_url":"https://api.github.com/repos/zfeldstein/ursula-cli/contributors","subscribers_url":"https://api.github.com/repos/zfeldstein/ursula-cli/subscribers","subscription_url":"https://api.github.com/repos/zfeldstein/ursula-cli/subscription","commits_url":"https://api.github.com/repos/zfeldstein/ursula-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/zfeldstein/ursula-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/zfeldstein/ursula-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/zfeldstein/ursula-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/zfeldstein/ursula-cli/contents/{+path}","compare_url":"https://api.github.com/repos/zfeldstein/ursula-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zfeldstein/ursula-cli/merges","archive_url":"https://api.github.com/repos/zfeldstein/ursula-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zfeldstein/ursula-cli/downloads","issues_url":"https://api.github.com/repos/zfeldstein/ursula-cli/issues{/number}","pulls_url":"https://api.github.com/repos/zfeldstein/ursula-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/zfeldstein/ursula-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/zfeldstein/ursula-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zfeldstein/ursula-cli/labels{/name}","releases_url":"https://api.github.com/repos/zfeldstein/ursula-cli/releases{/id}","deployments_url":"https://api.github.com/repos/zfeldstein/ursula-cli/deployments","created_at":"2016-06-02T17:08:45Z","updated_at":"2016-06-02T17:08:46Z","pushed_at":"2016-06-02T17:11:19Z","git_url":"git://github.com/zfeldstein/ursula-cli.git","ssh_url":"git@github.com:zfeldstein/ursula-cli.git","clone_url":"https://github.com/zfeldstein/ursula-cli.git","svn_url":"https://github.com/zfeldstein/ursula-cli","homepage":null,"size":62,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"blueboxgroup:master","ref":"master","sha":"a83c91f369bd2c67a5b5981295349e2c5aae4ef7","user":{"login":"blueboxgroup","id":458705,"avatar_url":"https://avatars.githubusercontent.com/u/458705?v=3","gravatar_id":"","url":"https://api.github.com/users/blueboxgroup","html_url":"https://github.com/blueboxgroup","followers_url":"https://api.github.com/users/blueboxgroup/followers","following_url":"https://api.github.com/users/blueboxgroup/following{/other_user}","gists_url":"https://api.github.com/users/blueboxgroup/gists{/gist_id}","starred_url":"https://api.github.com/users/blueboxgroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blueboxgroup/subscriptions","organizations_url":"https://api.github.com/users/blueboxgroup/orgs","repos_url":"https://api.github.com/users/blueboxgroup/repos","events_url":"https://api.github.com/users/blueboxgroup/events{/privacy}","received_events_url":"https://api.github.com/users/blueboxgroup/received_events","type":"Organization","site_admin":false},"repo":{"id":31620538,"name":"ursula-cli","full_name":"blueboxgroup/ursula-cli","owner":{"login":"blueboxgroup","id":458705,"avatar_url":"https://avatars.githubusercontent.com/u/458705?v=3","gravatar_id":"","url":"https://api.github.com/users/blueboxgroup","html_url":"https://github.com/blueboxgroup","followers_url":"https://api.github.com/users/blueboxgroup/followers","following_url":"https://api.github.com/users/blueboxgroup/following{/other_user}","gists_url":"https://api.github.com/users/blueboxgroup/gists{/gist_id}","starred_url":"https://api.github.com/users/blueboxgroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blueboxgroup/subscriptions","organizations_url":"https://api.github.com/users/blueboxgroup/orgs","repos_url":"https://api.github.com/users/blueboxgroup/repos","events_url":"https://api.github.com/users/blueboxgroup/events{/privacy}","received_events_url":"https://api.github.com/users/blueboxgroup/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/blueboxgroup/ursula-cli","description":"A command line wrapper for ansible","fork":false,"url":"https://api.github.com/repos/blueboxgroup/ursula-cli","forks_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/forks","keys_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/teams","hooks_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/hooks","issue_events_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/issues/events{/number}","events_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/events","assignees_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/assignees{/user}","branches_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/branches{/branch}","tags_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/tags","blobs_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/languages","stargazers_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/stargazers","contributors_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/contributors","subscribers_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/subscribers","subscription_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/subscription","commits_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/contents/{+path}","compare_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/merges","archive_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/downloads","issues_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/issues{/number}","pulls_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/labels{/name}","releases_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/releases{/id}","deployments_url":"https://api.github.com/repos/blueboxgroup/ursula-cli/deployments","created_at":"2015-03-03T20:48:51Z","updated_at":"2016-05-09T21:40:37Z","pushed_at":"2016-06-02T17:11:40Z","git_url":"git://github.com/blueboxgroup/ursula-cli.git","ssh_url":"git@github.com:blueboxgroup/ursula-cli.git","clone_url":"https://github.com/blueboxgroup/ursula-cli.git","svn_url":"https://github.com/blueboxgroup/ursula-cli","homepage":null,"size":75,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":6,"forks":10,"open_issues":6,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/blueboxgroup/ursula-cli/pulls/47"},"html":{"href":"https://github.com/blueboxgroup/ursula-cli/pull/47"},"issue":{"href":"https://api.github.com/repos/blueboxgroup/ursula-cli/issues/47"},"comments":{"href":"https://api.github.com/repos/blueboxgroup/ursula-cli/issues/47/comments"},"review_comments":{"href":"https://api.github.com/repos/blueboxgroup/ursula-cli/pulls/47/comments"},"review_comment":{"href":"https://api.github.com/repos/blueboxgroup/ursula-cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/blueboxgroup/ursula-cli/pulls/47/commits"},"statuses":{"href":"https://api.github.com/repos/blueboxgroup/ursula-cli/statuses/a25916dd8c5d1d2486ae277576bdd0d30950cc62"}}}}
{"actor":{"display_login":"j2sol"}}