{"action":"created","comment":{"url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/pulls/comments/67159693","id":67159693,"diff_hunk":"@@ -0,0 +1,99 @@\n+# -*- coding: utf-8 -*-\n+###\n+# (C) Copyright (2012-2016) Hewlett Packard Enterprise Development LP\n+#\n+# Permission is hereby granted, free of charge, to any person obtaining a copy\n+# of this software and associated documentation files (the \"Software\"), to deal\n+# in the Software without restriction, including without limitation the rights\n+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n+# copies of the Software, and to permit persons to whom the Software is\n+# furnished to do so, subject to the following conditions:\n+#\n+# The above copyright notice and this permission notice shall be included in\n+# all copies or substantial portions of the Software.\n+#\n+# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n+# THE SOFTWARE.\n+###\n+\n+from __future__ import absolute_import\n+from __future__ import division\n+from __future__ import print_function\n+from __future__ import unicode_literals\n+\n+from future import standard_library\n+\n+standard_library.install_aliases()\n+\n+__title__ = 'Interconnect Types'\n+__version__ = '0.0.1'\n+__copyright__ = '(C) Copyright (2012-2016) Hewlett Packard Enterprise ' \\\n+                ' Development LP'\n+__license__ = 'MIT'\n+__status__ = 'Development'\n+\n+from hpOneView.resources.resource import ResourceClient\n+\n+\n+class InterconnectTypes(object):\n+    URI = '/rest/interconnect-types'\n+\n+    def __init__(self, con):\n+        self._connection = con\n+        self._client = ResourceClient(con, self.URI)\n+\n+    def get_all(self, start=0, count=-1, filter='', sort=''):\n+        \"\"\"\n+        Gets a paginated collection of all interconnect types based on the specified parameters.\n+        Filters can be used in the URL to control the number of interconnect types that are returned.\n+        With no filters specified, the API returns all interconnect types.\n+\n+        Args:\n+            start:\n+                The first item to return, using 0-based indexing.\n+                If not specified, the default is 0 - start with the first available item.\n+            count:\n+                The number of resources to return. A count of -1 requests all the items.\n+                The actual number of items in the response may differ from the requested\n+                count if the sum of start and count exceed the total number of items, or\n+                if returning the requested number of items would take too long.\n+            filter:\n+                A general filter/query string to narrow the list of items returned. The\n+                default is no filter - all resources are returned.\n+            sort:\n+                The sort order of the returned data set. By default, the sort order is based\n+                on create time, with the oldest entry first.\n+\n+        Returns: dict\n+\n+        \"\"\"\n+        return self._client.get_all(start, count, filter=filter, sort=sort)\n+\n+    def get(self, id):","path":"hpOneView/resources/networking/interconnect_types.py","position":77,"original_position":77,"commit_id":"8f75e618cf4c3603cfead2b2838cb13b73a72d21","original_commit_id":"8f75e618cf4c3603cfead2b2838cb13b73a72d21","user":{"login":"balestrinc","id":1029844,"avatar_url":"https://avatars.githubusercontent.com/u/1029844?v=3","gravatar_id":"","url":"https://api.github.com/users/balestrinc","html_url":"https://github.com/balestrinc","followers_url":"https://api.github.com/users/balestrinc/followers","following_url":"https://api.github.com/users/balestrinc/following{/other_user}","gists_url":"https://api.github.com/users/balestrinc/gists{/gist_id}","starred_url":"https://api.github.com/users/balestrinc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/balestrinc/subscriptions","organizations_url":"https://api.github.com/users/balestrinc/orgs","repos_url":"https://api.github.com/users/balestrinc/repos","events_url":"https://api.github.com/users/balestrinc/events{/privacy}","received_events_url":"https://api.github.com/users/balestrinc/received_events","type":"User","site_admin":false},"body":"I suggest accept either the ID or the URI of the resource in the methods like this, that  need a resource reference. \r\n(E.g.:  'e28949fa-8681-433d-9808-a9146feb8048' or '/rest/interconnect-types/28949fa-8681-433d-9808-a9146feb8048')\r\nWe started use this recently (look to networking/logical_interconnect_groups.py), after notice that the created resouces do not have an attribute 'id', however they have an attribute 'uri' that is the reference to the resource.\r\n","created_at":"2016-06-15T13:22:50Z","updated_at":"2016-06-15T13:22:50Z","html_url":"https://github.com/HewlettPackard/python-hpOneView/pull/80#discussion_r67159693","pull_request_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/pulls/80","_links":{"self":{"href":"https://api.github.com/repos/HewlettPackard/python-hpOneView/pulls/comments/67159693"},"html":{"href":"https://github.com/HewlettPackard/python-hpOneView/pull/80#discussion_r67159693"},"pull_request":{"href":"https://api.github.com/repos/HewlettPackard/python-hpOneView/pulls/80"}}},"pull_request":{"url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/pulls/80","id":73821309,"html_url":"https://github.com/HewlettPackard/python-hpOneView/pull/80","diff_url":"https://github.com/HewlettPackard/python-hpOneView/pull/80.diff","patch_url":"https://github.com/HewlettPackard/python-hpOneView/pull/80.patch","issue_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/issues/80","number":80,"state":"open","locked":false,"title":"Adds support for interconnect types","user":{"login":"andreadean5","id":12565654,"avatar_url":"https://avatars.githubusercontent.com/u/12565654?v=3","gravatar_id":"","url":"https://api.github.com/users/andreadean5","html_url":"https://github.com/andreadean5","followers_url":"https://api.github.com/users/andreadean5/followers","following_url":"https://api.github.com/users/andreadean5/following{/other_user}","gists_url":"https://api.github.com/users/andreadean5/gists{/gist_id}","starred_url":"https://api.github.com/users/andreadean5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreadean5/subscriptions","organizations_url":"https://api.github.com/users/andreadean5/orgs","repos_url":"https://api.github.com/users/andreadean5/repos","events_url":"https://api.github.com/users/andreadean5/events{/privacy}","received_events_url":"https://api.github.com/users/andreadean5/received_events","type":"User","site_admin":false},"body":"Adds support for interconnect types (and fixes name of switch types test)","created_at":"2016-06-14T22:00:11Z","updated_at":"2016-06-15T13:22:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1f61befad480af713d5299de0857af29709eca5d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/pulls/80/commits","review_comments_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/pulls/80/comments","review_comment_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/pulls/comments{/number}","comments_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/issues/80/comments","statuses_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/statuses/8f75e618cf4c3603cfead2b2838cb13b73a72d21","head":{"label":"andreadean5:master","ref":"master","sha":"8f75e618cf4c3603cfead2b2838cb13b73a72d21","user":{"login":"andreadean5","id":12565654,"avatar_url":"https://avatars.githubusercontent.com/u/12565654?v=3","gravatar_id":"","url":"https://api.github.com/users/andreadean5","html_url":"https://github.com/andreadean5","followers_url":"https://api.github.com/users/andreadean5/followers","following_url":"https://api.github.com/users/andreadean5/following{/other_user}","gists_url":"https://api.github.com/users/andreadean5/gists{/gist_id}","starred_url":"https://api.github.com/users/andreadean5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreadean5/subscriptions","organizations_url":"https://api.github.com/users/andreadean5/orgs","repos_url":"https://api.github.com/users/andreadean5/repos","events_url":"https://api.github.com/users/andreadean5/events{/privacy}","received_events_url":"https://api.github.com/users/andreadean5/received_events","type":"User","site_admin":false},"repo":{"id":60856134,"name":"python-hpOneView","full_name":"andreadean5/python-hpOneView","owner":{"login":"andreadean5","id":12565654,"avatar_url":"https://avatars.githubusercontent.com/u/12565654?v=3","gravatar_id":"","url":"https://api.github.com/users/andreadean5","html_url":"https://github.com/andreadean5","followers_url":"https://api.github.com/users/andreadean5/followers","following_url":"https://api.github.com/users/andreadean5/following{/other_user}","gists_url":"https://api.github.com/users/andreadean5/gists{/gist_id}","starred_url":"https://api.github.com/users/andreadean5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreadean5/subscriptions","organizations_url":"https://api.github.com/users/andreadean5/orgs","repos_url":"https://api.github.com/users/andreadean5/repos","events_url":"https://api.github.com/users/andreadean5/events{/privacy}","received_events_url":"https://api.github.com/users/andreadean5/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andreadean5/python-hpOneView","description":"Python library for HPE OneView","fork":true,"url":"https://api.github.com/repos/andreadean5/python-hpOneView","forks_url":"https://api.github.com/repos/andreadean5/python-hpOneView/forks","keys_url":"https://api.github.com/repos/andreadean5/python-hpOneView/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andreadean5/python-hpOneView/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andreadean5/python-hpOneView/teams","hooks_url":"https://api.github.com/repos/andreadean5/python-hpOneView/hooks","issue_events_url":"https://api.github.com/repos/andreadean5/python-hpOneView/issues/events{/number}","events_url":"https://api.github.com/repos/andreadean5/python-hpOneView/events","assignees_url":"https://api.github.com/repos/andreadean5/python-hpOneView/assignees{/user}","branches_url":"https://api.github.com/repos/andreadean5/python-hpOneView/branches{/branch}","tags_url":"https://api.github.com/repos/andreadean5/python-hpOneView/tags","blobs_url":"https://api.github.com/repos/andreadean5/python-hpOneView/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andreadean5/python-hpOneView/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andreadean5/python-hpOneView/git/refs{/sha}","trees_url":"https://api.github.com/repos/andreadean5/python-hpOneView/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andreadean5/python-hpOneView/statuses/{sha}","languages_url":"https://api.github.com/repos/andreadean5/python-hpOneView/languages","stargazers_url":"https://api.github.com/repos/andreadean5/python-hpOneView/stargazers","contributors_url":"https://api.github.com/repos/andreadean5/python-hpOneView/contributors","subscribers_url":"https://api.github.com/repos/andreadean5/python-hpOneView/subscribers","subscription_url":"https://api.github.com/repos/andreadean5/python-hpOneView/subscription","commits_url":"https://api.github.com/repos/andreadean5/python-hpOneView/commits{/sha}","git_commits_url":"https://api.github.com/repos/andreadean5/python-hpOneView/git/commits{/sha}","comments_url":"https://api.github.com/repos/andreadean5/python-hpOneView/comments{/number}","issue_comment_url":"https://api.github.com/repos/andreadean5/python-hpOneView/issues/comments{/number}","contents_url":"https://api.github.com/repos/andreadean5/python-hpOneView/contents/{+path}","compare_url":"https://api.github.com/repos/andreadean5/python-hpOneView/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andreadean5/python-hpOneView/merges","archive_url":"https://api.github.com/repos/andreadean5/python-hpOneView/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andreadean5/python-hpOneView/downloads","issues_url":"https://api.github.com/repos/andreadean5/python-hpOneView/issues{/number}","pulls_url":"https://api.github.com/repos/andreadean5/python-hpOneView/pulls{/number}","milestones_url":"https://api.github.com/repos/andreadean5/python-hpOneView/milestones{/number}","notifications_url":"https://api.github.com/repos/andreadean5/python-hpOneView/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andreadean5/python-hpOneView/labels{/name}","releases_url":"https://api.github.com/repos/andreadean5/python-hpOneView/releases{/id}","deployments_url":"https://api.github.com/repos/andreadean5/python-hpOneView/deployments","created_at":"2016-06-10T15:02:10Z","updated_at":"2016-06-10T15:02:11Z","pushed_at":"2016-06-14T21:58:53Z","git_url":"git://github.com/andreadean5/python-hpOneView.git","ssh_url":"git@github.com:andreadean5/python-hpOneView.git","clone_url":"https://github.com/andreadean5/python-hpOneView.git","svn_url":"https://github.com/andreadean5/python-hpOneView","homepage":"http://www.hpe.com/info/oneview","size":1361,"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":"HewlettPackard:master","ref":"master","sha":"7f10a0399502f3a199cd6f866f62e556d1e71684","user":{"login":"HewlettPackard","id":6004705,"avatar_url":"https://avatars.githubusercontent.com/u/6004705?v=3","gravatar_id":"","url":"https://api.github.com/users/HewlettPackard","html_url":"https://github.com/HewlettPackard","followers_url":"https://api.github.com/users/HewlettPackard/followers","following_url":"https://api.github.com/users/HewlettPackard/following{/other_user}","gists_url":"https://api.github.com/users/HewlettPackard/gists{/gist_id}","starred_url":"https://api.github.com/users/HewlettPackard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HewlettPackard/subscriptions","organizations_url":"https://api.github.com/users/HewlettPackard/orgs","repos_url":"https://api.github.com/users/HewlettPackard/repos","events_url":"https://api.github.com/users/HewlettPackard/events{/privacy}","received_events_url":"https://api.github.com/users/HewlettPackard/received_events","type":"Organization","site_admin":false},"repo":{"id":14697221,"name":"python-hpOneView","full_name":"HewlettPackard/python-hpOneView","owner":{"login":"HewlettPackard","id":6004705,"avatar_url":"https://avatars.githubusercontent.com/u/6004705?v=3","gravatar_id":"","url":"https://api.github.com/users/HewlettPackard","html_url":"https://github.com/HewlettPackard","followers_url":"https://api.github.com/users/HewlettPackard/followers","following_url":"https://api.github.com/users/HewlettPackard/following{/other_user}","gists_url":"https://api.github.com/users/HewlettPackard/gists{/gist_id}","starred_url":"https://api.github.com/users/HewlettPackard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HewlettPackard/subscriptions","organizations_url":"https://api.github.com/users/HewlettPackard/orgs","repos_url":"https://api.github.com/users/HewlettPackard/repos","events_url":"https://api.github.com/users/HewlettPackard/events{/privacy}","received_events_url":"https://api.github.com/users/HewlettPackard/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/HewlettPackard/python-hpOneView","description":"Python library for HPE OneView","fork":false,"url":"https://api.github.com/repos/HewlettPackard/python-hpOneView","forks_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/forks","keys_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/teams","hooks_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/hooks","issue_events_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/issues/events{/number}","events_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/events","assignees_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/assignees{/user}","branches_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/branches{/branch}","tags_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/tags","blobs_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/git/refs{/sha}","trees_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/statuses/{sha}","languages_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/languages","stargazers_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/stargazers","contributors_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/contributors","subscribers_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/subscribers","subscription_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/subscription","commits_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/commits{/sha}","git_commits_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/git/commits{/sha}","comments_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/comments{/number}","issue_comment_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/issues/comments{/number}","contents_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/contents/{+path}","compare_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/merges","archive_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/downloads","issues_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/issues{/number}","pulls_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/pulls{/number}","milestones_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/milestones{/number}","notifications_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/labels{/name}","releases_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/releases{/id}","deployments_url":"https://api.github.com/repos/HewlettPackard/python-hpOneView/deployments","created_at":"2013-11-25T20:18:55Z","updated_at":"2016-06-11T01:07:12Z","pushed_at":"2016-06-14T22:00:11Z","git_url":"git://github.com/HewlettPackard/python-hpOneView.git","ssh_url":"git@github.com:HewlettPackard/python-hpOneView.git","clone_url":"https://github.com/HewlettPackard/python-hpOneView.git","svn_url":"https://github.com/HewlettPackard/python-hpOneView","homepage":"http://www.hpe.com/info/oneview","size":1382,"stargazers_count":39,"watchers_count":39,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":5,"forks":30,"open_issues":5,"watchers":39,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/HewlettPackard/python-hpOneView/pulls/80"},"html":{"href":"https://github.com/HewlettPackard/python-hpOneView/pull/80"},"issue":{"href":"https://api.github.com/repos/HewlettPackard/python-hpOneView/issues/80"},"comments":{"href":"https://api.github.com/repos/HewlettPackard/python-hpOneView/issues/80/comments"},"review_comments":{"href":"https://api.github.com/repos/HewlettPackard/python-hpOneView/pulls/80/comments"},"review_comment":{"href":"https://api.github.com/repos/HewlettPackard/python-hpOneView/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/HewlettPackard/python-hpOneView/pulls/80/commits"},"statuses":{"href":"https://api.github.com/repos/HewlettPackard/python-hpOneView/statuses/8f75e618cf4c3603cfead2b2838cb13b73a72d21"}}}}
{"actor":{"display_login":"balestrinc"}}