)]}'
{"oneview_client/client.py":[{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"549e43249661b0a2d5ee83ce887830697cf673a2","unresolved":false,"context_lines":[{"line_number":271,"context_line":"#        server_profile_updated \u003d self._update_boot_order("},{"line_number":272,"context_line":"#            server_profile,"},{"line_number":273,"context_line":"#            boot_order"},{"line_number":274,"context_line":"#        )"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"        manage_boot \u003d server_profile.boot.get(\"manageBoot\")"},{"line_number":277,"context_line":"        server_profile.boot \u003d {"}],"source_content_type":"text/x-python","patch_set":8,"id":"5aef4532_7a968795","line":274,"updated":"2016-03-07 16:47:19.000000000","message":"Please remove commented code.","commit_id":"28b132b9609fc1fcf74759a2a1cd1b31953808fb"},{"author":{"_account_id":14891,"name":"Lilia Sampaio","email":"liliars@lsd.ufcg.edu.br","username":"liliars"},"change_message_id":"b9d5d2c8214e8b2380a7765b5ee8c03369622019","unresolved":false,"context_lines":[{"line_number":271,"context_line":"#        server_profile_updated \u003d self._update_boot_order("},{"line_number":272,"context_line":"#            server_profile,"},{"line_number":273,"context_line":"#            boot_order"},{"line_number":274,"context_line":"#        )"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"        manage_boot \u003d server_profile.boot.get(\"manageBoot\")"},{"line_number":277,"context_line":"        server_profile.boot \u003d {"}],"source_content_type":"text/x-python","patch_set":8,"id":"5aef4532_2d61303a","line":274,"in_reply_to":"5aef4532_7a968795","updated":"2016-03-08 16:30:40.000000000","message":"Done","commit_id":"28b132b9609fc1fcf74759a2a1cd1b31953808fb"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"549e43249661b0a2d5ee83ce887830697cf673a2","unresolved":false,"context_lines":[{"line_number":277,"context_line":"        server_profile.boot \u003d {"},{"line_number":278,"context_line":"            \"manageBoot\": manage_boot,"},{"line_number":279,"context_line":"            \"order\": boot_order"},{"line_number":280,"context_line":"        }"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"        boot_order_dict \u003d server_profile.to_oneview_dict()"},{"line_number":283,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5aef4532_dad4fb48","line":280,"updated":"2016-03-07 16:47:19.000000000","message":"Why is it copy/pasted from line 250-255?","commit_id":"28b132b9609fc1fcf74759a2a1cd1b31953808fb"},{"author":{"_account_id":14891,"name":"Lilia Sampaio","email":"liliars@lsd.ufcg.edu.br","username":"liliars"},"change_message_id":"b9d5d2c8214e8b2380a7765b5ee8c03369622019","unresolved":false,"context_lines":[{"line_number":277,"context_line":"        server_profile.boot \u003d {"},{"line_number":278,"context_line":"            \"manageBoot\": manage_boot,"},{"line_number":279,"context_line":"            \"order\": boot_order"},{"line_number":280,"context_line":"        }"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"        boot_order_dict \u003d server_profile.to_oneview_dict()"},{"line_number":283,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5aef4532_4daf5c94","line":280,"in_reply_to":"5aef4532_dad4fb48","updated":"2016-03-08 16:30:40.000000000","message":"Will remove the method since it is ~supposed to be~ used only here.","commit_id":"28b132b9609fc1fcf74759a2a1cd1b31953808fb"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"549e43249661b0a2d5ee83ce887830697cf673a2","unresolved":false,"context_lines":[{"line_number":312,"context_line":"        try:"},{"line_number":313,"context_line":"            self._wait_for_task_to_complete(post_profile_task)"},{"line_number":314,"context_line":"        except exceptions.OneViewTaskError as e:"},{"line_number":315,"context_line":"            raise exceptions.OneViewServerProfileAssignmentError(e.message)"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"    def delete_server_profile_from_server_hardware(self, node_info):"},{"line_number":318,"context_line":"        server_hardware \u003d self.get_server_hardware(node_info)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5aef4532_68a51803","line":315,"updated":"2016-03-07 16:47:19.000000000","message":"Can we return the id of the new server profile here, so that it can be saved in the node\u0027s driver_internal_info?","commit_id":"28b132b9609fc1fcf74759a2a1cd1b31953808fb"},{"author":{"_account_id":14891,"name":"Lilia Sampaio","email":"liliars@lsd.ufcg.edu.br","username":"liliars"},"change_message_id":"b9d5d2c8214e8b2380a7765b5ee8c03369622019","unresolved":false,"context_lines":[{"line_number":312,"context_line":"        try:"},{"line_number":313,"context_line":"            self._wait_for_task_to_complete(post_profile_task)"},{"line_number":314,"context_line":"        except exceptions.OneViewTaskError as e:"},{"line_number":315,"context_line":"            raise exceptions.OneViewServerProfileAssignmentError(e.message)"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"    def delete_server_profile_from_server_hardware(self, node_info):"},{"line_number":318,"context_line":"        server_hardware \u003d self.get_server_hardware(node_info)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5aef4532_6f3b22d2","line":315,"in_reply_to":"5aef4532_68a51803","updated":"2016-03-08 16:30:40.000000000","message":"That makes sense. Will return a server profile object though, since it changes less the driver implementation.","commit_id":"28b132b9609fc1fcf74759a2a1cd1b31953808fb"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"56f60dbe1b27439c478e65c60c7fe20ee92c3c27","unresolved":false,"context_lines":[{"line_number":312,"context_line":"        try:"},{"line_number":313,"context_line":"            self._wait_for_task_to_complete(post_profile_task)"},{"line_number":314,"context_line":"        except exceptions.OneViewTaskError as e:"},{"line_number":315,"context_line":"            raise exceptions.OneViewServerProfileAssignmentError(e.message)"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"    def delete_server_profile_from_server_hardware(self, node_info):"},{"line_number":318,"context_line":"        server_hardware \u003d self.get_server_hardware(node_info)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5aef4532_71e1459a","line":315,"in_reply_to":"5aef4532_6f3b22d2","updated":"2016-03-08 18:08:41.000000000","message":"It can be the uri as well.","commit_id":"28b132b9609fc1fcf74759a2a1cd1b31953808fb"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"549e43249661b0a2d5ee83ce887830697cf673a2","unresolved":false,"context_lines":[{"line_number":314,"context_line":"        except exceptions.OneViewTaskError as e:"},{"line_number":315,"context_line":"            raise exceptions.OneViewServerProfileAssignmentError(e.message)"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"    def delete_server_profile_from_server_hardware(self, node_info):"},{"line_number":318,"context_line":"        server_hardware \u003d self.get_server_hardware(node_info)"},{"line_number":319,"context_line":"        server_profile_uri \u003d server_hardware.server_profile_uri"},{"line_number":320,"context_line":"        if server_profile_uri:"}],"source_content_type":"text/x-python","patch_set":8,"id":"5aef4532_680fd8e1","line":317,"updated":"2016-03-07 16:47:19.000000000","message":"This method should receive the server profile id/uri as parameter, instead of reading from OneView, in order to avoid deleting someone else\u0027s profile.","commit_id":"28b132b9609fc1fcf74759a2a1cd1b31953808fb"},{"author":{"_account_id":14891,"name":"Lilia Sampaio","email":"liliars@lsd.ufcg.edu.br","username":"liliars"},"change_message_id":"504c6532282490b92a6d3b1746fd12bab4506223","unresolved":false,"context_lines":[{"line_number":314,"context_line":"        except exceptions.OneViewTaskError as e:"},{"line_number":315,"context_line":"            raise exceptions.OneViewServerProfileAssignmentError(e.message)"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"    def delete_server_profile_from_server_hardware(self, node_info):"},{"line_number":318,"context_line":"        server_hardware \u003d self.get_server_hardware(node_info)"},{"line_number":319,"context_line":"        server_profile_uri \u003d server_hardware.server_profile_uri"},{"line_number":320,"context_line":"        if server_profile_uri:"}],"source_content_type":"text/x-python","patch_set":8,"id":"1af94dfe_c76c249f","line":317,"in_reply_to":"1af94dfe_701d0c0f","updated":"2016-03-16 13:52:42.000000000","message":"Ok, I\u0027ll update this bit in a next patch set.","commit_id":"28b132b9609fc1fcf74759a2a1cd1b31953808fb"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"bff94659d17431b998b4bbda9644b13eec28430a","unresolved":false,"context_lines":[{"line_number":314,"context_line":"        except exceptions.OneViewTaskError as e:"},{"line_number":315,"context_line":"            raise exceptions.OneViewServerProfileAssignmentError(e.message)"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"    def delete_server_profile_from_server_hardware(self, node_info):"},{"line_number":318,"context_line":"        server_hardware \u003d self.get_server_hardware(node_info)"},{"line_number":319,"context_line":"        server_profile_uri \u003d server_hardware.server_profile_uri"},{"line_number":320,"context_line":"        if server_profile_uri:"}],"source_content_type":"text/x-python","patch_set":8,"id":"1af94dfe_701d0c0f","line":317,"in_reply_to":"3afc51ec_6d05d778","updated":"2016-03-15 16:00:56.000000000","message":"No, it won\u0027t. The server profile URI must be stored within the node\u0027s attributes at creation -- being returned directly from OneView\u0027s task result -- and should be passed here at deletion. That\u0027s why I asked you to return the URI/id in that method.\n\nThe point is: the id returned from the server profile creation task is the one that is the consequence from the call; thus no risk to get the id of a server profile created by someone else. It is the one created when the DB lock is acquired (or whatever consistency mechanism OneView uses). This case is analogous to a compare-and-swap in an SMP environment: write and return what has been written, instead of write and then read (where there is margin for race conditions).","commit_id":"28b132b9609fc1fcf74759a2a1cd1b31953808fb"},{"author":{"_account_id":14891,"name":"Lilia Sampaio","email":"liliars@lsd.ufcg.edu.br","username":"liliars"},"change_message_id":"ba7ad3c6a038542b1b6b558ac02fe8d8c0b0e157","unresolved":false,"context_lines":[{"line_number":314,"context_line":"        except exceptions.OneViewTaskError as e:"},{"line_number":315,"context_line":"            raise exceptions.OneViewServerProfileAssignmentError(e.message)"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"    def delete_server_profile_from_server_hardware(self, node_info):"},{"line_number":318,"context_line":"        server_hardware \u003d self.get_server_hardware(node_info)"},{"line_number":319,"context_line":"        server_profile_uri \u003d server_hardware.server_profile_uri"},{"line_number":320,"context_line":"        if server_profile_uri:"}],"source_content_type":"text/x-python","patch_set":8,"id":"3afc51ec_6d05d778","line":317,"in_reply_to":"5aef4532_119a8163","updated":"2016-03-14 19:47:33.000000000","message":"Ok, I\u0027m going to put this in another way. If we do send only the uri, the way we are going to get this info, using this lib in the driver code, is exactly the same as we are doing it here. We just change the moment in time when the uri is retrieved, which I reckon is much less than a second.","commit_id":"28b132b9609fc1fcf74759a2a1cd1b31953808fb"},{"author":{"_account_id":14891,"name":"Lilia Sampaio","email":"liliars@lsd.ufcg.edu.br","username":"liliars"},"change_message_id":"b9d5d2c8214e8b2380a7765b5ee8c03369622019","unresolved":false,"context_lines":[{"line_number":314,"context_line":"        except exceptions.OneViewTaskError as e:"},{"line_number":315,"context_line":"            raise exceptions.OneViewServerProfileAssignmentError(e.message)"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"    def delete_server_profile_from_server_hardware(self, node_info):"},{"line_number":318,"context_line":"        server_hardware \u003d self.get_server_hardware(node_info)"},{"line_number":319,"context_line":"        server_profile_uri \u003d server_hardware.server_profile_uri"},{"line_number":320,"context_line":"        if server_profile_uri:"}],"source_content_type":"text/x-python","patch_set":8,"id":"5aef4532_af77ea38","line":317,"in_reply_to":"5aef4532_680fd8e1","updated":"2016-03-08 16:30:40.000000000","message":"We are following the pattern used in the current version of the whole library. By sending to the client a dict containing the node\u0027s info, instead of only the uri of some obj, we ease the process of making changes in the lib, not having to change anything in the driver (we already had this discussion). In this particular case, the right profile will be removed since node_info contains the info of a particular node, which corresponds to a particular server hardware, which can receive only a server profile at a time. So imo, with this implementation, we already avoid deleting someone else\u0027s server profile (since we are using this method in the driver only for times when the node is not in use by oneview).","commit_id":"28b132b9609fc1fcf74759a2a1cd1b31953808fb"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"56f60dbe1b27439c478e65c60c7fe20ee92c3c27","unresolved":false,"context_lines":[{"line_number":314,"context_line":"        except exceptions.OneViewTaskError as e:"},{"line_number":315,"context_line":"            raise exceptions.OneViewServerProfileAssignmentError(e.message)"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"    def delete_server_profile_from_server_hardware(self, node_info):"},{"line_number":318,"context_line":"        server_hardware \u003d self.get_server_hardware(node_info)"},{"line_number":319,"context_line":"        server_profile_uri \u003d server_hardware.server_profile_uri"},{"line_number":320,"context_line":"        if server_profile_uri:"}],"source_content_type":"text/x-python","patch_set":8,"id":"5aef4532_119a8163","line":317,"in_reply_to":"5aef4532_af77ea38","updated":"2016-03-08 18:08:41.000000000","message":"No, we don\u0027t avoid it if we don\u0027t tell OneView exactly which server profile we mean to delete.\n\nThis change must come with the change in apply_server_profile mentioned in its own comment.\n\nA case when it can go wrong:\n\n- Driver uses node\n- Driver starts deleting\n- OneView user changes the SP\n- Driver sends delete command to the user\u0027s profile","commit_id":"28b132b9609fc1fcf74759a2a1cd1b31953808fb"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"549e43249661b0a2d5ee83ce887830697cf673a2","unresolved":false,"context_lines":[{"line_number":324,"context_line":"            try:"},{"line_number":325,"context_line":"                self._wait_for_task_to_complete(delete_profile_task)"},{"line_number":326,"context_line":"            except exceptions.OneViewTaskError as e:"},{"line_number":327,"context_line":"                raise exceptions.OneViewServerProfileAssignmentError("},{"line_number":328,"context_line":"                    e.message"},{"line_number":329,"context_line":"                )"},{"line_number":330,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5aef4532_0830d455","line":327,"updated":"2016-03-07 16:47:19.000000000","message":"Shouldn\u0027t it be DeletionError?","commit_id":"28b132b9609fc1fcf74759a2a1cd1b31953808fb"},{"author":{"_account_id":14891,"name":"Lilia Sampaio","email":"liliars@lsd.ufcg.edu.br","username":"liliars"},"change_message_id":"b9d5d2c8214e8b2380a7765b5ee8c03369622019","unresolved":false,"context_lines":[{"line_number":324,"context_line":"            try:"},{"line_number":325,"context_line":"                self._wait_for_task_to_complete(delete_profile_task)"},{"line_number":326,"context_line":"            except exceptions.OneViewTaskError as e:"},{"line_number":327,"context_line":"                raise exceptions.OneViewServerProfileAssignmentError("},{"line_number":328,"context_line":"                    e.message"},{"line_number":329,"context_line":"                )"},{"line_number":330,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5aef4532_2f0d9a90","line":327,"in_reply_to":"5aef4532_0830d455","updated":"2016-03-08 16:30:40.000000000","message":"Yeah, I can add some similar exception.","commit_id":"28b132b9609fc1fcf74759a2a1cd1b31953808fb"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"549e43249661b0a2d5ee83ce887830697cf673a2","unresolved":false,"context_lines":[{"line_number":326,"context_line":"            except exceptions.OneViewTaskError as e:"},{"line_number":327,"context_line":"                raise exceptions.OneViewServerProfileAssignmentError("},{"line_number":328,"context_line":"                    e.message"},{"line_number":329,"context_line":"                )"},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"    # ---- Node Validate ----"},{"line_number":332,"context_line":"    def validate_node_server_hardware("}],"source_content_type":"text/x-python","patch_set":8,"id":"5aef4532_68feb86c","line":329,"updated":"2016-03-07 16:47:19.000000000","message":"... then it should return something telling the user of the library if the profile has actually been deleted (it can be an exception, depends on your design decisions)","commit_id":"28b132b9609fc1fcf74759a2a1cd1b31953808fb"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"bff94659d17431b998b4bbda9644b13eec28430a","unresolved":false,"context_lines":[{"line_number":326,"context_line":"            except exceptions.OneViewTaskError as e:"},{"line_number":327,"context_line":"                raise exceptions.OneViewServerProfileAssignmentError("},{"line_number":328,"context_line":"                    e.message"},{"line_number":329,"context_line":"                )"},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"    # ---- Node Validate ----"},{"line_number":332,"context_line":"    def validate_node_server_hardware("}],"source_content_type":"text/x-python","patch_set":8,"id":"1af94dfe_8eefdeaf","line":329,"in_reply_to":"3afc51ec_6dd4b71f","updated":"2016-03-15 16:00:56.000000000","message":"Never mind then.","commit_id":"28b132b9609fc1fcf74759a2a1cd1b31953808fb"},{"author":{"_account_id":14891,"name":"Lilia Sampaio","email":"liliars@lsd.ufcg.edu.br","username":"liliars"},"change_message_id":"b9d5d2c8214e8b2380a7765b5ee8c03369622019","unresolved":false,"context_lines":[{"line_number":326,"context_line":"            except exceptions.OneViewTaskError as e:"},{"line_number":327,"context_line":"                raise exceptions.OneViewServerProfileAssignmentError("},{"line_number":328,"context_line":"                    e.message"},{"line_number":329,"context_line":"                )"},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"    # ---- Node Validate ----"},{"line_number":332,"context_line":"    def validate_node_server_hardware("}],"source_content_type":"text/x-python","patch_set":8,"id":"5aef4532_c2020d09","line":329,"in_reply_to":"5aef4532_68feb86c","updated":"2016-03-08 16:30:40.000000000","message":"There are log messages in the driver for such operations.","commit_id":"28b132b9609fc1fcf74759a2a1cd1b31953808fb"},{"author":{"_account_id":14891,"name":"Lilia Sampaio","email":"liliars@lsd.ufcg.edu.br","username":"liliars"},"change_message_id":"ba7ad3c6a038542b1b6b558ac02fe8d8c0b0e157","unresolved":false,"context_lines":[{"line_number":326,"context_line":"            except exceptions.OneViewTaskError as e:"},{"line_number":327,"context_line":"                raise exceptions.OneViewServerProfileAssignmentError("},{"line_number":328,"context_line":"                    e.message"},{"line_number":329,"context_line":"                )"},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"    # ---- Node Validate ----"},{"line_number":332,"context_line":"    def validate_node_server_hardware("}],"source_content_type":"text/x-python","patch_set":8,"id":"3afc51ec_6dd4b71f","line":329,"in_reply_to":"5aef4532_71c0252b","updated":"2016-03-14 19:47:33.000000000","message":"Ok. So a boolean then? An exception is already raised if anything goes wrong, so basically you want output for the cases it went well? Anyways, I don\u0027t see how only the exception is not acceptable. The way it was implemented, if no exception is raised, then obviously everything went well.","commit_id":"28b132b9609fc1fcf74759a2a1cd1b31953808fb"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"56f60dbe1b27439c478e65c60c7fe20ee92c3c27","unresolved":false,"context_lines":[{"line_number":326,"context_line":"            except exceptions.OneViewTaskError as e:"},{"line_number":327,"context_line":"                raise exceptions.OneViewServerProfileAssignmentError("},{"line_number":328,"context_line":"                    e.message"},{"line_number":329,"context_line":"                )"},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"    # ---- Node Validate ----"},{"line_number":332,"context_line":"    def validate_node_server_hardware("}],"source_content_type":"text/x-python","patch_set":8,"id":"5aef4532_71c0252b","line":329,"in_reply_to":"5aef4532_c2020d09","updated":"2016-03-08 18:08:41.000000000","message":"When I say \"the user of the library\" I mean the code that uses the library, not the person behind a service where this library can be used.","commit_id":"28b132b9609fc1fcf74759a2a1cd1b31953808fb"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"549e43249661b0a2d5ee83ce887830697cf673a2","unresolved":false,"context_lines":[{"line_number":372,"context_line":"        server_hardware_json \u003d self._prepare_and_do_request("},{"line_number":373,"context_line":"            uri\u003dserver_hardware_uri"},{"line_number":374,"context_line":"        )"},{"line_number":375,"context_line":"        return server_hardware_json.get(\u0027state\u0027) \u003d\u003d \u0027ProfileApplied\u0027"},{"line_number":376,"context_line":""},{"line_number":377,"context_line":"    def validate_node_enclosure_group(self, node_info):"},{"line_number":378,"context_line":"        server_hardware \u003d self.get_server_hardware(node_info)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5aef4532_5e829601","line":375,"updated":"2016-03-07 16:47:19.000000000","message":"It should use the parsed state from get_server_hardware instead.","commit_id":"28b132b9609fc1fcf74759a2a1cd1b31953808fb"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"a256fb6cc1abd7bfa951781d253cf44e8b2cb965","unresolved":false,"context_lines":[{"line_number":302,"context_line":"        except exceptions.OneViewTaskError as e:"},{"line_number":303,"context_line":"            raise exceptions.OneViewServerProfileAssignmentError(e.message)"},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"        return self.get_server_profile_from_hardware(node_info)"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":"    def delete_server_profile_from_server_hardware(self, node_info):"},{"line_number":308,"context_line":"        server_hardware \u003d self.get_server_hardware(node_info)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5aef4532_f1cd55b8","line":305,"updated":"2016-03-08 18:08:27.000000000","message":"Doesn\u0027t the create-profile task return the id or uri of the newly created profile?\n\nIt is important to avoid race conditions. They may still occur if we gather the value instead of receiving it as the return of the create-profile command.","commit_id":"8f142aa363e36738556a1bbc0cad448a202db7d8"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"ff2399e7db407b3a671c606d2ff0e301ac958466","unresolved":false,"context_lines":[{"line_number":302,"context_line":"        except exceptions.OneViewTaskError as e:"},{"line_number":303,"context_line":"            raise exceptions.OneViewServerProfileAssignmentError(e.message)"},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"        return self.get_server_profile_from_hardware(node_info)"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":"    def delete_server_profile_from_server_hardware(self, node_info):"},{"line_number":308,"context_line":"        server_hardware \u003d self.get_server_hardware(node_info)"}],"source_content_type":"text/x-python","patch_set":9,"id":"1af94dfe_b3ef9eaf","line":305,"in_reply_to":"3afc51ec_ad0a3f1f","updated":"2016-03-15 16:00:44.000000000","message":"For rationale, see the comment on patch set 8. To be clearer: return the id that comes as result of the task, when it ends.","commit_id":"8f142aa363e36738556a1bbc0cad448a202db7d8"},{"author":{"_account_id":14891,"name":"Lilia Sampaio","email":"liliars@lsd.ufcg.edu.br","username":"liliars"},"change_message_id":"e33294ab3a10ada5f6cf1ea99c0c5af1fa3a8aeb","unresolved":false,"context_lines":[{"line_number":302,"context_line":"        except exceptions.OneViewTaskError as e:"},{"line_number":303,"context_line":"            raise exceptions.OneViewServerProfileAssignmentError(e.message)"},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"        return self.get_server_profile_from_hardware(node_info)"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":"    def delete_server_profile_from_server_hardware(self, node_info):"},{"line_number":308,"context_line":"        server_hardware \u003d self.get_server_hardware(node_info)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3afc51ec_ad0a3f1f","line":305,"in_reply_to":"5aef4532_f1cd55b8","updated":"2016-03-14 19:47:40.000000000","message":"Yes it does. However, I don\u0027t see how this avoids race conditions. When we return the uri of the object (or the object itself), the task is already finished anyways. And once the task is finished someone can grab the server profile, afaik. We can\u0027t end the workflow of the method before the task is finished, so I just don\u0027t see the difference. Am I missing something?\n\nNote: I don\u0027t actually mind, although I\u0027ll have to update the current patch of dyn-allocation in Ironic. Just want to understand the reasons why your approach is better (:","commit_id":"8f142aa363e36738556a1bbc0cad448a202db7d8"},{"author":{"_account_id":10697,"name":"Thiago Paiva Brito","email":"thiagop@lsd.ufcg.edu.br","username":"thiagop","inactive":true},"change_message_id":"51e78876a934326f2628c58814e279c64690c451","unresolved":false,"context_lines":[{"line_number":185,"context_line":"        uuid \u003d node_info[\u0027server_hardware_uri\u0027].split(\"/\")[-1]"},{"line_number":186,"context_line":"        return self.get_server_hardware_by_uuid(uuid)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    def get_server_hardware_state(self, node_info):"},{"line_number":189,"context_line":"        server_hardware \u003d self.get_server_hardware(node_info)"},{"line_number":190,"context_line":"        return server_hardware.state"},{"line_number":191,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1af94dfe_0f1823d2","line":188,"range":{"start_line":188,"start_character":40,"end_line":188,"end_character":49},"updated":"2016-03-18 18:06:23.000000000","message":"This is a new method. Why is it receiving node_info?","commit_id":"1f5b9837bc79aa5e710effe95ac76400c98d8d4c"},{"author":{"_account_id":10697,"name":"Thiago Paiva Brito","email":"thiagop@lsd.ufcg.edu.br","username":"thiagop","inactive":true},"change_message_id":"51e78876a934326f2628c58814e279c64690c451","unresolved":false,"context_lines":[{"line_number":279,"context_line":"            raise exceptions.OneViewErrorSettingBootDevice(e.message)"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"    # ---- Deploy Driver ----"},{"line_number":282,"context_line":"    def apply_server_profile(self, server_profile_name, node_info):"},{"line_number":283,"context_line":"        node_sh_uri \u003d node_info.get(\u0027server_hardware_uri\u0027)"},{"line_number":284,"context_line":"        node_spt_uri \u003d node_info.get(\u0027server_profile_template_uri\u0027)"},{"line_number":285,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1af94dfe_4f0eab8c","line":282,"range":{"start_line":282,"start_character":56,"end_line":282,"end_character":65},"updated":"2016-03-18 18:06:23.000000000","message":"ditto","commit_id":"1f5b9837bc79aa5e710effe95ac76400c98d8d4c"},{"author":{"_account_id":14923,"name":"Sinval Vieira Mendes Neto","email":"sinvalneto01@gmail.com","username":"sinvalvieira"},"change_message_id":"8fab9801488240a1cc6572a2c3ac38b5eb6c5081","unresolved":false,"context_lines":[{"line_number":279,"context_line":"            raise exceptions.OneViewErrorSettingBootDevice(e.message)"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"    # ---- Deploy Driver ----"},{"line_number":282,"context_line":"    def apply_server_profile(self, server_profile_name, node_info):"},{"line_number":283,"context_line":"        node_sh_uri \u003d node_info.get(\u0027server_hardware_uri\u0027)"},{"line_number":284,"context_line":"        node_spt_uri \u003d node_info.get(\u0027server_profile_template_uri\u0027)"},{"line_number":285,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"ba0121b8_60a074a0","line":282,"range":{"start_line":282,"start_character":56,"end_line":282,"end_character":65},"in_reply_to":"1af94dfe_4f0eab8c","updated":"2016-03-29 14:19:34.000000000","message":"We don\u0027t want to do this, keep node_info param for dynalloc current version compatibility.","commit_id":"1f5b9837bc79aa5e710effe95ac76400c98d8d4c"},{"author":{"_account_id":10697,"name":"Thiago Paiva Brito","email":"thiagop@lsd.ufcg.edu.br","username":"thiagop","inactive":true},"change_message_id":"090ef250c4cb794533e8ed9d7842d242d28fedee","unresolved":false,"context_lines":[{"line_number":279,"context_line":"            raise exceptions.OneViewErrorSettingBootDevice(e.message)"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"    # ---- Deploy Driver ----"},{"line_number":282,"context_line":"    def apply_server_profile(self, server_profile_name, node_info):"},{"line_number":283,"context_line":"        node_sh_uri \u003d node_info.get(\u0027server_hardware_uri\u0027)"},{"line_number":284,"context_line":"        node_spt_uri \u003d node_info.get(\u0027server_profile_template_uri\u0027)"},{"line_number":285,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"ba0121b8_65cd9430","line":282,"range":{"start_line":282,"start_character":56,"end_line":282,"end_character":65},"in_reply_to":"ba0121b8_60a074a0","updated":"2016-03-31 18:27:12.000000000","message":"The code for dynamic allocation for the driver has not yet beeing merged. Talking to Gabriel we agreed that we don\u0027t want to build on technical debt that can be stretched for 1.5 year in favor of consistency of driver calls. Please, update the call to use uuid(s) needed and change the driver patch accordingly.\n\nASAP, we\u0027ll send a patch to refactor the driver to use only the UUID methods.","commit_id":"1f5b9837bc79aa5e710effe95ac76400c98d8d4c"},{"author":{"_account_id":10697,"name":"Thiago Paiva Brito","email":"thiagop@lsd.ufcg.edu.br","username":"thiagop","inactive":true},"change_message_id":"51e78876a934326f2628c58814e279c64690c451","unresolved":false,"context_lines":[{"line_number":487,"context_line":"            )"},{"line_number":488,"context_line":"            raise exceptions.OneViewInconsistentResource(message)"},{"line_number":489,"context_line":""},{"line_number":490,"context_line":"    def validate_spt_boot_connections(self, node_info):"},{"line_number":491,"context_line":"        server_profile_template \u003d self.get_server_profile_template(node_info)"},{"line_number":492,"context_line":""},{"line_number":493,"context_line":"        for connection in server_profile_template.connections:"}],"source_content_type":"text/x-python","patch_set":13,"id":"1af94dfe_ef1fb7b4","line":490,"range":{"start_line":490,"start_character":44,"end_line":490,"end_character":53},"updated":"2016-03-18 18:06:23.000000000","message":"ditto","commit_id":"1f5b9837bc79aa5e710effe95ac76400c98d8d4c"},{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"5c5b569c07653320d4376ac5a9d127007d0235f6","unresolved":false,"context_lines":[{"line_number":185,"context_line":"        uuid \u003d node_info[\u0027server_hardware_uri\u0027].split(\"/\")[-1]"},{"line_number":186,"context_line":"        return self.get_server_hardware_by_uuid(uuid)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    def get_server_hardware_state(self, uuid):"},{"line_number":189,"context_line":"        server_hardware \u003d self.get_server_hardware_by_uuid(uuid)"},{"line_number":190,"context_line":"        return server_hardware.state"},{"line_number":191,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"ba0121b8_54dec43f","line":188,"range":{"start_line":188,"start_character":40,"end_line":188,"end_character":44},"updated":"2016-03-29 18:00:54.000000000","message":"node_info replaced in favor of uuid.","commit_id":"bb1c10579d372772daa3942ca2ee55dbffffa543"},{"author":{"_account_id":10697,"name":"Thiago Paiva Brito","email":"thiagop@lsd.ufcg.edu.br","username":"thiagop","inactive":true},"change_message_id":"8f38d355b8c91881c433b9f78631acff65e28ad3","unresolved":false,"context_lines":[{"line_number":279,"context_line":"            raise exceptions.OneViewErrorSettingBootDevice(e.message)"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"    # ---- Deploy Driver ----"},{"line_number":282,"context_line":"    def apply_server_profile(self, server_profile_name, node_info):"},{"line_number":283,"context_line":"        node_sh_uri \u003d node_info.get(\u0027server_hardware_uri\u0027)"},{"line_number":284,"context_line":"        node_spt_uri \u003d node_info.get(\u0027server_profile_template_uri\u0027)"},{"line_number":285,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"ba0121b8_d708932a","line":282,"range":{"start_line":282,"start_character":56,"end_line":282,"end_character":65},"updated":"2016-03-31 18:29:43.000000000","message":"Please, update this as requested on Patch Set 13.","commit_id":"bb1c10579d372772daa3942ca2ee55dbffffa543"},{"author":{"_account_id":10697,"name":"Thiago Paiva Brito","email":"thiagop@lsd.ufcg.edu.br","username":"thiagop","inactive":true},"change_message_id":"8f38d355b8c91881c433b9f78631acff65e28ad3","unresolved":false,"context_lines":[{"line_number":481,"context_line":"            )"},{"line_number":482,"context_line":"            raise exceptions.OneViewInconsistentResource(message)"},{"line_number":483,"context_line":""},{"line_number":484,"context_line":"    def validate_spt_boot_connections(self, node_info):"},{"line_number":485,"context_line":"        server_profile_template \u003d self.get_server_profile_template(node_info)"},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"        for connection in server_profile_template.connections:"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba0121b8_45069020","line":484,"range":{"start_line":484,"start_character":44,"end_line":484,"end_character":53},"updated":"2016-03-31 18:29:43.000000000","message":"new function. Use uuid.","commit_id":"bb1c10579d372772daa3942ca2ee55dbffffa543"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"16c50a07a3bfb5a01479c76dd56432156a8bba9f","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"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":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"class Client(object):"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a061dce_06356df6","line":45,"updated":"2016-04-08 15:15:04.000000000","message":"Where is it being used?","commit_id":"518bd47fe34eb18297ea5b0efb725053288b766f"},{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"1ff93e421591f3cbaf1b272d7091b66c1e87df84","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"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":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"class Client(object):"}],"source_content_type":"text/x-python","patch_set":15,"id":"7a1b2928_a65bc753","line":45,"in_reply_to":"9a061dce_06356df6","updated":"2016-04-11 17:37:20.000000000","message":"Hi Gabriel, lines 313 and 329.","commit_id":"518bd47fe34eb18297ea5b0efb725053288b766f"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"16c50a07a3bfb5a01479c76dd56432156a8bba9f","unresolved":false,"context_lines":[{"line_number":284,"context_line":"                             server_profile_name,"},{"line_number":285,"context_line":"                             server_hardware_uuid,"},{"line_number":286,"context_line":"                             server_profile_template_uuid):"},{"line_number":287,"context_line":"        if server_profile_name and server_hardware_uuid and \\"},{"line_number":288,"context_line":"           server_profile_template_uuid:"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"            server_hardware_uri \u003d \u0027%s%s\u0027 % ("}],"source_content_type":"text/x-python","patch_set":15,"id":"9a061dce_c6e1b59c","line":287,"updated":"2016-04-08 15:15:04.000000000","message":"Why is the lack of any of these simply ignored instead of throwing an error?","commit_id":"518bd47fe34eb18297ea5b0efb725053288b766f"},{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"1ff93e421591f3cbaf1b272d7091b66c1e87df84","unresolved":false,"context_lines":[{"line_number":284,"context_line":"                             server_profile_name,"},{"line_number":285,"context_line":"                             server_hardware_uuid,"},{"line_number":286,"context_line":"                             server_profile_template_uuid):"},{"line_number":287,"context_line":"        if server_profile_name and server_hardware_uuid and \\"},{"line_number":288,"context_line":"           server_profile_template_uuid:"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"            server_hardware_uri \u003d \u0027%s%s\u0027 % ("}],"source_content_type":"text/x-python","patch_set":15,"id":"7a1b2928_863b2beb","line":287,"in_reply_to":"9a061dce_c6e1b59c","updated":"2016-04-11 17:37:20.000000000","message":"Done.","commit_id":"518bd47fe34eb18297ea5b0efb725053288b766f"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"16c50a07a3bfb5a01479c76dd56432156a8bba9f","unresolved":false,"context_lines":[{"line_number":321,"context_line":"            except exceptions.OneViewTaskError as e:"},{"line_number":322,"context_line":"                raise exceptions.OneViewServerProfileAssignmentError(e.message)"},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"            return complete_task.get(\u0027associatedResource\u0027).get(\u0027resourceUri\u0027)"},{"line_number":325,"context_line":""},{"line_number":326,"context_line":"    def delete_server_profile(self, uuid):"},{"line_number":327,"context_line":"        if uuid:"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a061dce_21733bb6","line":324,"updated":"2016-04-08 15:15:04.000000000","message":"@thiagop: I wonder if we should return the uuid instead of the uri in these new methods that receive uuids. WDYT?","commit_id":"518bd47fe34eb18297ea5b0efb725053288b766f"},{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"1ff93e421591f3cbaf1b272d7091b66c1e87df84","unresolved":false,"context_lines":[{"line_number":321,"context_line":"            except exceptions.OneViewTaskError as e:"},{"line_number":322,"context_line":"                raise exceptions.OneViewServerProfileAssignmentError(e.message)"},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"            return complete_task.get(\u0027associatedResource\u0027).get(\u0027resourceUri\u0027)"},{"line_number":325,"context_line":""},{"line_number":326,"context_line":"    def delete_server_profile(self, uuid):"},{"line_number":327,"context_line":"        if uuid:"}],"source_content_type":"text/x-python","patch_set":15,"id":"7a1b2928_e62c9fad","line":324,"in_reply_to":"9a061dce_21733bb6","updated":"2016-04-11 17:37:20.000000000","message":"Waiting for this, for now remains the same.","commit_id":"518bd47fe34eb18297ea5b0efb725053288b766f"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"16c50a07a3bfb5a01479c76dd56432156a8bba9f","unresolved":false,"context_lines":[{"line_number":324,"context_line":"            return complete_task.get(\u0027associatedResource\u0027).get(\u0027resourceUri\u0027)"},{"line_number":325,"context_line":""},{"line_number":326,"context_line":"    def delete_server_profile(self, uuid):"},{"line_number":327,"context_line":"        if uuid:"},{"line_number":328,"context_line":"            delete_profile_task \u003d self._prepare_and_do_request("},{"line_number":329,"context_line":"                uri\u003d\u0027%s%s\u0027 % (SERVER_PROFILE_PREFIX_URI, uuid),"},{"line_number":330,"context_line":"                request_type\u003dDELETE_REQUEST_TYPE"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a061dce_8685fdae","line":327,"updated":"2016-04-08 15:15:04.000000000","message":"Ditto @ 287","commit_id":"518bd47fe34eb18297ea5b0efb725053288b766f"},{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"1ff93e421591f3cbaf1b272d7091b66c1e87df84","unresolved":false,"context_lines":[{"line_number":324,"context_line":"            return complete_task.get(\u0027associatedResource\u0027).get(\u0027resourceUri\u0027)"},{"line_number":325,"context_line":""},{"line_number":326,"context_line":"    def delete_server_profile(self, uuid):"},{"line_number":327,"context_line":"        if uuid:"},{"line_number":328,"context_line":"            delete_profile_task \u003d self._prepare_and_do_request("},{"line_number":329,"context_line":"                uri\u003d\u0027%s%s\u0027 % (SERVER_PROFILE_PREFIX_URI, uuid),"},{"line_number":330,"context_line":"                request_type\u003dDELETE_REQUEST_TYPE"}],"source_content_type":"text/x-python","patch_set":15,"id":"7a1b2928_a6090734","line":327,"in_reply_to":"9a061dce_8685fdae","updated":"2016-04-11 17:37:20.000000000","message":"Done.","commit_id":"518bd47fe34eb18297ea5b0efb725053288b766f"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"16c50a07a3bfb5a01479c76dd56432156a8bba9f","unresolved":false,"context_lines":[{"line_number":503,"context_line":"            )"},{"line_number":504,"context_line":"            raise exceptions.OneViewInconsistentResource(message)"},{"line_number":505,"context_line":""},{"line_number":506,"context_line":"    def validate_spt_boot_connections(self, node_info):"},{"line_number":507,"context_line":"        server_profile_template \u003d self.get_server_profile_template(node_info)"},{"line_number":508,"context_line":""},{"line_number":509,"context_line":"        for connection in server_profile_template.connections:"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a061dce_666c2909","line":506,"updated":"2016-04-08 15:15:04.000000000","message":"Still missing this method with node_info.","commit_id":"518bd47fe34eb18297ea5b0efb725053288b766f"},{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"1ff93e421591f3cbaf1b272d7091b66c1e87df84","unresolved":false,"context_lines":[{"line_number":503,"context_line":"            )"},{"line_number":504,"context_line":"            raise exceptions.OneViewInconsistentResource(message)"},{"line_number":505,"context_line":""},{"line_number":506,"context_line":"    def validate_spt_boot_connections(self, node_info):"},{"line_number":507,"context_line":"        server_profile_template \u003d self.get_server_profile_template(node_info)"},{"line_number":508,"context_line":""},{"line_number":509,"context_line":"        for connection in server_profile_template.connections:"}],"source_content_type":"text/x-python","patch_set":15,"id":"7a1b2928_e8090d2e","line":506,"in_reply_to":"9a061dce_666c2909","updated":"2016-04-11 17:37:20.000000000","message":"Done.","commit_id":"518bd47fe34eb18297ea5b0efb725053288b766f"},{"author":{"_account_id":10697,"name":"Thiago Paiva Brito","email":"thiagop@lsd.ufcg.edu.br","username":"thiagop","inactive":true},"change_message_id":"7a0193425f4ef71ab1fadb96b08c79bdda29e857","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from oneview_client import exceptions"},{"line_number":23,"context_line":"from oneview_client import ilo_utils"},{"line_number":24,"context_line":"from oneview_client.models import ServerHardware"},{"line_number":25,"context_line":"from oneview_client.models import ServerProfile"},{"line_number":26,"context_line":"from oneview_client.models import ServerProfileTemplate"},{"line_number":27,"context_line":"from oneview_client import states"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"7a1b2928_68569dd3","line":26,"range":{"start_line":24,"start_character":0,"end_line":26,"end_character":55},"updated":"2016-04-11 17:41:08.000000000","message":"care to refactor that as in the other module, please?","commit_id":"c10e39c0423e45bde3003cb68a9d1ebfa9598197"},{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"1125bec02c2b274b9efaaadafe3779afe275dade","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from oneview_client import exceptions"},{"line_number":23,"context_line":"from oneview_client import ilo_utils"},{"line_number":24,"context_line":"from oneview_client.models import ServerHardware"},{"line_number":25,"context_line":"from oneview_client.models import ServerProfile"},{"line_number":26,"context_line":"from oneview_client.models import ServerProfileTemplate"},{"line_number":27,"context_line":"from oneview_client import states"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"5a18252c_b5816050","line":26,"range":{"start_line":24,"start_character":0,"end_line":26,"end_character":55},"in_reply_to":"7a1b2928_68569dd3","updated":"2016-04-11 20:54:49.000000000","message":"Done.","commit_id":"c10e39c0423e45bde3003cb68a9d1ebfa9598197"},{"author":{"_account_id":10697,"name":"Thiago Paiva Brito","email":"thiagop@lsd.ufcg.edu.br","username":"thiagop","inactive":true},"change_message_id":"f15d39d242ebed229fff0b14e9ba98d48ba50aa0","unresolved":false,"context_lines":[{"line_number":278,"context_line":"            raise exceptions.OneViewErrorSettingBootDevice(e.message)"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"    # ---- Deploy Driver ----"},{"line_number":281,"context_line":"    def apply_server_profile(self,"},{"line_number":282,"context_line":"                             server_profile_name,"},{"line_number":283,"context_line":"                             server_hardware_uuid,"},{"line_number":284,"context_line":"                             server_profile_template_uuid):"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a18252c_1b056cbb","line":281,"range":{"start_line":281,"start_character":8,"end_line":281,"end_character":28},"updated":"2016-04-13 20:54:40.000000000","message":"I liked when this function name was \u0027clone_and_assign\u0027. This name doesn\u0027t reflects what is being done here (Creating a SP based on SPT and applying to SH). We could think of a better name...\n\napply_profile_from_template?\nclone_template_and_apply?\ncreate_profile_from_template_and_apply?\n[Maybe split it in two, thinking of end-users/responsability]\ncreate_profile_from_template \u0026\u0026 apply_server_profile?","commit_id":"1d14b7792034fe16d6c6d7737085714185b6d57d"},{"author":{"_account_id":14943,"name":"Caio Oliveira","email":"caiobo@lsd.ufcg.edu.br","username":"caiobo"},"change_message_id":"33dd7453dcb668f3a16d18947fe9cbabf0447b15","unresolved":false,"context_lines":[{"line_number":278,"context_line":"            raise exceptions.OneViewErrorSettingBootDevice(e.message)"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"    # ---- Deploy Driver ----"},{"line_number":281,"context_line":"    def apply_server_profile(self,"},{"line_number":282,"context_line":"                             server_profile_name,"},{"line_number":283,"context_line":"                             server_hardware_uuid,"},{"line_number":284,"context_line":"                             server_profile_template_uuid):"}],"source_content_type":"text/x-python","patch_set":17,"id":"dab17558_e9c7a293","line":281,"range":{"start_line":281,"start_character":8,"end_line":281,"end_character":28},"in_reply_to":"5a18252c_1b056cbb","updated":"2016-05-11 15:00:59.000000000","message":"Done","commit_id":"1d14b7792034fe16d6c6d7737085714185b6d57d"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"a6ab569ecfb1c53edb6b23f0e933f253525df7ac","unresolved":false,"context_lines":[{"line_number":284,"context_line":"                             server_profile_template_uuid):"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"        if not server_profile_name:"},{"line_number":287,"context_line":"            raise exceptions.OneViewMissingValueException("},{"line_number":288,"context_line":"                \u0027Missing Server Profile name.\u0027"},{"line_number":289,"context_line":"            )"},{"line_number":290,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"5a18252c_95868063","line":287,"updated":"2016-04-13 14:44:50.000000000","message":"Why not to use python\u0027s ValueError instead?\n\nI don\u0027t think anyone will capture this exception, as it should mean they are doing something wrong and the process should crash anyway.","commit_id":"1d14b7792034fe16d6c6d7737085714185b6d57d"},{"author":{"_account_id":10697,"name":"Thiago Paiva Brito","email":"thiagop@lsd.ufcg.edu.br","username":"thiagop","inactive":true},"change_message_id":"18bff8b916e12d0127e32c8bc91eb5e789fc90df","unresolved":false,"context_lines":[{"line_number":284,"context_line":"                             server_profile_template_uuid):"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"        if not server_profile_name:"},{"line_number":287,"context_line":"            raise exceptions.OneViewMissingValueException("},{"line_number":288,"context_line":"                \u0027Missing Server Profile name.\u0027"},{"line_number":289,"context_line":"            )"},{"line_number":290,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"5a18252c_a3241daf","line":287,"in_reply_to":"5a18252c_95868063","updated":"2016-04-13 16:07:52.000000000","message":"All exceptions inherited from OneViewError are captured at some level, such as in:\nhttps://review.openstack.org/#/c/286192/4/ironic/drivers/modules/oneview/deploy_utils.py@49 \nhttps://review.openstack.org/#/c/286192/4/ironic/drivers/modules/oneview/deploy_utils.py@76\n\nThat way, we can treat some of the exceptions without blowing the conductor.","commit_id":"1d14b7792034fe16d6c6d7737085714185b6d57d"},{"author":{"_account_id":10697,"name":"Thiago Paiva Brito","email":"thiagop@lsd.ufcg.edu.br","username":"thiagop","inactive":true},"change_message_id":"f15d39d242ebed229fff0b14e9ba98d48ba50aa0","unresolved":false,"context_lines":[{"line_number":284,"context_line":"                             server_profile_template_uuid):"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"        if not server_profile_name:"},{"line_number":287,"context_line":"            raise exceptions.OneViewMissingValueException("},{"line_number":288,"context_line":"                \u0027Missing Server Profile name.\u0027"},{"line_number":289,"context_line":"            )"},{"line_number":290,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"5a18252c_dbe814e5","line":287,"in_reply_to":"5a18252c_a3241daf","updated":"2016-04-13 20:54:40.000000000","message":"Gabriel\u0027s point here (as talked in Hangouts) is that it\u0027s not a OneView exception. It is checking only if the lib\u0027s consumer is passing the parameters required. I\u0027m now thinking about the value of checking parameters here...","commit_id":"1d14b7792034fe16d6c6d7737085714185b6d57d"},{"author":{"_account_id":14943,"name":"Caio Oliveira","email":"caiobo@lsd.ufcg.edu.br","username":"caiobo"},"change_message_id":"33dd7453dcb668f3a16d18947fe9cbabf0447b15","unresolved":false,"context_lines":[{"line_number":284,"context_line":"                             server_profile_template_uuid):"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"        if not server_profile_name:"},{"line_number":287,"context_line":"            raise exceptions.OneViewMissingValueException("},{"line_number":288,"context_line":"                \u0027Missing Server Profile name.\u0027"},{"line_number":289,"context_line":"            )"},{"line_number":290,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"dab17558_1adb461c","line":287,"in_reply_to":"5a18252c_dbe814e5","updated":"2016-05-11 15:00:59.000000000","message":"Done","commit_id":"1d14b7792034fe16d6c6d7737085714185b6d57d"},{"author":{"_account_id":10697,"name":"Thiago Paiva Brito","email":"thiagop@lsd.ufcg.edu.br","username":"thiagop","inactive":true},"change_message_id":"f15d39d242ebed229fff0b14e9ba98d48ba50aa0","unresolved":false,"context_lines":[{"line_number":332,"context_line":"        except exceptions.OneViewTaskError as e:"},{"line_number":333,"context_line":"            raise exceptions.OneViewServerProfileAssignmentError(e.message)"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"        return complete_task.get(\u0027associatedResource\u0027).get(\u0027resourceUri\u0027)"},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"    def delete_server_profile(self, uuid):"},{"line_number":338,"context_line":"        if not uuid:"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a18252c_98450272","line":335,"range":{"start_line":335,"start_character":8,"end_line":335,"end_character":73},"updated":"2016-04-13 20:54:40.000000000","message":"Answering Gabriel on patchset 15, I\u0027d return not just uuid but a ServerProfile object instead.","commit_id":"1d14b7792034fe16d6c6d7737085714185b6d57d"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"66e988ef49eec406d8c71f7a87a957089cd1789b","unresolved":false,"context_lines":[{"line_number":348,"context_line":"        uuid \u003d server_profile_uri.split(\"/\")[-1]"},{"line_number":349,"context_line":"        server_profile_return \u003d self.get_server_profile_by_uuid(uuid)"},{"line_number":350,"context_line":""},{"line_number":351,"context_line":"        return server_profile_return"},{"line_number":352,"context_line":""},{"line_number":353,"context_line":"    def delete_server_profile(self, uuid):"},{"line_number":354,"context_line":"        if not uuid:"}],"source_content_type":"text/x-python","patch_set":20,"id":"dab17558_e38a0c1a","line":351,"updated":"2016-05-11 20:29:37.000000000","message":"No sir. If the response from the API brings one, just use it. Otherwise, keep it as it was. Do not make a new request for the ServerProfile.","commit_id":"1fb751c83866138ebfdb543e0f1b2a3d9d13845e"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"6207bbdd16f4b363134ac2bf321f4d7cc584fc13","unresolved":false,"context_lines":[{"line_number":348,"context_line":"        uuid \u003d server_profile_uri.split(\"/\")[-1]"},{"line_number":349,"context_line":"        server_profile_return \u003d self.get_server_profile_by_uuid(uuid)"},{"line_number":350,"context_line":""},{"line_number":351,"context_line":"        return server_profile_return"},{"line_number":352,"context_line":""},{"line_number":353,"context_line":"    def delete_server_profile(self, uuid):"},{"line_number":354,"context_line":"        if not uuid:"}],"source_content_type":"text/x-python","patch_set":20,"id":"dab17558_8329809d","line":351,"in_reply_to":"dab17558_43cf9855","updated":"2016-05-11 20:44:51.000000000","message":"OK. I don\u0027t have a strong opinion on this for this method.\n\nBy the way. Can we remove the link between the server profile that is created and its template here by cleaning serverProfileTemplateUri ?\n\nAs is, it leads to bad UX as all OpenStack profiles seems unhealthy.","commit_id":"1fb751c83866138ebfdb543e0f1b2a3d9d13845e"},{"author":{"_account_id":10697,"name":"Thiago Paiva Brito","email":"thiagop@lsd.ufcg.edu.br","username":"thiagop","inactive":true},"change_message_id":"7c84e7024040a78ea3a7bd89cbde2f3ee8e6c160","unresolved":false,"context_lines":[{"line_number":348,"context_line":"        uuid \u003d server_profile_uri.split(\"/\")[-1]"},{"line_number":349,"context_line":"        server_profile_return \u003d self.get_server_profile_by_uuid(uuid)"},{"line_number":350,"context_line":""},{"line_number":351,"context_line":"        return server_profile_return"},{"line_number":352,"context_line":""},{"line_number":353,"context_line":"    def delete_server_profile(self, uuid):"},{"line_number":354,"context_line":"        if not uuid:"}],"source_content_type":"text/x-python","patch_set":20,"id":"dab17558_43cf9855","line":351,"in_reply_to":"dab17558_e38a0c1a","updated":"2016-05-11 20:31:42.000000000","message":"It is useful to have the server profile created returned.","commit_id":"1fb751c83866138ebfdb543e0f1b2a3d9d13845e"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"e12bc79499c577b7633b96c8df0da4cf7fbe2370","unresolved":false,"context_lines":[{"line_number":351,"context_line":"            uri\u003dserver_profile_uri"},{"line_number":352,"context_line":"        )"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"        server_profile_json[\u0027serverProfileTemplateUri\u0027] \u003d \"\""},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"        put_clean_server_profile_template_uri \u003d self._prepare_and_do_request("},{"line_number":357,"context_line":"            uri\u003dserver_profile_uri,"}],"source_content_type":"text/x-python","patch_set":21,"id":"dab17558_de6cbf0a","line":354,"updated":"2016-05-12 22:58:53.000000000","message":"This line should actually be below and analogous to line 332. Won\u0027t you be testing this as well?","commit_id":"065204f6dee4d0f89bd562cb2e0d87a01d1a5106"},{"author":{"_account_id":14675,"name":"Hugo Nicodemos","email":"hugo.brito@windriver.com","username":"nicodemos"},"change_message_id":"ce73e856bcb875dcd6c1eb289455488eaacbb054","unresolved":false,"context_lines":[{"line_number":351,"context_line":"            uri\u003dserver_profile_uri"},{"line_number":352,"context_line":"        )"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"        server_profile_json[\u0027serverProfileTemplateUri\u0027] \u003d \"\""},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"        put_clean_server_profile_template_uri \u003d self._prepare_and_do_request("},{"line_number":357,"context_line":"            uri\u003dserver_profile_uri,"}],"source_content_type":"text/x-python","patch_set":21,"id":"dab17558_05f9a680","line":354,"in_reply_to":"dab17558_1c9594e3","updated":"2016-05-13 17:58:05.000000000","message":"Done","commit_id":"065204f6dee4d0f89bd562cb2e0d87a01d1a5106"},{"author":{"_account_id":14943,"name":"Caio Oliveira","email":"caiobo@lsd.ufcg.edu.br","username":"caiobo"},"change_message_id":"a5bd988c1950131a663a4087d0ff0cbce1fbe5f5","unresolved":false,"context_lines":[{"line_number":351,"context_line":"            uri\u003dserver_profile_uri"},{"line_number":352,"context_line":"        )"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"        server_profile_json[\u0027serverProfileTemplateUri\u0027] \u003d \"\""},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"        put_clean_server_profile_template_uri \u003d self._prepare_and_do_request("},{"line_number":357,"context_line":"            uri\u003dserver_profile_uri,"}],"source_content_type":"text/x-python","patch_set":21,"id":"dab17558_1c9594e3","line":354,"in_reply_to":"dab17558_de6cbf0a","updated":"2016-05-13 12:33:16.000000000","message":"I got the test part but you\u0027re saying that this should be just before the return statement?\n\nWe should create another variable just to storage a null string? I don\u0027t think it\u0027s necessary in this case","commit_id":"065204f6dee4d0f89bd562cb2e0d87a01d1a5106"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"e825be909166668e61c596949d723d0d8700150b","unresolved":false,"context_lines":[{"line_number":170,"context_line":""},{"line_number":171,"context_line":"        current_state \u003d self.get_node_power_state(node_info)"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"        if current_state is states.ONEVIEW_UNKNOWN:"},{"line_number":174,"context_line":"            message \u003d ("},{"line_number":175,"context_line":"                \"Error setting node power state to %(state)s\" %"},{"line_number":176,"context_line":"                {\"state\": state}"}],"source_content_type":"text/x-python","patch_set":24,"id":"bab6814e_102144b5","line":173,"updated":"2016-05-23 19:25:04.000000000","message":"What is the point in looking for powerState \u003d Unknown here?\n\nI think it can return the powerState from the taskOutput, should it contain the new power state\n\n\nhttp://h17007.www1.hpe.com/docs/enterprise/servers/oneview2.0/cic-api/en/api-docs/current/index.html#rest/server-hardware\n\n     taskOutput         Output resulting from the running of the task","commit_id":"c8a0ac7fbe5150b5fa4904274b69a410c4c87477"},{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"b7828ba8774dd7a5b0a819a35f1a8e42faa2660c","unresolved":false,"context_lines":[{"line_number":170,"context_line":""},{"line_number":171,"context_line":"        current_state \u003d self.get_node_power_state(node_info)"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"        if current_state is states.ONEVIEW_UNKNOWN:"},{"line_number":174,"context_line":"            message \u003d ("},{"line_number":175,"context_line":"                \"Error setting node power state to %(state)s\" %"},{"line_number":176,"context_line":"                {\"state\": state}"}],"source_content_type":"text/x-python","patch_set":24,"id":"bab6814e_e49a4913","line":173,"in_reply_to":"bab6814e_102144b5","updated":"2016-05-26 19:52:41.000000000","message":"In the new patch set I\u0027m returning the state that was passed as parameter. If anything unexpected happens when changing the state will be catch in the except. If everything goes well, it will return the passed state. (see patch set 25)","commit_id":"c8a0ac7fbe5150b5fa4904274b69a410c4c87477"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"e825be909166668e61c596949d723d0d8700150b","unresolved":false,"context_lines":[{"line_number":227,"context_line":"            uri\u003dserver_profile_uri"},{"line_number":228,"context_line":"        )"},{"line_number":229,"context_line":"        if server_profile_json.get(\"uri\") is None:"},{"line_number":230,"context_line":"            message \u003d \"OneView Server Profile resource not found.\""},{"line_number":231,"context_line":"            raise exceptions.OneViewResourceNotFoundError(message)"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"        return models.ServerProfile.from_json(server_profile_json)"}],"source_content_type":"text/x-python","patch_set":24,"id":"bab6814e_f00da0e9","line":230,"updated":"2016-05-23 19:25:04.000000000","message":"Please, include the uuid in the message.","commit_id":"c8a0ac7fbe5150b5fa4904274b69a410c4c87477"},{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"b7828ba8774dd7a5b0a819a35f1a8e42faa2660c","unresolved":false,"context_lines":[{"line_number":227,"context_line":"            uri\u003dserver_profile_uri"},{"line_number":228,"context_line":"        )"},{"line_number":229,"context_line":"        if server_profile_json.get(\"uri\") is None:"},{"line_number":230,"context_line":"            message \u003d \"OneView Server Profile resource not found.\""},{"line_number":231,"context_line":"            raise exceptions.OneViewResourceNotFoundError(message)"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"        return models.ServerProfile.from_json(server_profile_json)"}],"source_content_type":"text/x-python","patch_set":24,"id":"bab6814e_446a35ee","line":230,"in_reply_to":"bab6814e_f00da0e9","updated":"2016-05-26 19:52:41.000000000","message":"I will do this in a new patch set.","commit_id":"c8a0ac7fbe5150b5fa4904274b69a410c4c87477"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"e825be909166668e61c596949d723d0d8700150b","unresolved":false,"context_lines":[{"line_number":355,"context_line":""},{"line_number":356,"context_line":"    def delete_server_profile(self, uuid):"},{"line_number":357,"context_line":"        if not uuid:"},{"line_number":358,"context_line":"            raise exceptions.OneViewMissingValueException("},{"line_number":359,"context_line":"                \u0027Missing Server Profile UUID.\u0027"},{"line_number":360,"context_line":"            )"},{"line_number":361,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"bab6814e_90d3745f","line":358,"updated":"2016-05-23 19:25:04.000000000","message":"Use ValueError instead. See clone_template_and_apply above.","commit_id":"c8a0ac7fbe5150b5fa4904274b69a410c4c87477"},{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"b7828ba8774dd7a5b0a819a35f1a8e42faa2660c","unresolved":false,"context_lines":[{"line_number":355,"context_line":""},{"line_number":356,"context_line":"    def delete_server_profile(self, uuid):"},{"line_number":357,"context_line":"        if not uuid:"},{"line_number":358,"context_line":"            raise exceptions.OneViewMissingValueException("},{"line_number":359,"context_line":"                \u0027Missing Server Profile UUID.\u0027"},{"line_number":360,"context_line":"            )"},{"line_number":361,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"bab6814e_7f142243","line":358,"in_reply_to":"bab6814e_90d3745f","updated":"2016-05-26 19:52:41.000000000","message":"Done.","commit_id":"c8a0ac7fbe5150b5fa4904274b69a410c4c87477"},{"author":{"_account_id":10697,"name":"Thiago Paiva Brito","email":"thiagop@lsd.ufcg.edu.br","username":"thiagop","inactive":true},"change_message_id":"fb2ee1d6e6858d4aafbe2bbe7c2bcd782e6c495e","unresolved":false,"context_lines":[{"line_number":320,"context_line":"        uuid \u003d node_info[\u0027server_hardware_uri\u0027].split(\"/\")[-1]"},{"line_number":321,"context_line":"        return self._server_hardware.get(uuid)"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"    def get_server_hardware_state(self, uuid):"},{"line_number":324,"context_line":"        server_hardware \u003d self.get_server_hardware_by_uuid(uuid)"},{"line_number":325,"context_line":"        return server_hardware.state"},{"line_number":326,"context_line":""},{"line_number":327,"context_line":"    def get_server_hardware_by_uuid(self, uuid):"},{"line_number":328,"context_line":"        return self._server_hardware.get(uuid)"}],"source_content_type":"text/x-python","patch_set":28,"id":"9abb7d3a_323aa5e7","line":325,"range":{"start_line":323,"start_character":3,"end_line":325,"end_character":36},"updated":"2016-06-01 21:38:25.000000000","message":"Why not get_server_hardware() then get the state?","commit_id":"f4ab92bc2bda09123906bb5f2f3a8240d448d76b"},{"author":{"_account_id":14675,"name":"Hugo Nicodemos","email":"hugo.brito@windriver.com","username":"nicodemos"},"change_message_id":"98ccba2df09612f42f66f4d855f7df0e25bff4d2","unresolved":false,"context_lines":[{"line_number":320,"context_line":"        uuid \u003d node_info[\u0027server_hardware_uri\u0027].split(\"/\")[-1]"},{"line_number":321,"context_line":"        return self._server_hardware.get(uuid)"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"    def get_server_hardware_state(self, uuid):"},{"line_number":324,"context_line":"        server_hardware \u003d self.get_server_hardware_by_uuid(uuid)"},{"line_number":325,"context_line":"        return server_hardware.state"},{"line_number":326,"context_line":""},{"line_number":327,"context_line":"    def get_server_hardware_by_uuid(self, uuid):"},{"line_number":328,"context_line":"        return self._server_hardware.get(uuid)"}],"source_content_type":"text/x-python","patch_set":28,"id":"7aa08908_61b195e1","line":325,"range":{"start_line":323,"start_character":3,"end_line":325,"end_character":36},"in_reply_to":"9abb7d3a_323aa5e7","updated":"2016-06-06 20:21:44.000000000","message":"Method deleted.","commit_id":"f4ab92bc2bda09123906bb5f2f3a8240d448d76b"},{"author":{"_account_id":10697,"name":"Thiago Paiva Brito","email":"thiagop@lsd.ufcg.edu.br","username":"thiagop","inactive":true},"change_message_id":"fb2ee1d6e6858d4aafbe2bbe7c2bcd782e6c495e","unresolved":false,"context_lines":[{"line_number":350,"context_line":"        return self._server_profile_template.get(uuid)"},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"    def get_server_profile_by_uuid(self, uuid):"},{"line_number":353,"context_line":"        server_profile_uri \u003d SERVER_PROFILE_PREFIX_URI + str(uuid)"},{"line_number":354,"context_line":"        server_profile_json \u003d self._prepare_and_do_request("},{"line_number":355,"context_line":"            uri\u003dserver_profile_uri"},{"line_number":356,"context_line":"        )"},{"line_number":357,"context_line":"        if server_profile_json.get(\"uri\") is None:"},{"line_number":358,"context_line":"            message \u003d \"OneView Server Profile resource not found.\""},{"line_number":359,"context_line":"            raise exceptions.OneViewResourceNotFoundError(message)"},{"line_number":360,"context_line":""},{"line_number":361,"context_line":"        return models.ServerProfile.from_json(server_profile_json)"},{"line_number":362,"context_line":""},{"line_number":363,"context_line":"    def get_boot_order(self, node_info):"},{"line_number":364,"context_line":"        server_profile \u003d self.get_server_profile_from_hardware("}],"source_content_type":"text/x-python","patch_set":28,"id":"9abb7d3a_f5012706","line":361,"range":{"start_line":353,"start_character":8,"end_line":361,"end_character":66},"updated":"2016-06-01 21:38:25.000000000","message":"use self._server_profile.get()","commit_id":"f4ab92bc2bda09123906bb5f2f3a8240d448d76b"},{"author":{"_account_id":14675,"name":"Hugo Nicodemos","email":"hugo.brito@windriver.com","username":"nicodemos"},"change_message_id":"98ccba2df09612f42f66f4d855f7df0e25bff4d2","unresolved":false,"context_lines":[{"line_number":350,"context_line":"        return self._server_profile_template.get(uuid)"},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"    def get_server_profile_by_uuid(self, uuid):"},{"line_number":353,"context_line":"        server_profile_uri \u003d SERVER_PROFILE_PREFIX_URI + str(uuid)"},{"line_number":354,"context_line":"        server_profile_json \u003d self._prepare_and_do_request("},{"line_number":355,"context_line":"            uri\u003dserver_profile_uri"},{"line_number":356,"context_line":"        )"},{"line_number":357,"context_line":"        if server_profile_json.get(\"uri\") is None:"},{"line_number":358,"context_line":"            message \u003d \"OneView Server Profile resource not found.\""},{"line_number":359,"context_line":"            raise exceptions.OneViewResourceNotFoundError(message)"},{"line_number":360,"context_line":""},{"line_number":361,"context_line":"        return models.ServerProfile.from_json(server_profile_json)"},{"line_number":362,"context_line":""},{"line_number":363,"context_line":"    def get_boot_order(self, node_info):"},{"line_number":364,"context_line":"        server_profile \u003d self.get_server_profile_from_hardware("}],"source_content_type":"text/x-python","patch_set":28,"id":"7aa08908_819f614f","line":361,"range":{"start_line":353,"start_character":8,"end_line":361,"end_character":66},"in_reply_to":"9abb7d3a_f5012706","updated":"2016-06-06 20:21:44.000000000","message":"Done.","commit_id":"f4ab92bc2bda09123906bb5f2f3a8240d448d76b"},{"author":{"_account_id":10697,"name":"Thiago Paiva Brito","email":"thiagop@lsd.ufcg.edu.br","username":"thiagop","inactive":true},"change_message_id":"fb2ee1d6e6858d4aafbe2bbe7c2bcd782e6c495e","unresolved":false,"context_lines":[{"line_number":433,"context_line":"            server_profile_template_uri"},{"line_number":434,"context_line":"        )"},{"line_number":435,"context_line":""},{"line_number":436,"context_line":"        server_profile_from_template_json \u003d self._prepare_and_do_request("},{"line_number":437,"context_line":"            uri\u003dgenerate_new_profile_uri"},{"line_number":438,"context_line":"        )"},{"line_number":439,"context_line":""},{"line_number":440,"context_line":"        server_profile_from_template_json[\u0027serverHardwareUri\u0027] \u003d \\"},{"line_number":441,"context_line":"            server_hardware_uri"},{"line_number":442,"context_line":"        server_profile_from_template_json[\u0027name\u0027] \u003d server_profile_name"},{"line_number":443,"context_line":"        server_profile_from_template_json[\u0027serverProfileTemplateUri\u0027] \u003d \"\""},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"        post_profile_task \u003d self._prepare_and_do_request("},{"line_number":446,"context_line":"            uri\u003dSERVER_PROFILE_PREFIX_URI,"},{"line_number":447,"context_line":"            body\u003dserver_profile_from_template_json,"},{"line_number":448,"context_line":"            request_type\u003dPOST_REQUEST_TYPE"},{"line_number":449,"context_line":"        )"},{"line_number":450,"context_line":""},{"line_number":451,"context_line":"        try:"},{"line_number":452,"context_line":"            complete_task \u003d self._wait_for_task_to_complete("}],"source_content_type":"text/x-python","patch_set":28,"id":"9abb7d3a_758c17da","line":449,"range":{"start_line":436,"start_character":8,"end_line":449,"end_character":9},"updated":"2016-06-01 21:38:25.000000000","message":"Is there a way to do it in a single request? i.e passing arguments to the call to /new-profile?","commit_id":"f4ab92bc2bda09123906bb5f2f3a8240d448d76b"},{"author":{"_account_id":14675,"name":"Hugo Nicodemos","email":"hugo.brito@windriver.com","username":"nicodemos"},"change_message_id":"98ccba2df09612f42f66f4d855f7df0e25bff4d2","unresolved":false,"context_lines":[{"line_number":433,"context_line":"            server_profile_template_uri"},{"line_number":434,"context_line":"        )"},{"line_number":435,"context_line":""},{"line_number":436,"context_line":"        server_profile_from_template_json \u003d self._prepare_and_do_request("},{"line_number":437,"context_line":"            uri\u003dgenerate_new_profile_uri"},{"line_number":438,"context_line":"        )"},{"line_number":439,"context_line":""},{"line_number":440,"context_line":"        server_profile_from_template_json[\u0027serverHardwareUri\u0027] \u003d \\"},{"line_number":441,"context_line":"            server_hardware_uri"},{"line_number":442,"context_line":"        server_profile_from_template_json[\u0027name\u0027] \u003d server_profile_name"},{"line_number":443,"context_line":"        server_profile_from_template_json[\u0027serverProfileTemplateUri\u0027] \u003d \"\""},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"        post_profile_task \u003d self._prepare_and_do_request("},{"line_number":446,"context_line":"            uri\u003dSERVER_PROFILE_PREFIX_URI,"},{"line_number":447,"context_line":"            body\u003dserver_profile_from_template_json,"},{"line_number":448,"context_line":"            request_type\u003dPOST_REQUEST_TYPE"},{"line_number":449,"context_line":"        )"},{"line_number":450,"context_line":""},{"line_number":451,"context_line":"        try:"},{"line_number":452,"context_line":"            complete_task \u003d self._wait_for_task_to_complete("}],"source_content_type":"text/x-python","patch_set":28,"id":"7aa08908_419d7958","line":449,"range":{"start_line":436,"start_character":8,"end_line":449,"end_character":9},"in_reply_to":"9abb7d3a_758c17da","updated":"2016-06-06 20:21:44.000000000","message":"As the Server Profile Template API uses GET to create the new Server Profile, I don\u0027t think it\u0027s possible to do it in a single request.","commit_id":"f4ab92bc2bda09123906bb5f2f3a8240d448d76b"},{"author":{"_account_id":10697,"name":"Thiago Paiva Brito","email":"thiagop@lsd.ufcg.edu.br","username":"thiagop","inactive":true},"change_message_id":"fb2ee1d6e6858d4aafbe2bbe7c2bcd782e6c495e","unresolved":false,"context_lines":[{"line_number":645,"context_line":"            raise exceptions.OneViewInconsistentResource(message)"},{"line_number":646,"context_line":""},{"line_number":647,"context_line":"    def validate_spt_boot_connections(self, uuid):"},{"line_number":648,"context_line":"        if not uuid:"},{"line_number":649,"context_line":"            raise ValueError(\u0027Missing Server Profile Template uuid.\u0027)"},{"line_number":650,"context_line":""},{"line_number":651,"context_line":"        server_profile_template \u003d self.get_server_profile_template_by_uuid("},{"line_number":652,"context_line":"            uuid"}],"source_content_type":"text/x-python","patch_set":28,"id":"9abb7d3a_d536a301","line":649,"range":{"start_line":648,"start_character":8,"end_line":649,"end_character":69},"updated":"2016-06-01 21:38:25.000000000","message":"Not necessary","commit_id":"f4ab92bc2bda09123906bb5f2f3a8240d448d76b"},{"author":{"_account_id":14675,"name":"Hugo Nicodemos","email":"hugo.brito@windriver.com","username":"nicodemos"},"change_message_id":"98ccba2df09612f42f66f4d855f7df0e25bff4d2","unresolved":false,"context_lines":[{"line_number":645,"context_line":"            raise exceptions.OneViewInconsistentResource(message)"},{"line_number":646,"context_line":""},{"line_number":647,"context_line":"    def validate_spt_boot_connections(self, uuid):"},{"line_number":648,"context_line":"        if not uuid:"},{"line_number":649,"context_line":"            raise ValueError(\u0027Missing Server Profile Template uuid.\u0027)"},{"line_number":650,"context_line":""},{"line_number":651,"context_line":"        server_profile_template \u003d self.get_server_profile_template_by_uuid("},{"line_number":652,"context_line":"            uuid"}],"source_content_type":"text/x-python","patch_set":28,"id":"7aa08908_21902d43","line":649,"range":{"start_line":648,"start_character":8,"end_line":649,"end_character":69},"in_reply_to":"9abb7d3a_d536a301","updated":"2016-06-06 20:21:44.000000000","message":"Done.","commit_id":"f4ab92bc2bda09123906bb5f2f3a8240d448d76b"}],"oneview_client/exceptions.py":[{"author":{"_account_id":10697,"name":"Thiago Paiva Brito","email":"thiagop@lsd.ufcg.edu.br","username":"thiagop","inactive":true},"change_message_id":"7a0193425f4ef71ab1fadb96b08c79bdda29e857","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"class OneViewServerProfileTemplateError(OneViewException):"},{"line_number":43,"context_line":"    message \u003d (\"Server Profile Template not found in the node\u0027s\""},{"line_number":44,"context_line":"               \" properties/capabilities.\")"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"class OneViewMaxPollingAttemptsExceededError(OneViewException):"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a1b2928_d0f83d7f","line":44,"range":{"start_line":44,"start_character":40,"end_line":44,"end_character":43},"updated":"2016-04-11 17:41:08.000000000","message":"It\u0027ll not be the case when pre-allocation is enabled. Also, this message is very specific. Maybe you should create a generic message and overwrite it when throwing this exception.","commit_id":"c10e39c0423e45bde3003cb68a9d1ebfa9598197"},{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"1125bec02c2b274b9efaaadafe3779afe275dade","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"class OneViewServerProfileTemplateError(OneViewException):"},{"line_number":43,"context_line":"    message \u003d (\"Server Profile Template not found in the node\u0027s\""},{"line_number":44,"context_line":"               \" properties/capabilities.\")"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"class OneViewMaxPollingAttemptsExceededError(OneViewException):"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a18252c_959f04b4","line":44,"range":{"start_line":44,"start_character":40,"end_line":44,"end_character":43},"in_reply_to":"7a1b2928_d0f83d7f","updated":"2016-04-11 20:54:49.000000000","message":"thiagop, there were three exceptions that were never been raised. OneViewHealthStatusError, OneViewMaxPollingAttemptsExceededError, \nOneViewServerProfileTemplateError. Removed on patch set 17.","commit_id":"c10e39c0423e45bde3003cb68a9d1ebfa9598197"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"e825be909166668e61c596949d723d0d8700150b","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"class OneViewServerProfileAssignmentError(OneViewException):"},{"line_number":74,"context_line":"    message \u003d (\"Something went wrong applying the Server Profile.\")"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"class IncompatibleOneViewAPIVersion(OneViewException):"}],"source_content_type":"text/x-python","patch_set":24,"id":"bab6814e_3039e8d9","line":74,"range":{"start_line":74,"start_character":37,"end_line":74,"end_character":45},"updated":"2016-05-23 19:25:04.000000000","message":"Assigning?","commit_id":"c8a0ac7fbe5150b5fa4904274b69a410c4c87477"},{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"b7828ba8774dd7a5b0a819a35f1a8e42faa2660c","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"class OneViewServerProfileAssignmentError(OneViewException):"},{"line_number":74,"context_line":"    message \u003d (\"Something went wrong applying the Server Profile.\")"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"class IncompatibleOneViewAPIVersion(OneViewException):"}],"source_content_type":"text/x-python","patch_set":24,"id":"bab6814e_bf8dea7d","line":74,"range":{"start_line":74,"start_character":37,"end_line":74,"end_character":45},"in_reply_to":"bab6814e_3039e8d9","updated":"2016-05-26 19:52:41.000000000","message":"Done.","commit_id":"c8a0ac7fbe5150b5fa4904274b69a410c4c87477"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"e825be909166668e61c596949d723d0d8700150b","unresolved":false,"context_lines":[{"line_number":86,"context_line":"    message \u003d (\"Unknown response from iLO.\")"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"class OneviewServerProfileDeletionError(OneViewException):"},{"line_number":90,"context_line":"    message \u003d (\"There was an error deleting this Server Profile.\")"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"bab6814e_b24cbf9e","line":89,"range":{"start_line":89,"start_character":9,"end_line":89,"end_character":10},"updated":"2016-05-23 19:25:04.000000000","message":"Please, capitalize this.","commit_id":"c8a0ac7fbe5150b5fa4904274b69a410c4c87477"},{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"b7828ba8774dd7a5b0a819a35f1a8e42faa2660c","unresolved":false,"context_lines":[{"line_number":86,"context_line":"    message \u003d (\"Unknown response from iLO.\")"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"class OneviewServerProfileDeletionError(OneViewException):"},{"line_number":90,"context_line":"    message \u003d (\"There was an error deleting this Server Profile.\")"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"bab6814e_7f4c2242","line":89,"range":{"start_line":89,"start_character":9,"end_line":89,"end_character":10},"in_reply_to":"bab6814e_b24cbf9e","updated":"2016-05-26 19:52:41.000000000","message":"Done.","commit_id":"c8a0ac7fbe5150b5fa4904274b69a410c4c87477"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"e825be909166668e61c596949d723d0d8700150b","unresolved":false,"context_lines":[{"line_number":90,"context_line":"    message \u003d (\"There was an error deleting this Server Profile.\")"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"class OneViewMissingValueException(OneViewException):"},{"line_number":94,"context_line":"    message \u003d (\"Missing value.\")"}],"source_content_type":"text/x-python","patch_set":24,"id":"bab6814e_72053712","line":93,"updated":"2016-05-23 19:25:04.000000000","message":"If this has to be used, inherit from ValueError as well. Otherwise, remove it.","commit_id":"c8a0ac7fbe5150b5fa4904274b69a410c4c87477"},{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"b7828ba8774dd7a5b0a819a35f1a8e42faa2660c","unresolved":false,"context_lines":[{"line_number":90,"context_line":"    message \u003d (\"There was an error deleting this Server Profile.\")"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"class OneViewMissingValueException(OneViewException):"},{"line_number":94,"context_line":"    message \u003d (\"Missing value.\")"}],"source_content_type":"text/x-python","patch_set":24,"id":"bab6814e_5f495e30","line":93,"in_reply_to":"bab6814e_72053712","updated":"2016-05-26 19:52:41.000000000","message":"Removed.","commit_id":"c8a0ac7fbe5150b5fa4904274b69a410c4c87477"}],"oneview_client/managers.py":[{"author":{"_account_id":10697,"name":"Thiago Paiva Brito","email":"thiagop@lsd.ufcg.edu.br","username":"thiagop","inactive":true},"change_message_id":"fb2ee1d6e6858d4aafbe2bbe7c2bcd782e6c495e","unresolved":false,"context_lines":[{"line_number":25,"context_line":"ONEVIEW_POWER_ON \u003d \u0027On\u0027"},{"line_number":26,"context_line":"ONEVIEW_POWER_OFF \u003d \u0027Off\u0027"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"DELETE_REQUEST_TYPE \u003d \u0027DELETE\u0027"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"@six.add_metaclass(abc.ABCMeta)"}],"source_content_type":"text/x-python","patch_set":28,"id":"9abb7d3a_d06b5183","line":28,"range":{"start_line":28,"start_character":0,"end_line":28,"end_character":30},"updated":"2016-06-01 21:38:25.000000000","message":"Import it form the client module to maintain consistency.","commit_id":"f4ab92bc2bda09123906bb5f2f3a8240d448d76b"},{"author":{"_account_id":14675,"name":"Hugo Nicodemos","email":"hugo.brito@windriver.com","username":"nicodemos"},"change_message_id":"98ccba2df09612f42f66f4d855f7df0e25bff4d2","unresolved":false,"context_lines":[{"line_number":25,"context_line":"ONEVIEW_POWER_ON \u003d \u0027On\u0027"},{"line_number":26,"context_line":"ONEVIEW_POWER_OFF \u003d \u0027Off\u0027"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"DELETE_REQUEST_TYPE \u003d \u0027DELETE\u0027"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"@six.add_metaclass(abc.ABCMeta)"}],"source_content_type":"text/x-python","patch_set":28,"id":"7aa08908_61e875b5","line":28,"range":{"start_line":28,"start_character":0,"end_line":28,"end_character":30},"in_reply_to":"9abb7d3a_d06b5183","updated":"2016-06-06 20:21:44.000000000","message":"I can\u0027t import client as it already imports managers.","commit_id":"f4ab92bc2bda09123906bb5f2f3a8240d448d76b"},{"author":{"_account_id":10697,"name":"Thiago Paiva Brito","email":"thiagop@lsd.ufcg.edu.br","username":"thiagop","inactive":true},"change_message_id":"fb2ee1d6e6858d4aafbe2bbe7c2bcd782e6c495e","unresolved":false,"context_lines":[{"line_number":218,"context_line":"        resource_uri \u003d self.uri_prefix + str(uuid)"},{"line_number":219,"context_line":"        resource_json \u003d self.oneview_client._prepare_and_do_request("},{"line_number":220,"context_line":"            uri\u003dresource_uri,"},{"line_number":221,"context_line":"            request_type\u003dDELETE_REQUEST_TYPE"},{"line_number":222,"context_line":"        )"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":28,"id":"9abb7d3a_3011fd04","line":221,"range":{"start_line":221,"start_character":25,"end_line":221,"end_character":44},"updated":"2016-06-01 21:38:25.000000000","message":"Use the value from client module.","commit_id":"f4ab92bc2bda09123906bb5f2f3a8240d448d76b"},{"author":{"_account_id":14675,"name":"Hugo Nicodemos","email":"hugo.brito@windriver.com","username":"nicodemos"},"change_message_id":"98ccba2df09612f42f66f4d855f7df0e25bff4d2","unresolved":false,"context_lines":[{"line_number":218,"context_line":"        resource_uri \u003d self.uri_prefix + str(uuid)"},{"line_number":219,"context_line":"        resource_json \u003d self.oneview_client._prepare_and_do_request("},{"line_number":220,"context_line":"            uri\u003dresource_uri,"},{"line_number":221,"context_line":"            request_type\u003dDELETE_REQUEST_TYPE"},{"line_number":222,"context_line":"        )"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":28,"id":"7aa08908_41ebb9b0","line":221,"range":{"start_line":221,"start_character":25,"end_line":221,"end_character":44},"in_reply_to":"9abb7d3a_3011fd04","updated":"2016-06-06 20:21:44.000000000","message":"Using \u0027DELETE\u0027 for now.","commit_id":"f4ab92bc2bda09123906bb5f2f3a8240d448d76b"},{"author":{"_account_id":10697,"name":"Thiago Paiva Brito","email":"thiagop@lsd.ufcg.edu.br","username":"thiagop","inactive":true},"change_message_id":"fb2ee1d6e6858d4aafbe2bbe7c2bcd782e6c495e","unresolved":false,"context_lines":[{"line_number":228,"context_line":"        except exceptions.OneViewTaskError as e:"},{"line_number":229,"context_line":"            raise exceptions.OneViewServerProfileDeletionError(e.message)"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"        return complete_task.get(\u0027associatedResource\u0027).get(\u0027resourceUri\u0027)"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"class ServerProfileTemplateManager(OneViewManager):"}],"source_content_type":"text/x-python","patch_set":28,"id":"9abb7d3a_b014cde8","line":231,"range":{"start_line":231,"start_character":8,"end_line":231,"end_character":73},"updated":"2016-06-01 21:38:25.000000000","message":"What is this uri? The uri of the server_profile deleted? Seems that it\u0027s not very useful...","commit_id":"f4ab92bc2bda09123906bb5f2f3a8240d448d76b"},{"author":{"_account_id":14675,"name":"Hugo Nicodemos","email":"hugo.brito@windriver.com","username":"nicodemos"},"change_message_id":"98ccba2df09612f42f66f4d855f7df0e25bff4d2","unresolved":false,"context_lines":[{"line_number":228,"context_line":"        except exceptions.OneViewTaskError as e:"},{"line_number":229,"context_line":"            raise exceptions.OneViewServerProfileDeletionError(e.message)"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"        return complete_task.get(\u0027associatedResource\u0027).get(\u0027resourceUri\u0027)"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"class ServerProfileTemplateManager(OneViewManager):"}],"source_content_type":"text/x-python","patch_set":28,"id":"7aa08908_e1dc6514","line":231,"range":{"start_line":231,"start_character":8,"end_line":231,"end_character":73},"in_reply_to":"9abb7d3a_b014cde8","updated":"2016-06-06 20:21:44.000000000","message":"Changed to return the state of the task.","commit_id":"f4ab92bc2bda09123906bb5f2f3a8240d448d76b"},{"author":{"_account_id":10697,"name":"Thiago Paiva Brito","email":"thiagop@lsd.ufcg.edu.br","username":"thiagop","inactive":true},"change_message_id":"d3a9cf58d43b07eeba9ea1a2ccdd36ad349426b2","unresolved":false,"context_lines":[{"line_number":226,"context_line":"        except exceptions.OneViewTaskError as e:"},{"line_number":227,"context_line":"            raise exceptions.OneViewServerProfileDeletionError(e.message)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"        return complete_task.get(\u0027taskState\u0027)"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"class ServerProfileTemplateManager(OneViewManager):"}],"source_content_type":"text/x-python","patch_set":29,"id":"7aa08908_b58a6dbd","line":229,"range":{"start_line":229,"start_character":8,"end_line":229,"end_character":45},"updated":"2016-06-07 14:00:24.000000000","message":"I rather remove the return. The client consumer isn\u0027t supposed to know what is \u0027taskState\u0027 and what values it may return so...","commit_id":"e0dbcb58dd60a7a59ef34bd510f73d1f9f02f464"},{"author":{"_account_id":14675,"name":"Hugo Nicodemos","email":"hugo.brito@windriver.com","username":"nicodemos"},"change_message_id":"877443983798d8b8c964589bce5b3048d5a36c94","unresolved":false,"context_lines":[{"line_number":226,"context_line":"        except exceptions.OneViewTaskError as e:"},{"line_number":227,"context_line":"            raise exceptions.OneViewServerProfileDeletionError(e.message)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"        return complete_task.get(\u0027taskState\u0027)"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"class ServerProfileTemplateManager(OneViewManager):"}],"source_content_type":"text/x-python","patch_set":29,"id":"7aa08908_13d71924","line":229,"range":{"start_line":229,"start_character":8,"end_line":229,"end_character":45},"in_reply_to":"7aa08908_b58a6dbd","updated":"2016-06-07 14:11:09.000000000","message":"Done.","commit_id":"e0dbcb58dd60a7a59ef34bd510f73d1f9f02f464"}],"oneview_client/states.py":[{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"549e43249661b0a2d5ee83ce887830697cf673a2","unresolved":false,"context_lines":[{"line_number":15,"context_line":"#    See the License for the specific language governing permissions and"},{"line_number":16,"context_line":"#    limitations under the License."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"SERVER_HARDWARE_POWER_ON \u003d \u0027On\u0027"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"SERVER_HARDWARE_POWER_OFF \u003d \u0027Off\u0027"},{"line_number":21,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5aef4532_59575002","line":18,"updated":"2016-03-07 16:47:19.000000000","message":"Please leave comments separating what these constants are about.","commit_id":"28b132b9609fc1fcf74759a2a1cd1b31953808fb"},{"author":{"_account_id":14891,"name":"Lilia Sampaio","email":"liliars@lsd.ufcg.edu.br","username":"liliars"},"change_message_id":"b9d5d2c8214e8b2380a7765b5ee8c03369622019","unresolved":false,"context_lines":[{"line_number":15,"context_line":"#    See the License for the specific language governing permissions and"},{"line_number":16,"context_line":"#    limitations under the License."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"SERVER_HARDWARE_POWER_ON \u003d \u0027On\u0027"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"SERVER_HARDWARE_POWER_OFF \u003d \u0027Off\u0027"},{"line_number":21,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5aef4532_6d105802","line":18,"in_reply_to":"5aef4532_59575002","updated":"2016-03-08 16:30:40.000000000","message":"These will change back to ONEVIEW_POWER_ON, etc, in order to maintain compatibility with the upstream driver. Do we really need docstrings for this? I think it is pretty straight-forward only with the variable names.","commit_id":"28b132b9609fc1fcf74759a2a1cd1b31953808fb"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"56f60dbe1b27439c478e65c60c7fe20ee92c3c27","unresolved":false,"context_lines":[{"line_number":15,"context_line":"#    See the License for the specific language governing permissions and"},{"line_number":16,"context_line":"#    limitations under the License."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"SERVER_HARDWARE_POWER_ON \u003d \u0027On\u0027"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"SERVER_HARDWARE_POWER_OFF \u003d \u0027Off\u0027"},{"line_number":21,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5aef4532_516ec92f","line":18,"in_reply_to":"5aef4532_6d105802","updated":"2016-03-08 18:08:41.000000000","message":"Some of these are meant to be used with sh.power_state, some are meant to be used with sh.state. Just group them accordingly:\n\n# Power State\n\nONEVIEW_POWER_ON \u003d ...\nONEVIEW_POWER_OFF \u003d ...\n...\n\n# State (profile state?)\n\nONEVIEW_APPLYING_PROFILE \u003d ...\nONEVIEW_PROFILE_APPLIED \u003d ....\n...","commit_id":"28b132b9609fc1fcf74759a2a1cd1b31953808fb"},{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"817b8e02914782072c2e67acd557a3902b486bc3","unresolved":false,"context_lines":[{"line_number":15,"context_line":"#    See the License for the specific language governing permissions and"},{"line_number":16,"context_line":"#    limitations under the License."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"ONEVIEW_POWER_ON \u003d \u0027On\u0027"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"ONEVIEW_POWER_OFF \u003d \u0027Off\u0027"},{"line_number":21,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"1af94dfe_a085cb5a","line":18,"updated":"2016-03-18 15:16:02.000000000","message":"Some of these are meant to be used with sh.power_state, some are meant to be used with sh.state. Just group them accordingly:\n\n# Power State\nONEVIEW_POWER_ON \u003d ...\nONEVIEW_POWER_OFF \u003d ...\n...\n# State (profile state?)\nONEVIEW_APPLYING_PROFILE \u003d ...\nONEVIEW_PROFILE_APPLIED \u003d ....\n...\n\nIt was done on patch set 11, but undone now.","commit_id":"42665ab4f94901e408f38ac4cf3ef76b21c6290d"}],"oneview_client/tests/functional/test_oneview_client.py":[{"author":{"_account_id":10697,"name":"Thiago Paiva Brito","email":"thiagop@lsd.ufcg.edu.br","username":"thiagop","inactive":true},"change_message_id":"d3a9cf58d43b07eeba9ea1a2ccdd36ad349426b2","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        self.assertIsInstance(spt, models.ServerProfileTemplate)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    @mock.patch.object(requests, \u0027get\u0027, autospec\u003dTrue)"},{"line_number":108,"context_line":"    def test_server_profile_template_get_not_found(self, mock_get,"},{"line_number":109,"context_line":"                                                   mock__authenticate):"},{"line_number":110,"context_line":"        oneview_client \u003d client.Client(self.manager_url,"},{"line_number":111,"context_line":"                                       self.username,"}],"source_content_type":"text/x-python","patch_set":29,"id":"7aa08908_553fc9d5","line":108,"range":{"start_line":108,"start_character":8,"end_line":108,"end_character":50},"updated":"2016-06-07 14:00:24.000000000","message":"Please, change this to \"test_get_server_profile_template_not_found\", to maintain consistency with the tested method name.","commit_id":"e0dbcb58dd60a7a59ef34bd510f73d1f9f02f464"},{"author":{"_account_id":14675,"name":"Hugo Nicodemos","email":"hugo.brito@windriver.com","username":"nicodemos"},"change_message_id":"877443983798d8b8c964589bce5b3048d5a36c94","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        self.assertIsInstance(spt, models.ServerProfileTemplate)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    @mock.patch.object(requests, \u0027get\u0027, autospec\u003dTrue)"},{"line_number":108,"context_line":"    def test_server_profile_template_get_not_found(self, mock_get,"},{"line_number":109,"context_line":"                                                   mock__authenticate):"},{"line_number":110,"context_line":"        oneview_client \u003d client.Client(self.manager_url,"},{"line_number":111,"context_line":"                                       self.username,"}],"source_content_type":"text/x-python","patch_set":29,"id":"7aa08908_93e30905","line":108,"range":{"start_line":108,"start_character":8,"end_line":108,"end_character":50},"in_reply_to":"7aa08908_553fc9d5","updated":"2016-06-07 14:11:09.000000000","message":"Done.","commit_id":"e0dbcb58dd60a7a59ef34bd510f73d1f9f02f464"}],"oneview_client/tests/unit/test_oneview_client.py":[{"author":{"_account_id":10697,"name":"Thiago Paiva Brito","email":"thiagop@lsd.ufcg.edu.br","username":"thiagop","inactive":true},"change_message_id":"7a0193425f4ef71ab1fadb96b08c79bdda29e857","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"from oneview_client import client"},{"line_number":27,"context_line":"from oneview_client import exceptions"},{"line_number":28,"context_line":"from oneview_client import models"},{"line_number":29,"context_line":"from oneview_client import states"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"PROPERTIES_DICT \u003d {\"cpu_arch\": \"x86_64\","}],"source_content_type":"text/x-python","patch_set":16,"id":"7a1b2928_2687b762","line":28,"range":{"start_line":28,"start_character":0,"end_line":28,"end_character":33},"updated":"2016-04-11 17:41:08.000000000","message":"nicely done!","commit_id":"c10e39c0423e45bde3003cb68a9d1ebfa9598197"},{"author":{"_account_id":10697,"name":"Thiago Paiva Brito","email":"thiagop@lsd.ufcg.edu.br","username":"thiagop","inactive":true},"change_message_id":"7a0193425f4ef71ab1fadb96b08c79bdda29e857","unresolved":false,"context_lines":[{"line_number":258,"context_line":"        )"},{"line_number":259,"context_line":"        self.assertFalse(mock_set_pstate.called)"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"    @mock.patch.object(client.Client, \u0027_authenticate\u0027)"},{"line_number":262,"context_line":"    @mock.patch.object(client.Client, \u0027set_node_power_state\u0027, autospec\u003dTrue)"},{"line_number":263,"context_line":"    @mock.patch.object(client.Client, \u0027get_node_power_state\u0027, autospec\u003dTrue)"},{"line_number":264,"context_line":"    def test_power_on_server_off("}],"source_content_type":"text/x-python","patch_set":16,"id":"7a1b2928_26797794","line":261,"range":{"start_line":261,"start_character":4,"end_line":261,"end_character":54},"updated":"2016-04-11 17:41:08.000000000","message":"These changes need to be undone. André has removed mocks of authenticate and the instantiation of oneview_client in every test in favor of instantiating it at setUp() in a previously approved patch, please, be consistent with his approach.","commit_id":"c10e39c0423e45bde3003cb68a9d1ebfa9598197"},{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"1125bec02c2b274b9efaaadafe3779afe275dade","unresolved":false,"context_lines":[{"line_number":258,"context_line":"        )"},{"line_number":259,"context_line":"        self.assertFalse(mock_set_pstate.called)"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"    @mock.patch.object(client.Client, \u0027_authenticate\u0027)"},{"line_number":262,"context_line":"    @mock.patch.object(client.Client, \u0027set_node_power_state\u0027, autospec\u003dTrue)"},{"line_number":263,"context_line":"    @mock.patch.object(client.Client, \u0027get_node_power_state\u0027, autospec\u003dTrue)"},{"line_number":264,"context_line":"    def test_power_on_server_off("}],"source_content_type":"text/x-python","patch_set":16,"id":"5a18252c_d5805c49","line":261,"range":{"start_line":261,"start_character":4,"end_line":261,"end_character":54},"in_reply_to":"7a1b2928_26797794","updated":"2016-04-11 20:54:49.000000000","message":"Done.","commit_id":"c10e39c0423e45bde3003cb68a9d1ebfa9598197"},{"author":{"_account_id":10697,"name":"Thiago Paiva Brito","email":"thiagop@lsd.ufcg.edu.br","username":"thiagop","inactive":true},"change_message_id":"7a0193425f4ef71ab1fadb96b08c79bdda29e857","unresolved":false,"context_lines":[{"line_number":1065,"context_line":""},{"line_number":1066,"context_line":"        yield status, headers, system, memberuri"},{"line_number":1067,"context_line":""},{"line_number":1068,"context_line":"    @mock.patch.object(client.Client, \u0027_authenticate\u0027)"},{"line_number":1069,"context_line":"    @mock.patch.object(client.Client, \u0027_wait_for_task_to_complete\u0027)"},{"line_number":1070,"context_line":"    @mock.patch.object(client.Client, \u0027_prepare_and_do_request\u0027)"},{"line_number":1071,"context_line":"    @mock.patch.object(client.Client, \u0027get_server_hardware_by_uuid\u0027)"},{"line_number":1072,"context_line":"    def test_check_server_hardware_state_profile_applied("},{"line_number":1073,"context_line":"            self, mock_get_server_hardware_by_uuid, mock__prepare_do_request,"},{"line_number":1074,"context_line":"            mock__wait_for_task, mock__authenticate):"},{"line_number":1075,"context_line":""},{"line_number":1076,"context_line":"        server_hardware \u003d models.ServerHardware()"},{"line_number":1077,"context_line":"        server_hardware.uri \u003d \u0027/rest/server-hardware/123456789\u0027"},{"line_number":1078,"context_line":"        server_hardware.state \u003d states.ONEVIEW_PROFILE_APPLIED"},{"line_number":1079,"context_line":"        mock_get_server_hardware_by_uuid.return_value \u003d server_hardware"},{"line_number":1080,"context_line":""},{"line_number":1081,"context_line":"        oneview_client \u003d client.Client(self.manager_url,"},{"line_number":1082,"context_line":"                                       self.username,"},{"line_number":1083,"context_line":"                                       self.password)"},{"line_number":1084,"context_line":""},{"line_number":1085,"context_line":"        oneview_client.get_server_hardware_by_uuid \u003d \\"},{"line_number":1086,"context_line":"            mock_get_server_hardware_by_uuid"},{"line_number":1087,"context_line":""},{"line_number":1088,"context_line":"        self.assertEqual("},{"line_number":1089,"context_line":"            states.ONEVIEW_PROFILE_APPLIED,"},{"line_number":1090,"context_line":"            oneview_client.get_server_hardware_state(\u0027123456789\u0027)"},{"line_number":1091,"context_line":"        )"},{"line_number":1092,"context_line":""},{"line_number":1093,"context_line":"    @mock.patch.object(client.Client, \u0027_authenticate\u0027)"},{"line_number":1094,"context_line":"    @mock.patch.object(client.Client, \u0027_wait_for_task_to_complete\u0027)"},{"line_number":1095,"context_line":"    @mock.patch.object(client.Client, \u0027_prepare_and_do_request\u0027)"},{"line_number":1096,"context_line":"    @mock.patch.object(client.Client, \u0027get_server_hardware_by_uuid\u0027)"},{"line_number":1097,"context_line":"    def test_check_server_hardware_state_applying_profile("},{"line_number":1098,"context_line":"            self, mock_get_server_hardware_by_uuid, mock__prepare_do_request,"},{"line_number":1099,"context_line":"            mock__wait_for_task, mock__authenticate"},{"line_number":1100,"context_line":"    ):"},{"line_number":1101,"context_line":""},{"line_number":1102,"context_line":"        server_hardware \u003d models.ServerHardware()"},{"line_number":1103,"context_line":"        server_hardware.uri \u003d \u0027/rest/server-hardware/123456789\u0027"},{"line_number":1104,"context_line":"        server_hardware.state \u003d states.ONEVIEW_APPLYING_PROFILE"},{"line_number":1105,"context_line":"        mock_get_server_hardware_by_uuid.return_value \u003d server_hardware"},{"line_number":1106,"context_line":""},{"line_number":1107,"context_line":"        oneview_client \u003d client.Client(self.manager_url,"},{"line_number":1108,"context_line":"                                       self.username,"},{"line_number":1109,"context_line":"                                       self.password)"},{"line_number":1110,"context_line":""},{"line_number":1111,"context_line":"        oneview_client.get_server_hardware_by_uuid \u003d \\"},{"line_number":1112,"context_line":"            mock_get_server_hardware_by_uuid"},{"line_number":1113,"context_line":""},{"line_number":1114,"context_line":"        self.assertEqual("},{"line_number":1115,"context_line":"            states.ONEVIEW_APPLYING_PROFILE,"},{"line_number":1116,"context_line":"            oneview_client.get_server_hardware_state(\u0027123456789\u0027)"},{"line_number":1117,"context_line":"        )"},{"line_number":1118,"context_line":""},{"line_number":1119,"context_line":"    @mock.patch.object(client.Client, \u0027_authenticate\u0027)"},{"line_number":1120,"context_line":"    @mock.patch.object(client.Client, \u0027_prepare_and_do_request\u0027)"},{"line_number":1121,"context_line":"    @mock.patch.object(client.Client, \u0027_wait_for_task_to_complete\u0027)"},{"line_number":1122,"context_line":"    def test_apply_server_profile_assignment_with_missing_parameters("},{"line_number":1123,"context_line":"        self, mock__wait_task, mock__prepare, mock__authenticate"},{"line_number":1124,"context_line":"    ):"},{"line_number":1125,"context_line":"        oneview_client \u003d client.Client(self.manager_url,"},{"line_number":1126,"context_line":"                                       self.username,"},{"line_number":1127,"context_line":"                                       self.password)"},{"line_number":1128,"context_line":""},{"line_number":1129,"context_line":"        self.assertRaises("},{"line_number":1130,"context_line":"            exceptions.OneViewMissingValueException,"},{"line_number":1131,"context_line":"            oneview_client.apply_server_profile,"},{"line_number":1132,"context_line":"            None,"},{"line_number":1133,"context_line":"            None,"},{"line_number":1134,"context_line":"            None"},{"line_number":1135,"context_line":"        )"},{"line_number":1136,"context_line":""},{"line_number":1137,"context_line":"    @mock.patch.object(client.Client, \u0027_authenticate\u0027)"},{"line_number":1138,"context_line":"    @mock.patch.object(client.Client, \u0027_prepare_and_do_request\u0027)"},{"line_number":1139,"context_line":"    @mock.patch.object(client.Client, \u0027_wait_for_task_to_complete\u0027)"},{"line_number":1140,"context_line":"    def test_apply_server_profile_assignment_error("},{"line_number":1141,"context_line":"        self, mock__wait_task, mock__prepare, mock__authenticate"},{"line_number":1142,"context_line":"    ):"},{"line_number":1143,"context_line":"        oneview_client \u003d client.Client(self.manager_url,"},{"line_number":1144,"context_line":"                                       self.username,"},{"line_number":1145,"context_line":"                                       self.password)"},{"line_number":1146,"context_line":""},{"line_number":1147,"context_line":"        server_hardware_uuid \u003d \u0027111111111-2222-3333-4444-55555555555\u0027"},{"line_number":1148,"context_line":"        server_profile_template_uuid \u003d \u0027555555555-4444-3333-2222-11111111\u0027"},{"line_number":1149,"context_line":""},{"line_number":1150,"context_line":"        mock__wait_task.side_effect \u003d exceptions.OneViewTaskError"},{"line_number":1151,"context_line":"        oneview_client._wait_for_task_to_complete \u003d mock__wait_task"},{"line_number":1152,"context_line":""},{"line_number":1153,"context_line":"        self.assertRaises("},{"line_number":1154,"context_line":"            exceptions.OneViewServerProfileAssignmentError,"},{"line_number":1155,"context_line":"            oneview_client.apply_server_profile,"},{"line_number":1156,"context_line":"            \u0027profilename\u0027,"},{"line_number":1157,"context_line":"            server_hardware_uuid,"},{"line_number":1158,"context_line":"            server_profile_template_uuid"},{"line_number":1159,"context_line":"        )"},{"line_number":1160,"context_line":""},{"line_number":1161,"context_line":"    @mock.patch.object(client.Client, \u0027_authenticate\u0027)"},{"line_number":1162,"context_line":"    @mock.patch.object(client.Client, \u0027_prepare_and_do_request\u0027)"},{"line_number":1163,"context_line":"    @mock.patch.object(client.Client, \u0027_wait_for_task_to_complete\u0027)"},{"line_number":1164,"context_line":"    def test_apply_server_profile_assignment("},{"line_number":1165,"context_line":"        self, mock__wait_task, mock__prepare, mock__authenticate"},{"line_number":1166,"context_line":"    ):"},{"line_number":1167,"context_line":"        oneview_client \u003d client.Client(self.manager_url,"},{"line_number":1168,"context_line":"                                       self.username,"},{"line_number":1169,"context_line":"                                       self.password)"},{"line_number":1170,"context_line":""},{"line_number":1171,"context_line":"        server_hardware_uuid \u003d \u0027111111111-2222-3333-4444-55555555555\u0027"},{"line_number":1172,"context_line":"        server_profile_template_uuid \u003d \u0027555555555-4444-3333-2222-11111111\u0027"},{"line_number":1173,"context_line":"        resource_uri \u003d \u0027/rest/server-profiles/AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEE\u0027"},{"line_number":1174,"context_line":"        response \u003d {\u0027associatedResource\u0027: {\u0027resourceUri\u0027: resource_uri}}"},{"line_number":1175,"context_line":""},{"line_number":1176,"context_line":"        mock__wait_task.return_value \u003d response"},{"line_number":1177,"context_line":"        oneview_client._wait_for_task_to_complete \u003d mock__wait_task"},{"line_number":1178,"context_line":""},{"line_number":1179,"context_line":"        self.assertEqual(resource_uri, oneview_client.apply_server_profile("},{"line_number":1180,"context_line":"            \u0027profilename\u0027, server_hardware_uuid, server_profile_template_uuid"},{"line_number":1181,"context_line":"        ))"},{"line_number":1182,"context_line":"        self.assertTrue(mock__prepare.called)"},{"line_number":1183,"context_line":""},{"line_number":1184,"context_line":"    @mock.patch.object(client.Client, \u0027_authenticate\u0027)"},{"line_number":1185,"context_line":"    @mock.patch.object(client.Client, \u0027_wait_for_task_to_complete\u0027)"},{"line_number":1186,"context_line":"    @mock.patch.object(client.Client, \u0027_prepare_and_do_request\u0027)"},{"line_number":1187,"context_line":"    @mock.patch.object(client.Client, \u0027get_server_hardware\u0027)"},{"line_number":1188,"context_line":"    def test_delete_server_profile_from_sh_with_missing_profile_uuid("},{"line_number":1189,"context_line":"        self, mock_get_server_hardware, mock__prepare_do_request,"},{"line_number":1190,"context_line":"        mock__wait_for_task, mock__authenticate"},{"line_number":1191,"context_line":"    ):"},{"line_number":1192,"context_line":"        oneview_client \u003d client.Client(self.manager_url,"},{"line_number":1193,"context_line":"                                       self.username,"},{"line_number":1194,"context_line":"                                       self.password)"},{"line_number":1195,"context_line":""},{"line_number":1196,"context_line":"        oneview_client._prepare_and_do_request \u003d mock__prepare_do_request"},{"line_number":1197,"context_line":"        oneview_client._wait_for_task_to_complete \u003d mock__wait_for_task"},{"line_number":1198,"context_line":""},{"line_number":1199,"context_line":"        self.assertRaises("},{"line_number":1200,"context_line":"            exceptions.OneViewMissingValueException,"},{"line_number":1201,"context_line":"            oneview_client.delete_server_profile,"},{"line_number":1202,"context_line":"            None"},{"line_number":1203,"context_line":"        )"},{"line_number":1204,"context_line":""},{"line_number":1205,"context_line":"    @mock.patch.object(client.Client, \u0027_authenticate\u0027)"},{"line_number":1206,"context_line":"    @mock.patch.object(client.Client, \u0027_wait_for_task_to_complete\u0027)"},{"line_number":1207,"context_line":"    @mock.patch.object(client.Client, \u0027_prepare_and_do_request\u0027)"},{"line_number":1208,"context_line":"    @mock.patch.object(client.Client, \u0027get_server_hardware\u0027)"},{"line_number":1209,"context_line":"    def test_delete_server_profile_from_sh_unassignment_error("},{"line_number":1210,"context_line":"        self, mock_get_server_hardware, mock__prepare_do_request,"},{"line_number":1211,"context_line":"        mock__wait_for_task, mock__authenticate"},{"line_number":1212,"context_line":"    ):"},{"line_number":1213,"context_line":"        oneview_client \u003d client.Client(self.manager_url,"},{"line_number":1214,"context_line":"                                       self.username,"},{"line_number":1215,"context_line":"                                       self.password)"},{"line_number":1216,"context_line":""},{"line_number":1217,"context_line":"        profile_to_be_deleted_uuid \u003d \u0027111111111-2222-3333-4444-55555555555\u0027"},{"line_number":1218,"context_line":""},{"line_number":1219,"context_line":"        fake_server_hardware \u003d models.ServerHardware()"},{"line_number":1220,"context_line":"        fake_server_hardware.server_profile_uri \u003d \\"},{"line_number":1221,"context_line":"            \u0027111111111-2222-3333-4444-55555555555\u0027"},{"line_number":1222,"context_line":"        mock_get_server_hardware.return_value \u003d fake_server_hardware"},{"line_number":1223,"context_line":"        oneview_client.get_server_hardware \u003d mock_get_server_hardware"},{"line_number":1224,"context_line":""},{"line_number":1225,"context_line":"        mock__wait_for_task.side_effect \u003d exceptions.OneViewTaskError"},{"line_number":1226,"context_line":"        oneview_client._wait_for_task_to_complete \u003d mock__wait_for_task"},{"line_number":1227,"context_line":""},{"line_number":1228,"context_line":"        self.assertRaises("},{"line_number":1229,"context_line":"            exceptions.OneviewServerProfileDeletionError,"},{"line_number":1230,"context_line":"            oneview_client.delete_server_profile,"},{"line_number":1231,"context_line":"            profile_to_be_deleted_uuid"},{"line_number":1232,"context_line":"        )"},{"line_number":1233,"context_line":""},{"line_number":1234,"context_line":"    @mock.patch.object(client.Client, \u0027_authenticate\u0027)"},{"line_number":1235,"context_line":"    @mock.patch.object(client.Client, \u0027_wait_for_task_to_complete\u0027)"},{"line_number":1236,"context_line":"    @mock.patch.object(client.Client, \u0027_prepare_and_do_request\u0027)"},{"line_number":1237,"context_line":"    @mock.patch.object(client.Client, \u0027get_server_hardware\u0027)"},{"line_number":1238,"context_line":"    def test_delete_server_profile_from_sh("},{"line_number":1239,"context_line":"        self, mock_get_server_hardware, mock__prepare_do_request,"},{"line_number":1240,"context_line":"        mock__wait_for_task, mock__authenticate"},{"line_number":1241,"context_line":"    ):"},{"line_number":1242,"context_line":"        oneview_client \u003d client.Client(self.manager_url,"},{"line_number":1243,"context_line":"                                       self.username,"},{"line_number":1244,"context_line":"                                       self.password)"},{"line_number":1245,"context_line":""},{"line_number":1246,"context_line":"        profile_to_be_deleted_uuid \u003d \u0027111111111-2222-3333-4444-55555555555\u0027"},{"line_number":1247,"context_line":""},{"line_number":1248,"context_line":"        fake_server_hardware \u003d models.ServerHardware()"},{"line_number":1249,"context_line":"        fake_server_hardware.server_profile_uri \u003d \\"},{"line_number":1250,"context_line":"            \u0027111111111-2222-3333-4444-55555555555\u0027"},{"line_number":1251,"context_line":"        mock_get_server_hardware.return_value \u003d fake_server_hardware"},{"line_number":1252,"context_line":"        oneview_client.get_server_hardware \u003d mock_get_server_hardware"},{"line_number":1253,"context_line":""},{"line_number":1254,"context_line":"        oneview_client._prepare_and_do_request \u003d mock__prepare_do_request"},{"line_number":1255,"context_line":"        oneview_client._wait_for_task_to_complete \u003d mock__wait_for_task"},{"line_number":1256,"context_line":""},{"line_number":1257,"context_line":"        oneview_client.delete_server_profile(profile_to_be_deleted_uuid)"},{"line_number":1258,"context_line":""},{"line_number":1259,"context_line":"        self.assertTrue(mock__prepare_do_request.called)"},{"line_number":1260,"context_line":"        self.assertTrue(mock__wait_for_task.called)"},{"line_number":1261,"context_line":""},{"line_number":1262,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"},{"line_number":1263,"context_line":"    unittest.main()"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a1b2928_86a5eb05","line":1260,"range":{"start_line":1068,"start_character":4,"end_line":1260,"end_character":51},"updated":"2016-04-11 17:41:08.000000000","message":"Nice coverage! :)","commit_id":"c10e39c0423e45bde3003cb68a9d1ebfa9598197"},{"author":{"_account_id":10697,"name":"Thiago Paiva Brito","email":"thiagop@lsd.ufcg.edu.br","username":"thiagop","inactive":true},"change_message_id":"bbe951ccdd03957dae75815491d3bf56af48d057","unresolved":false,"context_lines":[{"line_number":1172,"context_line":"            \u0027serverProfileTemplateUri\u0027: \"\""},{"line_number":1173,"context_line":"        }"},{"line_number":1174,"context_line":""},{"line_number":1175,"context_line":"        self.oneview_client.clone_template_and_apply("},{"line_number":1176,"context_line":"            server_profile_name,"},{"line_number":1177,"context_line":"            server_hardware_uuid,"},{"line_number":1178,"context_line":"            server_profile_template_uuid"},{"line_number":1179,"context_line":"        )"},{"line_number":1180,"context_line":""},{"line_number":1181,"context_line":"        mock__prepare.assert_called_with("},{"line_number":1182,"context_line":"            uri\u003dclient.SERVER_PROFILE_PREFIX_URI,"}],"source_content_type":"text/x-python","patch_set":23,"id":"dab17558_29c8bc54","line":1179,"range":{"start_line":1175,"start_character":8,"end_line":1179,"end_character":9},"updated":"2016-05-16 15:50:39.000000000","message":"Just to improve the test case: can we test if the SP object returned by this method isInstanceOf models.ServerProfile and if the object has the same properties of the SPT chosen?","commit_id":"a2f8056dc4cc984ec1a484350e1541cce40e6757"},{"author":{"_account_id":14675,"name":"Hugo Nicodemos","email":"hugo.brito@windriver.com","username":"nicodemos"},"change_message_id":"c76fdaf69248a737eb1e9265cbcaefa7f83f1eda","unresolved":false,"context_lines":[{"line_number":1172,"context_line":"            \u0027serverProfileTemplateUri\u0027: \"\""},{"line_number":1173,"context_line":"        }"},{"line_number":1174,"context_line":""},{"line_number":1175,"context_line":"        self.oneview_client.clone_template_and_apply("},{"line_number":1176,"context_line":"            server_profile_name,"},{"line_number":1177,"context_line":"            server_hardware_uuid,"},{"line_number":1178,"context_line":"            server_profile_template_uuid"},{"line_number":1179,"context_line":"        )"},{"line_number":1180,"context_line":""},{"line_number":1181,"context_line":"        mock__prepare.assert_called_with("},{"line_number":1182,"context_line":"            uri\u003dclient.SERVER_PROFILE_PREFIX_URI,"}],"source_content_type":"text/x-python","patch_set":23,"id":"dab17558_7a1444e8","line":1179,"range":{"start_line":1175,"start_character":8,"end_line":1179,"end_character":9},"in_reply_to":"dab17558_29c8bc54","updated":"2016-05-16 16:34:56.000000000","message":"The return of this method it\u0027s a mock of get_server_profile_by_uuid, so test if isInstanceOf models.SeverProfile or compare the properties doesn\u0027t make sense.","commit_id":"a2f8056dc4cc984ec1a484350e1541cce40e6757"},{"author":{"_account_id":10697,"name":"Thiago Paiva Brito","email":"thiagop@lsd.ufcg.edu.br","username":"thiagop","inactive":true},"change_message_id":"a5664d7bc38929ade17d6dbd8e565e30e7a9b31d","unresolved":false,"context_lines":[{"line_number":1172,"context_line":"            \u0027serverProfileTemplateUri\u0027: \"\""},{"line_number":1173,"context_line":"        }"},{"line_number":1174,"context_line":""},{"line_number":1175,"context_line":"        self.oneview_client.clone_template_and_apply("},{"line_number":1176,"context_line":"            server_profile_name,"},{"line_number":1177,"context_line":"            server_hardware_uuid,"},{"line_number":1178,"context_line":"            server_profile_template_uuid"},{"line_number":1179,"context_line":"        )"},{"line_number":1180,"context_line":""},{"line_number":1181,"context_line":"        mock__prepare.assert_called_with("},{"line_number":1182,"context_line":"            uri\u003dclient.SERVER_PROFILE_PREFIX_URI,"}],"source_content_type":"text/x-python","patch_set":23,"id":"dab17558_ba4fcc90","line":1179,"range":{"start_line":1175,"start_character":8,"end_line":1179,"end_character":9},"in_reply_to":"dab17558_7a1444e8","updated":"2016-05-16 16:43:42.000000000","message":"Right, makes sense.","commit_id":"a2f8056dc4cc984ec1a484350e1541cce40e6757"}]}
