{"action":"created","comment":{"url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/pulls/comments/70432807","id":70432807,"diff_hunk":"@@ -28,31 +28,50 @@ def _configure_influxdb(host, port):\n     # curl -S -s \"http://localhost:8086/db?u=root&p=root\" '-d \"{\\\"name\\\": \\\"cloudify\\\"}\"  # NOQA\n     import urllib\n     import urllib2\n+    import ast\n \n-    endpoint = 'http://{0}:{1}/db'.format(host, port)\n+    endpoint_for_list = 'http://{0}:{1}/db'.format(host, port)\n+    endpoint_for_creation = 'http://{0}:{1}/cluster/database_configs/' \\\n+                            '{2}'.format(host, port, db_name)\n     params = urllib.urlencode(dict(u=db_user, p=db_pass))\n-    data = {'name': db_name}\n-    url = endpoint + '?' + params\n+    url_for_list = endpoint_for_list + '?' + params\n+    url_for_creation = endpoint_for_creation + '?' + params\n \n     # check if db already exists\n-    db_list = eval(urllib2.urlopen(urllib2.Request(url)).read())\n+    db_list = eval(urllib2.urlopen(urllib2.Request(url_for_list)).read())\n     try:\n         assert not any(d.get('name') == db_name for d in db_list)\n     except AssertionError:\n         ctx.logger.info('Database {0} already exists!'.format(db_name))\n         return\n \n-    ctx.logger.info('Request is: {0} \\'{1}\\''.format(url, data))\n-\n     try:\n-        urllib2.urlopen(urllib2.Request(url, json.dumps(data)))\n+        utils.deploy_blueprint_resource(\n+            '{0}/retention.json'.format(CONFIG_PATH),\n+            '/tmp/retention.json', INFLUX_SERVICE_NAME)","path":"components/influxdb/scripts/create.py","position":31,"original_position":31,"commit_id":"bd3d62568948860ede55258bd3766d4ca3131e2c","original_commit_id":"bd3d62568948860ede55258bd3766d4ca3131e2c","user":{"login":"nir0s","id":2003076,"avatar_url":"https://avatars.githubusercontent.com/u/2003076?v=3","gravatar_id":"","url":"https://api.github.com/users/nir0s","html_url":"https://github.com/nir0s","followers_url":"https://api.github.com/users/nir0s/followers","following_url":"https://api.github.com/users/nir0s/following{/other_user}","gists_url":"https://api.github.com/users/nir0s/gists{/gist_id}","starred_url":"https://api.github.com/users/nir0s/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nir0s/subscriptions","organizations_url":"https://api.github.com/users/nir0s/orgs","repos_url":"https://api.github.com/users/nir0s/repos","events_url":"https://api.github.com/users/nir0s/events{/privacy}","received_events_url":"https://api.github.com/users/nir0s/received_events","type":"User","site_admin":false},"body":"I don't see anywhere where this file is deleted afterwards.","created_at":"2016-07-12T13:02:14Z","updated_at":"2016-07-12T13:02:14Z","html_url":"https://github.com/cloudify-cosmo/cloudify-manager-blueprints/pull/277#discussion_r70432807","pull_request_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/pulls/277","_links":{"self":{"href":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/pulls/comments/70432807"},"html":{"href":"https://github.com/cloudify-cosmo/cloudify-manager-blueprints/pull/277#discussion_r70432807"},"pull_request":{"href":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/pulls/277"}}},"pull_request":{"url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/pulls/277","id":66289903,"html_url":"https://github.com/cloudify-cosmo/cloudify-manager-blueprints/pull/277","diff_url":"https://github.com/cloudify-cosmo/cloudify-manager-blueprints/pull/277.diff","patch_url":"https://github.com/cloudify-cosmo/cloudify-manager-blueprints/pull/277.patch","issue_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/issues/277","number":277,"state":"open","locked":false,"title":"Cfy 4986 add influxdb retention policy","user":{"login":"gilzellner","id":6705750,"avatar_url":"https://avatars.githubusercontent.com/u/6705750?v=3","gravatar_id":"","url":"https://api.github.com/users/gilzellner","html_url":"https://github.com/gilzellner","followers_url":"https://api.github.com/users/gilzellner/followers","following_url":"https://api.github.com/users/gilzellner/following{/other_user}","gists_url":"https://api.github.com/users/gilzellner/gists{/gist_id}","starred_url":"https://api.github.com/users/gilzellner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gilzellner/subscriptions","organizations_url":"https://api.github.com/users/gilzellner/orgs","repos_url":"https://api.github.com/users/gilzellner/repos","events_url":"https://api.github.com/users/gilzellner/events{/privacy}","received_events_url":"https://api.github.com/users/gilzellner/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-13T09:23:37Z","updated_at":"2016-07-12T13:02:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c070f6e2427d82c55c2a73170826b872ee15af38","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/pulls/277/commits","review_comments_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/pulls/277/comments","review_comment_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/issues/277/comments","statuses_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/statuses/bd3d62568948860ede55258bd3766d4ca3131e2c","head":{"label":"cloudify-cosmo:CFY-4986-add-influxdb-retention-policy","ref":"CFY-4986-add-influxdb-retention-policy","sha":"bd3d62568948860ede55258bd3766d4ca3131e2c","user":{"login":"cloudify-cosmo","id":6260555,"avatar_url":"https://avatars.githubusercontent.com/u/6260555?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudify-cosmo","html_url":"https://github.com/cloudify-cosmo","followers_url":"https://api.github.com/users/cloudify-cosmo/followers","following_url":"https://api.github.com/users/cloudify-cosmo/following{/other_user}","gists_url":"https://api.github.com/users/cloudify-cosmo/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudify-cosmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudify-cosmo/subscriptions","organizations_url":"https://api.github.com/users/cloudify-cosmo/orgs","repos_url":"https://api.github.com/users/cloudify-cosmo/repos","events_url":"https://api.github.com/users/cloudify-cosmo/events{/privacy}","received_events_url":"https://api.github.com/users/cloudify-cosmo/received_events","type":"Organization","site_admin":false},"repo":{"id":24557021,"name":"cloudify-manager-blueprints","full_name":"cloudify-cosmo/cloudify-manager-blueprints","owner":{"login":"cloudify-cosmo","id":6260555,"avatar_url":"https://avatars.githubusercontent.com/u/6260555?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudify-cosmo","html_url":"https://github.com/cloudify-cosmo","followers_url":"https://api.github.com/users/cloudify-cosmo/followers","following_url":"https://api.github.com/users/cloudify-cosmo/following{/other_user}","gists_url":"https://api.github.com/users/cloudify-cosmo/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudify-cosmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudify-cosmo/subscriptions","organizations_url":"https://api.github.com/users/cloudify-cosmo/orgs","repos_url":"https://api.github.com/users/cloudify-cosmo/repos","events_url":"https://api.github.com/users/cloudify-cosmo/events{/privacy}","received_events_url":"https://api.github.com/users/cloudify-cosmo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cloudify-cosmo/cloudify-manager-blueprints","description":"","fork":false,"url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints","forks_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/forks","keys_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/teams","hooks_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/hooks","issue_events_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/issues/events{/number}","events_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/events","assignees_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/assignees{/user}","branches_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/branches{/branch}","tags_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/tags","blobs_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/git/refs{/sha}","trees_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/statuses/{sha}","languages_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/languages","stargazers_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/stargazers","contributors_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/contributors","subscribers_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/subscribers","subscription_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/subscription","commits_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/commits{/sha}","git_commits_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/git/commits{/sha}","comments_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/comments{/number}","issue_comment_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/issues/comments{/number}","contents_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/contents/{+path}","compare_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/merges","archive_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/downloads","issues_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/issues{/number}","pulls_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/pulls{/number}","milestones_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/milestones{/number}","notifications_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/labels{/name}","releases_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/releases{/id}","deployments_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/deployments","created_at":"2014-09-28T10:35:22Z","updated_at":"2016-07-05T15:18:48Z","pushed_at":"2016-07-12T11:08:50Z","git_url":"git://github.com/cloudify-cosmo/cloudify-manager-blueprints.git","ssh_url":"git@github.com:cloudify-cosmo/cloudify-manager-blueprints.git","clone_url":"https://github.com/cloudify-cosmo/cloudify-manager-blueprints.git","svn_url":"https://github.com/cloudify-cosmo/cloudify-manager-blueprints","homepage":null,"size":2885,"stargazers_count":8,"watchers_count":8,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":35,"mirror_url":null,"open_issues_count":30,"forks":35,"open_issues":30,"watchers":8,"default_branch":"master"}},"base":{"label":"cloudify-cosmo:master","ref":"master","sha":"6cb799a8e698ac9e38c337c65538eb8629004a07","user":{"login":"cloudify-cosmo","id":6260555,"avatar_url":"https://avatars.githubusercontent.com/u/6260555?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudify-cosmo","html_url":"https://github.com/cloudify-cosmo","followers_url":"https://api.github.com/users/cloudify-cosmo/followers","following_url":"https://api.github.com/users/cloudify-cosmo/following{/other_user}","gists_url":"https://api.github.com/users/cloudify-cosmo/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudify-cosmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudify-cosmo/subscriptions","organizations_url":"https://api.github.com/users/cloudify-cosmo/orgs","repos_url":"https://api.github.com/users/cloudify-cosmo/repos","events_url":"https://api.github.com/users/cloudify-cosmo/events{/privacy}","received_events_url":"https://api.github.com/users/cloudify-cosmo/received_events","type":"Organization","site_admin":false},"repo":{"id":24557021,"name":"cloudify-manager-blueprints","full_name":"cloudify-cosmo/cloudify-manager-blueprints","owner":{"login":"cloudify-cosmo","id":6260555,"avatar_url":"https://avatars.githubusercontent.com/u/6260555?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudify-cosmo","html_url":"https://github.com/cloudify-cosmo","followers_url":"https://api.github.com/users/cloudify-cosmo/followers","following_url":"https://api.github.com/users/cloudify-cosmo/following{/other_user}","gists_url":"https://api.github.com/users/cloudify-cosmo/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudify-cosmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudify-cosmo/subscriptions","organizations_url":"https://api.github.com/users/cloudify-cosmo/orgs","repos_url":"https://api.github.com/users/cloudify-cosmo/repos","events_url":"https://api.github.com/users/cloudify-cosmo/events{/privacy}","received_events_url":"https://api.github.com/users/cloudify-cosmo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cloudify-cosmo/cloudify-manager-blueprints","description":"","fork":false,"url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints","forks_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/forks","keys_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/teams","hooks_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/hooks","issue_events_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/issues/events{/number}","events_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/events","assignees_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/assignees{/user}","branches_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/branches{/branch}","tags_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/tags","blobs_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/git/refs{/sha}","trees_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/statuses/{sha}","languages_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/languages","stargazers_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/stargazers","contributors_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/contributors","subscribers_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/subscribers","subscription_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/subscription","commits_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/commits{/sha}","git_commits_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/git/commits{/sha}","comments_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/comments{/number}","issue_comment_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/issues/comments{/number}","contents_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/contents/{+path}","compare_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/merges","archive_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/downloads","issues_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/issues{/number}","pulls_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/pulls{/number}","milestones_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/milestones{/number}","notifications_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/labels{/name}","releases_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/releases{/id}","deployments_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/deployments","created_at":"2014-09-28T10:35:22Z","updated_at":"2016-07-05T15:18:48Z","pushed_at":"2016-07-12T11:08:50Z","git_url":"git://github.com/cloudify-cosmo/cloudify-manager-blueprints.git","ssh_url":"git@github.com:cloudify-cosmo/cloudify-manager-blueprints.git","clone_url":"https://github.com/cloudify-cosmo/cloudify-manager-blueprints.git","svn_url":"https://github.com/cloudify-cosmo/cloudify-manager-blueprints","homepage":null,"size":2885,"stargazers_count":8,"watchers_count":8,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":35,"mirror_url":null,"open_issues_count":30,"forks":35,"open_issues":30,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/pulls/277"},"html":{"href":"https://github.com/cloudify-cosmo/cloudify-manager-blueprints/pull/277"},"issue":{"href":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/issues/277"},"comments":{"href":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/issues/277/comments"},"review_comments":{"href":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/pulls/277/comments"},"review_comment":{"href":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/pulls/277/commits"},"statuses":{"href":"https://api.github.com/repos/cloudify-cosmo/cloudify-manager-blueprints/statuses/bd3d62568948860ede55258bd3766d4ca3131e2c"}}}}
{"actor":{"display_login":"nir0s"}}