)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"6ddd3a185364bdbb0f3e60256c0bebbdf62d79d8","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Extend client to add Connections"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Added functions and auxiliary functions to help implement"},{"line_number":10,"context_line":"functionality to add connections in a server profile"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: Ie09f73f05ec76bd0c5441a103cd2398164be46c9"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9a061dce_f8b209e4","line":9,"updated":"2016-04-06 20:04:23.000000000","message":"Please keep this in present or imperative tense.","commit_id":"5505162235f35a913c18c9a6d8fb96119abc661e"}],"oneview_client/client.py":[{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"6ddd3a185364bdbb0f3e60256c0bebbdf62d79d8","unresolved":false,"context_lines":[{"line_number":45,"context_line":"SERVER_PROFILE_PREFIX_URI \u003d \u0027/rest/server-profiles/\u0027"},{"line_number":46,"context_line":"NETWORK_PREFIX_URI \u003d \u0027/rest/ethernet-networks/\u0027"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"FIRT_PORT_ID \u003d \u0027Flb 1:1-a\u0027"},{"line_number":49,"context_line":"SECOND_PORT_ID \u003d \u0027Flb 1:2-a\u0027"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_97bc8007","line":48,"updated":"2016-04-06 20:04:23.000000000","message":"typo","commit_id":"5505162235f35a913c18c9a6d8fb96119abc661e"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"6ddd3a185364bdbb0f3e60256c0bebbdf62d79d8","unresolved":false,"context_lines":[{"line_number":46,"context_line":"NETWORK_PREFIX_URI \u003d \u0027/rest/ethernet-networks/\u0027"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"FIRT_PORT_ID \u003d \u0027Flb 1:1-a\u0027"},{"line_number":49,"context_line":"SECOND_PORT_ID \u003d \u0027Flb 1:2-a\u0027"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"def _get_oneview_resource_uuid_from_resource_uri(uri):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_bd888372","line":49,"updated":"2016-04-06 20:04:23.000000000","message":"What is the point in keeping these ID values here? I couldn\u0027t find them in the API documentation.","commit_id":"5505162235f35a913c18c9a6d8fb96119abc661e"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"6ddd3a185364bdbb0f3e60256c0bebbdf62d79d8","unresolved":false,"context_lines":[{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    # --- Connection ---"},{"line_number":147,"context_line":"    def add_connection_to_server_profile("},{"line_number":148,"context_line":"        self, server_profile_uuid, network_uuid, priority, portId,"},{"line_number":149,"context_line":"        functionType"},{"line_number":150,"context_line":"    ):"},{"line_number":151,"context_line":"        server_profile_uri \u003d _get_oneview_resource_uri_from_resource_uuid("}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_120a3e79","line":148,"updated":"2016-04-06 20:04:23.000000000","message":"s/priority/boot_priority/\ns/portId/port_id/","commit_id":"5505162235f35a913c18c9a6d8fb96119abc661e"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"6ddd3a185364bdbb0f3e60256c0bebbdf62d79d8","unresolved":false,"context_lines":[{"line_number":146,"context_line":"    # --- Connection ---"},{"line_number":147,"context_line":"    def add_connection_to_server_profile("},{"line_number":148,"context_line":"        self, server_profile_uuid, network_uuid, priority, portId,"},{"line_number":149,"context_line":"        functionType"},{"line_number":150,"context_line":"    ):"},{"line_number":151,"context_line":"        server_profile_uri \u003d _get_oneview_resource_uri_from_resource_uuid("},{"line_number":152,"context_line":"            SERVER_PROFILE_PREFIX_URI, server_profile_uuid)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_129d1e0a","line":149,"updated":"2016-04-06 20:04:23.000000000","message":"s/functionType/function_type/","commit_id":"5505162235f35a913c18c9a6d8fb96119abc661e"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"6ddd3a185364bdbb0f3e60256c0bebbdf62d79d8","unresolved":false,"context_lines":[{"line_number":156,"context_line":"            server_profile_uuid)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        connections \u003d [{"},{"line_number":159,"context_line":"            \"functionType\": functionType,"},{"line_number":160,"context_line":"            \"portId\": portId,"},{"line_number":161,"context_line":"            \"networkUri\": network_uri,"},{"line_number":162,"context_line":"            \"boot\": {"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_9dbc9f07","line":159,"updated":"2016-04-06 20:04:23.000000000","message":"function_type seems to deserve constants defined in the beginning of the file","commit_id":"5505162235f35a913c18c9a6d8fb96119abc661e"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"6ddd3a185364bdbb0f3e60256c0bebbdf62d79d8","unresolved":false,"context_lines":[{"line_number":160,"context_line":"            \"portId\": portId,"},{"line_number":161,"context_line":"            \"networkUri\": network_uri,"},{"line_number":162,"context_line":"            \"boot\": {"},{"line_number":163,"context_line":"                \"priority\": priority"},{"line_number":164,"context_line":"            }"},{"line_number":165,"context_line":"        }]"},{"line_number":166,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_3d4ab326","line":163,"updated":"2016-04-06 20:04:23.000000000","message":"boot_priority seems to deserve constants defined in the beginning of the file.","commit_id":"5505162235f35a913c18c9a6d8fb96119abc661e"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"6ddd3a185364bdbb0f3e60256c0bebbdf62d79d8","unresolved":false,"context_lines":[{"line_number":174,"context_line":"                server_profile_obj.server_hardware_type_uri,"},{"line_number":175,"context_line":"            \"enclosureGroupUri\": server_profile_obj.enclosure_group_uri,"},{"line_number":176,"context_line":"            \"eTag\": server_profile_obj.e_tag,"},{"line_number":177,"context_line":"            \"connections\": connections"},{"line_number":178,"context_line":"        }"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        task \u003d self._prepare_and_do_request("}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_927f6eaa","line":177,"updated":"2016-04-06 20:04:23.000000000","message":"If this adds a connection, shouldn\u0027t it reuse the previous connection set?","commit_id":"5505162235f35a913c18c9a6d8fb96119abc661e"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"6ddd3a185364bdbb0f3e60256c0bebbdf62d79d8","unresolved":false,"context_lines":[{"line_number":175,"context_line":"            \"enclosureGroupUri\": server_profile_obj.enclosure_group_uri,"},{"line_number":176,"context_line":"            \"eTag\": server_profile_obj.e_tag,"},{"line_number":177,"context_line":"            \"connections\": connections"},{"line_number":178,"context_line":"        }"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        task \u003d self._prepare_and_do_request("},{"line_number":181,"context_line":"            uri\u003dserver_profile_uri, body\u003dserver_profile_update_json,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_1d07ef18","line":178,"updated":"2016-04-06 20:04:23.000000000","message":"Please use server_profile.to_oneview_dict() instead.","commit_id":"5505162235f35a913c18c9a6d8fb96119abc661e"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"6ddd3a185364bdbb0f3e60256c0bebbdf62d79d8","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        task_completed \u003d self._wait_for_task_to_complete(task)"},{"line_number":185,"context_line":"        return task_completed.get(\u0027associatedResource\u0027).get(\u0027resourceUri\u0027)"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    def add_primary_connection_to_server_profile("},{"line_number":188,"context_line":"        self, server_profile_uuid, network_uuid"},{"line_number":189,"context_line":"    ):"},{"line_number":190,"context_line":"        portId \u003d self.get_next_available_port_id(server_profile_uuid)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_f8596936","line":187,"updated":"2016-04-06 20:04:23.000000000","message":"add_primary_ethernet_connection_to_server_profile","commit_id":"5505162235f35a913c18c9a6d8fb96119abc661e"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"6ddd3a185364bdbb0f3e60256c0bebbdf62d79d8","unresolved":false,"context_lines":[{"line_number":189,"context_line":"    ):"},{"line_number":190,"context_line":"        portId \u003d self.get_next_available_port_id(server_profile_uuid)"},{"line_number":191,"context_line":"        if portId is None:"},{"line_number":192,"context_line":"            raise exceptions.OneViewResponseNoPortsAvailablesError()"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"        self.add_connection_to_server_profile("},{"line_number":195,"context_line":"            server_profile_uuid, network_uuid, priority\u003d\u0027Primary\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_b87a5186","line":192,"updated":"2016-04-06 20:04:23.000000000","message":"OneView didn\u0027t actually respond that. This exception is misleading. Please use a better name.","commit_id":"5505162235f35a913c18c9a6d8fb96119abc661e"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"6ddd3a185364bdbb0f3e60256c0bebbdf62d79d8","unresolved":false,"context_lines":[{"line_number":195,"context_line":"            server_profile_uuid, network_uuid, priority\u003d\u0027Primary\u0027,"},{"line_number":196,"context_line":"            portId\u003dportId, functionType\u003d\u0027Ethernet\u0027)"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"    def is_there_any_primary_connection_in_server_profile("},{"line_number":199,"context_line":"        self, server_profile_uuid"},{"line_number":200,"context_line":"    ):"},{"line_number":201,"context_line":"        server_profile_obj \u003d self.get_server_profile_by_uuid("}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_7de0ab96","line":198,"updated":"2016-04-06 20:04:23.000000000","message":"This can be implemented in the ServerProfile class itself.","commit_id":"5505162235f35a913c18c9a6d8fb96119abc661e"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"6ddd3a185364bdbb0f3e60256c0bebbdf62d79d8","unresolved":false,"context_lines":[{"line_number":210,"context_line":""},{"line_number":211,"context_line":"        return False"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"    def is_port_id_used_in_server_profile(self, port_id, server_profile_uuid):"},{"line_number":214,"context_line":"        server_profile_obj \u003d self.get_server_profile_by_uuid("},{"line_number":215,"context_line":"            server_profile_uuid"},{"line_number":216,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_fdd31bd3","line":213,"updated":"2016-04-06 20:04:23.000000000","message":"This can be implemented in the ServerProfile class itself.","commit_id":"5505162235f35a913c18c9a6d8fb96119abc661e"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"6ddd3a185364bdbb0f3e60256c0bebbdf62d79d8","unresolved":false,"context_lines":[{"line_number":219,"context_line":"                return True"},{"line_number":220,"context_line":"        return False"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"    def get_next_available_port_id(self, server_profile_uuid):"},{"line_number":223,"context_line":"        if self.is_there_any_primary_connection_in_server_profile("},{"line_number":224,"context_line":"           server_profile_uuid):"},{"line_number":225,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_7dfeebae","line":222,"updated":"2016-04-06 20:04:23.000000000","message":"It seems like this method should...\n\n\"Use /rest/server-profiles/profile-ports to retrieve the list of available ports.\"\n\nhttp://h17007.www1.hpe.com/docs/enterprise/servers/oneview2.0/cic-api/en/api-docs/current/index.html#rest/server-profiles","commit_id":"5505162235f35a913c18c9a6d8fb96119abc661e"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"6ddd3a185364bdbb0f3e60256c0bebbdf62d79d8","unresolved":false,"context_lines":[{"line_number":222,"context_line":"    def get_next_available_port_id(self, server_profile_uuid):"},{"line_number":223,"context_line":"        if self.is_there_any_primary_connection_in_server_profile("},{"line_number":224,"context_line":"           server_profile_uuid):"},{"line_number":225,"context_line":"            return None"},{"line_number":226,"context_line":"        if not self.is_port_id_used_in_server_profile("},{"line_number":227,"context_line":"           FIRT_PORT_ID, server_profile_uuid):"},{"line_number":228,"context_line":"            return FIRT_PORT_ID"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_dd7a97f0","line":225,"updated":"2016-04-06 20:04:23.000000000","message":"Does the profile having a primary connection make all other ports unavailable?","commit_id":"5505162235f35a913c18c9a6d8fb96119abc661e"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"f335bc6e765c06937ddf1d508ceb6bc6100c6e3c","unresolved":false,"context_lines":[{"line_number":43,"context_line":"SERVER_HARDWARE_PREFIX_URI \u003d \u0027/rest/server-hardware/\u0027"},{"line_number":44,"context_line":"SERVER_PROFILE_TEMPLATE_PREFIX_URI \u003d \u0027/rest/server-profile-templates/\u0027"},{"line_number":45,"context_line":"SERVER_PROFILE_PREFIX_URI \u003d \u0027/rest/server-profiles/\u0027"},{"line_number":46,"context_line":"SERVER_PROFILE_PREFIX_URI \u003d \u0027/rest/server-profiles/\u0027"},{"line_number":47,"context_line":"NETWORK_PREFIX_URI \u003d \u0027/rest/ethernet-networks/\u0027"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"FIRST_PORT_ID \u003d \u0027Flb 1:1-a\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a061dce_e102e3b3","line":46,"updated":"2016-04-08 15:51:00.000000000","message":"Line repeated","commit_id":"1cd4c031a826a0c5376984428e1344a1251190f4"},{"author":{"_account_id":10765,"name":"Andre Aranha","email":"afaranha@lsd.ufcg.edu.br","username":"afaranha"},"change_message_id":"ce7667eaa3c8151a4feb6afb46f338a751f9be72","unresolved":false,"context_lines":[{"line_number":43,"context_line":"SERVER_HARDWARE_PREFIX_URI \u003d \u0027/rest/server-hardware/\u0027"},{"line_number":44,"context_line":"SERVER_PROFILE_TEMPLATE_PREFIX_URI \u003d \u0027/rest/server-profile-templates/\u0027"},{"line_number":45,"context_line":"SERVER_PROFILE_PREFIX_URI \u003d \u0027/rest/server-profiles/\u0027"},{"line_number":46,"context_line":"SERVER_PROFILE_PREFIX_URI \u003d \u0027/rest/server-profiles/\u0027"},{"line_number":47,"context_line":"NETWORK_PREFIX_URI \u003d \u0027/rest/ethernet-networks/\u0027"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"FIRST_PORT_ID \u003d \u0027Flb 1:1-a\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_dee807e5","line":46,"in_reply_to":"9a061dce_e102e3b3","updated":"2016-04-13 19:29:19.000000000","message":"Done","commit_id":"1cd4c031a826a0c5376984428e1344a1251190f4"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"f335bc6e765c06937ddf1d508ceb6bc6100c6e3c","unresolved":false,"context_lines":[{"line_number":47,"context_line":"NETWORK_PREFIX_URI \u003d \u0027/rest/ethernet-networks/\u0027"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"FIRST_PORT_ID \u003d \u0027Flb 1:1-a\u0027"},{"line_number":50,"context_line":"SECOND_PORT_ID \u003d \u0027Flb 1:2-a\u0027"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"FUNCTION_TYPE_ETHERNET \u003d \u0027Ethernet\u0027"},{"line_number":53,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a061dce_21b97bed","line":50,"updated":"2016-04-08 15:51:00.000000000","message":"From previous patch set:\nWhat is the point in keeping these ID values here? I couldn\u0027t find them in the API documentation.","commit_id":"1cd4c031a826a0c5376984428e1344a1251190f4"},{"author":{"_account_id":10765,"name":"Andre Aranha","email":"afaranha@lsd.ufcg.edu.br","username":"afaranha"},"change_message_id":"ce7667eaa3c8151a4feb6afb46f338a751f9be72","unresolved":false,"context_lines":[{"line_number":47,"context_line":"NETWORK_PREFIX_URI \u003d \u0027/rest/ethernet-networks/\u0027"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"FIRST_PORT_ID \u003d \u0027Flb 1:1-a\u0027"},{"line_number":50,"context_line":"SECOND_PORT_ID \u003d \u0027Flb 1:2-a\u0027"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"FUNCTION_TYPE_ETHERNET \u003d \u0027Ethernet\u0027"},{"line_number":53,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_decf677d","line":50,"in_reply_to":"9a061dce_21b97bed","updated":"2016-04-13 19:29:19.000000000","message":"Answered in the comment in models.py. I\u0027m gonna remove these from here","commit_id":"1cd4c031a826a0c5376984428e1344a1251190f4"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"f335bc6e765c06937ddf1d508ceb6bc6100c6e3c","unresolved":false,"context_lines":[{"line_number":178,"context_line":"        task_completed \u003d self._wait_for_task_to_complete(task)"},{"line_number":179,"context_line":"        return task_completed.get(\u0027associatedResource\u0027).get(\u0027resourceUri\u0027)"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    def add_primary_ethernet_connection_to_server_profile("},{"line_number":182,"context_line":"        self, server_profile_uuid, network_uuid"},{"line_number":183,"context_line":"    ):"},{"line_number":184,"context_line":"        server_profile_obj \u003d self.get_server_profile_by_uuid("}],"source_content_type":"text/x-python","patch_set":2,"id":"9a061dce_170475c4","line":181,"updated":"2016-04-08 15:51:00.000000000","message":"I see this as the most driver-specific method you are adding. From what we have talked offline, it seems like it\u0027ll just need to update the existing connections instead of creating new ones. Can you confirm it?\n\nIf so, I\u0027d like do keep this class simple and just add the methods the driver will actually need. By that, I\u0027m considering replacing it with the connection update method.","commit_id":"1cd4c031a826a0c5376984428e1344a1251190f4"},{"author":{"_account_id":10765,"name":"Andre Aranha","email":"afaranha@lsd.ufcg.edu.br","username":"afaranha"},"change_message_id":"ce7667eaa3c8151a4feb6afb46f338a751f9be72","unresolved":false,"context_lines":[{"line_number":178,"context_line":"        task_completed \u003d self._wait_for_task_to_complete(task)"},{"line_number":179,"context_line":"        return task_completed.get(\u0027associatedResource\u0027).get(\u0027resourceUri\u0027)"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    def add_primary_ethernet_connection_to_server_profile("},{"line_number":182,"context_line":"        self, server_profile_uuid, network_uuid"},{"line_number":183,"context_line":"    ):"},{"line_number":184,"context_line":"        server_profile_obj \u003d self.get_server_profile_by_uuid("}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_be91cb54","line":181,"in_reply_to":"9a061dce_170475c4","updated":"2016-04-13 19:29:19.000000000","message":"Yes. We still need to do the tests to check if update is suitable.","commit_id":"1cd4c031a826a0c5376984428e1344a1251190f4"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"f335bc6e765c06937ddf1d508ceb6bc6100c6e3c","unresolved":false,"context_lines":[{"line_number":187,"context_line":"        port_id \u003d server_profile_obj.get_next_available_port_id()"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"        if server_profile_obj.is_there_any_primary_connection():"},{"line_number":190,"context_line":"            raise exceptions.NoAvailablePrimaryConnectionInServerProfileError()"},{"line_number":191,"context_line":"        if port_id is None:"},{"line_number":192,"context_line":"            raise exceptions.NoAvailablePortsInOneViewError()"},{"line_number":193,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a061dce_21117bb0","line":190,"updated":"2016-04-08 15:51:00.000000000","message":"I think OneView should be the one to respond that instead of this library being preventing it.\n\nCan we parse this exception from some OneView response code, to keep being specific on the error?","commit_id":"1cd4c031a826a0c5376984428e1344a1251190f4"},{"author":{"_account_id":10765,"name":"Andre Aranha","email":"afaranha@lsd.ufcg.edu.br","username":"afaranha"},"change_message_id":"ce7667eaa3c8151a4feb6afb46f338a751f9be72","unresolved":false,"context_lines":[{"line_number":187,"context_line":"        port_id \u003d server_profile_obj.get_next_available_port_id()"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"        if server_profile_obj.is_there_any_primary_connection():"},{"line_number":190,"context_line":"            raise exceptions.NoAvailablePrimaryConnectionInServerProfileError()"},{"line_number":191,"context_line":"        if port_id is None:"},{"line_number":192,"context_line":"            raise exceptions.NoAvailablePortsInOneViewError()"},{"line_number":193,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_1ec6ff47","line":190,"in_reply_to":"9a061dce_21117bb0","updated":"2016-04-13 19:29:19.000000000","message":"Sure, it makes sense, and the method will be simplified. Thanks for the tip","commit_id":"1cd4c031a826a0c5376984428e1344a1251190f4"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"115d94f37b3af876b9698b5ceb4fd188bbb13ec1","unresolved":false,"context_lines":[{"line_number":158,"context_line":"            msg \u003d (\"Error getting connection with id %d in Server Profile \""},{"line_number":159,"context_line":"                   \"%s\") % (connection_id, server_profile_uri)"},{"line_number":160,"context_line":"            raise exceptions.OneViewResourceNotFoundError(msg)"},{"line_number":161,"context_line":"        if connection.get(\"networkUri\") is not None:"},{"line_number":162,"context_line":"            connection[\"networkUri\"] \u003d network_uri"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"        task \u003d self._prepare_and_do_request("}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_4398396a","line":161,"updated":"2016-05-11 20:15:41.000000000","message":"What should happen if it is None?","commit_id":"043754f6ad2523d42fbb2ddf9b77232ce8741bde"}],"oneview_client/exceptions.py":[{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"6ddd3a185364bdbb0f3e60256c0bebbdf62d79d8","unresolved":false,"context_lines":[{"line_number":90,"context_line":"    message \u003d (\"OneView appliance returned an unknown response status\")"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"class OneViewResponseNoPortsAvailablesError(OneViewException):"},{"line_number":94,"context_line":"    message \u003d (\"There are no ports availables to add in a Server Profile \""},{"line_number":95,"context_line":"               \"Connection\")"},{"line_number":96,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_78e27930","line":93,"updated":"2016-04-06 20:04:23.000000000","message":"s/Availables/Available/","commit_id":"5505162235f35a913c18c9a6d8fb96119abc661e"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"6ddd3a185364bdbb0f3e60256c0bebbdf62d79d8","unresolved":false,"context_lines":[{"line_number":91,"context_line":""},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"class OneViewResponseNoPortsAvailablesError(OneViewException):"},{"line_number":94,"context_line":"    message \u003d (\"There are no ports availables to add in a Server Profile \""},{"line_number":95,"context_line":"               \"Connection\")"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_f8432911","line":94,"updated":"2016-04-06 20:04:23.000000000","message":"s/availables/available/\ns/add/use/","commit_id":"5505162235f35a913c18c9a6d8fb96119abc661e"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"f335bc6e765c06937ddf1d508ceb6bc6100c6e3c","unresolved":false,"context_lines":[{"line_number":96,"context_line":""},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"class NoAvailablePrimaryConnectionInServerProfileError(OneViewException):"},{"line_number":99,"context_line":"    message \u003d (\"There are no primary connection available to use in a Server \""},{"line_number":100,"context_line":"               \"Profile Connection\")"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a061dce_dc2ea2a4","line":99,"updated":"2016-04-08 15:51:00.000000000","message":"Pick one of:\n* There are ... connections\n* There is ... connection","commit_id":"1cd4c031a826a0c5376984428e1344a1251190f4"},{"author":{"_account_id":10765,"name":"Andre Aranha","email":"afaranha@lsd.ufcg.edu.br","username":"afaranha"},"change_message_id":"ce7667eaa3c8151a4feb6afb46f338a751f9be72","unresolved":false,"context_lines":[{"line_number":96,"context_line":""},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"class NoAvailablePrimaryConnectionInServerProfileError(OneViewException):"},{"line_number":99,"context_line":"    message \u003d (\"There are no primary connection available to use in a Server \""},{"line_number":100,"context_line":"               \"Profile Connection\")"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_becd4b5f","line":99,"in_reply_to":"9a061dce_dc2ea2a4","updated":"2016-04-13 19:29:19.000000000","message":"Done","commit_id":"1cd4c031a826a0c5376984428e1344a1251190f4"}],"oneview_client/models.py":[{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"f335bc6e765c06937ddf1d508ceb6bc6100c6e3c","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"FUNCTION_TYPE_ETHERNET \u003d \u0027Ethernet\u0027"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"BOOT_PRIORITY_PRIMARY \u003d \u0027Primary\u0027"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"class OneViewObject(object):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a061dce_5c8292c9","line":25,"updated":"2016-04-08 15:51:00.000000000","message":"These constants are repeated here and in client.py. Please keep them in a single place.\n\nI\u0027d suggest BOOT_PRIORITY_PRIMARY and FUNCTION_TYPE_ETHERNET to be in the very ServerProfile class.","commit_id":"1cd4c031a826a0c5376984428e1344a1251190f4"},{"author":{"_account_id":10765,"name":"Andre Aranha","email":"afaranha@lsd.ufcg.edu.br","username":"afaranha"},"change_message_id":"ce7667eaa3c8151a4feb6afb46f338a751f9be72","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"FUNCTION_TYPE_ETHERNET \u003d \u0027Ethernet\u0027"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"BOOT_PRIORITY_PRIMARY \u003d \u0027Primary\u0027"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"class OneViewObject(object):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_dede476c","line":25,"in_reply_to":"9a061dce_5c8292c9","updated":"2016-04-13 19:29:19.000000000","message":"These variables aren\u0027t specific to Server Profile. BOOT_PRIORITY_PRIMARY is a resource from Connection and FUNCTION_TYPE_ETHERNET from Network.","commit_id":"1cd4c031a826a0c5376984428e1344a1251190f4"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"f335bc6e765c06937ddf1d508ceb6bc6100c6e3c","unresolved":false,"context_lines":[{"line_number":152,"context_line":"            if v \u003d\u003d value:"},{"line_number":153,"context_line":"                return k"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def is_there_any_primary_connection(self):"},{"line_number":156,"context_line":"        for connection in self.connections:"},{"line_number":157,"context_line":"            boot \u003d connection.get(\u0027boot\u0027)"},{"line_number":158,"context_line":"            if boot is None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a061dce_fc29e68a","line":155,"updated":"2016-04-08 15:51:00.000000000","message":"I think we can improve code reuse if this function is a bit less specific: get_primary_connection or primary_connection.\n\nIIRC, both the ironic driver and ironic-oneviewd would reuse it.","commit_id":"1cd4c031a826a0c5376984428e1344a1251190f4"},{"author":{"_account_id":10765,"name":"Andre Aranha","email":"afaranha@lsd.ufcg.edu.br","username":"afaranha"},"change_message_id":"ce7667eaa3c8151a4feb6afb46f338a751f9be72","unresolved":false,"context_lines":[{"line_number":152,"context_line":"            if v \u003d\u003d value:"},{"line_number":153,"context_line":"                return k"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def is_there_any_primary_connection(self):"},{"line_number":156,"context_line":"        for connection in self.connections:"},{"line_number":157,"context_line":"            boot \u003d connection.get(\u0027boot\u0027)"},{"line_number":158,"context_line":"            if boot is None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_4ff3a8d6","line":155,"in_reply_to":"9a061dce_fc29e68a","updated":"2016-04-13 19:29:19.000000000","message":"Done","commit_id":"1cd4c031a826a0c5376984428e1344a1251190f4"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"f335bc6e765c06937ddf1d508ceb6bc6100c6e3c","unresolved":false,"context_lines":[{"line_number":157,"context_line":"            boot \u003d connection.get(\u0027boot\u0027)"},{"line_number":158,"context_line":"            if boot is None:"},{"line_number":159,"context_line":"                continue"},{"line_number":160,"context_line":"            if connection.get(\u0027boot\u0027).get(\u0027priority\u0027) \u003d\u003d \u0027Primary\u0027:"},{"line_number":161,"context_line":"                return True"},{"line_number":162,"context_line":"        return False"},{"line_number":163,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a061dce_3c399e42","line":160,"updated":"2016-04-08 15:51:00.000000000","message":"Please reuse the BOOT_PRIORITY_PRIMARY constant.","commit_id":"1cd4c031a826a0c5376984428e1344a1251190f4"},{"author":{"_account_id":10765,"name":"Andre Aranha","email":"afaranha@lsd.ufcg.edu.br","username":"afaranha"},"change_message_id":"ce7667eaa3c8151a4feb6afb46f338a751f9be72","unresolved":false,"context_lines":[{"line_number":157,"context_line":"            boot \u003d connection.get(\u0027boot\u0027)"},{"line_number":158,"context_line":"            if boot is None:"},{"line_number":159,"context_line":"                continue"},{"line_number":160,"context_line":"            if connection.get(\u0027boot\u0027).get(\u0027priority\u0027) \u003d\u003d \u0027Primary\u0027:"},{"line_number":161,"context_line":"                return True"},{"line_number":162,"context_line":"        return False"},{"line_number":163,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_cf105804","line":160,"in_reply_to":"9a061dce_3c399e42","updated":"2016-04-13 19:29:19.000000000","message":"Sure, gonna fix it.","commit_id":"1cd4c031a826a0c5376984428e1344a1251190f4"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"f335bc6e765c06937ddf1d508ceb6bc6100c6e3c","unresolved":false,"context_lines":[{"line_number":161,"context_line":"                return True"},{"line_number":162,"context_line":"        return False"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"    def is_port_id_used(self, port_id):"},{"line_number":165,"context_line":"        for connection in self.connections:"},{"line_number":166,"context_line":"            if connection.get(\u0027portId\u0027) \u003d\u003d port_id:"},{"line_number":167,"context_line":"                return True"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a061dce_7c64b6e4","line":164,"updated":"2016-04-08 15:51:00.000000000","message":"Does just having a port in the Server Profile makes it used? If you mean something else, please rename the method to clarify it.","commit_id":"1cd4c031a826a0c5376984428e1344a1251190f4"},{"author":{"_account_id":10765,"name":"Andre Aranha","email":"afaranha@lsd.ufcg.edu.br","username":"afaranha"},"change_message_id":"ce7667eaa3c8151a4feb6afb46f338a751f9be72","unresolved":false,"context_lines":[{"line_number":161,"context_line":"                return True"},{"line_number":162,"context_line":"        return False"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"    def is_port_id_used(self, port_id):"},{"line_number":165,"context_line":"        for connection in self.connections:"},{"line_number":166,"context_line":"            if connection.get(\u0027portId\u0027) \u003d\u003d port_id:"},{"line_number":167,"context_line":"                return True"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_aff7dcf3","line":164,"in_reply_to":"9a061dce_7c64b6e4","updated":"2016-04-13 19:29:19.000000000","message":"Yes, if there is a connection using that port, it means that the port is used.","commit_id":"1cd4c031a826a0c5376984428e1344a1251190f4"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"f335bc6e765c06937ddf1d508ceb6bc6100c6e3c","unresolved":false,"context_lines":[{"line_number":167,"context_line":"                return True"},{"line_number":168,"context_line":"        return False"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    def get_next_available_port_id(self):"},{"line_number":171,"context_line":"        if not self.is_port_id_used(FIRST_PORT_ID):"},{"line_number":172,"context_line":"            return FIRST_PORT_ID"},{"line_number":173,"context_line":"        if not self.is_port_id_used(SECOND_PORT_ID):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a061dce_bc680e89","line":170,"updated":"2016-04-08 15:51:00.000000000","message":"The way this function is still does not make sense to me.\n\nWhat is the point in having the ID values hard coded in the library? Why does it limit to 2 ports only? I bet there are machines with more than 2 NIC out there.","commit_id":"1cd4c031a826a0c5376984428e1344a1251190f4"},{"author":{"_account_id":10765,"name":"Andre Aranha","email":"afaranha@lsd.ufcg.edu.br","username":"afaranha"},"change_message_id":"ce7667eaa3c8151a4feb6afb46f338a751f9be72","unresolved":false,"context_lines":[{"line_number":167,"context_line":"                return True"},{"line_number":168,"context_line":"        return False"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    def get_next_available_port_id(self):"},{"line_number":171,"context_line":"        if not self.is_port_id_used(FIRST_PORT_ID):"},{"line_number":172,"context_line":"            return FIRST_PORT_ID"},{"line_number":173,"context_line":"        if not self.is_port_id_used(SECOND_PORT_ID):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_cf2178a1","line":170,"in_reply_to":"9a061dce_bc680e89","updated":"2016-04-13 19:29:19.000000000","message":"This is a restriction in our currently environment. We can\u0027t take any ports, just these specific ports.","commit_id":"1cd4c031a826a0c5376984428e1344a1251190f4"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"115d94f37b3af876b9698b5ceb4fd188bbb13ec1","unresolved":false,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    def get_connection_by_id(self, connection_id):"},{"line_number":151,"context_line":"        for connection in self.connections:"},{"line_number":152,"context_line":"            if connection.get(\"id\") \u003d\u003d connection_id:"},{"line_number":153,"context_line":"                return connection"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_43fdd96c","line":152,"updated":"2016-05-11 20:15:41.000000000","message":"Wouldn\u0027t\n\n    return connection.get(\"id\")\n\nbe enough?","commit_id":"043754f6ad2523d42fbb2ddf9b77232ce8741bde"}]}
