)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":14923,"name":"Sinval Vieira Mendes Neto","email":"sinvalneto01@gmail.com","username":"sinvalvieira"},"change_message_id":"173bed8a2c0ed72d2d64a9d9f4978ece3b06fea0","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     afaranha \u003cafaranha@lsd.ufcg.edu.br\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-03-18 12:27:49 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Extend python-oneviewclient to Network"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add Network CRUD functionalities."},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1af94dfe_8c00d367","line":7,"updated":"2016-03-18 13:13:57.000000000","message":"Would be nice to have a better commit message and more details about the changes, this one is too vague.","commit_id":"6078f7c5fd854e33277745ff4bf3ed3dcb2ffd7c"}],"oneview_client/client.py":[{"author":{"_account_id":14923,"name":"Sinval Vieira Mendes Neto","email":"sinvalneto01@gmail.com","username":"sinvalvieira"},"change_message_id":"173bed8a2c0ed72d2d64a9d9f4978ece3b06fea0","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        return current_state"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    # --- Network ---"},{"line_number":186,"context_line":"    def create_network(self, name, ethernet_network_type, vlan\u003d\u0027\u0027):"},{"line_number":187,"context_line":"        if ethernet_network_type \u003d\u003d ETHERNET_NETWORK_TYPE_UNTAGGED:"},{"line_number":188,"context_line":"            vlan \u003d \u0027\u0027"},{"line_number":189,"context_line":"        network_body \u003d {"}],"source_content_type":"text/x-python","patch_set":1,"id":"1af94dfe_4c69abf8","line":186,"range":{"start_line":186,"start_character":8,"end_line":186,"end_character":22},"updated":"2016-03-18 13:13:57.000000000","message":"[Just to think about]\nI suppose that you guys will add validations to the create network creation workflow, am I right? If so, you might want to think if you\u0027re going to use this same method to validate things before the creation call.","commit_id":"6078f7c5fd854e33277745ff4bf3ed3dcb2ffd7c"},{"author":{"_account_id":14891,"name":"Lilia Sampaio","email":"liliars@lsd.ufcg.edu.br","username":"liliars"},"change_message_id":"9e8e98106bdbc5a4d8700c921520c3247cc922b6","unresolved":false,"context_lines":[{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    # --- Network ---"},{"line_number":186,"context_line":"    def create_network(self, name, ethernet_network_type, vlan\u003d\u0027\u0027):"},{"line_number":187,"context_line":"        if ethernet_network_type \u003d\u003d ETHERNET_NETWORK_TYPE_UNTAGGED:"},{"line_number":188,"context_line":"            vlan \u003d \u0027\u0027"},{"line_number":189,"context_line":"        network_body \u003d {"},{"line_number":190,"context_line":"            \"vlanId\": vlan,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1af94dfe_a68210c6","line":187,"range":{"start_line":187,"start_character":11,"end_line":187,"end_character":66},"updated":"2016-03-18 12:52:47.000000000","message":"Might be helpful compare strings considering all lowercase letters, or else, if the string coming from OneView changes, your code also breaks.","commit_id":"6078f7c5fd854e33277745ff4bf3ed3dcb2ffd7c"},{"author":{"_account_id":14923,"name":"Sinval Vieira Mendes Neto","email":"sinvalneto01@gmail.com","username":"sinvalvieira"},"change_message_id":"173bed8a2c0ed72d2d64a9d9f4978ece3b06fea0","unresolved":false,"context_lines":[{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    # --- Network ---"},{"line_number":186,"context_line":"    def create_network(self, name, ethernet_network_type, vlan\u003d\u0027\u0027):"},{"line_number":187,"context_line":"        if ethernet_network_type \u003d\u003d ETHERNET_NETWORK_TYPE_UNTAGGED:"},{"line_number":188,"context_line":"            vlan \u003d \u0027\u0027"},{"line_number":189,"context_line":"        network_body \u003d {"},{"line_number":190,"context_line":"            \"vlanId\": vlan,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1af94dfe_8c37334c","line":187,"range":{"start_line":187,"start_character":11,"end_line":187,"end_character":66},"in_reply_to":"1af94dfe_a68210c6","updated":"2016-03-18 13:13:57.000000000","message":"+1","commit_id":"6078f7c5fd854e33277745ff4bf3ed3dcb2ffd7c"},{"author":{"_account_id":10765,"name":"Andre Aranha","email":"afaranha@lsd.ufcg.edu.br","username":"afaranha"},"change_message_id":"31a003c4a8670cb3f8e7cb11f409905e10f0c9db","unresolved":false,"context_lines":[{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    # --- Network ---"},{"line_number":186,"context_line":"    def create_network(self, name, ethernet_network_type, vlan\u003d\u0027\u0027):"},{"line_number":187,"context_line":"        if ethernet_network_type \u003d\u003d ETHERNET_NETWORK_TYPE_UNTAGGED:"},{"line_number":188,"context_line":"            vlan \u003d \u0027\u0027"},{"line_number":189,"context_line":"        network_body \u003d {"},{"line_number":190,"context_line":"            \"vlanId\": vlan,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1af94dfe_d8529166","line":187,"range":{"start_line":187,"start_character":11,"end_line":187,"end_character":66},"in_reply_to":"1af94dfe_a68210c6","updated":"2016-03-18 14:09:50.000000000","message":"Done","commit_id":"6078f7c5fd854e33277745ff4bf3ed3dcb2ffd7c"},{"author":{"_account_id":14891,"name":"Lilia Sampaio","email":"liliars@lsd.ufcg.edu.br","username":"liliars"},"change_message_id":"9e8e98106bdbc5a4d8700c921520c3247cc922b6","unresolved":false,"context_lines":[{"line_number":186,"context_line":"    def create_network(self, name, ethernet_network_type, vlan\u003d\u0027\u0027):"},{"line_number":187,"context_line":"        if ethernet_network_type \u003d\u003d ETHERNET_NETWORK_TYPE_UNTAGGED:"},{"line_number":188,"context_line":"            vlan \u003d \u0027\u0027"},{"line_number":189,"context_line":"        network_body \u003d {"},{"line_number":190,"context_line":"            \"vlanId\": vlan,"},{"line_number":191,"context_line":"            \"purpose\": \"General\","},{"line_number":192,"context_line":"            \"name\": name,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1af94dfe_c6875cb3","line":189,"range":{"start_line":189,"start_character":8,"end_line":189,"end_character":20},"updated":"2016-03-18 12:52:47.000000000","message":"We are trying to handle naming better in the client. Though I can tell this is a json body, we want to be more specific when naming variables, for instance: \"server_profile_json\", \"server_profile_obj\", and so on.. So I would suggest naming this as \"network_json_body\". Sorry for the nit pick but it is also a tip for next patch sets.","commit_id":"6078f7c5fd854e33277745ff4bf3ed3dcb2ffd7c"},{"author":{"_account_id":10765,"name":"Andre Aranha","email":"afaranha@lsd.ufcg.edu.br","username":"afaranha"},"change_message_id":"31a003c4a8670cb3f8e7cb11f409905e10f0c9db","unresolved":false,"context_lines":[{"line_number":186,"context_line":"    def create_network(self, name, ethernet_network_type, vlan\u003d\u0027\u0027):"},{"line_number":187,"context_line":"        if ethernet_network_type \u003d\u003d ETHERNET_NETWORK_TYPE_UNTAGGED:"},{"line_number":188,"context_line":"            vlan \u003d \u0027\u0027"},{"line_number":189,"context_line":"        network_body \u003d {"},{"line_number":190,"context_line":"            \"vlanId\": vlan,"},{"line_number":191,"context_line":"            \"purpose\": \"General\","},{"line_number":192,"context_line":"            \"name\": name,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1af94dfe_184999b7","line":189,"range":{"start_line":189,"start_character":8,"end_line":189,"end_character":20},"in_reply_to":"1af94dfe_c6875cb3","updated":"2016-03-18 14:09:50.000000000","message":"Done","commit_id":"6078f7c5fd854e33277745ff4bf3ed3dcb2ffd7c"},{"author":{"_account_id":14891,"name":"Lilia Sampaio","email":"liliars@lsd.ufcg.edu.br","username":"liliars"},"change_message_id":"9e8e98106bdbc5a4d8700c921520c3247cc922b6","unresolved":false,"context_lines":[{"line_number":196,"context_line":"            \"ethernetNetworkType\": ethernet_network_type,"},{"line_number":197,"context_line":"            \"type\": \"ethernet-networkV3\""},{"line_number":198,"context_line":"        }"},{"line_number":199,"context_line":"        return self._prepare_and_do_request("},{"line_number":200,"context_line":"            uri\u003dNETWORK_PREFIX_URI, body\u003dnetwork_body,"},{"line_number":201,"context_line":"            request_type\u003dPOST_REQUEST_TYPE"},{"line_number":202,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":1,"id":"1af94dfe_a9a4a107","line":199,"range":{"start_line":199,"start_character":20,"end_line":199,"end_character":43},"updated":"2016-03-18 12:52:47.000000000","message":"General statement for rest calls: remember that if you need a task to be finished before starting another, please use the _wait_for_task_to_complete() method. That might not be the case now but just to keep it in mind :)","commit_id":"6078f7c5fd854e33277745ff4bf3ed3dcb2ffd7c"},{"author":{"_account_id":10765,"name":"Andre Aranha","email":"afaranha@lsd.ufcg.edu.br","username":"afaranha"},"change_message_id":"31a003c4a8670cb3f8e7cb11f409905e10f0c9db","unresolved":false,"context_lines":[{"line_number":196,"context_line":"            \"ethernetNetworkType\": ethernet_network_type,"},{"line_number":197,"context_line":"            \"type\": \"ethernet-networkV3\""},{"line_number":198,"context_line":"        }"},{"line_number":199,"context_line":"        return self._prepare_and_do_request("},{"line_number":200,"context_line":"            uri\u003dNETWORK_PREFIX_URI, body\u003dnetwork_body,"},{"line_number":201,"context_line":"            request_type\u003dPOST_REQUEST_TYPE"},{"line_number":202,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":1,"id":"1af94dfe_b8d065ca","line":199,"range":{"start_line":199,"start_character":20,"end_line":199,"end_character":43},"in_reply_to":"1af94dfe_a9a4a107","updated":"2016-03-18 14:09:50.000000000","message":"Done","commit_id":"6078f7c5fd854e33277745ff4bf3ed3dcb2ffd7c"},{"author":{"_account_id":14891,"name":"Lilia Sampaio","email":"liliars@lsd.ufcg.edu.br","username":"liliars"},"change_message_id":"9e8e98106bdbc5a4d8700c921520c3247cc922b6","unresolved":false,"context_lines":[{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    def get_network(self, uri):"},{"line_number":210,"context_line":"        for net in self.list_network():"},{"line_number":211,"context_line":"            if net[\u0027uri\u0027] \u003d\u003d uri:"},{"line_number":212,"context_line":"                return net"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"    def delete_network(self, uri):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1af94dfe_661be881","line":211,"range":{"start_line":211,"start_character":15,"end_line":211,"end_character":25},"updated":"2016-03-18 12:52:47.000000000","message":"This is going to crash if this key doesn\u0027t exist for some reason.. I recommend handling the exception, or, using net.get(\u0027uri\u0027) as it returns None if there is no key correspondent key.","commit_id":"6078f7c5fd854e33277745ff4bf3ed3dcb2ffd7c"},{"author":{"_account_id":10765,"name":"Andre Aranha","email":"afaranha@lsd.ufcg.edu.br","username":"afaranha"},"change_message_id":"31a003c4a8670cb3f8e7cb11f409905e10f0c9db","unresolved":false,"context_lines":[{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    def get_network(self, uri):"},{"line_number":210,"context_line":"        for net in self.list_network():"},{"line_number":211,"context_line":"            if net[\u0027uri\u0027] \u003d\u003d uri:"},{"line_number":212,"context_line":"                return net"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"    def delete_network(self, uri):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1af94dfe_38e575a7","line":211,"range":{"start_line":211,"start_character":15,"end_line":211,"end_character":25},"in_reply_to":"1af94dfe_661be881","updated":"2016-03-18 14:09:50.000000000","message":"Done","commit_id":"6078f7c5fd854e33277745ff4bf3ed3dcb2ffd7c"},{"author":{"_account_id":14923,"name":"Sinval Vieira Mendes Neto","email":"sinvalneto01@gmail.com","username":"sinvalvieira"},"change_message_id":"173bed8a2c0ed72d2d64a9d9f4978ece3b06fea0","unresolved":false,"context_lines":[{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    def get_network(self, uri):"},{"line_number":210,"context_line":"        for net in self.list_network():"},{"line_number":211,"context_line":"            if net[\u0027uri\u0027] \u003d\u003d uri:"},{"line_number":212,"context_line":"                return net"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"    def delete_network(self, uri):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1af94dfe_0c720311","line":211,"range":{"start_line":211,"start_character":15,"end_line":211,"end_character":25},"in_reply_to":"1af94dfe_661be881","updated":"2016-03-18 13:13:57.000000000","message":"and please, never access a dict of list with [\u0027key\u0027], we have a get() method, as Lilia pointed, so, let\u0027s make this count :)","commit_id":"6078f7c5fd854e33277745ff4bf3ed3dcb2ffd7c"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"0192ca03bcf071603aec49579f6e5317400e838f","unresolved":false,"context_lines":[{"line_number":46,"context_line":"ETHERNET_NETWORK_PREFIX_URI \u003d \u0027/rest/ethernet-networks/\u0027"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"ETHERNET_NETWORK_TYPE_TAGGED \u003d \u0027Tagged\u0027"},{"line_number":49,"context_line":"ETHERNET_NETWORK_TYPE_UNTAGGED \u003d \u0027Untagged\u0027"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"def _uuid_from_uri(uri):"}],"source_content_type":"text/x-python","patch_set":12,"id":"bab6814e_59e1379a","line":49,"updated":"2016-05-23 20:22:35.000000000","message":"If you go for the comment on line 174, please make these constants part of the EthernetNetwork class, as in:\n\n    class EthernetNetwork:\n        TAGGED \u003d \u0027Tagged\u0027\n        UNTAGGED \u003d \u0027Untagged\u0027","commit_id":"b6473b53d2a074bef77ea89cca0dd8e59fc80d26"},{"author":{"_account_id":10765,"name":"Andre Aranha","email":"afaranha@lsd.ufcg.edu.br","username":"afaranha"},"change_message_id":"2dd73f70b432d14cb7b065ce50b51229673c2991","unresolved":false,"context_lines":[{"line_number":46,"context_line":"ETHERNET_NETWORK_PREFIX_URI \u003d \u0027/rest/ethernet-networks/\u0027"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"ETHERNET_NETWORK_TYPE_TAGGED \u003d \u0027Tagged\u0027"},{"line_number":49,"context_line":"ETHERNET_NETWORK_TYPE_UNTAGGED \u003d \u0027Untagged\u0027"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"def _uuid_from_uri(uri):"}],"source_content_type":"text/x-python","patch_set":12,"id":"9abb7d3a_baac7136","line":49,"in_reply_to":"bab6814e_59e1379a","updated":"2016-06-02 20:24:48.000000000","message":"Done","commit_id":"b6473b53d2a074bef77ea89cca0dd8e59fc80d26"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"0192ca03bcf071603aec49579f6e5317400e838f","unresolved":false,"context_lines":[{"line_number":144,"context_line":"            raise exceptions.OneViewConnectionError(e.message)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    # --- Ethernet Network ---"},{"line_number":147,"context_line":"    def create_ethernet_network(self, name, ethernet_network_type, vlan\u003d\u0027\u0027):"},{"line_number":148,"context_line":"        if ethernet_network_type.lower() \u003d\u003d\\"},{"line_number":149,"context_line":"           ETHERNET_NETWORK_TYPE_UNTAGGED.lower():"},{"line_number":150,"context_line":"            vlan \u003d \u0027\u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"dab17558_0370f0a2","line":147,"range":{"start_line":147,"start_character":67,"end_line":147,"end_character":73},"updated":"2016-05-23 20:22:35.000000000","message":"It seems to me like using None instead of \u0027\u0027 would make a more idiomatic API. You can then use \n\n    vlan if vlan is not None else \u0027\u0027\n\nwhen building the JSON.","commit_id":"b6473b53d2a074bef77ea89cca0dd8e59fc80d26"},{"author":{"_account_id":10765,"name":"Andre Aranha","email":"afaranha@lsd.ufcg.edu.br","username":"afaranha"},"change_message_id":"2dd73f70b432d14cb7b065ce50b51229673c2991","unresolved":false,"context_lines":[{"line_number":144,"context_line":"            raise exceptions.OneViewConnectionError(e.message)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    # --- Ethernet Network ---"},{"line_number":147,"context_line":"    def create_ethernet_network(self, name, ethernet_network_type, vlan\u003d\u0027\u0027):"},{"line_number":148,"context_line":"        if ethernet_network_type.lower() \u003d\u003d\\"},{"line_number":149,"context_line":"           ETHERNET_NETWORK_TYPE_UNTAGGED.lower():"},{"line_number":150,"context_line":"            vlan \u003d \u0027\u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"9abb7d3a_1aaadd19","line":147,"range":{"start_line":147,"start_character":67,"end_line":147,"end_character":73},"in_reply_to":"dab17558_0370f0a2","updated":"2016-06-02 20:24:48.000000000","message":"Done","commit_id":"b6473b53d2a074bef77ea89cca0dd8e59fc80d26"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"0192ca03bcf071603aec49579f6e5317400e838f","unresolved":false,"context_lines":[{"line_number":147,"context_line":"    def create_ethernet_network(self, name, ethernet_network_type, vlan\u003d\u0027\u0027):"},{"line_number":148,"context_line":"        if ethernet_network_type.lower() \u003d\u003d\\"},{"line_number":149,"context_line":"           ETHERNET_NETWORK_TYPE_UNTAGGED.lower():"},{"line_number":150,"context_line":"            vlan \u003d \u0027\u0027"},{"line_number":151,"context_line":"        network_json \u003d {"},{"line_number":152,"context_line":"            \"vlanId\": vlan,"},{"line_number":153,"context_line":"            \"purpose\": \"General\","}],"source_content_type":"text/x-python","patch_set":12,"id":"dab17558_23c9b4ac","line":150,"updated":"2016-05-23 20:22:35.000000000","message":"It should raise a ValueError instead of fixing the call up and hiding that the input parameters were not valid.\n\nAlso, no need for string comparison, as we expect the user of the library to use the very constant from the library.\n\n    if not (ethernet_network_type is ETHERNET_NETWORK_TYPE_UNTAGGED or ethernet_network_type is ETHERNET_NETWORK_TYPE_TAGGED):\n        raise ValueError(error message)\n\n    if ethernet_network_type is ETHERNET_NETWORK_TYPE_UNTAGGED and vlan:\n        raise ValueError(error message)","commit_id":"b6473b53d2a074bef77ea89cca0dd8e59fc80d26"},{"author":{"_account_id":10765,"name":"Andre Aranha","email":"afaranha@lsd.ufcg.edu.br","username":"afaranha"},"change_message_id":"2dd73f70b432d14cb7b065ce50b51229673c2991","unresolved":false,"context_lines":[{"line_number":147,"context_line":"    def create_ethernet_network(self, name, ethernet_network_type, vlan\u003d\u0027\u0027):"},{"line_number":148,"context_line":"        if ethernet_network_type.lower() \u003d\u003d\\"},{"line_number":149,"context_line":"           ETHERNET_NETWORK_TYPE_UNTAGGED.lower():"},{"line_number":150,"context_line":"            vlan \u003d \u0027\u0027"},{"line_number":151,"context_line":"        network_json \u003d {"},{"line_number":152,"context_line":"            \"vlanId\": vlan,"},{"line_number":153,"context_line":"            \"purpose\": \"General\","}],"source_content_type":"text/x-python","patch_set":12,"id":"9abb7d3a_5a62a517","line":150,"in_reply_to":"dab17558_23c9b4ac","updated":"2016-06-02 20:24:48.000000000","message":"Done","commit_id":"b6473b53d2a074bef77ea89cca0dd8e59fc80d26"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"0192ca03bcf071603aec49579f6e5317400e838f","unresolved":false,"context_lines":[{"line_number":171,"context_line":"    def list_ethernet_network(self):"},{"line_number":172,"context_line":"        return self._prepare_and_do_request("},{"line_number":173,"context_line":"            uri\u003dETHERNET_NETWORK_PREFIX_URI"},{"line_number":174,"context_line":"        ).get(\u0027members\u0027)"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    def get_ethernet_network(self, uuid):"},{"line_number":177,"context_line":"        network_uri \u003d _uri_from_uuid("}],"source_content_type":"text/x-python","patch_set":12,"id":"bab6814e_59a9377b","line":174,"updated":"2016-05-23 20:22:35.000000000","message":"It seems like we need a Network or EthernetNetwork in models.py","commit_id":"b6473b53d2a074bef77ea89cca0dd8e59fc80d26"},{"author":{"_account_id":10765,"name":"Andre Aranha","email":"afaranha@lsd.ufcg.edu.br","username":"afaranha"},"change_message_id":"2dd73f70b432d14cb7b065ce50b51229673c2991","unresolved":false,"context_lines":[{"line_number":171,"context_line":"    def list_ethernet_network(self):"},{"line_number":172,"context_line":"        return self._prepare_and_do_request("},{"line_number":173,"context_line":"            uri\u003dETHERNET_NETWORK_PREFIX_URI"},{"line_number":174,"context_line":"        ).get(\u0027members\u0027)"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    def get_ethernet_network(self, uuid):"},{"line_number":177,"context_line":"        network_uri \u003d _uri_from_uuid("}],"source_content_type":"text/x-python","patch_set":12,"id":"9abb7d3a_e5401e38","line":174,"in_reply_to":"bab6814e_59a9377b","updated":"2016-06-02 20:24:48.000000000","message":"Done","commit_id":"b6473b53d2a074bef77ea89cca0dd8e59fc80d26"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"0192ca03bcf071603aec49579f6e5317400e838f","unresolved":false,"context_lines":[{"line_number":177,"context_line":"        network_uri \u003d _uri_from_uuid("},{"line_number":178,"context_line":"            ETHERNET_NETWORK_PREFIX_URI, uuid"},{"line_number":179,"context_line":"        )"},{"line_number":180,"context_line":"        return self._prepare_and_do_request(uri\u003dnetwork_uri)"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"    def get_ethernet_network_by_name(self, ethernet_network_name):"},{"line_number":183,"context_line":"        for network in self.list_ethernet_network():"}],"source_content_type":"text/x-python","patch_set":12,"id":"bab6814e_59c0172b","line":180,"updated":"2016-05-23 20:22:35.000000000","message":"See comment on line 174","commit_id":"b6473b53d2a074bef77ea89cca0dd8e59fc80d26"},{"author":{"_account_id":10765,"name":"Andre Aranha","email":"afaranha@lsd.ufcg.edu.br","username":"afaranha"},"change_message_id":"2dd73f70b432d14cb7b065ce50b51229673c2991","unresolved":false,"context_lines":[{"line_number":177,"context_line":"        network_uri \u003d _uri_from_uuid("},{"line_number":178,"context_line":"            ETHERNET_NETWORK_PREFIX_URI, uuid"},{"line_number":179,"context_line":"        )"},{"line_number":180,"context_line":"        return self._prepare_and_do_request(uri\u003dnetwork_uri)"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"    def get_ethernet_network_by_name(self, ethernet_network_name):"},{"line_number":183,"context_line":"        for network in self.list_ethernet_network():"}],"source_content_type":"text/x-python","patch_set":12,"id":"9abb7d3a_a06d64ce","line":180,"in_reply_to":"bab6814e_59c0172b","updated":"2016-06-02 20:24:48.000000000","message":"Done","commit_id":"b6473b53d2a074bef77ea89cca0dd8e59fc80d26"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"0192ca03bcf071603aec49579f6e5317400e838f","unresolved":false,"context_lines":[{"line_number":182,"context_line":"    def get_ethernet_network_by_name(self, ethernet_network_name):"},{"line_number":183,"context_line":"        for network in self.list_ethernet_network():"},{"line_number":184,"context_line":"            if network.get(\u0027name\u0027) \u003d\u003d ethernet_network_name:"},{"line_number":185,"context_line":"                return network"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    def delete_ethernet_network(self, uuid):"},{"line_number":188,"context_line":"        network_uri \u003d _uri_from_uuid("}],"source_content_type":"text/x-python","patch_set":12,"id":"dab17558_c6a0b6f6","line":185,"updated":"2016-05-23 20:22:35.000000000","message":"Can\u0027t we use the filters of the API here instead of filtering in the client?","commit_id":"b6473b53d2a074bef77ea89cca0dd8e59fc80d26"},{"author":{"_account_id":10765,"name":"Andre Aranha","email":"afaranha@lsd.ufcg.edu.br","username":"afaranha"},"change_message_id":"2dd73f70b432d14cb7b065ce50b51229673c2991","unresolved":false,"context_lines":[{"line_number":182,"context_line":"    def get_ethernet_network_by_name(self, ethernet_network_name):"},{"line_number":183,"context_line":"        for network in self.list_ethernet_network():"},{"line_number":184,"context_line":"            if network.get(\u0027name\u0027) \u003d\u003d ethernet_network_name:"},{"line_number":185,"context_line":"                return network"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    def delete_ethernet_network(self, uuid):"},{"line_number":188,"context_line":"        network_uri \u003d _uri_from_uuid("}],"source_content_type":"text/x-python","patch_set":12,"id":"9abb7d3a_035555c5","line":185,"in_reply_to":"dab17558_c6a0b6f6","updated":"2016-06-02 20:24:48.000000000","message":"Yes we can. But just for simple names. If a name has any special character like \u0027-\u0027 or whitespace it breaks\nWe can filter like this:\nurl/?filter\u003dname\u003d\u003cNAME_HERE\u003e","commit_id":"b6473b53d2a074bef77ea89cca0dd8e59fc80d26"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"0192ca03bcf071603aec49579f6e5317400e838f","unresolved":false,"context_lines":[{"line_number":192,"context_line":"            uri\u003dnetwork_uri, request_type\u003dDELETE_REQUEST_TYPE"},{"line_number":193,"context_line":"        )"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"    def update_ethernet_network(self, uuid, new_name):"},{"line_number":196,"context_line":"        network \u003d self.get_ethernet_network(uuid)"},{"line_number":197,"context_line":"        if network is None:"},{"line_number":198,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":12,"id":"bab6814e_59ee57b5","line":195,"updated":"2016-05-23 20:22:35.000000000","message":"Either receive the entire Network object (see line 174) or rename it to update_ethernet_network_name.","commit_id":"b6473b53d2a074bef77ea89cca0dd8e59fc80d26"},{"author":{"_account_id":10765,"name":"Andre Aranha","email":"afaranha@lsd.ufcg.edu.br","username":"afaranha"},"change_message_id":"2dd73f70b432d14cb7b065ce50b51229673c2991","unresolved":false,"context_lines":[{"line_number":192,"context_line":"            uri\u003dnetwork_uri, request_type\u003dDELETE_REQUEST_TYPE"},{"line_number":193,"context_line":"        )"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"    def update_ethernet_network(self, uuid, new_name):"},{"line_number":196,"context_line":"        network \u003d self.get_ethernet_network(uuid)"},{"line_number":197,"context_line":"        if network is None:"},{"line_number":198,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":12,"id":"9abb7d3a_0320b5f6","line":195,"in_reply_to":"bab6814e_59ee57b5","updated":"2016-06-02 20:24:48.000000000","message":"done renaming to update_ethernet_network_name","commit_id":"b6473b53d2a074bef77ea89cca0dd8e59fc80d26"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"0192ca03bcf071603aec49579f6e5317400e838f","unresolved":false,"context_lines":[{"line_number":195,"context_line":"    def update_ethernet_network(self, uuid, new_name):"},{"line_number":196,"context_line":"        network \u003d self.get_ethernet_network(uuid)"},{"line_number":197,"context_line":"        if network is None:"},{"line_number":198,"context_line":"            return"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"        network[\u0027name\u0027] \u003d new_name"},{"line_number":201,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"bab6814e_f90aab78","line":198,"updated":"2016-05-23 20:22:35.000000000","message":"It should thrown an exception -- certainly coming from get_ethernet_network.","commit_id":"b6473b53d2a074bef77ea89cca0dd8e59fc80d26"},{"author":{"_account_id":10765,"name":"Andre Aranha","email":"afaranha@lsd.ufcg.edu.br","username":"afaranha"},"change_message_id":"2dd73f70b432d14cb7b065ce50b51229673c2991","unresolved":false,"context_lines":[{"line_number":195,"context_line":"    def update_ethernet_network(self, uuid, new_name):"},{"line_number":196,"context_line":"        network \u003d self.get_ethernet_network(uuid)"},{"line_number":197,"context_line":"        if network is None:"},{"line_number":198,"context_line":"            return"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"        network[\u0027name\u0027] \u003d new_name"},{"line_number":201,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"9abb7d3a_633f01d7","line":198,"in_reply_to":"bab6814e_f90aab78","updated":"2016-06-02 20:24:48.000000000","message":"Done","commit_id":"b6473b53d2a074bef77ea89cca0dd8e59fc80d26"},{"author":{"_account_id":10697,"name":"Thiago Paiva Brito","email":"thiagop@lsd.ufcg.edu.br","username":"thiagop","inactive":true},"change_message_id":"b8fd3c821c2252ec2660c850d6b1d0d95cb46986","unresolved":false,"context_lines":[{"line_number":258,"context_line":"        self.server_profile_template \u003d managers.ServerProfileTemplateManager("},{"line_number":259,"context_line":"            self"},{"line_number":260,"context_line":"        )"},{"line_number":261,"context_line":"        self.ethernet_network \u003d managers.EthernetNetworkManager(self)"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"class Client(BaseClient):"}],"source_content_type":"text/x-python","patch_set":27,"id":"bacf61ea_7fdf303a","line":261,"range":{"start_line":261,"start_character":8,"end_line":261,"end_character":69},"updated":"2016-08-04 15:01:03.000000000","message":"Sorry, ethernet network isn\u0027t an object in OneView domain model. I think you should go with \"Network\".","commit_id":"d961174180e62127c93644e6f721c856488a9c42"}],"oneview_client/managers.py":[{"author":{"_account_id":10765,"name":"Andre Aranha","email":"afaranha@lsd.ufcg.edu.br","username":"afaranha"},"change_message_id":"f663fde6c722c2c26b324d00dc9aee9b7dbaf789","unresolved":false,"context_lines":[{"line_number":320,"context_line":"        try:"},{"line_number":321,"context_line":"            self.oneview_client._wait_for_task_to_complete(task)"},{"line_number":322,"context_line":"        except exceptions.OneViewTaskError as e:"},{"line_number":323,"context_line":"            raise exceptions.OneViewServerProfileDeletionError(e.message)"}],"source_content_type":"text/x-python","patch_set":19,"id":"7aa08908_4dd03cca","line":323,"range":{"start_line":323,"start_character":29,"end_line":323,"end_character":62},"updated":"2016-06-09 17:40:37.000000000","message":"ctrl c ctrl v error, gonna fix it.","commit_id":"0cf7cbbd98de483be848a807df043ecc25bd3513"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"5aa318b07648e99c93bbe86b3e3cfee806826af4","unresolved":false,"context_lines":[{"line_number":265,"context_line":"            message \u003d \"When ethernet_network_type is tagged \" +\\"},{"line_number":266,"context_line":"                \"you must use vlan.\""},{"line_number":267,"context_line":"            raise ValueError(message)"},{"line_number":268,"context_line":"        ethernet_network_json \u003d {"},{"line_number":269,"context_line":"            \"vlanId\": vlan if vlan is not None else \u0027\u0027,"},{"line_number":270,"context_line":"            \"purpose\": \"General\","},{"line_number":271,"context_line":"            \"name\": name,"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a9d85d2_16adc231","line":268,"updated":"2016-06-19 05:11:07.000000000","message":"Can\u0027t this dictionary be generated from the model_instance.to_oneview_dict()?","commit_id":"8b18ae62692b536492831b79d563acaf077ba582"},{"author":{"_account_id":10765,"name":"Andre Aranha","email":"afaranha@lsd.ufcg.edu.br","username":"afaranha"},"change_message_id":"8b32db997ebeb682696d615c2a9208725b6dd72d","unresolved":false,"context_lines":[{"line_number":265,"context_line":"            message \u003d \"When ethernet_network_type is tagged \" +\\"},{"line_number":266,"context_line":"                \"you must use vlan.\""},{"line_number":267,"context_line":"            raise ValueError(message)"},{"line_number":268,"context_line":"        ethernet_network_json \u003d {"},{"line_number":269,"context_line":"            \"vlanId\": vlan if vlan is not None else \u0027\u0027,"},{"line_number":270,"context_line":"            \"purpose\": \"General\","},{"line_number":271,"context_line":"            \"name\": name,"}],"source_content_type":"text/x-python","patch_set":21,"id":"3aaa91ec_a9f28a6d","line":268,"in_reply_to":"5a9d85d2_16adc231","updated":"2016-06-21 19:42:51.000000000","message":"Done","commit_id":"8b18ae62692b536492831b79d563acaf077ba582"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"5aa318b07648e99c93bbe86b3e3cfee806826af4","unresolved":false,"context_lines":[{"line_number":287,"context_line":"        except exceptions.OneViewTaskError as e:"},{"line_number":288,"context_line":"            raise exceptions.OneViewErrorCreatingNetwork(e.message)"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    def update_name(self, uuid, new_name):"},{"line_number":291,"context_line":"        network \u003d self.get(uuid)"},{"line_number":292,"context_line":"        if network is None:"},{"line_number":293,"context_line":"            message \u003d \"Network not found with uuid: %(uuid)s\" % {\u0027uuid\u0027: uuid}"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a9d85d2_76aa461b","line":290,"updated":"2016-06-19 05:11:07.000000000","message":"Is the driver\u0027s code still using this?","commit_id":"8b18ae62692b536492831b79d563acaf077ba582"},{"author":{"_account_id":10765,"name":"Andre Aranha","email":"afaranha@lsd.ufcg.edu.br","username":"afaranha"},"change_message_id":"8b32db997ebeb682696d615c2a9208725b6dd72d","unresolved":false,"context_lines":[{"line_number":287,"context_line":"        except exceptions.OneViewTaskError as e:"},{"line_number":288,"context_line":"            raise exceptions.OneViewErrorCreatingNetwork(e.message)"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    def update_name(self, uuid, new_name):"},{"line_number":291,"context_line":"        network \u003d self.get(uuid)"},{"line_number":292,"context_line":"        if network is None:"},{"line_number":293,"context_line":"            message \u003d \"Network not found with uuid: %(uuid)s\" % {\u0027uuid\u0027: uuid}"}],"source_content_type":"text/x-python","patch_set":21,"id":"3aaa91ec_c99436ea","line":290,"in_reply_to":"5a9d85d2_76aa461b","updated":"2016-06-21 19:42:51.000000000","message":"Yes, on Neutron Port Update changing the network name.","commit_id":"8b18ae62692b536492831b79d563acaf077ba582"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"81cc57c4a292fd60f9a04024dbb182fb6dbc6db2","unresolved":false,"context_lines":[{"line_number":304,"context_line":"            raise exceptions.OneViewErrorUpdatingNetwork(e.message)"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"    def delete(self, uuid):"},{"line_number":307,"context_line":"        if not uuid:"},{"line_number":308,"context_line":"            raise ValueError(\u0027Missing Ethernet Network uuid.\u0027)"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"        resource_uri \u003d self.uri_prefix + str(uuid)"}],"source_content_type":"text/x-python","patch_set":24,"id":"1aa78d24_125521f9","line":307,"updated":"2016-07-06 16:18:49.000000000","message":"uuid is None or uuid \u003d \u0027\u0027? By the way, please validate this logic with tests.","commit_id":"2276b869df72123e3943349a36e14d103b5053de"},{"author":{"_account_id":10765,"name":"Andre Aranha","email":"afaranha@lsd.ufcg.edu.br","username":"afaranha"},"change_message_id":"161c3d40b3ae24e57249862c45146f79a98177ff","unresolved":false,"context_lines":[{"line_number":304,"context_line":"            raise exceptions.OneViewErrorUpdatingNetwork(e.message)"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"    def delete(self, uuid):"},{"line_number":307,"context_line":"        if not uuid:"},{"line_number":308,"context_line":"            raise ValueError(\u0027Missing Ethernet Network uuid.\u0027)"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"        resource_uri \u003d self.uri_prefix + str(uuid)"}],"source_content_type":"text/x-python","patch_set":24,"id":"1aa78d24_98928bf4","line":307,"in_reply_to":"1aa78d24_125521f9","updated":"2016-07-07 17:37:36.000000000","message":"Yes, if uuid is None or empty it should raise exception. But maybe this should test \u003cuuid is not None or str(uuid).strip() \u003d\u003d \u0027\u0027\u003e.\nAnd yes, I\u0027m gonna add a test to it.","commit_id":"2276b869df72123e3943349a36e14d103b5053de"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"81cc57c4a292fd60f9a04024dbb182fb6dbc6db2","unresolved":false,"context_lines":[{"line_number":307,"context_line":"        if not uuid:"},{"line_number":308,"context_line":"            raise ValueError(\u0027Missing Ethernet Network uuid.\u0027)"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"        resource_uri \u003d self.uri_prefix + str(uuid)"},{"line_number":311,"context_line":"        task \u003d self.oneview_client._prepare_and_do_request("},{"line_number":312,"context_line":"            uri\u003dresource_uri,"},{"line_number":313,"context_line":"            request_type\u003d\u0027DELETE\u0027"}],"source_content_type":"text/x-python","patch_set":24,"id":"1aa78d24_f27055a6","line":310,"updated":"2016-07-06 16:18:49.000000000","message":"There is a uri maker from uuid, please reuse it.","commit_id":"2276b869df72123e3943349a36e14d103b5053de"},{"author":{"_account_id":10765,"name":"Andre Aranha","email":"afaranha@lsd.ufcg.edu.br","username":"afaranha"},"change_message_id":"161c3d40b3ae24e57249862c45146f79a98177ff","unresolved":false,"context_lines":[{"line_number":307,"context_line":"        if not uuid:"},{"line_number":308,"context_line":"            raise ValueError(\u0027Missing Ethernet Network uuid.\u0027)"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"        resource_uri \u003d self.uri_prefix + str(uuid)"},{"line_number":311,"context_line":"        task \u003d self.oneview_client._prepare_and_do_request("},{"line_number":312,"context_line":"            uri\u003dresource_uri,"},{"line_number":313,"context_line":"            request_type\u003d\u0027DELETE\u0027"}],"source_content_type":"text/x-python","patch_set":24,"id":"1aa78d24_d87b73f3","line":310,"in_reply_to":"1aa78d24_f27055a6","updated":"2016-07-07 17:37:36.000000000","message":"Sure","commit_id":"2276b869df72123e3943349a36e14d103b5053de"},{"author":{"_account_id":10697,"name":"Thiago Paiva Brito","email":"thiagop@lsd.ufcg.edu.br","username":"thiagop","inactive":true},"change_message_id":"b8fd3c821c2252ec2660c850d6b1d0d95cb46986","unresolved":false,"context_lines":[{"line_number":249,"context_line":"        return ethernet_network_type \u003d\u003d models.EthernetNetwork.TAGGED or\\"},{"line_number":250,"context_line":"            ethernet_network_type \u003d\u003d models.EthernetNetwork.UNTAGGED"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"    def create(self, **kwargs):"},{"line_number":253,"context_line":"        name \u003d kwargs.get(\u0027name\u0027)"},{"line_number":254,"context_line":"        ethernet_network_type \u003d kwargs.get(\u0027ethernet_network_type\u0027)"},{"line_number":255,"context_line":"        vlan \u003d kwargs.get(\u0027vlan\u0027)"}],"source_content_type":"text/x-python","patch_set":27,"id":"bacf61ea_92e5bca5","line":252,"range":{"start_line":252,"start_character":21,"end_line":252,"end_character":29},"updated":"2016-08-04 15:01:03.000000000","message":"If the consumer passes any other parameter on kwargs, it\u0027ll not be set on the network. Please, use named args for required parameters and kwargs for optional parameters, makind sure they\u0027re added into the created object.","commit_id":"d961174180e62127c93644e6f721c856488a9c42"},{"author":{"_account_id":10697,"name":"Thiago Paiva Brito","email":"thiagop@lsd.ufcg.edu.br","username":"thiagop","inactive":true},"change_message_id":"b8fd3c821c2252ec2660c850d6b1d0d95cb46986","unresolved":false,"context_lines":[{"line_number":268,"context_line":"            raise ValueError(message)"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"        ethernet_network \u003d models.EthernetNetwork()"},{"line_number":271,"context_line":"        ethernet_network.vlan_id \u003d vlan if vlan is not None else \u0027\u0027"},{"line_number":272,"context_line":"        ethernet_network.name \u003d name"},{"line_number":273,"context_line":"        ethernet_network.ethernet_network_type \u003d ethernet_network_type"},{"line_number":274,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"bacf61ea_0d3251f2","line":271,"range":{"start_line":271,"start_character":35,"end_line":271,"end_character":67},"updated":"2016-08-04 15:01:03.000000000","message":"str(vlan) or \u0027\u0027","commit_id":"d961174180e62127c93644e6f721c856488a9c42"},{"author":{"_account_id":10697,"name":"Thiago Paiva Brito","email":"thiagop@lsd.ufcg.edu.br","username":"thiagop","inactive":true},"change_message_id":"b8fd3c821c2252ec2660c850d6b1d0d95cb46986","unresolved":false,"context_lines":[{"line_number":305,"context_line":"            raise exceptions.OneViewErrorUpdatingNetwork(e.message)"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":"    def delete(self, uuid):"},{"line_number":308,"context_line":"        if uuid is None or str(uuid).strip() \u003d\u003d \u0027\u0027:"},{"line_number":309,"context_line":"            raise ValueError(\u0027Missing Ethernet Network uuid.\u0027)"},{"line_number":310,"context_line":""},{"line_number":311,"context_line":"        resource_uri \u003d utils.get_uri_from_uuid(self.uri_prefix, str(uuid))"}],"source_content_type":"text/x-python","patch_set":27,"id":"bacf61ea_4d89e925","line":308,"range":{"start_line":308,"start_character":11,"end_line":308,"end_character":50},"updated":"2016-08-04 15:01:03.000000000","message":"if utils._is_uuid_valid(uuid)","commit_id":"d961174180e62127c93644e6f721c856488a9c42"}],"oneview_client/models.py":[{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"5aa318b07648e99c93bbe86b3e3cfee806826af4","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        \u0027type\u0027: \u0027type\u0027,"},{"line_number":174,"context_line":"    }"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    def to_oneview_dict(self):"},{"line_number":177,"context_line":"        ethernet_network_dict \u003d {}"},{"line_number":178,"context_line":"        for attr_key in self.__dict__.keys():"},{"line_number":179,"context_line":"            attribute_value \u003d getattr(self, str(attr_key))"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a9d85d2_964ed294","line":176,"updated":"2016-06-19 05:11:07.000000000","message":"176-188 and 144-158 are too similar to not be reused. Please refactor this.","commit_id":"8b18ae62692b536492831b79d563acaf077ba582"},{"author":{"_account_id":10765,"name":"Andre Aranha","email":"afaranha@lsd.ufcg.edu.br","username":"afaranha"},"change_message_id":"8b32db997ebeb682696d615c2a9208725b6dd72d","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        \u0027type\u0027: \u0027type\u0027,"},{"line_number":174,"context_line":"    }"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    def to_oneview_dict(self):"},{"line_number":177,"context_line":"        ethernet_network_dict \u003d {}"},{"line_number":178,"context_line":"        for attr_key in self.__dict__.keys():"},{"line_number":179,"context_line":"            attribute_value \u003d getattr(self, str(attr_key))"}],"source_content_type":"text/x-python","patch_set":21,"id":"3aaa91ec_293cda2e","line":176,"in_reply_to":"5a9d85d2_964ed294","updated":"2016-06-21 19:42:51.000000000","message":"Done","commit_id":"8b18ae62692b536492831b79d563acaf077ba582"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"2f8e817686984688868dde7ec18cbbf7a907abfc","unresolved":false,"context_lines":[{"line_number":191,"context_line":"        \u0027type\u0027: \u0027type\u0027,"},{"line_number":192,"context_line":"    }"},{"line_number":193,"context_line":"    default_values \u003d {"},{"line_number":194,"context_line":"        \u0027purpose\u0027: \u0027General\u0027,"},{"line_number":195,"context_line":"        \u0027smartLink\u0027: False,"},{"line_number":196,"context_line":"        \u0027privateNetwork\u0027: False,"},{"line_number":197,"context_line":"        \u0027type\u0027: \u0027ethernet-networkV3\u0027,"},{"line_number":198,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":24,"id":"1aa78d24_50079717","line":197,"range":{"start_line":194,"start_character":0,"end_line":197,"end_character":37},"updated":"2016-07-06 19:36:52.000000000","message":"This is pushing user code logic into the library. These default values aren\u0027t true generic default values, except for the one in \u0027type\u0027. And even this one is something the OneView API already has as a default.","commit_id":"2276b869df72123e3943349a36e14d103b5053de"},{"author":{"_account_id":10765,"name":"Andre Aranha","email":"afaranha@lsd.ufcg.edu.br","username":"afaranha"},"change_message_id":"161c3d40b3ae24e57249862c45146f79a98177ff","unresolved":false,"context_lines":[{"line_number":191,"context_line":"        \u0027type\u0027: \u0027type\u0027,"},{"line_number":192,"context_line":"    }"},{"line_number":193,"context_line":"    default_values \u003d {"},{"line_number":194,"context_line":"        \u0027purpose\u0027: \u0027General\u0027,"},{"line_number":195,"context_line":"        \u0027smartLink\u0027: False,"},{"line_number":196,"context_line":"        \u0027privateNetwork\u0027: False,"},{"line_number":197,"context_line":"        \u0027type\u0027: \u0027ethernet-networkV3\u0027,"},{"line_number":198,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":24,"id":"1aa78d24_1834db47","line":197,"range":{"start_line":194,"start_character":0,"end_line":197,"end_character":37},"in_reply_to":"1aa78d24_50079717","updated":"2016-07-07 17:37:36.000000000","message":"In case of \u0027type\u0027, although in the OneView API it has a default value, in practice it doesn\u0027t create a network if this parameter is missing, is none, or is a empty string.\nI don\u0027t agree that this default values are putting logic into the library.\nFor \u0027purpose\u0027 in all our cases we never care about it, and in API this field have more specific values this is, like the name says, the most general value for the field.\nFor \u0027smartLink\u0027 and \u0027privateNetwork\u0027 as they are boolean it best to give them a boolean value than a None one. The False value is the least specific value for these fields.\nAnd for \u0027type\u0027, like the API says, it has a default value, but it\u0027s not working.\nAnd in all case, this dictionary is just default values, it can be changed at any time by the user.","commit_id":"2276b869df72123e3943349a36e14d103b5053de"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"10868cc29e8ccf643633bcf3c27c5eeeeb9d0511","unresolved":false,"context_lines":[{"line_number":194,"context_line":"        \u0027purpose\u0027: \u0027General\u0027,"},{"line_number":195,"context_line":"        \u0027smartLink\u0027: False,"},{"line_number":196,"context_line":"        \u0027privateNetwork\u0027: False,"},{"line_number":197,"context_line":"        \u0027type\u0027: \u0027ethernet-networkV3\u0027,"},{"line_number":198,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":27,"id":"dada55a8_90055147","line":197,"updated":"2016-07-21 20:14:13.000000000","message":"Besides \u0027type\u0027, I think none of these should be here. @thiagop, what do you think?","commit_id":"d961174180e62127c93644e6f721c856488a9c42"},{"author":{"_account_id":10697,"name":"Thiago Paiva Brito","email":"thiagop@lsd.ufcg.edu.br","username":"thiagop","inactive":true},"change_message_id":"b8fd3c821c2252ec2660c850d6b1d0d95cb46986","unresolved":false,"context_lines":[{"line_number":194,"context_line":"        \u0027purpose\u0027: \u0027General\u0027,"},{"line_number":195,"context_line":"        \u0027smartLink\u0027: False,"},{"line_number":196,"context_line":"        \u0027privateNetwork\u0027: False,"},{"line_number":197,"context_line":"        \u0027type\u0027: \u0027ethernet-networkV3\u0027,"},{"line_number":198,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":27,"id":"bacf61ea_ff6680b9","line":197,"in_reply_to":"dada55a8_90055147","updated":"2016-08-04 15:01:03.000000000","message":"Agree. \u0027type\u0027 is the only that will be default for all cases, you should put the other ones inside create() and expose them to user\u0027s overwriting.","commit_id":"d961174180e62127c93644e6f721c856488a9c42"}],"oneview_client/tests/unit/test_managers.py":[{"author":{"_account_id":10697,"name":"Thiago Paiva Brito","email":"thiagop@lsd.ufcg.edu.br","username":"thiagop","inactive":true},"change_message_id":"b8fd3c821c2252ec2660c850d6b1d0d95cb46986","unresolved":false,"context_lines":[{"line_number":27,"context_line":"from oneview_client.tests import fixtures"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"class TestManagerBase(unittest.TestCase):"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    @mock.patch.object(client, \"BaseClient\", autospec\u003dTrue)"},{"line_number":33,"context_line":"    def setUp(self, mock_client):"},{"line_number":34,"context_line":"        self.oneview_client \u003d mock_client("},{"line_number":35,"context_line":"            manager_url\u003d\u0027https://something\u0027, username\u003d\u0027user\u0027, password\u003d\u0027pass\u0027"},{"line_number":36,"context_line":"        )"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"class TestServerHardwareManager(TestManagerBase):"}],"source_content_type":"text/x-python","patch_set":27,"id":"bacf61ea_2de3d5da","line":36,"range":{"start_line":30,"start_character":0,"end_line":36,"end_character":9},"updated":"2016-08-04 15:01:03.000000000","message":"nice catch!","commit_id":"d961174180e62127c93644e6f721c856488a9c42"}],"oneview_client/tests/unit/test_oneview_client.py":[{"author":{"_account_id":14891,"name":"Lilia Sampaio","email":"liliars@lsd.ufcg.edu.br","username":"liliars"},"change_message_id":"9e8e98106bdbc5a4d8700c921520c3247cc922b6","unresolved":false,"context_lines":[{"line_number":1177,"context_line":""},{"line_number":1178,"context_line":"        yield status, headers, system, memberuri"},{"line_number":1179,"context_line":""},{"line_number":1180,"context_line":"    @mock.patch.object(client.Client, \u0027_prepare_and_do_request\u0027, autospec\u003dTrue)"},{"line_number":1181,"context_line":"    def test_create_valid_untagged_network("},{"line_number":1182,"context_line":"        self, mock__prepare_do_request, mock__authenticate"},{"line_number":1183,"context_line":"    ):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1af94dfe_e9d4e9ec","line":1180,"updated":"2016-03-18 12:52:47.000000000","message":"For general testing: if a method has any inteligence (ifs, whiles, exceptions, etc), there must be a test case covering that. I see the get method was not addressed here and I can think in a test case for that. Also keep negative test cases in mind.","commit_id":"6078f7c5fd854e33277745ff4bf3ed3dcb2ffd7c"},{"author":{"_account_id":10765,"name":"Andre Aranha","email":"afaranha@lsd.ufcg.edu.br","username":"afaranha"},"change_message_id":"31a003c4a8670cb3f8e7cb11f409905e10f0c9db","unresolved":false,"context_lines":[{"line_number":1177,"context_line":""},{"line_number":1178,"context_line":"        yield status, headers, system, memberuri"},{"line_number":1179,"context_line":""},{"line_number":1180,"context_line":"    @mock.patch.object(client.Client, \u0027_prepare_and_do_request\u0027, autospec\u003dTrue)"},{"line_number":1181,"context_line":"    def test_create_valid_untagged_network("},{"line_number":1182,"context_line":"        self, mock__prepare_do_request, mock__authenticate"},{"line_number":1183,"context_line":"    ):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1af94dfe_b8e7c5aa","line":1180,"in_reply_to":"1af94dfe_e9d4e9ec","updated":"2016-03-18 14:09:50.000000000","message":"Done","commit_id":"6078f7c5fd854e33277745ff4bf3ed3dcb2ffd7c"},{"author":{"_account_id":14891,"name":"Lilia Sampaio","email":"liliars@lsd.ufcg.edu.br","username":"liliars"},"change_message_id":"9e8e98106bdbc5a4d8700c921520c3247cc922b6","unresolved":false,"context_lines":[{"line_number":1178,"context_line":"        yield status, headers, system, memberuri"},{"line_number":1179,"context_line":""},{"line_number":1180,"context_line":"    @mock.patch.object(client.Client, \u0027_prepare_and_do_request\u0027, autospec\u003dTrue)"},{"line_number":1181,"context_line":"    def test_create_valid_untagged_network("},{"line_number":1182,"context_line":"        self, mock__prepare_do_request, mock__authenticate"},{"line_number":1183,"context_line":"    ):"},{"line_number":1184,"context_line":"        oneview_client \u003d client.Client("}],"source_content_type":"text/x-python","patch_set":1,"id":"1af94dfe_29f1b1cd","line":1181,"range":{"start_line":1181,"start_character":8,"end_line":1181,"end_character":42},"updated":"2016-03-18 12:52:47.000000000","message":"Not giving too much thinking on this, but just reading the method titles I see there are no negative test cases. If there is a way to create valid untagged networks, I understand there must be an invalid way? Also, what about tagged networks?","commit_id":"6078f7c5fd854e33277745ff4bf3ed3dcb2ffd7c"},{"author":{"_account_id":10765,"name":"Andre Aranha","email":"afaranha@lsd.ufcg.edu.br","username":"afaranha"},"change_message_id":"31a003c4a8670cb3f8e7cb11f409905e10f0c9db","unresolved":false,"context_lines":[{"line_number":1178,"context_line":"        yield status, headers, system, memberuri"},{"line_number":1179,"context_line":""},{"line_number":1180,"context_line":"    @mock.patch.object(client.Client, \u0027_prepare_and_do_request\u0027, autospec\u003dTrue)"},{"line_number":1181,"context_line":"    def test_create_valid_untagged_network("},{"line_number":1182,"context_line":"        self, mock__prepare_do_request, mock__authenticate"},{"line_number":1183,"context_line":"    ):"},{"line_number":1184,"context_line":"        oneview_client \u003d client.Client("}],"source_content_type":"text/x-python","patch_set":1,"id":"1af94dfe_182a3990","line":1181,"range":{"start_line":1181,"start_character":8,"end_line":1181,"end_character":42},"in_reply_to":"1af94dfe_29f1b1cd","updated":"2016-03-18 14:09:50.000000000","message":"Sure, there is negative cases too. I\u0027m gonna add it.\nAnd tagged network tested!","commit_id":"6078f7c5fd854e33277745ff4bf3ed3dcb2ffd7c"},{"author":{"_account_id":14923,"name":"Sinval Vieira Mendes Neto","email":"sinvalneto01@gmail.com","username":"sinvalvieira"},"change_message_id":"173bed8a2c0ed72d2d64a9d9f4978ece3b06fea0","unresolved":false,"context_lines":[{"line_number":1190,"context_line":"        ethernet_network_type \u003d client.ETHERNET_NETWORK_TYPE_UNTAGGED"},{"line_number":1191,"context_line":"        oneview_client.create_network(fake_network_name, ethernet_network_type)"},{"line_number":1192,"context_line":""},{"line_number":1193,"context_line":"        network_body \u003d {"},{"line_number":1194,"context_line":"            \"vlanId\": \u0027\u0027,"},{"line_number":1195,"context_line":"            \"purpose\": \"General\","},{"line_number":1196,"context_line":"            \"name\": fake_network_name,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1af94dfe_6c1bc781","line":1193,"range":{"start_line":1193,"start_character":8,"end_line":1193,"end_character":20},"updated":"2016-03-18 13:13:57.000000000","message":"s/network_body/network_json_body ?","commit_id":"6078f7c5fd854e33277745ff4bf3ed3dcb2ffd7c"},{"author":{"_account_id":10765,"name":"Andre Aranha","email":"afaranha@lsd.ufcg.edu.br","username":"afaranha"},"change_message_id":"31a003c4a8670cb3f8e7cb11f409905e10f0c9db","unresolved":false,"context_lines":[{"line_number":1190,"context_line":"        ethernet_network_type \u003d client.ETHERNET_NETWORK_TYPE_UNTAGGED"},{"line_number":1191,"context_line":"        oneview_client.create_network(fake_network_name, ethernet_network_type)"},{"line_number":1192,"context_line":""},{"line_number":1193,"context_line":"        network_body \u003d {"},{"line_number":1194,"context_line":"            \"vlanId\": \u0027\u0027,"},{"line_number":1195,"context_line":"            \"purpose\": \"General\","},{"line_number":1196,"context_line":"            \"name\": fake_network_name,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1af94dfe_58c201ea","line":1193,"range":{"start_line":1193,"start_character":8,"end_line":1193,"end_character":20},"in_reply_to":"1af94dfe_6c1bc781","updated":"2016-03-18 14:09:50.000000000","message":"Done","commit_id":"6078f7c5fd854e33277745ff4bf3ed3dcb2ffd7c"}]}
