)]}'
{"ironic/common/exception.py":[{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"102cfc0cd7e31d433748b8b7838a591abf810823","unresolved":false,"context_lines":[{"line_number":615,"context_line":""},{"line_number":616,"context_line":""},{"line_number":617,"context_line":"class ObjectActionError(IronicException):"},{"line_number":618,"context_line":"    _msg_fmt \u003d _(\u0027Object action %(action)s failed because: %(reason)s\u0027)"},{"line_number":619,"context_line":""},{"line_number":620,"context_line":""},{"line_number":621,"context_line":"class OrphanedObjectError(IronicException):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa69d971_b61fad5a","line":618,"updated":"2015-12-30 08:07:01.000000000","message":"nit:Wonder should we use the exception directly from ovo.exception?","commit_id":"90504fb2e3287755b597574b56512eaa4a6e132a"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"0233c16586b4e6812b0e06faee71991331b52833","unresolved":false,"context_lines":[{"line_number":615,"context_line":""},{"line_number":616,"context_line":""},{"line_number":617,"context_line":"class ObjectActionError(IronicException):"},{"line_number":618,"context_line":"    _msg_fmt \u003d _(\u0027Object action %(action)s failed because: %(reason)s\u0027)"},{"line_number":619,"context_line":""},{"line_number":620,"context_line":""},{"line_number":621,"context_line":"class OrphanedObjectError(IronicException):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa69d971_c0befefe","line":618,"in_reply_to":"fa69d971_b61fad5a","updated":"2015-12-30 17:53:37.000000000","message":"We use subclasses of IronicException everywhere, because we do custom formatting and such. \n\nI thought about subclassing IronicException and the o.vo.exception classes, but I don\u0027t see much value there and I didn\u0027t want to dig into the MRO to make sure it works right. :)","commit_id":"90504fb2e3287755b597574b56512eaa4a6e132a"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"102cfc0cd7e31d433748b8b7838a591abf810823","unresolved":false,"context_lines":[{"line_number":618,"context_line":"    _msg_fmt \u003d _(\u0027Object action %(action)s failed because: %(reason)s\u0027)"},{"line_number":619,"context_line":""},{"line_number":620,"context_line":""},{"line_number":621,"context_line":"class OrphanedObjectError(IronicException):"},{"line_number":622,"context_line":"    _msg_fmt \u003d _(\u0027Cannot call %(method)s on orphaned %(objtype)s object\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa69d971_d624a1b0","line":621,"updated":"2015-12-30 08:07:01.000000000","message":"ditto","commit_id":"90504fb2e3287755b597574b56512eaa4a6e132a"}],"ironic/db/sqlalchemy/api.py":[{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"102cfc0cd7e31d433748b8b7838a591abf810823","unresolved":false,"context_lines":[{"line_number":440,"context_line":"                raise exception.PortAlreadyExists(uuid\u003dvalues[\u0027uuid\u0027])"},{"line_number":441,"context_line":"            return port"},{"line_number":442,"context_line":""},{"line_number":443,"context_line":"    def update_port(self, port_id, values, columns_to_join\u003dNone):"},{"line_number":444,"context_line":"        # NOTE(dtantsur): this can lead to very strange errors"},{"line_number":445,"context_line":"        if \u0027uuid\u0027 in values:"},{"line_number":446,"context_line":"            msg \u003d _(\"Cannot overwrite UUID for an existing Port.\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa69d971_18b6e7dc","line":443,"updated":"2015-12-30 08:07:01.000000000","message":"This part should belong to your another patch or you should add it in commit message.","commit_id":"90504fb2e3287755b597574b56512eaa4a6e132a"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"0233c16586b4e6812b0e06faee71991331b52833","unresolved":false,"context_lines":[{"line_number":440,"context_line":"                raise exception.PortAlreadyExists(uuid\u003dvalues[\u0027uuid\u0027])"},{"line_number":441,"context_line":"            return port"},{"line_number":442,"context_line":""},{"line_number":443,"context_line":"    def update_port(self, port_id, values, columns_to_join\u003dNone):"},{"line_number":444,"context_line":"        # NOTE(dtantsur): this can lead to very strange errors"},{"line_number":445,"context_line":"        if \u0027uuid\u0027 in values:"},{"line_number":446,"context_line":"            msg \u003d _(\"Cannot overwrite UUID for an existing Port.\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa69d971_a063cab0","line":443,"in_reply_to":"fa69d971_18b6e7dc","updated":"2015-12-30 17:53:37.000000000","message":"Done","commit_id":"90504fb2e3287755b597574b56512eaa4a6e132a"}],"ironic/objects/port.py":[{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"102cfc0cd7e31d433748b8b7838a591abf810823","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    # Version 1.4: Add list_by_node_id()"},{"line_number":43,"context_line":"    # Version 1.5: Add node attribute; add optional expected_attrs argument to"},{"line_number":44,"context_line":"    #              get(), get_by_id(), get_by_uuid(), get_by_address(), list(),"},{"line_number":45,"context_line":"    #              list_by_node_id()."},{"line_number":46,"context_line":"    VERSION \u003d \u00271.5\u0027"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    dbapi \u003d dbapi.get_instance()"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa69d971_9b7414d0","line":45,"updated":"2015-12-30 08:07:01.000000000","message":"also implement obj_load_attr() to lazy load node attribute.","commit_id":"90504fb2e3287755b597574b56512eaa4a6e132a"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"0233c16586b4e6812b0e06faee71991331b52833","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    # Version 1.4: Add list_by_node_id()"},{"line_number":43,"context_line":"    # Version 1.5: Add node attribute; add optional expected_attrs argument to"},{"line_number":44,"context_line":"    #              get(), get_by_id(), get_by_uuid(), get_by_address(), list(),"},{"line_number":45,"context_line":"    #              list_by_node_id()."},{"line_number":46,"context_line":"    VERSION \u003d \u00271.5\u0027"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    dbapi \u003d dbapi.get_instance()"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa69d971_0073b681","line":45,"in_reply_to":"fa69d971_9b7414d0","updated":"2015-12-30 17:53:37.000000000","message":"Done","commit_id":"90504fb2e3287755b597574b56512eaa4a6e132a"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"102cfc0cd7e31d433748b8b7838a591abf810823","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        if attrname \u003d\u003d \u0027node\u0027:"},{"line_number":99,"context_line":"            self._load_node()"},{"line_number":100,"context_line":"        self.obj_reset_changes([attrname])"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def _load_node(self, db_node\u003dNone):"},{"line_number":103,"context_line":"        if db_node is not None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa69d971_56e4313a","line":100,"updated":"2015-12-30 08:07:01.000000000","message":"nit:There is no problem for current implementation, but what about move self.obj_reset_changes([\u0027node\u0027]) into _load_node() method.  Then if someone use _load_node() somewhere else, they don\u0027t have to call obj_reset_changes() again.","commit_id":"90504fb2e3287755b597574b56512eaa4a6e132a"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"0233c16586b4e6812b0e06faee71991331b52833","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        if attrname \u003d\u003d \u0027node\u0027:"},{"line_number":99,"context_line":"            self._load_node()"},{"line_number":100,"context_line":"        self.obj_reset_changes([attrname])"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def _load_node(self, db_node\u003dNone):"},{"line_number":103,"context_line":"        if db_node is not None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa69d971_c0559ec6","line":100,"in_reply_to":"fa69d971_56e4313a","updated":"2015-12-30 17:53:37.000000000","message":"I thought about that, but I don\u0027t see much reason to use _load_node() elsewhere - just reference obj.node. That way it will be cached, too.\n\nThis way also means we don\u0027t have to add more obj_reset_changes calls, when we add more lazy attributes (which we will when portgroups stuff lands).","commit_id":"90504fb2e3287755b597574b56512eaa4a6e132a"},{"author":{"_account_id":18893,"name":"Miles Gould","email":"mgould@redhat.com","username":"pozorvlak"},"change_message_id":"dedf2a5263445b096bc668c3536fbe6a9d77d164","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                continue"},{"line_number":68,"context_line":"            port[field] \u003d db_port[field]"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        if \u0027node\u0027 in expected_attrs:"},{"line_number":71,"context_line":"            port._load_node(db_port.node)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        port.obj_reset_changes()"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa69d971_c2ba3823","line":70,"updated":"2016-01-04 16:42:19.000000000","message":"If the only allowed elements of expected_attrs are hardcoded, should we document them in the method\u0027s docstring?","commit_id":"665f36cf4bef2c0ee379134de38acd24714052a6"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"18670e613c843df12ee87b3bad4e0ba4aa03ab34","unresolved":false,"context_lines":[{"line_number":318,"context_line":"        node \u003d updates.pop(\u0027node\u0027, None)"},{"line_number":319,"context_line":"        if node is not None:"},{"line_number":320,"context_line":"            updates[\u0027node_id\u0027] \u003d node.id"},{"line_number":321,"context_line":"        updated_port \u003d self.dbapi.update_port(self.uuid, updates,"},{"line_number":322,"context_line":"                                              extra_attrs\u003dexpected_attrs)"},{"line_number":323,"context_line":"        self._from_db_object(self, updated_port, expected_attrs\u003dexpected_attrs)"},{"line_number":324,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"fa69d971_3d8ace64","line":321,"updated":"2016-01-07 09:23:41.000000000","message":"why do we always return port with node for save? I didn\u0027t see it is very useful for current usages. Is it better to add expected_attrs too?","commit_id":"665f36cf4bef2c0ee379134de38acd24714052a6"}]}
