)]}'
{"nailgun/nailgun/extensions/cluster_upgrade/handlers.py":[{"author":{"_account_id":8931,"name":"Artem Roma","email":"aroma@mirantis.com","username":"aateem"},"change_message_id":"d84f31b58122a8fa89a2d6d446446474fc7a7c70","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        \"\"\"Reassign node to the given cluster."},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        The given node will be assigned from the current cluster to the"},{"line_number":75,"context_line":"        given cluster, by default it includes re-provisioning and redeployment"},{"line_number":76,"context_line":"        of this node. If the \u0027reprovision\u0027 flag is set to False, then the node"},{"line_number":77,"context_line":"        will be just reassigned include an ability to change roles of the node"},{"line_number":78,"context_line":"        during this procedure by setting the \u0027roles\u0027 flag."}],"source_content_type":"text/x-python","patch_set":6,"id":"7af24918_2ecdfa65","line":75,"updated":"2016-03-04 16:58:42.000000000","message":"Redeployment is not done in scope of this method. Or I\u0027ve missed smth?","commit_id":"eb3abb07107f231e7e894a7a7e262fc48442606b"},{"author":{"_account_id":1531,"name":"Ilya Kharin","email":"akscram@gmail.com","username":"akscram"},"change_message_id":"f99c8ed8f3ea8a8fda6039b2b964da28109c472b","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        \"\"\"Reassign node to the given cluster."},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        The given node will be assigned from the current cluster to the"},{"line_number":75,"context_line":"        given cluster, by default it includes re-provisioning and redeployment"},{"line_number":76,"context_line":"        of this node. If the \u0027reprovision\u0027 flag is set to False, then the node"},{"line_number":77,"context_line":"        will be just reassigned include an ability to change roles of the node"},{"line_number":78,"context_line":"        during this procedure by setting the \u0027roles\u0027 flag."}],"source_content_type":"text/x-python","patch_set":6,"id":"7af24918_3539b442","line":75,"in_reply_to":"7af24918_2ecdfa65","updated":"2016-03-05 04:10:55.000000000","message":"Done","commit_id":"eb3abb07107f231e7e894a7a7e262fc48442606b"},{"author":{"_account_id":8392,"name":"Aleksey Kasatkin","email":"akasatkin@mirantis.com","username":"aleksey"},"change_message_id":"b052667c011ffad10d39954e87d7fdc886cc2863","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        \"\"\"Return roles depending on the reprovisioning status."},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        In case the node should be re-provisioned, only pending roles"},{"line_number":74,"context_line":"        should be set, otherwise for an already provisioned and deploy"},{"line_number":75,"context_line":"        node only actual roles should be set. In the first case the"},{"line_number":76,"context_line":"        given roles will have precedence over the existing. In the"},{"line_number":77,"context_line":"        second case the given roles are required."}],"source_content_type":"text/x-python","patch_set":7,"id":"5aef4532_d42fb49f","line":74,"range":{"start_line":74,"start_character":64,"end_line":74,"end_character":70},"updated":"2016-03-07 14:09:06.000000000","message":"deployed ?","commit_id":"bbdc965e30f17219c61bd183580fc619b0c7d79b"},{"author":{"_account_id":1531,"name":"Ilya Kharin","email":"akscram@gmail.com","username":"akscram"},"change_message_id":"ab42000675074e0d77a310817914e54eaf3541c7","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        \"\"\"Return roles depending on the reprovisioning status."},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        In case the node should be re-provisioned, only pending roles"},{"line_number":74,"context_line":"        should be set, otherwise for an already provisioned and deploy"},{"line_number":75,"context_line":"        node only actual roles should be set. In the first case the"},{"line_number":76,"context_line":"        given roles will have precedence over the existing. In the"},{"line_number":77,"context_line":"        second case the given roles are required."}],"source_content_type":"text/x-python","patch_set":7,"id":"5aef4532_92308058","line":74,"range":{"start_line":74,"start_character":64,"end_line":74,"end_character":70},"in_reply_to":"5aef4532_d42fb49f","updated":"2016-03-08 04:03:10.000000000","message":"Done","commit_id":"bbdc965e30f17219c61bd183580fc619b0c7d79b"},{"author":{"_account_id":8392,"name":"Aleksey Kasatkin","email":"akasatkin@mirantis.com","username":"aleksey"},"change_message_id":"b052667c011ffad10d39954e87d7fdc886cc2863","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        should be set, otherwise for an already provisioned and deploy"},{"line_number":75,"context_line":"        node only actual roles should be set. In the first case the"},{"line_number":76,"context_line":"        given roles will have precedence over the existing. In the"},{"line_number":77,"context_line":"        second case the given roles are required."},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        :param reprovision: boolean, if set to True then the node should"},{"line_number":80,"context_line":"                            be re-provisioned"}],"source_content_type":"text/x-python","patch_set":7,"id":"5aef4532_5f93bda3","line":77,"range":{"start_line":77,"start_character":19,"end_line":77,"end_character":20},"updated":"2016-03-07 14:09:06.000000000","message":"only","commit_id":"bbdc965e30f17219c61bd183580fc619b0c7d79b"},{"author":{"_account_id":1531,"name":"Ilya Kharin","email":"akscram@gmail.com","username":"akscram"},"change_message_id":"ab42000675074e0d77a310817914e54eaf3541c7","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        should be set, otherwise for an already provisioned and deploy"},{"line_number":75,"context_line":"        node only actual roles should be set. In the first case the"},{"line_number":76,"context_line":"        given roles will have precedence over the existing. In the"},{"line_number":77,"context_line":"        second case the given roles are required."},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        :param reprovision: boolean, if set to True then the node should"},{"line_number":80,"context_line":"                            be re-provisioned"}],"source_content_type":"text/x-python","patch_set":7,"id":"5aef4532_127590ca","line":77,"range":{"start_line":77,"start_character":19,"end_line":77,"end_character":20},"in_reply_to":"5aef4532_5f93bda3","updated":"2016-03-08 04:03:10.000000000","message":"It means that during the reassigning the client should specify new roles and `reprovision\u003dFalse` in this case.","commit_id":"bbdc965e30f17219c61bd183580fc619b0c7d79b"},{"author":{"_account_id":8392,"name":"Aleksey Kasatkin","email":"akasatkin@mirantis.com","username":"aleksey"},"change_message_id":"b052667c011ffad10d39954e87d7fdc886cc2863","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        The given node will be assigned from the current cluster to the"},{"line_number":101,"context_line":"        given cluster, by default it includes the reprovisioning of this"},{"line_number":102,"context_line":"        node. If the \u0027reprovision\u0027 flag is set to False, then the node"},{"line_number":103,"context_line":"        will be just reassigned. If the \u0027roles\u0027 flag is specified, then"},{"line_number":104,"context_line":"        the given roles will be used as \u0027pending_roles\u0027 in case of"},{"line_number":105,"context_line":"        the reprovisioning or otherwise as \u0027roles\u0027."},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"5aef4532_3fdd1143","line":103,"range":{"start_line":103,"start_character":48,"end_line":103,"end_character":52},"updated":"2016-03-07 14:09:06.000000000","message":"list ?","commit_id":"bbdc965e30f17219c61bd183580fc619b0c7d79b"},{"author":{"_account_id":1531,"name":"Ilya Kharin","email":"akscram@gmail.com","username":"akscram"},"change_message_id":"ab42000675074e0d77a310817914e54eaf3541c7","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        The given node will be assigned from the current cluster to the"},{"line_number":101,"context_line":"        given cluster, by default it includes the reprovisioning of this"},{"line_number":102,"context_line":"        node. If the \u0027reprovision\u0027 flag is set to False, then the node"},{"line_number":103,"context_line":"        will be just reassigned. If the \u0027roles\u0027 flag is specified, then"},{"line_number":104,"context_line":"        the given roles will be used as \u0027pending_roles\u0027 in case of"},{"line_number":105,"context_line":"        the reprovisioning or otherwise as \u0027roles\u0027."},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"5aef4532_3226ccce","line":103,"range":{"start_line":103,"start_character":48,"end_line":103,"end_character":52},"in_reply_to":"5aef4532_3fdd1143","updated":"2016-03-08 04:03:10.000000000","message":"It means a key in the request body.","commit_id":"bbdc965e30f17219c61bd183580fc619b0c7d79b"},{"author":{"_account_id":8392,"name":"Aleksey Kasatkin","email":"akasatkin@mirantis.com","username":"aleksey"},"change_message_id":"b052667c011ffad10d39954e87d7fdc886cc2863","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        data \u003d self.checked_data(cluster\u003dcluster)"},{"line_number":118,"context_line":"        node \u003d adapters.NailgunNodeAdapter("},{"line_number":119,"context_line":"            self.get_object_or_404(objects.Node, data[\u0027node_id\u0027]))"},{"line_number":120,"context_line":"        reprovision \u003d data[\u0027reprovision\u0027]"},{"line_number":121,"context_line":"        given_roles \u003d data[\u0027roles\u0027]"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        roles, pending_roles \u003d self.get_node_roles("},{"line_number":124,"context_line":"            reprovision, node.roles, given_roles)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5aef4532_df64ed4a","line":121,"range":{"start_line":120,"start_character":0,"end_line":121,"end_character":35},"updated":"2016-03-07 14:09:06.000000000","message":"will data always have \u0027reprovision\u0027 and \u0027roles\u0027 ?","commit_id":"bbdc965e30f17219c61bd183580fc619b0c7d79b"},{"author":{"_account_id":1531,"name":"Ilya Kharin","email":"akscram@gmail.com","username":"akscram"},"change_message_id":"ab42000675074e0d77a310817914e54eaf3541c7","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        data \u003d self.checked_data(cluster\u003dcluster)"},{"line_number":118,"context_line":"        node \u003d adapters.NailgunNodeAdapter("},{"line_number":119,"context_line":"            self.get_object_or_404(objects.Node, data[\u0027node_id\u0027]))"},{"line_number":120,"context_line":"        reprovision \u003d data[\u0027reprovision\u0027]"},{"line_number":121,"context_line":"        given_roles \u003d data[\u0027roles\u0027]"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        roles, pending_roles \u003d self.get_node_roles("},{"line_number":124,"context_line":"            reprovision, node.roles, given_roles)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5aef4532_120ab026","line":121,"range":{"start_line":120,"start_character":0,"end_line":121,"end_character":35},"in_reply_to":"5aef4532_df64ed4a","updated":"2016-03-08 04:03:10.000000000","message":"Yes, it will because the validator always provides them.","commit_id":"bbdc965e30f17219c61bd183580fc619b0c7d79b"},{"author":{"_account_id":8392,"name":"Aleksey Kasatkin","email":"akasatkin@mirantis.com","username":"aleksey"},"change_message_id":"16430af3bbe154e394ddf281f634768788df7bb9","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        should be set, otherwise for an already provisioned and deployed"},{"line_number":75,"context_line":"        node only actual roles should be set. In the first case the"},{"line_number":76,"context_line":"        given roles will have precedence over the existing. In the"},{"line_number":77,"context_line":"        second case the given roles are required."},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        :param reprovision: boolean, if set to True then the node should"},{"line_number":80,"context_line":"                            be re-provisioned"}],"source_content_type":"text/x-python","patch_set":10,"id":"5aef4532_18dfd4d9","line":77,"range":{"start_line":77,"start_character":24,"end_line":77,"end_character":48},"updated":"2016-03-10 10:42:51.000000000","message":"only given roles are in use \n\n(current roles are not in use)","commit_id":"a49699575453cbf560aaed0651e0ab937d673db5"},{"author":{"_account_id":1531,"name":"Ilya Kharin","email":"akscram@gmail.com","username":"akscram"},"change_message_id":"bfca5fe315e860592a75935626be392d37591dcb","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        should be set, otherwise for an already provisioned and deployed"},{"line_number":75,"context_line":"        node only actual roles should be set. In the first case the"},{"line_number":76,"context_line":"        given roles will have precedence over the existing. In the"},{"line_number":77,"context_line":"        second case the given roles are required."},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        :param reprovision: boolean, if set to True then the node should"},{"line_number":80,"context_line":"                            be re-provisioned"}],"source_content_type":"text/x-python","patch_set":10,"id":"3afc51ec_4cae0f99","line":77,"range":{"start_line":77,"start_character":24,"end_line":77,"end_character":48},"in_reply_to":"5aef4532_18dfd4d9","updated":"2016-03-22 17:22:58.000000000","message":"The logic was changed: now it\u0027s possible to specify roles for the both cases.","commit_id":"a49699575453cbf560aaed0651e0ab937d673db5"},{"author":{"_account_id":8392,"name":"Aleksey Kasatkin","email":"akasatkin@mirantis.com","username":"aleksey"},"change_message_id":"16430af3bbe154e394ddf281f634768788df7bb9","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        :param current_roles: a list of current roles of the node"},{"line_number":82,"context_line":"        :param given_roles: a list of roles that should be assigned to"},{"line_number":83,"context_line":"                            the node"},{"line_number":84,"context_line":"        \"\"\""},{"line_number":85,"context_line":"        if reprovision:"},{"line_number":86,"context_line":"            roles \u003d []"},{"line_number":87,"context_line":"            if given_roles:"}],"source_content_type":"text/x-python","patch_set":10,"id":"5aef4532_987c84ed","line":84,"updated":"2016-03-10 10:42:51.000000000","message":"returns: ?","commit_id":"a49699575453cbf560aaed0651e0ab937d673db5"},{"author":{"_account_id":1531,"name":"Ilya Kharin","email":"akscram@gmail.com","username":"akscram"},"change_message_id":"bfca5fe315e860592a75935626be392d37591dcb","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        :param current_roles: a list of current roles of the node"},{"line_number":82,"context_line":"        :param given_roles: a list of roles that should be assigned to"},{"line_number":83,"context_line":"                            the node"},{"line_number":84,"context_line":"        \"\"\""},{"line_number":85,"context_line":"        if reprovision:"},{"line_number":86,"context_line":"            roles \u003d []"},{"line_number":87,"context_line":"            if given_roles:"}],"source_content_type":"text/x-python","patch_set":10,"id":"3afc51ec_6cdb0b50","line":84,"in_reply_to":"5aef4532_987c84ed","updated":"2016-03-22 17:22:58.000000000","message":"Done","commit_id":"a49699575453cbf560aaed0651e0ab937d673db5"},{"author":{"_account_id":8392,"name":"Aleksey Kasatkin","email":"akasatkin@mirantis.com","username":"aleksey"},"change_message_id":"16430af3bbe154e394ddf281f634768788df7bb9","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        The given node will be assigned from the current cluster to the"},{"line_number":101,"context_line":"        given cluster, by default it includes the reprovisioning of this"},{"line_number":102,"context_line":"        node. If the \u0027reprovision\u0027 flag is set to False, then the node"},{"line_number":103,"context_line":"        will be just reassigned. If the \u0027roles\u0027 flag is specified, then"},{"line_number":104,"context_line":"        the given roles will be used as \u0027pending_roles\u0027 in case of"},{"line_number":105,"context_line":"        the reprovisioning or otherwise as \u0027roles\u0027."},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"5aef4532_186cf4cc","line":103,"range":{"start_line":103,"start_character":48,"end_line":103,"end_character":52},"updated":"2016-03-10 10:42:51.000000000","message":"Continuing from #7:\n\nLet it be \u0027key\u0027 then. Normally we don\u0027t call it \u0027flag\u0027. IMO, \u0027list\u0027 is more informative though.","commit_id":"a49699575453cbf560aaed0651e0ab937d673db5"},{"author":{"_account_id":1531,"name":"Ilya Kharin","email":"akscram@gmail.com","username":"akscram"},"change_message_id":"bfca5fe315e860592a75935626be392d37591dcb","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        The given node will be assigned from the current cluster to the"},{"line_number":101,"context_line":"        given cluster, by default it includes the reprovisioning of this"},{"line_number":102,"context_line":"        node. If the \u0027reprovision\u0027 flag is set to False, then the node"},{"line_number":103,"context_line":"        will be just reassigned. If the \u0027roles\u0027 flag is specified, then"},{"line_number":104,"context_line":"        the given roles will be used as \u0027pending_roles\u0027 in case of"},{"line_number":105,"context_line":"        the reprovisioning or otherwise as \u0027roles\u0027."},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"3afc51ec_0cda474c","line":103,"range":{"start_line":103,"start_character":48,"end_line":103,"end_character":52},"in_reply_to":"5aef4532_186cf4cc","updated":"2016-03-22 17:22:58.000000000","message":"Done","commit_id":"a49699575453cbf560aaed0651e0ab937d673db5"},{"author":{"_account_id":8392,"name":"Aleksey Kasatkin","email":"akasatkin@mirantis.com","username":"aleksey"},"change_message_id":"16430af3bbe154e394ddf281f634768788df7bb9","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        data \u003d self.checked_data(cluster\u003dcluster)"},{"line_number":118,"context_line":"        node \u003d adapters.NailgunNodeAdapter("},{"line_number":119,"context_line":"            self.get_object_or_404(objects.Node, data[\u0027node_id\u0027]))"},{"line_number":120,"context_line":"        reprovision \u003d data[\u0027reprovision\u0027]"},{"line_number":121,"context_line":"        given_roles \u003d data[\u0027roles\u0027]"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        roles, pending_roles \u003d self.get_node_roles("},{"line_number":124,"context_line":"            reprovision, node.roles, given_roles)"}],"source_content_type":"text/x-python","patch_set":10,"id":"5aef4532_189a34b9","line":121,"range":{"start_line":120,"start_character":0,"end_line":121,"end_character":35},"updated":"2016-03-10 10:42:51.000000000","message":"Continuing from #7:\n\nValidators should not change payload.","commit_id":"a49699575453cbf560aaed0651e0ab937d673db5"},{"author":{"_account_id":1531,"name":"Ilya Kharin","email":"akscram@gmail.com","username":"akscram"},"change_message_id":"bfca5fe315e860592a75935626be392d37591dcb","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        data \u003d self.checked_data(cluster\u003dcluster)"},{"line_number":118,"context_line":"        node \u003d adapters.NailgunNodeAdapter("},{"line_number":119,"context_line":"            self.get_object_or_404(objects.Node, data[\u0027node_id\u0027]))"},{"line_number":120,"context_line":"        reprovision \u003d data[\u0027reprovision\u0027]"},{"line_number":121,"context_line":"        given_roles \u003d data[\u0027roles\u0027]"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        roles, pending_roles \u003d self.get_node_roles("},{"line_number":124,"context_line":"            reprovision, node.roles, given_roles)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3afc51ec_8c949743","line":121,"range":{"start_line":120,"start_character":0,"end_line":121,"end_character":35},"in_reply_to":"5aef4532_189a34b9","updated":"2016-03-22 17:22:58.000000000","message":"Done","commit_id":"a49699575453cbf560aaed0651e0ab937d673db5"},{"author":{"_account_id":10488,"name":"Artur Svechnikov","email":"asvechnikov@mirantis.com","username":"asvechnikov"},"change_message_id":"f23f7371d6dccc5886ea6ff2e8eeea4ff403999c","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        self.raise_task(task)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def get_node_roles(self, reprovision, current_roles, given_roles):"},{"line_number":71,"context_line":"        \"\"\"Return roles depending on the reprovisioning status."},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        In case the node should be re-provisioned, only pending roles"},{"line_number":74,"context_line":"        should be set, otherwise for an already provisioned and deployed"},{"line_number":75,"context_line":"        node only actual roles should be set. In the both case the"},{"line_number":76,"context_line":"        given roles will have precedence over the existing."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        :param reprovision: boolean, if set to True then the node should"},{"line_number":79,"context_line":"                            be re-provisioned"},{"line_number":80,"context_line":"        :param current_roles: a list of current roles of the node"},{"line_number":81,"context_line":"        :param given_roles: a list of roles that should be assigned to"},{"line_number":82,"context_line":"                            the node"},{"line_number":83,"context_line":"        :returns: a tuple of a list of roles and a list of pending roles"},{"line_number":84,"context_line":"                  that will be assigned to the node"},{"line_number":85,"context_line":"        \"\"\""},{"line_number":86,"context_line":"        roles_to_assign \u003d given_roles if given_roles else current_roles"},{"line_number":87,"context_line":"        if reprovision:"},{"line_number":88,"context_line":"            roles, pending_roles \u003d [], roles_to_assign"},{"line_number":89,"context_line":"        else:"},{"line_number":90,"context_line":"            roles, pending_roles \u003d roles_to_assign, []"},{"line_number":91,"context_line":"        return roles, pending_roles"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    @base.content"},{"line_number":94,"context_line":"    def POST(self, cluster_id):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1af94dfe_bab25d92","line":91,"range":{"start_line":70,"start_character":0,"end_line":91,"end_character":35},"updated":"2016-03-17 13:28:40.000000000","message":"let\u0027s move it to UpgradeHelper, I think that this method shouldn\u0027t be in handler","commit_id":"5f93d0eef68c61ea99eeb4b222a43a7b8cd27a4e"},{"author":{"_account_id":1531,"name":"Ilya Kharin","email":"akscram@gmail.com","username":"akscram"},"change_message_id":"5394c32393447aff9a037a8e8d43830257a5b42c","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        self.raise_task(task)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def get_node_roles(self, reprovision, current_roles, given_roles):"},{"line_number":71,"context_line":"        \"\"\"Return roles depending on the reprovisioning status."},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        In case the node should be re-provisioned, only pending roles"},{"line_number":74,"context_line":"        should be set, otherwise for an already provisioned and deployed"},{"line_number":75,"context_line":"        node only actual roles should be set. In the both case the"},{"line_number":76,"context_line":"        given roles will have precedence over the existing."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        :param reprovision: boolean, if set to True then the node should"},{"line_number":79,"context_line":"                            be re-provisioned"},{"line_number":80,"context_line":"        :param current_roles: a list of current roles of the node"},{"line_number":81,"context_line":"        :param given_roles: a list of roles that should be assigned to"},{"line_number":82,"context_line":"                            the node"},{"line_number":83,"context_line":"        :returns: a tuple of a list of roles and a list of pending roles"},{"line_number":84,"context_line":"                  that will be assigned to the node"},{"line_number":85,"context_line":"        \"\"\""},{"line_number":86,"context_line":"        roles_to_assign \u003d given_roles if given_roles else current_roles"},{"line_number":87,"context_line":"        if reprovision:"},{"line_number":88,"context_line":"            roles, pending_roles \u003d [], roles_to_assign"},{"line_number":89,"context_line":"        else:"},{"line_number":90,"context_line":"            roles, pending_roles \u003d roles_to_assign, []"},{"line_number":91,"context_line":"        return roles, pending_roles"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    @base.content"},{"line_number":94,"context_line":"    def POST(self, cluster_id):"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa0719c6_251db9bd","line":91,"range":{"start_line":70,"start_character":0,"end_line":91,"end_character":35},"in_reply_to":"1af94dfe_bab25d92","updated":"2016-03-22 19:14:02.000000000","message":"Done","commit_id":"5f93d0eef68c61ea99eeb4b222a43a7b8cd27a4e"},{"author":{"_account_id":10391,"name":"Ihor Kalnytskyi","email":"ihor@kalnytskyi.com","username":"ikalnitsky"},"change_message_id":"f98fe0bd37caaa3cfeff190f027d6f79fc1a5500","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        node \u003d adapters.NailgunNodeAdapter("},{"line_number":93,"context_line":"            self.get_object_or_404(objects.Node, data[\u0027node_id\u0027]))"},{"line_number":94,"context_line":"        reprovision \u003d data.get(\u0027reprovision\u0027, True)"},{"line_number":95,"context_line":"        given_roles \u003d data.get(\u0027roles\u0027, [])"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        roles, pending_roles \u003d upgrade.UpgradeHelper.get_node_roles("},{"line_number":98,"context_line":"            reprovision, node.roles, given_roles)"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa0719c6_c90dc4e9","line":95,"updated":"2016-03-23 14:43:27.000000000","message":"It looks like the default value could be `node.roles`, and in that case you would simplify \u0027get_nodes_roles\u0027 interface. So it only receives \u0027given_roles\u0027 and \u0027reprovision\u0027 flag.","commit_id":"c66d903be20bc9af69079dedf75f17f74ee0e3df"},{"author":{"_account_id":1531,"name":"Ilya Kharin","email":"akscram@gmail.com","username":"akscram"},"change_message_id":"80978515f02868ec282fbf1f5c710795d0e31073","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        node \u003d adapters.NailgunNodeAdapter("},{"line_number":93,"context_line":"            self.get_object_or_404(objects.Node, data[\u0027node_id\u0027]))"},{"line_number":94,"context_line":"        reprovision \u003d data.get(\u0027reprovision\u0027, True)"},{"line_number":95,"context_line":"        given_roles \u003d data.get(\u0027roles\u0027, [])"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        roles, pending_roles \u003d upgrade.UpgradeHelper.get_node_roles("},{"line_number":98,"context_line":"            reprovision, node.roles, given_roles)"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa0719c6_c0c2aee8","line":95,"in_reply_to":"fa0719c6_c90dc4e9","updated":"2016-03-23 16:23:29.000000000","message":"In this case I also should improve the validation because it\u0027s possible to send a request with an empty list of roles and it means that the current list of roles will be preserved.","commit_id":"c66d903be20bc9af69079dedf75f17f74ee0e3df"}],"nailgun/nailgun/extensions/cluster_upgrade/objects/adapters.py":[{"author":{"_account_id":10488,"name":"Artur Svechnikov","email":"asvechnikov@mirantis.com","username":"asvechnikov"},"change_message_id":"f23f7371d6dccc5886ea6ff2e8eeea4ff403999c","unresolved":false,"context_lines":[{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    @property"},{"line_number":46,"context_line":"    def attributes(self):"},{"line_number":47,"context_line":"        return self.cluster.attributes"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    @property"},{"line_number":50,"context_line":"    def generated_attrs(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1af94dfe_65b79af5","line":47,"range":{"start_line":47,"start_character":28,"end_line":47,"end_character":38},"updated":"2016-03-17 13:28:40.000000000","message":"Now cluster attributes is combined with attributes from cluster. So taking only cluster attributes is what you need?","commit_id":"5f93d0eef68c61ea99eeb4b222a43a7b8cd27a4e"},{"author":{"_account_id":10488,"name":"Artur Svechnikov","email":"asvechnikov@mirantis.com","username":"asvechnikov"},"change_message_id":"332ea87ca4af477e424ce43cbed6ce194f4f5d7c","unresolved":false,"context_lines":[{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    @property"},{"line_number":46,"context_line":"    def attributes(self):"},{"line_number":47,"context_line":"        return self.cluster.attributes"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    @property"},{"line_number":50,"context_line":"    def generated_attrs(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1af94dfe_77bc5edc","line":47,"range":{"start_line":47,"start_character":28,"end_line":47,"end_character":38},"in_reply_to":"1af94dfe_65b79af5","updated":"2016-03-17 16:53:09.000000000","message":"Sorry combined with attributes from plugins","commit_id":"5f93d0eef68c61ea99eeb4b222a43a7b8cd27a4e"},{"author":{"_account_id":1531,"name":"Ilya Kharin","email":"akscram@gmail.com","username":"akscram"},"change_message_id":"5394c32393447aff9a037a8e8d43830257a5b42c","unresolved":false,"context_lines":[{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    @property"},{"line_number":46,"context_line":"    def attributes(self):"},{"line_number":47,"context_line":"        return self.cluster.attributes"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    @property"},{"line_number":50,"context_line":"    def generated_attrs(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa0719c6_6835c8f5","line":47,"range":{"start_line":47,"start_character":28,"end_line":47,"end_character":38},"in_reply_to":"1af94dfe_77bc5edc","updated":"2016-03-22 19:14:02.000000000","message":"I need exactly what was added in this patch because it\u0027s requires by the nailgun.api.v1.validators.assignment.NodeAssignmentValidator.validate_roles method to check the given roles for application for the given cluster. It\u0027s how the assignment validator works by default. This validator was re-used in this patch to verify the given roles.","commit_id":"5f93d0eef68c61ea99eeb4b222a43a7b8cd27a4e"}],"nailgun/nailgun/extensions/cluster_upgrade/tests/test_handlers.py":[{"author":{"_account_id":8931,"name":"Artem Roma","email":"aroma@mirantis.com","username":"aateem"},"change_message_id":"d84f31b58122a8fa89a2d6d446446474fc7a7c70","unresolved":false,"context_lines":[{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    @patch(\u0027nailgun.task.task.rpc.cast\u0027)"},{"line_number":101,"context_line":"    def test_node_reassign_handler_without_reprovisioning(self, mcast):"},{"line_number":102,"context_line":"        self.env.create("},{"line_number":103,"context_line":"            cluster_kwargs\u003d{\u0027api\u0027: False},"},{"line_number":104,"context_line":"            nodes_kwargs\u003d[{\u0027status\u0027: consts.NODE_STATUSES.ready}])"},{"line_number":105,"context_line":"        self.env.create_cluster()"}],"source_content_type":"text/x-python","patch_set":6,"id":"7af24918_5352b135","line":102,"updated":"2016-03-04 16:58:42.000000000","message":"JFYI, If key \u0027api\u0027 with value False supplied for cluster_kwargs then env.create returns instance of ORM for cluster entity. Thus you don\u0027t need to retrieve it further from env.clusters collection.","commit_id":"eb3abb07107f231e7e894a7a7e262fc48442606b"},{"author":{"_account_id":1531,"name":"Ilya Kharin","email":"akscram@gmail.com","username":"akscram"},"change_message_id":"f99c8ed8f3ea8a8fda6039b2b964da28109c472b","unresolved":false,"context_lines":[{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    @patch(\u0027nailgun.task.task.rpc.cast\u0027)"},{"line_number":101,"context_line":"    def test_node_reassign_handler_without_reprovisioning(self, mcast):"},{"line_number":102,"context_line":"        self.env.create("},{"line_number":103,"context_line":"            cluster_kwargs\u003d{\u0027api\u0027: False},"},{"line_number":104,"context_line":"            nodes_kwargs\u003d[{\u0027status\u0027: consts.NODE_STATUSES.ready}])"},{"line_number":105,"context_line":"        self.env.create_cluster()"}],"source_content_type":"text/x-python","patch_set":6,"id":"7af24918_35eb74b2","line":102,"in_reply_to":"7af24918_5352b135","updated":"2016-03-05 04:10:55.000000000","message":"Done","commit_id":"eb3abb07107f231e7e894a7a7e262fc48442606b"},{"author":{"_account_id":8931,"name":"Artem Roma","email":"aroma@mirantis.com","username":"aateem"},"change_message_id":"d84f31b58122a8fa89a2d6d446446474fc7a7c70","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        self.env.create("},{"line_number":103,"context_line":"            cluster_kwargs\u003d{\u0027api\u0027: False},"},{"line_number":104,"context_line":"            nodes_kwargs\u003d[{\u0027status\u0027: consts.NODE_STATUSES.ready}])"},{"line_number":105,"context_line":"        self.env.create_cluster()"},{"line_number":106,"context_line":"        cluster \u003d self.env.clusters[0]"},{"line_number":107,"context_line":"        seed_cluster \u003d self.env.clusters[1]"},{"line_number":108,"context_line":"        node_id \u003d cluster.nodes[0][\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":6,"id":"7af24918_0e111e52","line":105,"updated":"2016-03-04 16:58:42.000000000","message":"And so does env.create_cluster with kwarg api\u003dFalse.","commit_id":"eb3abb07107f231e7e894a7a7e262fc48442606b"},{"author":{"_account_id":1531,"name":"Ilya Kharin","email":"akscram@gmail.com","username":"akscram"},"change_message_id":"f99c8ed8f3ea8a8fda6039b2b964da28109c472b","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        self.env.create("},{"line_number":103,"context_line":"            cluster_kwargs\u003d{\u0027api\u0027: False},"},{"line_number":104,"context_line":"            nodes_kwargs\u003d[{\u0027status\u0027: consts.NODE_STATUSES.ready}])"},{"line_number":105,"context_line":"        self.env.create_cluster()"},{"line_number":106,"context_line":"        cluster \u003d self.env.clusters[0]"},{"line_number":107,"context_line":"        seed_cluster \u003d self.env.clusters[1]"},{"line_number":108,"context_line":"        node_id \u003d cluster.nodes[0][\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":6,"id":"7af24918_f5e0ecce","line":105,"in_reply_to":"7af24918_0e111e52","updated":"2016-03-05 04:10:55.000000000","message":"Done","commit_id":"eb3abb07107f231e7e894a7a7e262fc48442606b"},{"author":{"_account_id":8931,"name":"Artem Roma","email":"aroma@mirantis.com","username":"aateem"},"change_message_id":"d84f31b58122a8fa89a2d6d446446474fc7a7c70","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        node_id \u003d cluster.nodes[0][\u0027id\u0027]"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        data \u003d {\u0027node_id\u0027: node_id,"},{"line_number":111,"context_line":"                \u0027reprovision\u0027: False,"},{"line_number":112,"context_line":"                \u0027roles\u0027: [\u0027compute\u0027]}"},{"line_number":113,"context_line":"        resp \u003d self.app.post("},{"line_number":114,"context_line":"            reverse(\u0027NodeReassignHandler\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"7af24918_093f58b4","line":111,"updated":"2016-03-04 16:58:42.000000000","message":"Please, add case when reprovision is True","commit_id":"eb3abb07107f231e7e894a7a7e262fc48442606b"},{"author":{"_account_id":1531,"name":"Ilya Kharin","email":"akscram@gmail.com","username":"akscram"},"change_message_id":"f99c8ed8f3ea8a8fda6039b2b964da28109c472b","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        node_id \u003d cluster.nodes[0][\u0027id\u0027]"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        data \u003d {\u0027node_id\u0027: node_id,"},{"line_number":111,"context_line":"                \u0027reprovision\u0027: False,"},{"line_number":112,"context_line":"                \u0027roles\u0027: [\u0027compute\u0027]}"},{"line_number":113,"context_line":"        resp \u003d self.app.post("},{"line_number":114,"context_line":"            reverse(\u0027NodeReassignHandler\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"7af24918_b5ee64b2","line":111,"in_reply_to":"7af24918_093f58b4","updated":"2016-03-05 04:10:55.000000000","message":"`True` is set by default.","commit_id":"eb3abb07107f231e7e894a7a7e262fc48442606b"},{"author":{"_account_id":8931,"name":"Artem Roma","email":"aroma@mirantis.com","username":"aateem"},"change_message_id":"d84f31b58122a8fa89a2d6d446446474fc7a7c70","unresolved":false,"context_lines":[{"line_number":116,"context_line":"            jsonutils.dumps(data),"},{"line_number":117,"context_line":"            headers\u003dself.default_headers)"},{"line_number":118,"context_line":"        self.assertEqual(200, resp.status_code)"},{"line_number":119,"context_line":"        self.assertFalse(mcast.called)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def test_node_reassign_handler_no_node(self):"},{"line_number":122,"context_line":"        self.env.create_cluster()"}],"source_content_type":"text/x-python","patch_set":6,"id":"7af24918_8e688ef6","line":119,"updated":"2016-03-04 16:58:42.000000000","message":"Please, add check that roles for node was updated","commit_id":"eb3abb07107f231e7e894a7a7e262fc48442606b"},{"author":{"_account_id":1531,"name":"Ilya Kharin","email":"akscram@gmail.com","username":"akscram"},"change_message_id":"f99c8ed8f3ea8a8fda6039b2b964da28109c472b","unresolved":false,"context_lines":[{"line_number":116,"context_line":"            jsonutils.dumps(data),"},{"line_number":117,"context_line":"            headers\u003dself.default_headers)"},{"line_number":118,"context_line":"        self.assertEqual(200, resp.status_code)"},{"line_number":119,"context_line":"        self.assertFalse(mcast.called)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def test_node_reassign_handler_no_node(self):"},{"line_number":122,"context_line":"        self.env.create_cluster()"}],"source_content_type":"text/x-python","patch_set":6,"id":"7af24918_152ab8e7","line":119,"in_reply_to":"7af24918_8e688ef6","updated":"2016-03-05 04:10:55.000000000","message":"Done","commit_id":"eb3abb07107f231e7e894a7a7e262fc48442606b"},{"author":{"_account_id":8392,"name":"Aleksey Kasatkin","email":"akasatkin@mirantis.com","username":"aleksey"},"change_message_id":"b052667c011ffad10d39954e87d7fdc886cc2863","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        seed_cluster \u003d self.env.create_cluster(api\u003dFalse)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        data \u003d {\u0027node_id\u0027: node.id,"},{"line_number":110,"context_line":"                \u0027reprovision\u0027: True,"},{"line_number":111,"context_line":"                \u0027roles\u0027: [\u0027compute\u0027]}"},{"line_number":112,"context_line":"        resp \u003d self.app.post("},{"line_number":113,"context_line":"            reverse(\u0027NodeReassignHandler\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"5aef4532_7a95e73e","line":110,"range":{"start_line":110,"start_character":16,"end_line":110,"end_character":35},"updated":"2016-03-07 14:09:06.000000000","message":"Please add explanation, does this lead to call of rpc.cast().","commit_id":"bbdc965e30f17219c61bd183580fc619b0c7d79b"},{"author":{"_account_id":8931,"name":"Artem Roma","email":"aroma@mirantis.com","username":"aateem"},"change_message_id":"053ea7b799e8d6e012a82a5461ddb3084ff0ce87","unresolved":false,"context_lines":[{"line_number":115,"context_line":"            jsonutils.dumps(data),"},{"line_number":116,"context_line":"            headers\u003dself.default_headers)"},{"line_number":117,"context_line":"        self.assertEqual(202, resp.status_code)"},{"line_number":118,"context_line":"        self.assertEqual(node.pending_roles, [\u0027compute\u0027])"},{"line_number":119,"context_line":"        self.assertTrue(mcast.called)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    @patch(\u0027nailgun.task.task.rpc.cast\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5aef4532_660c3f43","line":118,"updated":"2016-03-07 11:11:22.000000000","message":"Also check, that \u0027roles\u0027 of node has not been changed.","commit_id":"bbdc965e30f17219c61bd183580fc619b0c7d79b"},{"author":{"_account_id":1531,"name":"Ilya Kharin","email":"akscram@gmail.com","username":"akscram"},"change_message_id":"ab42000675074e0d77a310817914e54eaf3541c7","unresolved":false,"context_lines":[{"line_number":115,"context_line":"            jsonutils.dumps(data),"},{"line_number":116,"context_line":"            headers\u003dself.default_headers)"},{"line_number":117,"context_line":"        self.assertEqual(202, resp.status_code)"},{"line_number":118,"context_line":"        self.assertEqual(node.pending_roles, [\u0027compute\u0027])"},{"line_number":119,"context_line":"        self.assertTrue(mcast.called)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    @patch(\u0027nailgun.task.task.rpc.cast\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5aef4532_d5aaf2d3","line":118,"in_reply_to":"5aef4532_660c3f43","updated":"2016-03-08 04:03:10.000000000","message":"They will change because the re-deployment will be performed.","commit_id":"bbdc965e30f17219c61bd183580fc619b0c7d79b"},{"author":{"_account_id":8931,"name":"Artem Roma","email":"aroma@mirantis.com","username":"aateem"},"change_message_id":"053ea7b799e8d6e012a82a5461ddb3084ff0ce87","unresolved":false,"context_lines":[{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    @patch(\u0027nailgun.task.task.rpc.cast\u0027)"},{"line_number":122,"context_line":"    def test_node_reassign_handler_without_reprovisioning(self, mcast):"},{"line_number":123,"context_line":"        cluster \u003d self.env.create("},{"line_number":124,"context_line":"            cluster_kwargs\u003d{\u0027api\u0027: False},"},{"line_number":125,"context_line":"            nodes_kwargs\u003d[{\u0027status\u0027: consts.NODE_STATUSES.ready,"},{"line_number":126,"context_line":"                           \u0027roles\u0027: [\u0027controller\u0027]}])"}],"source_content_type":"text/x-python","patch_set":7,"id":"5aef4532_c63553f8","line":123,"updated":"2016-03-07 11:11:22.000000000","message":"DRY. Creation of clusters (alongside w/ nodes) could be moved to setUp method.","commit_id":"bbdc965e30f17219c61bd183580fc619b0c7d79b"},{"author":{"_account_id":1531,"name":"Ilya Kharin","email":"akscram@gmail.com","username":"akscram"},"change_message_id":"ab42000675074e0d77a310817914e54eaf3541c7","unresolved":false,"context_lines":[{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    @patch(\u0027nailgun.task.task.rpc.cast\u0027)"},{"line_number":122,"context_line":"    def test_node_reassign_handler_without_reprovisioning(self, mcast):"},{"line_number":123,"context_line":"        cluster \u003d self.env.create("},{"line_number":124,"context_line":"            cluster_kwargs\u003d{\u0027api\u0027: False},"},{"line_number":125,"context_line":"            nodes_kwargs\u003d[{\u0027status\u0027: consts.NODE_STATUSES.ready,"},{"line_number":126,"context_line":"                           \u0027roles\u0027: [\u0027controller\u0027]}])"}],"source_content_type":"text/x-python","patch_set":7,"id":"5aef4532_751b1e1c","line":123,"in_reply_to":"5aef4532_c63553f8","updated":"2016-03-08 04:03:10.000000000","message":"As I can see other methods of this class create clusters in the different way.","commit_id":"bbdc965e30f17219c61bd183580fc619b0c7d79b"}],"nailgun/nailgun/extensions/cluster_upgrade/tests/test_validators.py":[{"author":{"_account_id":8931,"name":"Artem Roma","email":"aroma@mirantis.com","username":"aateem"},"change_message_id":"d84f31b58122a8fa89a2d6d446446474fc7a7c70","unresolved":false,"context_lines":[{"line_number":143,"context_line":"            self.validator.validate(\"\", node)"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"class TestNodeReassignNoReinstallValidator(tests_base.BaseCloneClusterTest):"},{"line_number":147,"context_line":"    validator \u003d validators.NodeReassignValidator"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"7af24918_448dc5d1","line":146,"updated":"2016-03-04 16:58:42.000000000","message":"Please, add test case that checks validation fails when roles is not supplied and reprovision is False.","commit_id":"eb3abb07107f231e7e894a7a7e262fc48442606b"},{"author":{"_account_id":1531,"name":"Ilya Kharin","email":"akscram@gmail.com","username":"akscram"},"change_message_id":"f99c8ed8f3ea8a8fda6039b2b964da28109c472b","unresolved":false,"context_lines":[{"line_number":143,"context_line":"            self.validator.validate(\"\", node)"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"class TestNodeReassignNoReinstallValidator(tests_base.BaseCloneClusterTest):"},{"line_number":147,"context_line":"    validator \u003d validators.NodeReassignValidator"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"7af24918_61e37a06","line":146,"in_reply_to":"7af24918_448dc5d1","updated":"2016-03-05 04:10:55.000000000","message":"Done","commit_id":"eb3abb07107f231e7e894a7a7e262fc48442606b"},{"author":{"_account_id":8392,"name":"Aleksey Kasatkin","email":"akasatkin@mirantis.com","username":"aleksey"},"change_message_id":"b052667c011ffad10d39954e87d7fdc886cc2863","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        super(TestNodeReassignNoReinstallValidator, self).setUp()"},{"line_number":151,"context_line":"        self.cluster_80 \u003d self.env.create_cluster("},{"line_number":152,"context_line":"            api\u003dFalse,"},{"line_number":153,"context_line":"            release_id\u003dself.release_80.id,"},{"line_number":154,"context_line":"        )"},{"line_number":155,"context_line":"        self.node \u003d self.env.create_node(cluster_id\u003dself.cluster_61.id,"},{"line_number":156,"context_line":"                                         roles\u003d[\"compute\"], status\u003d\"ready\")"}],"source_content_type":"text/x-python","patch_set":7,"id":"5aef4532_1ab5c3cc","line":153,"range":{"start_line":153,"start_character":28,"end_line":153,"end_character":38},"updated":"2016-03-07 14:09:06.000000000","message":"how about 9.0 ?","commit_id":"bbdc965e30f17219c61bd183580fc619b0c7d79b"},{"author":{"_account_id":1531,"name":"Ilya Kharin","email":"akscram@gmail.com","username":"akscram"},"change_message_id":"ab42000675074e0d77a310817914e54eaf3541c7","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        super(TestNodeReassignNoReinstallValidator, self).setUp()"},{"line_number":151,"context_line":"        self.cluster_80 \u003d self.env.create_cluster("},{"line_number":152,"context_line":"            api\u003dFalse,"},{"line_number":153,"context_line":"            release_id\u003dself.release_80.id,"},{"line_number":154,"context_line":"        )"},{"line_number":155,"context_line":"        self.node \u003d self.env.create_node(cluster_id\u003dself.cluster_61.id,"},{"line_number":156,"context_line":"                                         roles\u003d[\"compute\"], status\u003d\"ready\")"}],"source_content_type":"text/x-python","patch_set":7,"id":"5aef4532_98d09a55","line":153,"range":{"start_line":153,"start_character":28,"end_line":153,"end_character":38},"in_reply_to":"5aef4532_1ab5c3cc","updated":"2016-03-08 04:03:10.000000000","message":"I will do it in a separate change request.","commit_id":"bbdc965e30f17219c61bd183580fc619b0c7d79b"},{"author":{"_account_id":1531,"name":"Ilya Kharin","email":"akscram@gmail.com","username":"akscram"},"change_message_id":"30b57ba571f53692a6448f6ee644c8fd272e3001","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        super(TestNodeReassignNoReinstallValidator, self).setUp()"},{"line_number":151,"context_line":"        self.cluster_80 \u003d self.env.create_cluster("},{"line_number":152,"context_line":"            api\u003dFalse,"},{"line_number":153,"context_line":"            release_id\u003dself.release_80.id,"},{"line_number":154,"context_line":"        )"},{"line_number":155,"context_line":"        self.node \u003d self.env.create_node(cluster_id\u003dself.cluster_61.id,"},{"line_number":156,"context_line":"                                         roles\u003d[\"compute\"], status\u003d\"ready\")"}],"source_content_type":"text/x-python","patch_set":7,"id":"5aef4532_912cf54b","line":153,"range":{"start_line":153,"start_character":28,"end_line":153,"end_character":38},"in_reply_to":"5aef4532_98d09a55","updated":"2016-03-08 04:21:56.000000000","message":"https://review.openstack.org/#/c/289691/","commit_id":"bbdc965e30f17219c61bd183580fc619b0c7d79b"},{"author":{"_account_id":8392,"name":"Aleksey Kasatkin","email":"akasatkin@mirantis.com","username":"aleksey"},"change_message_id":"b052667c011ffad10d39954e87d7fdc886cc2863","unresolved":false,"context_lines":[{"line_number":174,"context_line":"            \"reprovision\": True,"},{"line_number":175,"context_line":"            \"roles\": [\u0027controller\u0027],"},{"line_number":176,"context_line":"        })"},{"line_number":177,"context_line":"        expected_data \u003d {"},{"line_number":178,"context_line":"            \"node_id\": self.node.id,"},{"line_number":179,"context_line":"            \"reprovision\": True,"},{"line_number":180,"context_line":"            \"roles\": [\u0027controller\u0027],"},{"line_number":181,"context_line":"        }"},{"line_number":182,"context_line":"        parsed \u003d self.validator.validate(data, self.cluster_80)"},{"line_number":183,"context_line":"        self.assertEqual(parsed, expected_data)"},{"line_number":184,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"5aef4532_1a030375","line":181,"range":{"start_line":177,"start_character":0,"end_line":181,"end_character":9},"updated":"2016-03-07 14:09:06.000000000","message":"same as \u0027data\u0027","commit_id":"bbdc965e30f17219c61bd183580fc619b0c7d79b"},{"author":{"_account_id":1531,"name":"Ilya Kharin","email":"akscram@gmail.com","username":"akscram"},"change_message_id":"ab42000675074e0d77a310817914e54eaf3541c7","unresolved":false,"context_lines":[{"line_number":174,"context_line":"            \"reprovision\": True,"},{"line_number":175,"context_line":"            \"roles\": [\u0027controller\u0027],"},{"line_number":176,"context_line":"        })"},{"line_number":177,"context_line":"        expected_data \u003d {"},{"line_number":178,"context_line":"            \"node_id\": self.node.id,"},{"line_number":179,"context_line":"            \"reprovision\": True,"},{"line_number":180,"context_line":"            \"roles\": [\u0027controller\u0027],"},{"line_number":181,"context_line":"        }"},{"line_number":182,"context_line":"        parsed \u003d self.validator.validate(data, self.cluster_80)"},{"line_number":183,"context_line":"        self.assertEqual(parsed, expected_data)"},{"line_number":184,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"5aef4532_1b96444c","line":181,"range":{"start_line":177,"start_character":0,"end_line":181,"end_character":9},"in_reply_to":"5aef4532_1a030375","updated":"2016-03-08 04:03:10.000000000","message":"Done","commit_id":"bbdc965e30f17219c61bd183580fc619b0c7d79b"}],"nailgun/nailgun/extensions/cluster_upgrade/validators.py":[{"author":{"_account_id":8931,"name":"Artem Roma","email":"aroma@mirantis.com","username":"aateem"},"change_message_id":"053ea7b799e8d6e012a82a5461ddb3084ff0ce87","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        \"type\": \"object\","},{"line_number":94,"context_line":"        \"properties\": {"},{"line_number":95,"context_line":"            \"node_id\": {\"type\": \"number\"},"},{"line_number":96,"context_line":"            \"reprovision\": {\"type\": \"boolean\", \"default\": True},"},{"line_number":97,"context_line":"            \"roles\": {\"type\": \"array\","},{"line_number":98,"context_line":"                      \"items\": {\"type\": \"string\"},"},{"line_number":99,"context_line":"                      \"uniqueItems\": True},"}],"source_content_type":"text/x-python","patch_set":7,"id":"5aef4532_bfbe4ad2","line":96,"updated":"2016-03-07 11:11:22.000000000","message":"\u0027default\u0027 is not needed in case setdefault is used on line #109","commit_id":"bbdc965e30f17219c61bd183580fc619b0c7d79b"},{"author":{"_account_id":1531,"name":"Ilya Kharin","email":"akscram@gmail.com","username":"akscram"},"change_message_id":"ab42000675074e0d77a310817914e54eaf3541c7","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        \"type\": \"object\","},{"line_number":94,"context_line":"        \"properties\": {"},{"line_number":95,"context_line":"            \"node_id\": {\"type\": \"number\"},"},{"line_number":96,"context_line":"            \"reprovision\": {\"type\": \"boolean\", \"default\": True},"},{"line_number":97,"context_line":"            \"roles\": {\"type\": \"array\","},{"line_number":98,"context_line":"                      \"items\": {\"type\": \"string\"},"},{"line_number":99,"context_line":"                      \"uniqueItems\": True},"}],"source_content_type":"text/x-python","patch_set":7,"id":"5aef4532_2eabfc75","line":96,"in_reply_to":"5aef4532_bfbe4ad2","updated":"2016-03-08 04:03:10.000000000","message":"This is here just for the documentation purposes to declare the behavior because this schema used for validation and it doesn\u0027t provide the actual default value.","commit_id":"bbdc965e30f17219c61bd183580fc619b0c7d79b"},{"author":{"_account_id":8931,"name":"Artem Roma","email":"aroma@mirantis.com","username":"aateem"},"change_message_id":"053ea7b799e8d6e012a82a5461ddb3084ff0ce87","unresolved":false,"context_lines":[{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        node \u003d cls.validate_node(parsed[\u0027node_id\u0027])"},{"line_number":113,"context_line":"        cls.validate_node_cluster(node, cluster)"},{"line_number":114,"context_line":"        if not reprovision:"},{"line_number":115,"context_line":"            if not roles:"},{"line_number":116,"context_line":"                raise errors.InvalidData("},{"line_number":117,"context_line":"                    \"Roles for the node {0} should be specified during \""}],"source_content_type":"text/x-python","patch_set":7,"id":"5aef4532_ff0d7238","line":114,"updated":"2016-03-07 11:11:22.000000000","message":"Minor: \n\n if not provision and not roles:\n     ...","commit_id":"bbdc965e30f17219c61bd183580fc619b0c7d79b"},{"author":{"_account_id":1531,"name":"Ilya Kharin","email":"akscram@gmail.com","username":"akscram"},"change_message_id":"ab42000675074e0d77a310817914e54eaf3541c7","unresolved":false,"context_lines":[{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        node \u003d cls.validate_node(parsed[\u0027node_id\u0027])"},{"line_number":113,"context_line":"        cls.validate_node_cluster(node, cluster)"},{"line_number":114,"context_line":"        if not reprovision:"},{"line_number":115,"context_line":"            if not roles:"},{"line_number":116,"context_line":"                raise errors.InvalidData("},{"line_number":117,"context_line":"                    \"Roles for the node {0} should be specified during \""}],"source_content_type":"text/x-python","patch_set":7,"id":"5aef4532_11c5858d","line":114,"in_reply_to":"5aef4532_ff0d7238","updated":"2016-03-08 04:03:10.000000000","message":"Done","commit_id":"bbdc965e30f17219c61bd183580fc619b0c7d79b"},{"author":{"_account_id":8931,"name":"Artem Roma","email":"aroma@mirantis.com","username":"aateem"},"change_message_id":"053ea7b799e8d6e012a82a5461ddb3084ff0ce87","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                raise errors.InvalidData("},{"line_number":117,"context_line":"                    \"Roles for the node {0} should be specified during \""},{"line_number":118,"context_line":"                    \"reassinging without reprovisioning.\".format(node.id))"},{"line_number":119,"context_line":"            cls.validate_roles(cluster, roles)"},{"line_number":120,"context_line":"        return parsed"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":7,"id":"5aef4532_fc8740d5","line":119,"updated":"2016-03-07 11:11:22.000000000","message":"Shouldn\u0027t be the roles validated also when \u0027reprovision\u0027 is False??","commit_id":"bbdc965e30f17219c61bd183580fc619b0c7d79b"},{"author":{"_account_id":1531,"name":"Ilya Kharin","email":"akscram@gmail.com","username":"akscram"},"change_message_id":"ab42000675074e0d77a310817914e54eaf3541c7","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                raise errors.InvalidData("},{"line_number":117,"context_line":"                    \"Roles for the node {0} should be specified during \""},{"line_number":118,"context_line":"                    \"reassinging without reprovisioning.\".format(node.id))"},{"line_number":119,"context_line":"            cls.validate_roles(cluster, roles)"},{"line_number":120,"context_line":"        return parsed"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":7,"id":"5aef4532_31bc0105","line":119,"in_reply_to":"5aef4532_fc8740d5","updated":"2016-03-08 04:03:10.000000000","message":"Done","commit_id":"bbdc965e30f17219c61bd183580fc619b0c7d79b"},{"author":{"_account_id":8392,"name":"Aleksey Kasatkin","email":"akasatkin@mirantis.com","username":"aleksey"},"change_message_id":"16430af3bbe154e394ddf281f634768788df7bb9","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        parsed \u003d super(NodeReassignValidator, cls).validate(data)"},{"line_number":107,"context_line":"        cls.validate_schema(parsed, cls.schema)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        reprovision \u003d parsed.setdefault(\u0027reprovision\u0027, True)"},{"line_number":110,"context_line":"        roles \u003d parsed.setdefault(\u0027roles\u0027, [])"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        node \u003d cls.validate_node(parsed[\u0027node_id\u0027])"},{"line_number":113,"context_line":"        cls.validate_node_cluster(node, cluster)"}],"source_content_type":"text/x-python","patch_set":10,"id":"5aef4532_b83d00df","line":110,"range":{"start_line":109,"start_character":0,"end_line":110,"end_character":46},"updated":"2016-03-10 10:42:51.000000000","message":"IMO, payload should not be changed in validators. opinions?","commit_id":"a49699575453cbf560aaed0651e0ab937d673db5"},{"author":{"_account_id":1531,"name":"Ilya Kharin","email":"akscram@gmail.com","username":"akscram"},"change_message_id":"bfca5fe315e860592a75935626be392d37591dcb","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        parsed \u003d super(NodeReassignValidator, cls).validate(data)"},{"line_number":107,"context_line":"        cls.validate_schema(parsed, cls.schema)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        reprovision \u003d parsed.setdefault(\u0027reprovision\u0027, True)"},{"line_number":110,"context_line":"        roles \u003d parsed.setdefault(\u0027roles\u0027, [])"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        node \u003d cls.validate_node(parsed[\u0027node_id\u0027])"},{"line_number":113,"context_line":"        cls.validate_node_cluster(node, cluster)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3afc51ec_2c14639e","line":110,"range":{"start_line":109,"start_character":0,"end_line":110,"end_character":46},"in_reply_to":"3afc51ec_717ebaaf","updated":"2016-03-22 17:22:58.000000000","message":"It requires to duplicate the default behavior in two places. \nDone.","commit_id":"a49699575453cbf560aaed0651e0ab937d673db5"},{"author":{"_account_id":8931,"name":"Artem Roma","email":"aroma@mirantis.com","username":"aateem"},"change_message_id":"5a7c24c6b632d3b982ba6133bedb6453396b76d8","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        parsed \u003d super(NodeReassignValidator, cls).validate(data)"},{"line_number":107,"context_line":"        cls.validate_schema(parsed, cls.schema)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        reprovision \u003d parsed.setdefault(\u0027reprovision\u0027, True)"},{"line_number":110,"context_line":"        roles \u003d parsed.setdefault(\u0027roles\u0027, [])"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        node \u003d cls.validate_node(parsed[\u0027node_id\u0027])"},{"line_number":113,"context_line":"        cls.validate_node_cluster(node, cluster)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3afc51ec_717ebaaf","line":110,"range":{"start_line":109,"start_character":0,"end_line":110,"end_character":46},"in_reply_to":"5aef4532_b83d00df","updated":"2016-03-11 13:04:24.000000000","message":"+1","commit_id":"a49699575453cbf560aaed0651e0ab937d673db5"},{"author":{"_account_id":10488,"name":"Artur Svechnikov","email":"asvechnikov@mirantis.com","username":"asvechnikov"},"change_message_id":"f23f7371d6dccc5886ea6ff2e8eeea4ff403999c","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        node \u003d cls.validate_node(parsed[\u0027node_id\u0027])"},{"line_number":110,"context_line":"        cls.validate_node_cluster(node, cluster)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        roles \u003d parsed.get(\u0027roles\u0027, [])"},{"line_number":113,"context_line":"        if roles:"},{"line_number":114,"context_line":"            cls.validate_roles(cluster, roles)"},{"line_number":115,"context_line":"        else:"},{"line_number":116,"context_line":"            cls.validate_roles(cluster, node.roles)"},{"line_number":117,"context_line":"        return parsed"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":11,"id":"1af94dfe_0557b626","line":116,"range":{"start_line":112,"start_character":0,"end_line":116,"end_character":51},"updated":"2016-03-17 13:28:40.000000000","message":"it can be wrote as:\n\n roles \u003d parsed.get(\u0027roles\u0027, node.roles)\n cls.validate_roles(cluster, roles)","commit_id":"5f93d0eef68c61ea99eeb4b222a43a7b8cd27a4e"},{"author":{"_account_id":1531,"name":"Ilya Kharin","email":"akscram@gmail.com","username":"akscram"},"change_message_id":"5394c32393447aff9a037a8e8d43830257a5b42c","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        node \u003d cls.validate_node(parsed[\u0027node_id\u0027])"},{"line_number":110,"context_line":"        cls.validate_node_cluster(node, cluster)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        roles \u003d parsed.get(\u0027roles\u0027, [])"},{"line_number":113,"context_line":"        if roles:"},{"line_number":114,"context_line":"            cls.validate_roles(cluster, roles)"},{"line_number":115,"context_line":"        else:"},{"line_number":116,"context_line":"            cls.validate_roles(cluster, node.roles)"},{"line_number":117,"context_line":"        return parsed"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa0719c6_db3660e6","line":116,"range":{"start_line":112,"start_character":0,"end_line":116,"end_character":51},"in_reply_to":"1af94dfe_0557b626","updated":"2016-03-22 19:14:02.000000000","message":"This code have to handle the empty list or None too.","commit_id":"5f93d0eef68c61ea99eeb4b222a43a7b8cd27a4e"}],"nailgun/nailgun/objects/node.py":[{"author":{"_account_id":10488,"name":"Artur Svechnikov","email":"asvechnikov@mirantis.com","username":"asvechnikov"},"change_message_id":"f23f7371d6dccc5886ea6ff2e8eeea4ff403999c","unresolved":false,"context_lines":[{"line_number":773,"context_line":"        \"\"\""},{"line_number":774,"context_line":"        roles \u003d instance.roles"},{"line_number":775,"context_line":"        instance.cluster_id \u003d cluster.id"},{"line_number":776,"context_line":"        instance.kernel_params \u003d None"},{"line_number":777,"context_line":"        instance.group_id \u003d None"},{"line_number":778,"context_line":"        instance.deployment_info \u003d []"},{"line_number":779,"context_line":"        cls.update_roles(instance, [])"}],"source_content_type":"text/x-python","patch_set":11,"id":"1af94dfe_000204b4","side":"PARENT","line":776,"range":{"start_line":776,"start_character":8,"end_line":776,"end_character":37},"updated":"2016-03-17 13:28:40.000000000","message":"I think it should be done in case node will re-provisioned, shouldn\u0027t it?","commit_id":"11ba91c169ff3520bdb4692b816776992d240772"},{"author":{"_account_id":1531,"name":"Ilya Kharin","email":"akscram@gmail.com","username":"akscram"},"change_message_id":"5394c32393447aff9a037a8e8d43830257a5b42c","unresolved":false,"context_lines":[{"line_number":773,"context_line":"        \"\"\""},{"line_number":774,"context_line":"        roles \u003d instance.roles"},{"line_number":775,"context_line":"        instance.cluster_id \u003d cluster.id"},{"line_number":776,"context_line":"        instance.kernel_params \u003d None"},{"line_number":777,"context_line":"        instance.group_id \u003d None"},{"line_number":778,"context_line":"        instance.deployment_info \u003d []"},{"line_number":779,"context_line":"        cls.update_roles(instance, [])"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa0719c6_fe14f244","side":"PARENT","line":776,"range":{"start_line":776,"start_character":8,"end_line":776,"end_character":37},"in_reply_to":"1af94dfe_000204b4","updated":"2016-03-22 19:14:02.000000000","message":"Done","commit_id":"11ba91c169ff3520bdb4692b816776992d240772"},{"author":{"_account_id":10488,"name":"Artur Svechnikov","email":"asvechnikov@mirantis.com","username":"asvechnikov"},"change_message_id":"f23f7371d6dccc5886ea6ff2e8eeea4ff403999c","unresolved":false,"context_lines":[{"line_number":776,"context_line":"        \"\"\""},{"line_number":777,"context_line":"        instance.cluster_id \u003d cluster.id"},{"line_number":778,"context_line":"        instance.group_id \u003d None"},{"line_number":779,"context_line":"        instance.deployment_info \u003d []"},{"line_number":780,"context_line":"        cls.update_roles(instance, roles)"},{"line_number":781,"context_line":"        cls.update_pending_roles(instance, pending_roles)"},{"line_number":782,"context_line":"        cls.remove_replaced_params(instance)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1af94dfe_200c60ec","line":779,"range":{"start_line":779,"start_character":17,"end_line":779,"end_character":32},"updated":"2016-03-17 13:28:40.000000000","message":"Now it `replaced_deployment_info`. Also, shouldn\u0027t replaced_provisioning_info be changed to `{}` too?","commit_id":"5f93d0eef68c61ea99eeb4b222a43a7b8cd27a4e"},{"author":{"_account_id":1531,"name":"Ilya Kharin","email":"akscram@gmail.com","username":"akscram"},"change_message_id":"5394c32393447aff9a037a8e8d43830257a5b42c","unresolved":false,"context_lines":[{"line_number":776,"context_line":"        \"\"\""},{"line_number":777,"context_line":"        instance.cluster_id \u003d cluster.id"},{"line_number":778,"context_line":"        instance.group_id \u003d None"},{"line_number":779,"context_line":"        instance.deployment_info \u003d []"},{"line_number":780,"context_line":"        cls.update_roles(instance, roles)"},{"line_number":781,"context_line":"        cls.update_pending_roles(instance, pending_roles)"},{"line_number":782,"context_line":"        cls.remove_replaced_params(instance)"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa0719c6_becb9aa4","line":779,"range":{"start_line":779,"start_character":17,"end_line":779,"end_character":32},"in_reply_to":"1af94dfe_200c60ec","updated":"2016-03-22 19:14:02.000000000","message":"There is no more deployment_info and the replaced parameters are cleared in the 782 line by a call of the cls.remove_replaced_params method.","commit_id":"5f93d0eef68c61ea99eeb4b222a43a7b8cd27a4e"}]}
