{"action":"created","comment":{"url":"https://api.github.com/repos/CCI-MOC/haas/pulls/comments/37492271","id":37492271,"diff_hunk":"@@ -0,0 +1,82 @@\n+# Copyright 2013-2014 Massachusetts Open Cloud Contributors\n+#\n+# Licensed under the Apache License, Version 2.0 (the \"License\");\n+# you may not use this file except in compliance with the\n+# License. You may obtain a copy of the License at\n+#\n+# http://www.apache.org/licenses/LICENSE-2.0\n+#\n+# Unless required by applicable law or agreed to in writing,\n+# software distributed under the License is distributed on an \"AS\n+# IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n+# express or implied. See the License for the specific language\n+# governing permissions and limitations under the License.\n+\n+\"\"\"\n+A obm driver for implementing lego robot based controls for \n+arm based servers on in a DC at North Pole :-)\n+\n+\"\"\"\n+\n+from sqlalchemy import Column, String, Integer, ForeignKey\n+import schema\n+\n+\n+from haas.model import Obm\n+from haas.errors import OBMError\n+from haas.dev_support import no_dry_run\n+\n+class Ipmi(Obm):\n+    id = Column(Integer, ForeignKey('obm.id'), primary_key=True)\n+    ipmi_host = Column(String, nullable=False) \n+    ipmi_user = Column(String, nullable=False)\n+    ipmi_password = Column(String, nullable=False)\n+\n+    api_name = 'http://schema.massopencloud.org/haas/v0/obm/ipmi'\n+    __mapper_args__ = {\n+        'polymorphic_identity': api_name,\n+        }\n+    @staticmethod\n+    def validate(kwargs):\n+        schema.Schema({\n+            'type': Ipmi.api_name,\n+            'ipmi_host': basestring,\n+            'ipmi_user': basestring,\n+            'ipmi_password': basestring,\n+            }).validate(kwargs)\n+\n+    def _ipmitool(self, args):\n+        \"\"\" Invoke ipmitool with the right host/pass etc. for this code.","path":"haas/ext/obm/ipmi.py","position":49,"original_position":49,"commit_id":"00dd609429be68a6c9af77a042374fbf737c35db","original_commit_id":"00dd609429be68a6c9af77a042374fbf737c35db","user":{"login":"zenhack","id":883774,"avatar_url":"https://avatars.githubusercontent.com/u/883774?v=3","gravatar_id":"","url":"https://api.github.com/users/zenhack","html_url":"https://github.com/zenhack","followers_url":"https://api.github.com/users/zenhack/followers","following_url":"https://api.github.com/users/zenhack/following{/other_user}","gists_url":"https://api.github.com/users/zenhack/gists{/gist_id}","starred_url":"https://api.github.com/users/zenhack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zenhack/subscriptions","organizations_url":"https://api.github.com/users/zenhack/orgs","repos_url":"https://api.github.com/users/zenhack/repos","events_url":"https://api.github.com/users/zenhack/events{/privacy}","received_events_url":"https://api.github.com/users/zenhack/received_events","type":"User","site_admin":false},"body":"s/code/node/\r\n\r\nAlso, scan over [PEP 257][1] and adjust the formatting of your docstrings accordingly; we follow the conventions described there.\r\n\r\n[1]: https://www.python.org/dev/peps/pep-0257/","created_at":"2015-08-20T03:30:32Z","updated_at":"2015-08-20T03:30:32Z","html_url":"https://github.com/CCI-MOC/haas/pull/484#discussion_r37492271","pull_request_url":"https://api.github.com/repos/CCI-MOC/haas/pulls/484","_links":{"self":{"href":"https://api.github.com/repos/CCI-MOC/haas/pulls/comments/37492271"},"html":{"href":"https://github.com/CCI-MOC/haas/pull/484#discussion_r37492271"},"pull_request":{"href":"https://api.github.com/repos/CCI-MOC/haas/pulls/484"}}},"pull_request":{"url":"https://api.github.com/repos/CCI-MOC/haas/pulls/484","id":42865387,"html_url":"https://github.com/CCI-MOC/haas/pull/484","diff_url":"https://github.com/CCI-MOC/haas/pull/484.diff","patch_url":"https://github.com/CCI-MOC/haas/pull/484.patch","issue_url":"https://api.github.com/repos/CCI-MOC/haas/issues/484","number":484,"state":"open","locked":false,"title":"OBM support for IPMI implemented.","user":{"login":"SahilTikale","id":2398718,"avatar_url":"https://avatars.githubusercontent.com/u/2398718?v=3","gravatar_id":"","url":"https://api.github.com/users/SahilTikale","html_url":"https://github.com/SahilTikale","followers_url":"https://api.github.com/users/SahilTikale/followers","following_url":"https://api.github.com/users/SahilTikale/following{/other_user}","gists_url":"https://api.github.com/users/SahilTikale/gists{/gist_id}","starred_url":"https://api.github.com/users/SahilTikale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SahilTikale/subscriptions","organizations_url":"https://api.github.com/users/SahilTikale/orgs","repos_url":"https://api.github.com/users/SahilTikale/repos","events_url":"https://api.github.com/users/SahilTikale/events{/privacy}","received_events_url":"https://api.github.com/users/SahilTikale/received_events","type":"User","site_admin":false},"body":"Following the 'drivertization' model, added OBM support for nodes.\r\nChanges are as follows:\r\n1. Necessary support is added to support various OBM types in the HaaS database schema\r\n2. Current types of OBM inlcude ipmi, haas(as an obm) and a lego robot driver (for variety of OBM driver)\r\n3. Nodes can be registered using the ipmi information using the api call\r\n4. Example of how to do that is included under examples/obm/insertNodes.command\r\n5. power_cycle method moved from Node to OBM and a specific type implemented under ipmi\r\n6. To ease the development process, automated scripts to start/stop haas servers is included\r\n\tunder 'examples/devel/' directory","created_at":"2015-08-19T21:18:44Z","updated_at":"2015-08-20T03:30:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7b302c0e812a685646c577f886f447ba26942f72","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/CCI-MOC/haas/pulls/484/commits","review_comments_url":"https://api.github.com/repos/CCI-MOC/haas/pulls/484/comments","review_comment_url":"https://api.github.com/repos/CCI-MOC/haas/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CCI-MOC/haas/issues/484/comments","statuses_url":"https://api.github.com/repos/CCI-MOC/haas/statuses/00dd609429be68a6c9af77a042374fbf737c35db","head":{"label":"SahilTikale:rHaaS-refactoring-work","ref":"rHaaS-refactoring-work","sha":"00dd609429be68a6c9af77a042374fbf737c35db","user":{"login":"SahilTikale","id":2398718,"avatar_url":"https://avatars.githubusercontent.com/u/2398718?v=3","gravatar_id":"","url":"https://api.github.com/users/SahilTikale","html_url":"https://github.com/SahilTikale","followers_url":"https://api.github.com/users/SahilTikale/followers","following_url":"https://api.github.com/users/SahilTikale/following{/other_user}","gists_url":"https://api.github.com/users/SahilTikale/gists{/gist_id}","starred_url":"https://api.github.com/users/SahilTikale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SahilTikale/subscriptions","organizations_url":"https://api.github.com/users/SahilTikale/orgs","repos_url":"https://api.github.com/users/SahilTikale/repos","events_url":"https://api.github.com/users/SahilTikale/events{/privacy}","received_events_url":"https://api.github.com/users/SahilTikale/received_events","type":"User","site_admin":false},"repo":{"id":35552937,"name":"haas","full_name":"SahilTikale/haas","owner":{"login":"SahilTikale","id":2398718,"avatar_url":"https://avatars.githubusercontent.com/u/2398718?v=3","gravatar_id":"","url":"https://api.github.com/users/SahilTikale","html_url":"https://github.com/SahilTikale","followers_url":"https://api.github.com/users/SahilTikale/followers","following_url":"https://api.github.com/users/SahilTikale/following{/other_user}","gists_url":"https://api.github.com/users/SahilTikale/gists{/gist_id}","starred_url":"https://api.github.com/users/SahilTikale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SahilTikale/subscriptions","organizations_url":"https://api.github.com/users/SahilTikale/orgs","repos_url":"https://api.github.com/users/SahilTikale/repos","events_url":"https://api.github.com/users/SahilTikale/events{/privacy}","received_events_url":"https://api.github.com/users/SahilTikale/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SahilTikale/haas","description":"","fork":true,"url":"https://api.github.com/repos/SahilTikale/haas","forks_url":"https://api.github.com/repos/SahilTikale/haas/forks","keys_url":"https://api.github.com/repos/SahilTikale/haas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SahilTikale/haas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SahilTikale/haas/teams","hooks_url":"https://api.github.com/repos/SahilTikale/haas/hooks","issue_events_url":"https://api.github.com/repos/SahilTikale/haas/issues/events{/number}","events_url":"https://api.github.com/repos/SahilTikale/haas/events","assignees_url":"https://api.github.com/repos/SahilTikale/haas/assignees{/user}","branches_url":"https://api.github.com/repos/SahilTikale/haas/branches{/branch}","tags_url":"https://api.github.com/repos/SahilTikale/haas/tags","blobs_url":"https://api.github.com/repos/SahilTikale/haas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SahilTikale/haas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SahilTikale/haas/git/refs{/sha}","trees_url":"https://api.github.com/repos/SahilTikale/haas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SahilTikale/haas/statuses/{sha}","languages_url":"https://api.github.com/repos/SahilTikale/haas/languages","stargazers_url":"https://api.github.com/repos/SahilTikale/haas/stargazers","contributors_url":"https://api.github.com/repos/SahilTikale/haas/contributors","subscribers_url":"https://api.github.com/repos/SahilTikale/haas/subscribers","subscription_url":"https://api.github.com/repos/SahilTikale/haas/subscription","commits_url":"https://api.github.com/repos/SahilTikale/haas/commits{/sha}","git_commits_url":"https://api.github.com/repos/SahilTikale/haas/git/commits{/sha}","comments_url":"https://api.github.com/repos/SahilTikale/haas/comments{/number}","issue_comment_url":"https://api.github.com/repos/SahilTikale/haas/issues/comments{/number}","contents_url":"https://api.github.com/repos/SahilTikale/haas/contents/{+path}","compare_url":"https://api.github.com/repos/SahilTikale/haas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SahilTikale/haas/merges","archive_url":"https://api.github.com/repos/SahilTikale/haas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SahilTikale/haas/downloads","issues_url":"https://api.github.com/repos/SahilTikale/haas/issues{/number}","pulls_url":"https://api.github.com/repos/SahilTikale/haas/pulls{/number}","milestones_url":"https://api.github.com/repos/SahilTikale/haas/milestones{/number}","notifications_url":"https://api.github.com/repos/SahilTikale/haas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SahilTikale/haas/labels{/name}","releases_url":"https://api.github.com/repos/SahilTikale/haas/releases{/id}","created_at":"2015-05-13T14:11:46Z","updated_at":"2015-05-13T14:11:47Z","pushed_at":"2015-08-19T21:33:23Z","git_url":"git://github.com/SahilTikale/haas.git","ssh_url":"git@github.com:SahilTikale/haas.git","clone_url":"https://github.com/SahilTikale/haas.git","svn_url":"https://github.com/SahilTikale/haas","homepage":null,"size":1183,"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":"CCI-MOC:master","ref":"master","sha":"efaec47a2828d0e04f541da3fec781d91df319ab","user":{"login":"CCI-MOC","id":3578683,"avatar_url":"https://avatars.githubusercontent.com/u/3578683?v=3","gravatar_id":"","url":"https://api.github.com/users/CCI-MOC","html_url":"https://github.com/CCI-MOC","followers_url":"https://api.github.com/users/CCI-MOC/followers","following_url":"https://api.github.com/users/CCI-MOC/following{/other_user}","gists_url":"https://api.github.com/users/CCI-MOC/gists{/gist_id}","starred_url":"https://api.github.com/users/CCI-MOC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CCI-MOC/subscriptions","organizations_url":"https://api.github.com/users/CCI-MOC/orgs","repos_url":"https://api.github.com/users/CCI-MOC/repos","events_url":"https://api.github.com/users/CCI-MOC/events{/privacy}","received_events_url":"https://api.github.com/users/CCI-MOC/received_events","type":"Organization","site_admin":false},"repo":{"id":16487339,"name":"haas","full_name":"CCI-MOC/haas","owner":{"login":"CCI-MOC","id":3578683,"avatar_url":"https://avatars.githubusercontent.com/u/3578683?v=3","gravatar_id":"","url":"https://api.github.com/users/CCI-MOC","html_url":"https://github.com/CCI-MOC","followers_url":"https://api.github.com/users/CCI-MOC/followers","following_url":"https://api.github.com/users/CCI-MOC/following{/other_user}","gists_url":"https://api.github.com/users/CCI-MOC/gists{/gist_id}","starred_url":"https://api.github.com/users/CCI-MOC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CCI-MOC/subscriptions","organizations_url":"https://api.github.com/users/CCI-MOC/orgs","repos_url":"https://api.github.com/users/CCI-MOC/repos","events_url":"https://api.github.com/users/CCI-MOC/events{/privacy}","received_events_url":"https://api.github.com/users/CCI-MOC/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CCI-MOC/haas","description":"","fork":false,"url":"https://api.github.com/repos/CCI-MOC/haas","forks_url":"https://api.github.com/repos/CCI-MOC/haas/forks","keys_url":"https://api.github.com/repos/CCI-MOC/haas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CCI-MOC/haas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CCI-MOC/haas/teams","hooks_url":"https://api.github.com/repos/CCI-MOC/haas/hooks","issue_events_url":"https://api.github.com/repos/CCI-MOC/haas/issues/events{/number}","events_url":"https://api.github.com/repos/CCI-MOC/haas/events","assignees_url":"https://api.github.com/repos/CCI-MOC/haas/assignees{/user}","branches_url":"https://api.github.com/repos/CCI-MOC/haas/branches{/branch}","tags_url":"https://api.github.com/repos/CCI-MOC/haas/tags","blobs_url":"https://api.github.com/repos/CCI-MOC/haas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CCI-MOC/haas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CCI-MOC/haas/git/refs{/sha}","trees_url":"https://api.github.com/repos/CCI-MOC/haas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CCI-MOC/haas/statuses/{sha}","languages_url":"https://api.github.com/repos/CCI-MOC/haas/languages","stargazers_url":"https://api.github.com/repos/CCI-MOC/haas/stargazers","contributors_url":"https://api.github.com/repos/CCI-MOC/haas/contributors","subscribers_url":"https://api.github.com/repos/CCI-MOC/haas/subscribers","subscription_url":"https://api.github.com/repos/CCI-MOC/haas/subscription","commits_url":"https://api.github.com/repos/CCI-MOC/haas/commits{/sha}","git_commits_url":"https://api.github.com/repos/CCI-MOC/haas/git/commits{/sha}","comments_url":"https://api.github.com/repos/CCI-MOC/haas/comments{/number}","issue_comment_url":"https://api.github.com/repos/CCI-MOC/haas/issues/comments{/number}","contents_url":"https://api.github.com/repos/CCI-MOC/haas/contents/{+path}","compare_url":"https://api.github.com/repos/CCI-MOC/haas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CCI-MOC/haas/merges","archive_url":"https://api.github.com/repos/CCI-MOC/haas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CCI-MOC/haas/downloads","issues_url":"https://api.github.com/repos/CCI-MOC/haas/issues{/number}","pulls_url":"https://api.github.com/repos/CCI-MOC/haas/pulls{/number}","milestones_url":"https://api.github.com/repos/CCI-MOC/haas/milestones{/number}","notifications_url":"https://api.github.com/repos/CCI-MOC/haas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CCI-MOC/haas/labels{/name}","releases_url":"https://api.github.com/repos/CCI-MOC/haas/releases{/id}","created_at":"2014-02-03T17:48:01Z","updated_at":"2015-05-14T22:15:54Z","pushed_at":"2015-08-19T21:33:24Z","git_url":"git://github.com/CCI-MOC/haas.git","ssh_url":"git@github.com:CCI-MOC/haas.git","clone_url":"https://github.com/CCI-MOC/haas.git","svn_url":"https://github.com/CCI-MOC/haas","homepage":null,"size":5697,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":105,"forks":20,"open_issues":105,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CCI-MOC/haas/pulls/484"},"html":{"href":"https://github.com/CCI-MOC/haas/pull/484"},"issue":{"href":"https://api.github.com/repos/CCI-MOC/haas/issues/484"},"comments":{"href":"https://api.github.com/repos/CCI-MOC/haas/issues/484/comments"},"review_comments":{"href":"https://api.github.com/repos/CCI-MOC/haas/pulls/484/comments"},"review_comment":{"href":"https://api.github.com/repos/CCI-MOC/haas/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CCI-MOC/haas/pulls/484/commits"},"statuses":{"href":"https://api.github.com/repos/CCI-MOC/haas/statuses/00dd609429be68a6c9af77a042374fbf737c35db"}}}}