{"action":"created","comment":{"url":"https://api.github.com/repos/niolabs/component_deployment_api/pulls/comments/218612853","pull_request_review_id":156591204,"id":218612853,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxODYxMjg1Mw==","diff_hunk":"@@ -87,10 +89,11 @@ def configure(self, context):\n \n         # fetch instance specific settings\n         default = Persistence().load(\"api_key\", default=None)\n-        self.api_key = NIOEnvironment.get_variable('API_KEY', \n-                                                   default=default)\n+        self._api_key = NIOEnvironment.get_variable('API_KEY',\n+                                                    default=default)\n+        self._instance_id = NIOEnvironment.get_variable('INSTANCE_ID')","path":"manager.py","position":44,"original_position":44,"commit_id":"8d928c65017b71abf86fd239beee23e8ad5da1ee","original_commit_id":"8d928c65017b71abf86fd239beee23e8ad5da1ee","user":{"login":"mattdodge","id":797259,"node_id":"MDQ6VXNlcjc5NzI1OQ==","avatar_url":"https://avatars3.githubusercontent.com/u/797259?v=4","gravatar_id":"","url":"https://api.github.com/users/mattdodge","html_url":"https://github.com/mattdodge","followers_url":"https://api.github.com/users/mattdodge/followers","following_url":"https://api.github.com/users/mattdodge/following{/other_user}","gists_url":"https://api.github.com/users/mattdodge/gists{/gist_id}","starred_url":"https://api.github.com/users/mattdodge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattdodge/subscriptions","organizations_url":"https://api.github.com/users/mattdodge/orgs","repos_url":"https://api.github.com/users/mattdodge/repos","events_url":"https://api.github.com/users/mattdodge/events{/privacy}","received_events_url":"https://api.github.com/users/mattdodge/received_events","type":"User","site_admin":false},"body":"I don't think either of these (instance id and api key) should be environment variables in the code, we should pull them from the configuration file. If the instance wants to use environment variables they can set that in the conf file. That should be the default behavior though.\r\n\r\nI think we should have two configuration settings for this:\r\n```ini\r\nconfiguration_fetch_endpoint: https://api.n.io/v1/instances/[[INSTANCE_ID]]/configuration\r\ninstance_api_key: [[API_KEY]]\r\n```","created_at":"2018-09-18T22:14:38Z","updated_at":"2018-09-18T22:17:46Z","html_url":"https://github.com/niolabs/component_deployment_api/pull/15#discussion_r218612853","pull_request_url":"https://api.github.com/repos/niolabs/component_deployment_api/pulls/15","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/niolabs/component_deployment_api/pulls/comments/218612853"},"html":{"href":"https://github.com/niolabs/component_deployment_api/pull/15#discussion_r218612853"},"pull_request":{"href":"https://api.github.com/repos/niolabs/component_deployment_api/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/niolabs/component_deployment_api/pulls/15","id":216323474,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE2MzIzNDc0","html_url":"https://github.com/niolabs/component_deployment_api/pull/15","diff_url":"https://github.com/niolabs/component_deployment_api/pull/15.diff","patch_url":"https://github.com/niolabs/component_deployment_api/pull/15.patch","issue_url":"https://api.github.com/repos/niolabs/component_deployment_api/issues/15","number":15,"state":"open","locked":false,"title":"NIO-1180, requesting configuration providing `api key` and `instance id`","user":{"login":"f1401martin","id":677414,"node_id":"MDQ6VXNlcjY3NzQxNA==","avatar_url":"https://avatars2.githubusercontent.com/u/677414?v=4","gravatar_id":"","url":"https://api.github.com/users/f1401martin","html_url":"https://github.com/f1401martin","followers_url":"https://api.github.com/users/f1401martin/followers","following_url":"https://api.github.com/users/f1401martin/following{/other_user}","gists_url":"https://api.github.com/users/f1401martin/gists{/gist_id}","starred_url":"https://api.github.com/users/f1401martin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/f1401martin/subscriptions","organizations_url":"https://api.github.com/users/f1401martin/orgs","repos_url":"https://api.github.com/users/f1401martin/repos","events_url":"https://api.github.com/users/f1401martin/events{/privacy}","received_events_url":"https://api.github.com/users/f1401martin/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-09-18T14:13:39Z","updated_at":"2018-09-18T22:17:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"37a926420c759f126211f14adf0e6404b7753a17","assignee":null,"assignees":[],"requested_reviewers":[{"login":"tlugger","id":10581772,"node_id":"MDQ6VXNlcjEwNTgxNzcy","avatar_url":"https://avatars3.githubusercontent.com/u/10581772?v=4","gravatar_id":"","url":"https://api.github.com/users/tlugger","html_url":"https://github.com/tlugger","followers_url":"https://api.github.com/users/tlugger/followers","following_url":"https://api.github.com/users/tlugger/following{/other_user}","gists_url":"https://api.github.com/users/tlugger/gists{/gist_id}","starred_url":"https://api.github.com/users/tlugger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tlugger/subscriptions","organizations_url":"https://api.github.com/users/tlugger/orgs","repos_url":"https://api.github.com/users/tlugger/repos","events_url":"https://api.github.com/users/tlugger/events{/privacy}","received_events_url":"https://api.github.com/users/tlugger/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/niolabs/component_deployment_api/pulls/15/commits","review_comments_url":"https://api.github.com/repos/niolabs/component_deployment_api/pulls/15/comments","review_comment_url":"https://api.github.com/repos/niolabs/component_deployment_api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/niolabs/component_deployment_api/issues/15/comments","statuses_url":"https://api.github.com/repos/niolabs/component_deployment_api/statuses/8d928c65017b71abf86fd239beee23e8ad5da1ee","head":{"label":"niolabs:config_through_instance_id","ref":"config_through_instance_id","sha":"8d928c65017b71abf86fd239beee23e8ad5da1ee","user":{"login":"niolabs","id":4392245,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzOTIyNDU=","avatar_url":"https://avatars3.githubusercontent.com/u/4392245?v=4","gravatar_id":"","url":"https://api.github.com/users/niolabs","html_url":"https://github.com/niolabs","followers_url":"https://api.github.com/users/niolabs/followers","following_url":"https://api.github.com/users/niolabs/following{/other_user}","gists_url":"https://api.github.com/users/niolabs/gists{/gist_id}","starred_url":"https://api.github.com/users/niolabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niolabs/subscriptions","organizations_url":"https://api.github.com/users/niolabs/orgs","repos_url":"https://api.github.com/users/niolabs/repos","events_url":"https://api.github.com/users/niolabs/events{/privacy}","received_events_url":"https://api.github.com/users/niolabs/received_events","type":"Organization","site_admin":false},"repo":{"id":60635397,"node_id":"MDEwOlJlcG9zaXRvcnk2MDYzNTM5Nw==","name":"component_deployment_api","full_name":"niolabs/component_deployment_api","private":false,"owner":{"login":"niolabs","id":4392245,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzOTIyNDU=","avatar_url":"https://avatars3.githubusercontent.com/u/4392245?v=4","gravatar_id":"","url":"https://api.github.com/users/niolabs","html_url":"https://github.com/niolabs","followers_url":"https://api.github.com/users/niolabs/followers","following_url":"https://api.github.com/users/niolabs/following{/other_user}","gists_url":"https://api.github.com/users/niolabs/gists{/gist_id}","starred_url":"https://api.github.com/users/niolabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niolabs/subscriptions","organizations_url":"https://api.github.com/users/niolabs/orgs","repos_url":"https://api.github.com/users/niolabs/repos","events_url":"https://api.github.com/users/niolabs/events{/privacy}","received_events_url":"https://api.github.com/users/niolabs/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/niolabs/component_deployment_api","description":null,"fork":false,"url":"https://api.github.com/repos/niolabs/component_deployment_api","forks_url":"https://api.github.com/repos/niolabs/component_deployment_api/forks","keys_url":"https://api.github.com/repos/niolabs/component_deployment_api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/niolabs/component_deployment_api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/niolabs/component_deployment_api/teams","hooks_url":"https://api.github.com/repos/niolabs/component_deployment_api/hooks","issue_events_url":"https://api.github.com/repos/niolabs/component_deployment_api/issues/events{/number}","events_url":"https://api.github.com/repos/niolabs/component_deployment_api/events","assignees_url":"https://api.github.com/repos/niolabs/component_deployment_api/assignees{/user}","branches_url":"https://api.github.com/repos/niolabs/component_deployment_api/branches{/branch}","tags_url":"https://api.github.com/repos/niolabs/component_deployment_api/tags","blobs_url":"https://api.github.com/repos/niolabs/component_deployment_api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/niolabs/component_deployment_api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/niolabs/component_deployment_api/git/refs{/sha}","trees_url":"https://api.github.com/repos/niolabs/component_deployment_api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/niolabs/component_deployment_api/statuses/{sha}","languages_url":"https://api.github.com/repos/niolabs/component_deployment_api/languages","stargazers_url":"https://api.github.com/repos/niolabs/component_deployment_api/stargazers","contributors_url":"https://api.github.com/repos/niolabs/component_deployment_api/contributors","subscribers_url":"https://api.github.com/repos/niolabs/component_deployment_api/subscribers","subscription_url":"https://api.github.com/repos/niolabs/component_deployment_api/subscription","commits_url":"https://api.github.com/repos/niolabs/component_deployment_api/commits{/sha}","git_commits_url":"https://api.github.com/repos/niolabs/component_deployment_api/git/commits{/sha}","comments_url":"https://api.github.com/repos/niolabs/component_deployment_api/comments{/number}","issue_comment_url":"https://api.github.com/repos/niolabs/component_deployment_api/issues/comments{/number}","contents_url":"https://api.github.com/repos/niolabs/component_deployment_api/contents/{+path}","compare_url":"https://api.github.com/repos/niolabs/component_deployment_api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/niolabs/component_deployment_api/merges","archive_url":"https://api.github.com/repos/niolabs/component_deployment_api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/niolabs/component_deployment_api/downloads","issues_url":"https://api.github.com/repos/niolabs/component_deployment_api/issues{/number}","pulls_url":"https://api.github.com/repos/niolabs/component_deployment_api/pulls{/number}","milestones_url":"https://api.github.com/repos/niolabs/component_deployment_api/milestones{/number}","notifications_url":"https://api.github.com/repos/niolabs/component_deployment_api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/niolabs/component_deployment_api/labels{/name}","releases_url":"https://api.github.com/repos/niolabs/component_deployment_api/releases{/id}","deployments_url":"https://api.github.com/repos/niolabs/component_deployment_api/deployments","created_at":"2016-06-07T18:09:00Z","updated_at":"2018-09-12T19:32:42Z","pushed_at":"2018-09-18T14:13:40Z","git_url":"git://github.com/niolabs/component_deployment_api.git","ssh_url":"git@github.com:niolabs/component_deployment_api.git","clone_url":"https://github.com/niolabs/component_deployment_api.git","svn_url":"https://github.com/niolabs/component_deployment_api","homepage":null,"size":39,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"niolabs:master","ref":"master","sha":"58fd394a0c583d3cad97b112a29b67cc8130d343","user":{"login":"niolabs","id":4392245,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzOTIyNDU=","avatar_url":"https://avatars3.githubusercontent.com/u/4392245?v=4","gravatar_id":"","url":"https://api.github.com/users/niolabs","html_url":"https://github.com/niolabs","followers_url":"https://api.github.com/users/niolabs/followers","following_url":"https://api.github.com/users/niolabs/following{/other_user}","gists_url":"https://api.github.com/users/niolabs/gists{/gist_id}","starred_url":"https://api.github.com/users/niolabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niolabs/subscriptions","organizations_url":"https://api.github.com/users/niolabs/orgs","repos_url":"https://api.github.com/users/niolabs/repos","events_url":"https://api.github.com/users/niolabs/events{/privacy}","received_events_url":"https://api.github.com/users/niolabs/received_events","type":"Organization","site_admin":false},"repo":{"id":60635397,"node_id":"MDEwOlJlcG9zaXRvcnk2MDYzNTM5Nw==","name":"component_deployment_api","full_name":"niolabs/component_deployment_api","private":false,"owner":{"login":"niolabs","id":4392245,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzOTIyNDU=","avatar_url":"https://avatars3.githubusercontent.com/u/4392245?v=4","gravatar_id":"","url":"https://api.github.com/users/niolabs","html_url":"https://github.com/niolabs","followers_url":"https://api.github.com/users/niolabs/followers","following_url":"https://api.github.com/users/niolabs/following{/other_user}","gists_url":"https://api.github.com/users/niolabs/gists{/gist_id}","starred_url":"https://api.github.com/users/niolabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niolabs/subscriptions","organizations_url":"https://api.github.com/users/niolabs/orgs","repos_url":"https://api.github.com/users/niolabs/repos","events_url":"https://api.github.com/users/niolabs/events{/privacy}","received_events_url":"https://api.github.com/users/niolabs/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/niolabs/component_deployment_api","description":null,"fork":false,"url":"https://api.github.com/repos/niolabs/component_deployment_api","forks_url":"https://api.github.com/repos/niolabs/component_deployment_api/forks","keys_url":"https://api.github.com/repos/niolabs/component_deployment_api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/niolabs/component_deployment_api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/niolabs/component_deployment_api/teams","hooks_url":"https://api.github.com/repos/niolabs/component_deployment_api/hooks","issue_events_url":"https://api.github.com/repos/niolabs/component_deployment_api/issues/events{/number}","events_url":"https://api.github.com/repos/niolabs/component_deployment_api/events","assignees_url":"https://api.github.com/repos/niolabs/component_deployment_api/assignees{/user}","branches_url":"https://api.github.com/repos/niolabs/component_deployment_api/branches{/branch}","tags_url":"https://api.github.com/repos/niolabs/component_deployment_api/tags","blobs_url":"https://api.github.com/repos/niolabs/component_deployment_api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/niolabs/component_deployment_api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/niolabs/component_deployment_api/git/refs{/sha}","trees_url":"https://api.github.com/repos/niolabs/component_deployment_api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/niolabs/component_deployment_api/statuses/{sha}","languages_url":"https://api.github.com/repos/niolabs/component_deployment_api/languages","stargazers_url":"https://api.github.com/repos/niolabs/component_deployment_api/stargazers","contributors_url":"https://api.github.com/repos/niolabs/component_deployment_api/contributors","subscribers_url":"https://api.github.com/repos/niolabs/component_deployment_api/subscribers","subscription_url":"https://api.github.com/repos/niolabs/component_deployment_api/subscription","commits_url":"https://api.github.com/repos/niolabs/component_deployment_api/commits{/sha}","git_commits_url":"https://api.github.com/repos/niolabs/component_deployment_api/git/commits{/sha}","comments_url":"https://api.github.com/repos/niolabs/component_deployment_api/comments{/number}","issue_comment_url":"https://api.github.com/repos/niolabs/component_deployment_api/issues/comments{/number}","contents_url":"https://api.github.com/repos/niolabs/component_deployment_api/contents/{+path}","compare_url":"https://api.github.com/repos/niolabs/component_deployment_api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/niolabs/component_deployment_api/merges","archive_url":"https://api.github.com/repos/niolabs/component_deployment_api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/niolabs/component_deployment_api/downloads","issues_url":"https://api.github.com/repos/niolabs/component_deployment_api/issues{/number}","pulls_url":"https://api.github.com/repos/niolabs/component_deployment_api/pulls{/number}","milestones_url":"https://api.github.com/repos/niolabs/component_deployment_api/milestones{/number}","notifications_url":"https://api.github.com/repos/niolabs/component_deployment_api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/niolabs/component_deployment_api/labels{/name}","releases_url":"https://api.github.com/repos/niolabs/component_deployment_api/releases{/id}","deployments_url":"https://api.github.com/repos/niolabs/component_deployment_api/deployments","created_at":"2016-06-07T18:09:00Z","updated_at":"2018-09-12T19:32:42Z","pushed_at":"2018-09-18T14:13:40Z","git_url":"git://github.com/niolabs/component_deployment_api.git","ssh_url":"git@github.com:niolabs/component_deployment_api.git","clone_url":"https://github.com/niolabs/component_deployment_api.git","svn_url":"https://github.com/niolabs/component_deployment_api","homepage":null,"size":39,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/niolabs/component_deployment_api/pulls/15"},"html":{"href":"https://github.com/niolabs/component_deployment_api/pull/15"},"issue":{"href":"https://api.github.com/repos/niolabs/component_deployment_api/issues/15"},"comments":{"href":"https://api.github.com/repos/niolabs/component_deployment_api/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/niolabs/component_deployment_api/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/niolabs/component_deployment_api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/niolabs/component_deployment_api/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/niolabs/component_deployment_api/statuses/8d928c65017b71abf86fd239beee23e8ad5da1ee"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"mattdodge"}}