{"action":"created","comment":{"url":"https://api.github.com/repos/zero-os/0-templates/pulls/comments/190521486","pull_request_review_id":122912430,"id":190521486,"diff_hunk":"@@ -0,0 +1,340 @@\n+import os\n+import pytest\n+import tempfile\n+import shutil\n+from unittest import TestCase\n+from unittest import mock\n+from unittest.mock import MagicMock\n+\n+from js9 import j\n+from zerorobot import config, template_collection\n+from zerorobot.template_uid import TemplateUID\n+from zerorobot.template.state import StateCheckError\n+\n+from zeroboot_ipmi_host import ZerobootIpmiHost\n+\n+class TestZerobootIpmiHostTemplate(TestCase):\n+    @classmethod\n+    def setUpClass(cls):\n+        config.DATA_DIR = '/tmp'\n+        config.DATA_DIR = tempfile.mkdtemp(prefix='0-templates_')\n+        ZerobootIpmiHost.template_uid = TemplateUID.parse(\n+            'github.com/zero-os/0-templates/%s/%s' % (\n+                ZerobootIpmiHost.template_name, ZerobootIpmiHost.version))\n+\n+        cls._valid_data = {\n+            'zerobootClient': 'zboot1-zb',\n+            'ipmiClient': 'zboot1-ipmi',\n+            'mac': 'well:this:a:weird:mac:address',\n+            'ip': '10.10.1.1',\n+            'network': '10.10.1.0/24',\n+            'hostname': 'test-01',\n+            'ipxeUrl': 'some.ixpe.url',\n+        }\n+\n+    @classmethod\n+    def tearDownClass(cls):\n+        if os.path.exists(config.DATA_DIR):\n+            shutil.rmtree(config.DATA_DIR)\n+\n+    @mock.patch.object(j.clients, '_ipmi')\n+    @mock.patch.object(j.clients, '_zboot')\n+    def test_validation_required_fields(self, zboot, ipmi):","path":"templates/zeroboot_ipmi_host/zeroboot_ipmi_host_test.py","position":42,"original_position":42,"commit_id":"b19aee4891add7046131168873c4afe46cfc4a84","original_commit_id":"b19aee4891add7046131168873c4afe46cfc4a84","user":{"login":"serboctor","id":6323012,"avatar_url":"https://avatars3.githubusercontent.com/u/6323012?v=4","gravatar_id":"","url":"https://api.github.com/users/serboctor","html_url":"https://github.com/serboctor","followers_url":"https://api.github.com/users/serboctor/followers","following_url":"https://api.github.com/users/serboctor/following{/other_user}","gists_url":"https://api.github.com/users/serboctor/gists{/gist_id}","starred_url":"https://api.github.com/users/serboctor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/serboctor/subscriptions","organizations_url":"https://api.github.com/users/serboctor/orgs","repos_url":"https://api.github.com/users/serboctor/repos","events_url":"https://api.github.com/users/serboctor/events{/privacy}","received_events_url":"https://api.github.com/users/serboctor/received_events","type":"User","site_admin":false},"body":"Can you seperate the test for valid data in a another test function?","created_at":"2018-05-24T09:30:51Z","updated_at":"2018-05-24T09:47:59Z","html_url":"https://github.com/zero-os/0-templates/pull/124#discussion_r190521486","pull_request_url":"https://api.github.com/repos/zero-os/0-templates/pulls/124","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/zero-os/0-templates/pulls/comments/190521486"},"html":{"href":"https://github.com/zero-os/0-templates/pull/124#discussion_r190521486"},"pull_request":{"href":"https://api.github.com/repos/zero-os/0-templates/pulls/124"}}},"pull_request":{"url":"https://api.github.com/repos/zero-os/0-templates/pulls/124","id":189981387,"html_url":"https://github.com/zero-os/0-templates/pull/124","diff_url":"https://github.com/zero-os/0-templates/pull/124.diff","patch_url":"https://github.com/zero-os/0-templates/pull/124.patch","issue_url":"https://api.github.com/repos/zero-os/0-templates/issues/124","number":124,"state":"open","locked":false,"title":"Zeroboot templates","user":{"login":"chrisvdg","id":23582741,"avatar_url":"https://avatars3.githubusercontent.com/u/23582741?v=4","gravatar_id":"","url":"https://api.github.com/users/chrisvdg","html_url":"https://github.com/chrisvdg","followers_url":"https://api.github.com/users/chrisvdg/followers","following_url":"https://api.github.com/users/chrisvdg/following{/other_user}","gists_url":"https://api.github.com/users/chrisvdg/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisvdg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisvdg/subscriptions","organizations_url":"https://api.github.com/users/chrisvdg/orgs","repos_url":"https://api.github.com/users/chrisvdg/repos","events_url":"https://api.github.com/users/chrisvdg/events{/privacy}","received_events_url":"https://api.github.com/users/chrisvdg/received_events","type":"User","site_admin":false},"body":"Adds templates for Zeroboot management and reservation\r\n\r\ncloses #102 \r\n\r\npart of story: https://docs.greenitglobe.com/gig/org_development/issues/57\r\n\r\nAll but the `zerotier_client` template mentioned [here](https://github.com/zero-os/0-templates/blob/zeroboot/docs/howto/zeroboot.md#overview-templates) are added in this PR","created_at":"2018-05-23T13:47:02Z","updated_at":"2018-05-24T09:47:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3a2e61470b3c463338303eb11cae76f75ee8cc53","assignee":{"login":"chrisvdg","id":23582741,"avatar_url":"https://avatars3.githubusercontent.com/u/23582741?v=4","gravatar_id":"","url":"https://api.github.com/users/chrisvdg","html_url":"https://github.com/chrisvdg","followers_url":"https://api.github.com/users/chrisvdg/followers","following_url":"https://api.github.com/users/chrisvdg/following{/other_user}","gists_url":"https://api.github.com/users/chrisvdg/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisvdg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisvdg/subscriptions","organizations_url":"https://api.github.com/users/chrisvdg/orgs","repos_url":"https://api.github.com/users/chrisvdg/repos","events_url":"https://api.github.com/users/chrisvdg/events{/privacy}","received_events_url":"https://api.github.com/users/chrisvdg/received_events","type":"User","site_admin":false},"assignees":[{"login":"chrisvdg","id":23582741,"avatar_url":"https://avatars3.githubusercontent.com/u/23582741?v=4","gravatar_id":"","url":"https://api.github.com/users/chrisvdg","html_url":"https://github.com/chrisvdg","followers_url":"https://api.github.com/users/chrisvdg/followers","following_url":"https://api.github.com/users/chrisvdg/following{/other_user}","gists_url":"https://api.github.com/users/chrisvdg/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisvdg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisvdg/subscriptions","organizations_url":"https://api.github.com/users/chrisvdg/orgs","repos_url":"https://api.github.com/users/chrisvdg/repos","events_url":"https://api.github.com/users/chrisvdg/events{/privacy}","received_events_url":"https://api.github.com/users/chrisvdg/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/zero-os/0-templates/pulls/124/commits","review_comments_url":"https://api.github.com/repos/zero-os/0-templates/pulls/124/comments","review_comment_url":"https://api.github.com/repos/zero-os/0-templates/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zero-os/0-templates/issues/124/comments","statuses_url":"https://api.github.com/repos/zero-os/0-templates/statuses/b19aee4891add7046131168873c4afe46cfc4a84","head":{"label":"zero-os:zeroboot","ref":"zeroboot","sha":"b19aee4891add7046131168873c4afe46cfc4a84","user":{"login":"zero-os","id":29012647,"avatar_url":"https://avatars0.githubusercontent.com/u/29012647?v=4","gravatar_id":"","url":"https://api.github.com/users/zero-os","html_url":"https://github.com/zero-os","followers_url":"https://api.github.com/users/zero-os/followers","following_url":"https://api.github.com/users/zero-os/following{/other_user}","gists_url":"https://api.github.com/users/zero-os/gists{/gist_id}","starred_url":"https://api.github.com/users/zero-os/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zero-os/subscriptions","organizations_url":"https://api.github.com/users/zero-os/orgs","repos_url":"https://api.github.com/users/zero-os/repos","events_url":"https://api.github.com/users/zero-os/events{/privacy}","received_events_url":"https://api.github.com/users/zero-os/received_events","type":"Organization","site_admin":false},"repo":{"id":119514188,"name":"0-templates","full_name":"zero-os/0-templates","owner":{"login":"zero-os","id":29012647,"avatar_url":"https://avatars0.githubusercontent.com/u/29012647?v=4","gravatar_id":"","url":"https://api.github.com/users/zero-os","html_url":"https://github.com/zero-os","followers_url":"https://api.github.com/users/zero-os/followers","following_url":"https://api.github.com/users/zero-os/following{/other_user}","gists_url":"https://api.github.com/users/zero-os/gists{/gist_id}","starred_url":"https://api.github.com/users/zero-os/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zero-os/subscriptions","organizations_url":"https://api.github.com/users/zero-os/orgs","repos_url":"https://api.github.com/users/zero-os/repos","events_url":"https://api.github.com/users/zero-os/events{/privacy}","received_events_url":"https://api.github.com/users/zero-os/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zero-os/0-templates","description":null,"fork":false,"url":"https://api.github.com/repos/zero-os/0-templates","forks_url":"https://api.github.com/repos/zero-os/0-templates/forks","keys_url":"https://api.github.com/repos/zero-os/0-templates/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zero-os/0-templates/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zero-os/0-templates/teams","hooks_url":"https://api.github.com/repos/zero-os/0-templates/hooks","issue_events_url":"https://api.github.com/repos/zero-os/0-templates/issues/events{/number}","events_url":"https://api.github.com/repos/zero-os/0-templates/events","assignees_url":"https://api.github.com/repos/zero-os/0-templates/assignees{/user}","branches_url":"https://api.github.com/repos/zero-os/0-templates/branches{/branch}","tags_url":"https://api.github.com/repos/zero-os/0-templates/tags","blobs_url":"https://api.github.com/repos/zero-os/0-templates/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zero-os/0-templates/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zero-os/0-templates/git/refs{/sha}","trees_url":"https://api.github.com/repos/zero-os/0-templates/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zero-os/0-templates/statuses/{sha}","languages_url":"https://api.github.com/repos/zero-os/0-templates/languages","stargazers_url":"https://api.github.com/repos/zero-os/0-templates/stargazers","contributors_url":"https://api.github.com/repos/zero-os/0-templates/contributors","subscribers_url":"https://api.github.com/repos/zero-os/0-templates/subscribers","subscription_url":"https://api.github.com/repos/zero-os/0-templates/subscription","commits_url":"https://api.github.com/repos/zero-os/0-templates/commits{/sha}","git_commits_url":"https://api.github.com/repos/zero-os/0-templates/git/commits{/sha}","comments_url":"https://api.github.com/repos/zero-os/0-templates/comments{/number}","issue_comment_url":"https://api.github.com/repos/zero-os/0-templates/issues/comments{/number}","contents_url":"https://api.github.com/repos/zero-os/0-templates/contents/{+path}","compare_url":"https://api.github.com/repos/zero-os/0-templates/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zero-os/0-templates/merges","archive_url":"https://api.github.com/repos/zero-os/0-templates/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zero-os/0-templates/downloads","issues_url":"https://api.github.com/repos/zero-os/0-templates/issues{/number}","pulls_url":"https://api.github.com/repos/zero-os/0-templates/pulls{/number}","milestones_url":"https://api.github.com/repos/zero-os/0-templates/milestones{/number}","notifications_url":"https://api.github.com/repos/zero-os/0-templates/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zero-os/0-templates/labels{/name}","releases_url":"https://api.github.com/repos/zero-os/0-templates/releases{/id}","deployments_url":"https://api.github.com/repos/zero-os/0-templates/deployments","created_at":"2018-01-30T09:33:57Z","updated_at":"2018-05-22T13:04:03Z","pushed_at":"2018-05-24T08:48:23Z","git_url":"git://github.com/zero-os/0-templates.git","ssh_url":"git@github.com:zero-os/0-templates.git","clone_url":"https://github.com/zero-os/0-templates.git","svn_url":"https://github.com/zero-os/0-templates","homepage":null,"size":334,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":15,"license":null,"forks":1,"open_issues":15,"watchers":0,"default_branch":"master"}},"base":{"label":"zero-os:master","ref":"master","sha":"01d35e4c6f0beda1b7fe7c6fefb1f06bd171f173","user":{"login":"zero-os","id":29012647,"avatar_url":"https://avatars0.githubusercontent.com/u/29012647?v=4","gravatar_id":"","url":"https://api.github.com/users/zero-os","html_url":"https://github.com/zero-os","followers_url":"https://api.github.com/users/zero-os/followers","following_url":"https://api.github.com/users/zero-os/following{/other_user}","gists_url":"https://api.github.com/users/zero-os/gists{/gist_id}","starred_url":"https://api.github.com/users/zero-os/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zero-os/subscriptions","organizations_url":"https://api.github.com/users/zero-os/orgs","repos_url":"https://api.github.com/users/zero-os/repos","events_url":"https://api.github.com/users/zero-os/events{/privacy}","received_events_url":"https://api.github.com/users/zero-os/received_events","type":"Organization","site_admin":false},"repo":{"id":119514188,"name":"0-templates","full_name":"zero-os/0-templates","owner":{"login":"zero-os","id":29012647,"avatar_url":"https://avatars0.githubusercontent.com/u/29012647?v=4","gravatar_id":"","url":"https://api.github.com/users/zero-os","html_url":"https://github.com/zero-os","followers_url":"https://api.github.com/users/zero-os/followers","following_url":"https://api.github.com/users/zero-os/following{/other_user}","gists_url":"https://api.github.com/users/zero-os/gists{/gist_id}","starred_url":"https://api.github.com/users/zero-os/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zero-os/subscriptions","organizations_url":"https://api.github.com/users/zero-os/orgs","repos_url":"https://api.github.com/users/zero-os/repos","events_url":"https://api.github.com/users/zero-os/events{/privacy}","received_events_url":"https://api.github.com/users/zero-os/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zero-os/0-templates","description":null,"fork":false,"url":"https://api.github.com/repos/zero-os/0-templates","forks_url":"https://api.github.com/repos/zero-os/0-templates/forks","keys_url":"https://api.github.com/repos/zero-os/0-templates/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zero-os/0-templates/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zero-os/0-templates/teams","hooks_url":"https://api.github.com/repos/zero-os/0-templates/hooks","issue_events_url":"https://api.github.com/repos/zero-os/0-templates/issues/events{/number}","events_url":"https://api.github.com/repos/zero-os/0-templates/events","assignees_url":"https://api.github.com/repos/zero-os/0-templates/assignees{/user}","branches_url":"https://api.github.com/repos/zero-os/0-templates/branches{/branch}","tags_url":"https://api.github.com/repos/zero-os/0-templates/tags","blobs_url":"https://api.github.com/repos/zero-os/0-templates/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zero-os/0-templates/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zero-os/0-templates/git/refs{/sha}","trees_url":"https://api.github.com/repos/zero-os/0-templates/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zero-os/0-templates/statuses/{sha}","languages_url":"https://api.github.com/repos/zero-os/0-templates/languages","stargazers_url":"https://api.github.com/repos/zero-os/0-templates/stargazers","contributors_url":"https://api.github.com/repos/zero-os/0-templates/contributors","subscribers_url":"https://api.github.com/repos/zero-os/0-templates/subscribers","subscription_url":"https://api.github.com/repos/zero-os/0-templates/subscription","commits_url":"https://api.github.com/repos/zero-os/0-templates/commits{/sha}","git_commits_url":"https://api.github.com/repos/zero-os/0-templates/git/commits{/sha}","comments_url":"https://api.github.com/repos/zero-os/0-templates/comments{/number}","issue_comment_url":"https://api.github.com/repos/zero-os/0-templates/issues/comments{/number}","contents_url":"https://api.github.com/repos/zero-os/0-templates/contents/{+path}","compare_url":"https://api.github.com/repos/zero-os/0-templates/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zero-os/0-templates/merges","archive_url":"https://api.github.com/repos/zero-os/0-templates/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zero-os/0-templates/downloads","issues_url":"https://api.github.com/repos/zero-os/0-templates/issues{/number}","pulls_url":"https://api.github.com/repos/zero-os/0-templates/pulls{/number}","milestones_url":"https://api.github.com/repos/zero-os/0-templates/milestones{/number}","notifications_url":"https://api.github.com/repos/zero-os/0-templates/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zero-os/0-templates/labels{/name}","releases_url":"https://api.github.com/repos/zero-os/0-templates/releases{/id}","deployments_url":"https://api.github.com/repos/zero-os/0-templates/deployments","created_at":"2018-01-30T09:33:57Z","updated_at":"2018-05-22T13:04:03Z","pushed_at":"2018-05-24T08:48:23Z","git_url":"git://github.com/zero-os/0-templates.git","ssh_url":"git@github.com:zero-os/0-templates.git","clone_url":"https://github.com/zero-os/0-templates.git","svn_url":"https://github.com/zero-os/0-templates","homepage":null,"size":334,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":15,"license":null,"forks":1,"open_issues":15,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zero-os/0-templates/pulls/124"},"html":{"href":"https://github.com/zero-os/0-templates/pull/124"},"issue":{"href":"https://api.github.com/repos/zero-os/0-templates/issues/124"},"comments":{"href":"https://api.github.com/repos/zero-os/0-templates/issues/124/comments"},"review_comments":{"href":"https://api.github.com/repos/zero-os/0-templates/pulls/124/comments"},"review_comment":{"href":"https://api.github.com/repos/zero-os/0-templates/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zero-os/0-templates/pulls/124/commits"},"statuses":{"href":"https://api.github.com/repos/zero-os/0-templates/statuses/b19aee4891add7046131168873c4afe46cfc4a84"}},"author_association":"NONE"}}
{"actor":{"display_login":"serboctor"}}