{"action":"created","comment":{"url":"https://api.github.com/repos/kendriu/python-fuelclient/pulls/comments/36074612","id":36074612,"diff_hunk":"@@ -58,6 +79,38 @@ def upload(self, params):\n         print(\n             \"Network configuration uploaded.\"\n         )\n+        if params.dnsmasq:\n+            self._update_dnsmasq_template(network_data['networks'])\n+\n+    @master_only\n+    def _update_dnsmasq_template(self, networks):\n+        fw_admin_nets = dict([(n['group_id'], n) for n in networks if\n+                              n['name'] == 'fuelweb_admin'])\n+        base_net = fw_admin_nets.pop(None)\n+        for group_id, net in fw_admin_nets.iteritems():\n+            marker = GROUP_ID_TEMPLATE.format(group_id = group_id)\n+            try:\n+                exec_cmd(COBBLER_SHELL + 'grep -q \"%s\" %s' % (","path":"fuelclient/cli/actions/network.py","position":null,"original_position":63,"commit_id":"4817c30c8b1e4e59cea4915302bdd3e8d3caa8f2","original_commit_id":"cbba8fe6ae7052285a78637da9b3583b5b3ce0b1","user":{"login":"kendriu","id":470095,"avatar_url":"https://avatars.githubusercontent.com/u/470095?v=3","gravatar_id":"","url":"https://api.github.com/users/kendriu","html_url":"https://github.com/kendriu","followers_url":"https://api.github.com/users/kendriu/followers","following_url":"https://api.github.com/users/kendriu/following{/other_user}","gists_url":"https://api.github.com/users/kendriu/gists{/gist_id}","starred_url":"https://api.github.com/users/kendriu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kendriu/subscriptions","organizations_url":"https://api.github.com/users/kendriu/orgs","repos_url":"https://api.github.com/users/kendriu/repos","events_url":"https://api.github.com/users/kendriu/events{/privacy}","received_events_url":"https://api.github.com/users/kendriu/received_events","type":"User","site_admin":false},"body":"done","created_at":"2015-08-03T10:56:12Z","updated_at":"2015-08-03T10:56:12Z","html_url":"https://github.com/kendriu/python-fuelclient/pull/1#discussion_r36074612","pull_request_url":"https://api.github.com/repos/kendriu/python-fuelclient/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/kendriu/python-fuelclient/pulls/comments/36074612"},"html":{"href":"https://github.com/kendriu/python-fuelclient/pull/1#discussion_r36074612"},"pull_request":{"href":"https://api.github.com/repos/kendriu/python-fuelclient/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/kendriu/python-fuelclient/pulls/1","id":41006318,"html_url":"https://github.com/kendriu/python-fuelclient/pull/1","diff_url":"https://github.com/kendriu/python-fuelclient/pull/1.diff","patch_url":"https://github.com/kendriu/python-fuelclient/pull/1.patch","issue_url":"https://api.github.com/repos/kendriu/python-fuelclient/issues/1","number":1,"state":"open","locked":false,"title":"Update /etc/cobbler/dnsmasq.template according to network_*.yaml and sync cobbler","user":{"login":"kendriu","id":470095,"avatar_url":"https://avatars.githubusercontent.com/u/470095?v=3","gravatar_id":"","url":"https://api.github.com/users/kendriu","html_url":"https://github.com/kendriu","followers_url":"https://api.github.com/users/kendriu/followers","following_url":"https://api.github.com/users/kendriu/following{/other_user}","gists_url":"https://api.github.com/users/kendriu/gists{/gist_id}","starred_url":"https://api.github.com/users/kendriu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kendriu/subscriptions","organizations_url":"https://api.github.com/users/kendriu/orgs","repos_url":"https://api.github.com/users/kendriu/repos","events_url":"https://api.github.com/users/kendriu/events{/privacy}","received_events_url":"https://api.github.com/users/kendriu/received_events","type":"User","site_admin":false},"body":"Operation can be done only on master node","created_at":"2015-07-28T12:38:29Z","updated_at":"2015-08-03T10:56:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6be17a461422fe35ff58143cd5a348cba1c673d4","assignee":{"login":"prmtl","id":1519363,"avatar_url":"https://avatars.githubusercontent.com/u/1519363?v=3","gravatar_id":"","url":"https://api.github.com/users/prmtl","html_url":"https://github.com/prmtl","followers_url":"https://api.github.com/users/prmtl/followers","following_url":"https://api.github.com/users/prmtl/following{/other_user}","gists_url":"https://api.github.com/users/prmtl/gists{/gist_id}","starred_url":"https://api.github.com/users/prmtl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prmtl/subscriptions","organizations_url":"https://api.github.com/users/prmtl/orgs","repos_url":"https://api.github.com/users/prmtl/repos","events_url":"https://api.github.com/users/prmtl/events{/privacy}","received_events_url":"https://api.github.com/users/prmtl/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/kendriu/python-fuelclient/pulls/1/commits","review_comments_url":"https://api.github.com/repos/kendriu/python-fuelclient/pulls/1/comments","review_comment_url":"https://api.github.com/repos/kendriu/python-fuelclient/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kendriu/python-fuelclient/issues/1/comments","statuses_url":"https://api.github.com/repos/kendriu/python-fuelclient/statuses/4817c30c8b1e4e59cea4915302bdd3e8d3caa8f2","head":{"label":"kendriu:dnsmasq","ref":"dnsmasq","sha":"4817c30c8b1e4e59cea4915302bdd3e8d3caa8f2","user":{"login":"kendriu","id":470095,"avatar_url":"https://avatars.githubusercontent.com/u/470095?v=3","gravatar_id":"","url":"https://api.github.com/users/kendriu","html_url":"https://github.com/kendriu","followers_url":"https://api.github.com/users/kendriu/followers","following_url":"https://api.github.com/users/kendriu/following{/other_user}","gists_url":"https://api.github.com/users/kendriu/gists{/gist_id}","starred_url":"https://api.github.com/users/kendriu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kendriu/subscriptions","organizations_url":"https://api.github.com/users/kendriu/orgs","repos_url":"https://api.github.com/users/kendriu/repos","events_url":"https://api.github.com/users/kendriu/events{/privacy}","received_events_url":"https://api.github.com/users/kendriu/received_events","type":"User","site_admin":false},"repo":{"id":39831730,"name":"python-fuelclient","full_name":"kendriu/python-fuelclient","owner":{"login":"kendriu","id":470095,"avatar_url":"https://avatars.githubusercontent.com/u/470095?v=3","gravatar_id":"","url":"https://api.github.com/users/kendriu","html_url":"https://github.com/kendriu","followers_url":"https://api.github.com/users/kendriu/followers","following_url":"https://api.github.com/users/kendriu/following{/other_user}","gists_url":"https://api.github.com/users/kendriu/gists{/gist_id}","starred_url":"https://api.github.com/users/kendriu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kendriu/subscriptions","organizations_url":"https://api.github.com/users/kendriu/orgs","repos_url":"https://api.github.com/users/kendriu/repos","events_url":"https://api.github.com/users/kendriu/events{/privacy}","received_events_url":"https://api.github.com/users/kendriu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kendriu/python-fuelclient","description":"Client for Fuel.","fork":true,"url":"https://api.github.com/repos/kendriu/python-fuelclient","forks_url":"https://api.github.com/repos/kendriu/python-fuelclient/forks","keys_url":"https://api.github.com/repos/kendriu/python-fuelclient/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kendriu/python-fuelclient/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kendriu/python-fuelclient/teams","hooks_url":"https://api.github.com/repos/kendriu/python-fuelclient/hooks","issue_events_url":"https://api.github.com/repos/kendriu/python-fuelclient/issues/events{/number}","events_url":"https://api.github.com/repos/kendriu/python-fuelclient/events","assignees_url":"https://api.github.com/repos/kendriu/python-fuelclient/assignees{/user}","branches_url":"https://api.github.com/repos/kendriu/python-fuelclient/branches{/branch}","tags_url":"https://api.github.com/repos/kendriu/python-fuelclient/tags","blobs_url":"https://api.github.com/repos/kendriu/python-fuelclient/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kendriu/python-fuelclient/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kendriu/python-fuelclient/git/refs{/sha}","trees_url":"https://api.github.com/repos/kendriu/python-fuelclient/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kendriu/python-fuelclient/statuses/{sha}","languages_url":"https://api.github.com/repos/kendriu/python-fuelclient/languages","stargazers_url":"https://api.github.com/repos/kendriu/python-fuelclient/stargazers","contributors_url":"https://api.github.com/repos/kendriu/python-fuelclient/contributors","subscribers_url":"https://api.github.com/repos/kendriu/python-fuelclient/subscribers","subscription_url":"https://api.github.com/repos/kendriu/python-fuelclient/subscription","commits_url":"https://api.github.com/repos/kendriu/python-fuelclient/commits{/sha}","git_commits_url":"https://api.github.com/repos/kendriu/python-fuelclient/git/commits{/sha}","comments_url":"https://api.github.com/repos/kendriu/python-fuelclient/comments{/number}","issue_comment_url":"https://api.github.com/repos/kendriu/python-fuelclient/issues/comments{/number}","contents_url":"https://api.github.com/repos/kendriu/python-fuelclient/contents/{+path}","compare_url":"https://api.github.com/repos/kendriu/python-fuelclient/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kendriu/python-fuelclient/merges","archive_url":"https://api.github.com/repos/kendriu/python-fuelclient/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kendriu/python-fuelclient/downloads","issues_url":"https://api.github.com/repos/kendriu/python-fuelclient/issues{/number}","pulls_url":"https://api.github.com/repos/kendriu/python-fuelclient/pulls{/number}","milestones_url":"https://api.github.com/repos/kendriu/python-fuelclient/milestones{/number}","notifications_url":"https://api.github.com/repos/kendriu/python-fuelclient/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kendriu/python-fuelclient/labels{/name}","releases_url":"https://api.github.com/repos/kendriu/python-fuelclient/releases{/id}","created_at":"2015-07-28T12:09:06Z","updated_at":"2015-07-28T12:09:07Z","pushed_at":"2015-08-03T10:52:38Z","git_url":"git://github.com/kendriu/python-fuelclient.git","ssh_url":"git@github.com:kendriu/python-fuelclient.git","clone_url":"https://github.com/kendriu/python-fuelclient.git","svn_url":"https://github.com/kendriu/python-fuelclient","homepage":"http://openstack.org","size":648,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"kendriu:master","ref":"master","sha":"f04e6c46783ecd6000df31b61b6749da66d4d828","user":{"login":"kendriu","id":470095,"avatar_url":"https://avatars.githubusercontent.com/u/470095?v=3","gravatar_id":"","url":"https://api.github.com/users/kendriu","html_url":"https://github.com/kendriu","followers_url":"https://api.github.com/users/kendriu/followers","following_url":"https://api.github.com/users/kendriu/following{/other_user}","gists_url":"https://api.github.com/users/kendriu/gists{/gist_id}","starred_url":"https://api.github.com/users/kendriu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kendriu/subscriptions","organizations_url":"https://api.github.com/users/kendriu/orgs","repos_url":"https://api.github.com/users/kendriu/repos","events_url":"https://api.github.com/users/kendriu/events{/privacy}","received_events_url":"https://api.github.com/users/kendriu/received_events","type":"User","site_admin":false},"repo":{"id":39831730,"name":"python-fuelclient","full_name":"kendriu/python-fuelclient","owner":{"login":"kendriu","id":470095,"avatar_url":"https://avatars.githubusercontent.com/u/470095?v=3","gravatar_id":"","url":"https://api.github.com/users/kendriu","html_url":"https://github.com/kendriu","followers_url":"https://api.github.com/users/kendriu/followers","following_url":"https://api.github.com/users/kendriu/following{/other_user}","gists_url":"https://api.github.com/users/kendriu/gists{/gist_id}","starred_url":"https://api.github.com/users/kendriu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kendriu/subscriptions","organizations_url":"https://api.github.com/users/kendriu/orgs","repos_url":"https://api.github.com/users/kendriu/repos","events_url":"https://api.github.com/users/kendriu/events{/privacy}","received_events_url":"https://api.github.com/users/kendriu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kendriu/python-fuelclient","description":"Client for Fuel.","fork":true,"url":"https://api.github.com/repos/kendriu/python-fuelclient","forks_url":"https://api.github.com/repos/kendriu/python-fuelclient/forks","keys_url":"https://api.github.com/repos/kendriu/python-fuelclient/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kendriu/python-fuelclient/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kendriu/python-fuelclient/teams","hooks_url":"https://api.github.com/repos/kendriu/python-fuelclient/hooks","issue_events_url":"https://api.github.com/repos/kendriu/python-fuelclient/issues/events{/number}","events_url":"https://api.github.com/repos/kendriu/python-fuelclient/events","assignees_url":"https://api.github.com/repos/kendriu/python-fuelclient/assignees{/user}","branches_url":"https://api.github.com/repos/kendriu/python-fuelclient/branches{/branch}","tags_url":"https://api.github.com/repos/kendriu/python-fuelclient/tags","blobs_url":"https://api.github.com/repos/kendriu/python-fuelclient/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kendriu/python-fuelclient/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kendriu/python-fuelclient/git/refs{/sha}","trees_url":"https://api.github.com/repos/kendriu/python-fuelclient/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kendriu/python-fuelclient/statuses/{sha}","languages_url":"https://api.github.com/repos/kendriu/python-fuelclient/languages","stargazers_url":"https://api.github.com/repos/kendriu/python-fuelclient/stargazers","contributors_url":"https://api.github.com/repos/kendriu/python-fuelclient/contributors","subscribers_url":"https://api.github.com/repos/kendriu/python-fuelclient/subscribers","subscription_url":"https://api.github.com/repos/kendriu/python-fuelclient/subscription","commits_url":"https://api.github.com/repos/kendriu/python-fuelclient/commits{/sha}","git_commits_url":"https://api.github.com/repos/kendriu/python-fuelclient/git/commits{/sha}","comments_url":"https://api.github.com/repos/kendriu/python-fuelclient/comments{/number}","issue_comment_url":"https://api.github.com/repos/kendriu/python-fuelclient/issues/comments{/number}","contents_url":"https://api.github.com/repos/kendriu/python-fuelclient/contents/{+path}","compare_url":"https://api.github.com/repos/kendriu/python-fuelclient/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kendriu/python-fuelclient/merges","archive_url":"https://api.github.com/repos/kendriu/python-fuelclient/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kendriu/python-fuelclient/downloads","issues_url":"https://api.github.com/repos/kendriu/python-fuelclient/issues{/number}","pulls_url":"https://api.github.com/repos/kendriu/python-fuelclient/pulls{/number}","milestones_url":"https://api.github.com/repos/kendriu/python-fuelclient/milestones{/number}","notifications_url":"https://api.github.com/repos/kendriu/python-fuelclient/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kendriu/python-fuelclient/labels{/name}","releases_url":"https://api.github.com/repos/kendriu/python-fuelclient/releases{/id}","created_at":"2015-07-28T12:09:06Z","updated_at":"2015-07-28T12:09:07Z","pushed_at":"2015-08-03T10:52:38Z","git_url":"git://github.com/kendriu/python-fuelclient.git","ssh_url":"git@github.com:kendriu/python-fuelclient.git","clone_url":"https://github.com/kendriu/python-fuelclient.git","svn_url":"https://github.com/kendriu/python-fuelclient","homepage":"http://openstack.org","size":648,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kendriu/python-fuelclient/pulls/1"},"html":{"href":"https://github.com/kendriu/python-fuelclient/pull/1"},"issue":{"href":"https://api.github.com/repos/kendriu/python-fuelclient/issues/1"},"comments":{"href":"https://api.github.com/repos/kendriu/python-fuelclient/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/kendriu/python-fuelclient/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/kendriu/python-fuelclient/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kendriu/python-fuelclient/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/kendriu/python-fuelclient/statuses/4817c30c8b1e4e59cea4915302bdd3e8d3caa8f2"}}}}