)]}'
{"nova/objects/base.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"888e0c66a2339db3fe635cee594b593a959fd7fe","unresolved":false,"context_lines":[{"line_number":945,"context_line":"            else classmethod(wrapper))"},{"line_number":946,"context_line":""},{"line_number":947,"context_line":""},{"line_number":948,"context_line":"def obj_equal_prims(obj_1, obj_2, ignore\u003dNone):"},{"line_number":949,"context_line":"    \"\"\"Compare two primitives for equivalence ignoring some keys."},{"line_number":950,"context_line":""},{"line_number":951,"context_line":"    This operation tests the primitives of two objects for equivalence."}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_7420b5f8","line":948,"updated":"2015-03-18 13:43:58.000000000","message":"Why aren\u0027t you providing __eq__ instead ?\n\nNote : the ignore field could be manager other way by having an attribute on the NovaObject for example...\n\nBy the way, if you\u0027re not using that \u0027ignore\u0027 arg in your change, that\u0027s worth removing it anyway.","commit_id":"576d5361d57109eacb5024eb3657e96d87935350"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"3b20bb6f1b741877e41f2472fd90ab79cd1f2658","unresolved":false,"context_lines":[{"line_number":945,"context_line":"            else classmethod(wrapper))"},{"line_number":946,"context_line":""},{"line_number":947,"context_line":""},{"line_number":948,"context_line":"def obj_equal_prims(obj_1, obj_2, ignore\u003dNone):"},{"line_number":949,"context_line":"    \"\"\"Compare two primitives for equivalence ignoring some keys."},{"line_number":950,"context_line":""},{"line_number":951,"context_line":"    This operation tests the primitives of two objects for equivalence."}],"source_content_type":"text/x-python","patch_set":2,"id":"1a6ced46_2562413e","line":948,"in_reply_to":"1a6ced46_f980edc1","updated":"2015-03-26 10:30:47.000000000","message":"Okay, fair enough for not using __eq__ even if that was not needed to use a new method name :-)","commit_id":"576d5361d57109eacb5024eb3657e96d87935350"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"0ab5319e932b5fdeae0b6dd45bd1e3187463723f","unresolved":false,"context_lines":[{"line_number":945,"context_line":"            else classmethod(wrapper))"},{"line_number":946,"context_line":""},{"line_number":947,"context_line":""},{"line_number":948,"context_line":"def obj_equal_prims(obj_1, obj_2, ignore\u003dNone):"},{"line_number":949,"context_line":"    \"\"\"Compare two primitives for equivalence ignoring some keys."},{"line_number":950,"context_line":""},{"line_number":951,"context_line":"    This operation tests the primitives of two objects for equivalence."}],"source_content_type":"text/x-python","patch_set":2,"id":"1a6ced46_f980edc1","line":948,"in_reply_to":"9a80dd14_7420b5f8","updated":"2015-03-25 18:15:53.000000000","message":"Didn\u0027t want to change object equivalence. This is not meant to replace the __eq__() operation, it is meant to be an additional and different operation.\n\nAgree with the ignore. Dan suggested that, but you are right, as it is not used it should not be there. It can be put back in if someone wants it.","commit_id":"576d5361d57109eacb5024eb3657e96d87935350"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"5c4893fec2792ae6591b6ca8bae5261279f8bd93","unresolved":false,"context_lines":[{"line_number":865,"context_line":"                _strip(v, keys)"},{"line_number":866,"context_line":"        return prim"},{"line_number":867,"context_line":""},{"line_number":868,"context_line":"    if ignore is not None:"},{"line_number":869,"context_line":"        keys \u003d [\u0027nova_object.changes\u0027] + ignore"},{"line_number":870,"context_line":"    else:"},{"line_number":871,"context_line":"        keys \u003d [\u0027nova_object.changes\u0027]"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a016987_295f65e6","line":868,"updated":"2015-05-29 12:46:18.000000000","message":"We could just do \n\n  ignore \u003d ignore or []\n  keys \u003d [\u0027nova_object.changes\u0027] + ignore","commit_id":"5e84b4cb1cbfc477bb302a10f03f20122f423957"}],"nova/objects/compute_node.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"888e0c66a2339db3fe635cee594b593a959fd7fe","unresolved":false,"context_lines":[{"line_number":272,"context_line":"                                                             self.service_id)"},{"line_number":273,"context_line":"        return self._cached_service"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"    def has_changed(self):"},{"line_number":276,"context_line":"        \"\"\"Test for changes since the last time this method was executed."},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        A copy of the state of the object the last time this method was"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_14e779e5","line":275,"updated":"2015-03-18 13:43:58.000000000","message":"Why aren\u0027t you providing that helper in the base class ?","commit_id":"576d5361d57109eacb5024eb3657e96d87935350"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"3b20bb6f1b741877e41f2472fd90ab79cd1f2658","unresolved":false,"context_lines":[{"line_number":272,"context_line":"                                                             self.service_id)"},{"line_number":273,"context_line":"        return self._cached_service"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"    def has_changed(self):"},{"line_number":276,"context_line":"        \"\"\"Test for changes since the last time this method was executed."},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        A copy of the state of the object the last time this method was"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a6ced46_65cfd929","line":275,"in_reply_to":"1a6ced46_597e611a","updated":"2015-03-26 10:30:47.000000000","message":"Ack, that sounds a good place.","commit_id":"576d5361d57109eacb5024eb3657e96d87935350"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"0ab5319e932b5fdeae0b6dd45bd1e3187463723f","unresolved":false,"context_lines":[{"line_number":272,"context_line":"                                                             self.service_id)"},{"line_number":273,"context_line":"        return self._cached_service"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"    def has_changed(self):"},{"line_number":276,"context_line":"        \"\"\"Test for changes since the last time this method was executed."},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        A copy of the state of the object the last time this method was"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a6ced46_3902856f","line":275,"in_reply_to":"9a80dd14_14e779e5","updated":"2015-03-25 18:15:53.000000000","message":"Dan thought it was better to put this here because it was not used elsewhere. By that same logic and the fact its not done well, I think it is better put back in the RT where there is a real idea of what the old and new things being checked for changes are.","commit_id":"576d5361d57109eacb5024eb3657e96d87935350"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"e00434b9cd6ad9061ded4a9355a97863e249ab15","unresolved":false,"context_lines":[{"line_number":272,"context_line":"                                                             self.service_id)"},{"line_number":273,"context_line":"        return self._cached_service"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"    def has_changed(self):"},{"line_number":276,"context_line":"        \"\"\"Test for changes since the last time this method was executed."},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        A copy of the state of the object the last time this method was"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_2a38963c","line":275,"in_reply_to":"9a80dd14_14e779e5","updated":"2015-03-18 14:26:11.000000000","message":"I\u0027m not a fan of this for a couple of reasons. Firstly it\u0027s only used in 1 place. This code could easily live there.\n\nSecondly, I feel like a \u0027has_changed\u0027 api should be passed an explicit \u0027since when/what\u0027 argument. Since-last-invocation is weird and error prone in the general case. And if this isn\u0027t supposed to be used in the general case it should be moved out of this object.\n\nThirdly (of my couple), if the intent here is to avoid object saves when the underlying values haven\u0027t changes, this seems like a prime candidate to go in the base class. If you updated the base setter to not add the field to the changeset if it was already loaded and the value hadn\u0027t changed, this would be equivalent to testing obj_what_changed() modulo the ignored argument, which doesn\u0027t seem to be used anyway. This might be a generally useful optimisation anyway, albeit a behaviour change in some race conditions.","commit_id":"576d5361d57109eacb5024eb3657e96d87935350"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"0ab5319e932b5fdeae0b6dd45bd1e3187463723f","unresolved":false,"context_lines":[{"line_number":272,"context_line":"                                                             self.service_id)"},{"line_number":273,"context_line":"        return self._cached_service"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"    def has_changed(self):"},{"line_number":276,"context_line":"        \"\"\"Test for changes since the last time this method was executed."},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        A copy of the state of the object the last time this method was"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a6ced46_597e611a","line":275,"in_reply_to":"9a80dd14_2a38963c","updated":"2015-03-25 18:15:53.000000000","message":"Actually, it is probably better to make it changed since the last save or read from db. The point is to decide if the values have changed from those in the db and can\u0027t be done by checking consecutive updates (i.e. is this value same as last) because changing and changing back is the same as not changing. \n\nAnyway, I agree it is badly done here. I will put it back in the RT.","commit_id":"576d5361d57109eacb5024eb3657e96d87935350"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"322ed7aa50e95dce833818f445bcc3fe9355f42b","unresolved":false,"context_lines":[{"line_number":285,"context_line":"        :return: True if there were changes and False if not."},{"line_number":286,"context_line":"        \"\"\""},{"line_number":287,"context_line":"        if self._old_state and base.obj_equal_prims(self._old_state, self):"},{"line_number":288,"context_line":"            self.obj_reset_changes()"},{"line_number":289,"context_line":"            return False"},{"line_number":290,"context_line":"        else:"},{"line_number":291,"context_line":"            # NOTE(pmurray): __deepcopy__() is defined for NovaObject so that"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aa53dc9_286ae1b3","line":288,"updated":"2015-04-08 16:55:19.000000000","message":"hum, I tend to agree with Jay actually... While I understand the docstring, it\u0027s probably worth leaving this call out of the method.","commit_id":"e5ec936b61d774a10d26e572548885676352a4b9"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c6a8f6e8920af98d34334c14281b0a780d91f841","unresolved":false,"context_lines":[{"line_number":285,"context_line":"        :return: True if there were changes and False if not."},{"line_number":286,"context_line":"        \"\"\""},{"line_number":287,"context_line":"        if self._old_state and base.obj_equal_prims(self._old_state, self):"},{"line_number":288,"context_line":"            self.obj_reset_changes()"},{"line_number":289,"context_line":"            return False"},{"line_number":290,"context_line":"        else:"},{"line_number":291,"context_line":"            # NOTE(pmurray): __deepcopy__() is defined for NovaObject so that"}],"source_content_type":"text/x-python","patch_set":5,"id":"7aaa499b_d06d7305","line":288,"in_reply_to":"9aa53dc9_286ae1b3","updated":"2015-04-14 16:05:32.000000000","message":"Yeah, definitely don\u0027t think this should alter state.","commit_id":"e5ec936b61d774a10d26e572548885676352a4b9"}],"nova/tests/unit/objects/test_compute_node.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"54cdcbc93bfad6612d2d5db9fd19441e37b1aee0","unresolved":false,"context_lines":[{"line_number":428,"context_line":"    def test_has_changed(self):"},{"line_number":429,"context_line":"        compute \u003d compute_node.ComputeNode()"},{"line_number":430,"context_line":"        self.assertTrue(compute.has_changed(),"},{"line_number":431,"context_line":"                        \"compute is always be changed when initialized\")"},{"line_number":432,"context_line":"        compute.id \u003d 1"},{"line_number":433,"context_line":"        self.assertTrue(compute.has_changed(),"},{"line_number":434,"context_line":"                        \"compute should have changed after setting a field\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aa53dc9_cae38e04","line":431,"updated":"2015-04-08 13:47:04.000000000","message":"\"is always be changed\"? :)","commit_id":"e5ec936b61d774a10d26e572548885676352a4b9"}]}
