)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8780ec9ce4c008e9921bd2dc53bbf392c82aaf51","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2020-03-24 11:29:31 +0100"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Support for nova-manage placement heal_allocations --cell"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I98b3280583a6d12461d8aa52e5714d7606b84369"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"df33271e_a9095cde","line":8,"updated":"2020-03-24 10:54:33.000000000","message":"Closes-Bug: #1868531","commit_id":"5eace91848e4aa258d7f70d9796d92aea338bb8a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ac45742ccd96f16367d2cf4262d621cb5f3eb192","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2020-03-29 14:00:59 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Support for nova-manage placement heal_allocations --cell"},{"line_number":8,"context_line":"Closes-bug: #1868531"},{"line_number":9,"context_line":"Change-Id: I98b3280583a6d12461d8aa52e5714d7606b84369"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"df33271e_e20cb6a6","line":8,"updated":"2020-03-30 13:50:01.000000000","message":"You should have a blank line between the title and the body of the commit message otherwise this all becomes part of the commit title.","commit_id":"ea95cce18c5a7986ff083d4a5f4f504ae05d58c2"}],"doc/source/cli/nova-manage.rst":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ac45742ccd96f16367d2cf4262d621cb5f3eb192","unresolved":false,"context_lines":[{"line_number":546,"context_line":""},{"line_number":547,"context_line":".. _heal_allocations_cli:"},{"line_number":548,"context_line":""},{"line_number":549,"context_line":"``nova-manage placement heal_allocations [--max-count \u003cmax_count\u003e] [--verbose] [--skip-port-allocations] [--dry-run] [--instance \u003cinstance_uuid\u003e] [--cell \u003ccell_uuid]``"},{"line_number":550,"context_line":"    Iterates over non-cell0 cells looking for instances which do not have"},{"line_number":551,"context_line":"    allocations in the Placement service and which are not undergoing a task"},{"line_number":552,"context_line":"    state transition. For each instance found, allocations are created against"}],"source_content_type":"text/x-rst","patch_set":8,"id":"df33271e_e231565c","line":549,"updated":"2020-03-30 13:50:01.000000000","message":"nit: at some point we should start using \"\\\" to wrap these long lines on command structure, or present the options as a table, something like that. You don\u0027t have to do it here in this change, it could be a follow up cleanup change.","commit_id":"ea95cce18c5a7986ff083d4a5f4f504ae05d58c2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ac45742ccd96f16367d2cf4262d621cb5f3eb192","unresolved":false,"context_lines":[{"line_number":605,"context_line":""},{"line_number":606,"context_line":"    Specify ``--cell`` to  process heal allocations within a specific cell."},{"line_number":607,"context_line":"    This is mutually exclusive with the --instance option."},{"line_number":608,"context_line":"    *(Since 20.0.0 Train)*"},{"line_number":609,"context_line":""},{"line_number":610,"context_line":"    This command requires that the"},{"line_number":611,"context_line":"    :oslo.config:option:`api_database.connection` and"}],"source_content_type":"text/x-rst","patch_set":8,"id":"df33271e_22385e3b","line":608,"updated":"2020-03-30 13:50:01.000000000","message":"This is not accurate since this change isn\u0027t going into 20.0.0.\n\nAssuming this makes it into Ussuri then you\u0027d say \"(Since 21.0.0 Ussuri)\".","commit_id":"ea95cce18c5a7986ff083d4a5f4f504ae05d58c2"},{"author":{"_account_id":31733,"name":"jayaditya gupta","email":"jayadityagupta11@gmail.com","username":"jgupta"},"change_message_id":"7bc57b1729efa04f54d2e6c04242ec214445aeb8","unresolved":false,"context_lines":[{"line_number":605,"context_line":""},{"line_number":606,"context_line":"    Specify ``--cell`` to  process heal allocations within a specific cell."},{"line_number":607,"context_line":"    This is mutually exclusive with the --instance option."},{"line_number":608,"context_line":"    *(Since 20.0.0 Train)*"},{"line_number":609,"context_line":""},{"line_number":610,"context_line":"    This command requires that the"},{"line_number":611,"context_line":"    :oslo.config:option:`api_database.connection` and"}],"source_content_type":"text/x-rst","patch_set":8,"id":"df33271e_dc3fc522","line":608,"in_reply_to":"df33271e_22385e3b","updated":"2020-04-03 08:13:50.000000000","message":"so should I add Ussuri or just leave it for now?","commit_id":"ea95cce18c5a7986ff083d4a5f4f504ae05d58c2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"27ac96bb4789ef00a32fad860222c6aa3d1df329","unresolved":false,"context_lines":[{"line_number":604,"context_line":"    *(Since 20.0.0 Train)*"},{"line_number":605,"context_line":""},{"line_number":606,"context_line":"    Specify ``--cell`` to  process heal allocations within a specific cell."},{"line_number":607,"context_line":"    This is mutually exclusive with the --instance option."},{"line_number":608,"context_line":""},{"line_number":609,"context_line":"    This command requires that the"},{"line_number":610,"context_line":"    :oslo.config:option:`api_database.connection` and"}],"source_content_type":"text/x-rst","patch_set":13,"id":"df33271e_537b5af3","line":607,"range":{"start_line":607,"start_character":40,"end_line":607,"end_character":50},"updated":"2020-04-02 19:54:05.000000000","message":"Format this: ``--instance``","commit_id":"1b07de85af46877affd92ae580cd31de40b22a67"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"16064964a4d0127931d31afc3980f3e3864e8a34","unresolved":false,"context_lines":[{"line_number":604,"context_line":"    *(Since 20.0.0 Train)*"},{"line_number":605,"context_line":""},{"line_number":606,"context_line":"    Specify ``--cell`` to  process heal allocations within a specific cell."},{"line_number":607,"context_line":"    This is mutually exclusive with the --instance option."},{"line_number":608,"context_line":""},{"line_number":609,"context_line":"    This command requires that the"},{"line_number":610,"context_line":"    :oslo.config:option:`api_database.connection` and"}],"source_content_type":"text/x-rst","patch_set":13,"id":"df33271e_b3ae262b","line":607,"range":{"start_line":607,"start_character":40,"end_line":607,"end_character":50},"in_reply_to":"df33271e_537b5af3","updated":"2020-04-02 20:04:40.000000000","message":"Done","commit_id":"1b07de85af46877affd92ae580cd31de40b22a67"}],"nova/cmd/manage.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8780ec9ce4c008e9921bd2dc53bbf392c82aaf51","unresolved":false,"context_lines":[{"line_number":2102,"context_line":"            help\u003d\u0027Provide heal allocation to specific cell\u0027)"},{"line_number":2103,"context_line":"    def heal_allocations(self, max_count\u003dNone, verbose\u003dFalse, dry_run\u003dFalse,"},{"line_number":2104,"context_line":"                        instance_uuid\u003dNone, skip_port_allocations\u003dFalse,"},{"line_number":2105,"context_line":"                        cell_id\u003dNone):"},{"line_number":2106,"context_line":"        \"\"\"Heals instance allocations in the Placement service"},{"line_number":2107,"context_line":""},{"line_number":2108,"context_line":"        Return codes:"}],"source_content_type":"text/x-python","patch_set":2,"id":"df33271e_29f54ccc","line":2105,"updated":"2020-03-24 10:54:33.000000000","message":"I suggest to use the uuid of the cell instead of the db row id.","commit_id":"5eace91848e4aa258d7f70d9796d92aea338bb8a"},{"author":{"_account_id":31733,"name":"jayaditya gupta","email":"jayadityagupta11@gmail.com","username":"jgupta"},"change_message_id":"7bc57b1729efa04f54d2e6c04242ec214445aeb8","unresolved":false,"context_lines":[{"line_number":2102,"context_line":"            help\u003d\u0027Provide heal allocation to specific cell\u0027)"},{"line_number":2103,"context_line":"    def heal_allocations(self, max_count\u003dNone, verbose\u003dFalse, dry_run\u003dFalse,"},{"line_number":2104,"context_line":"                        instance_uuid\u003dNone, skip_port_allocations\u003dFalse,"},{"line_number":2105,"context_line":"                        cell_id\u003dNone):"},{"line_number":2106,"context_line":"        \"\"\"Heals instance allocations in the Placement service"},{"line_number":2107,"context_line":""},{"line_number":2108,"context_line":"        Return codes:"}],"source_content_type":"text/x-python","patch_set":2,"id":"df33271e_d075619a","line":2105,"in_reply_to":"df33271e_29f54ccc","updated":"2020-04-03 08:13:50.000000000","message":"Done","commit_id":"5eace91848e4aa258d7f70d9796d92aea338bb8a"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8780ec9ce4c008e9921bd2dc53bbf392c82aaf51","unresolved":false,"context_lines":[{"line_number":2177,"context_line":"            if not cells:"},{"line_number":2178,"context_line":"                output(_(\u0027No cells to process.\u0027))"},{"line_number":2179,"context_line":"                return 4"},{"line_number":2180,"context_line":""},{"line_number":2181,"context_line":"        # validate cell_id"},{"line_number":2182,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":2183,"context_line":"        if cell_id:"}],"source_content_type":"text/x-python","patch_set":2,"id":"df33271e_49f890c3","line":2180,"updated":"2020-03-24 10:54:33.000000000","message":"At this point if an instance_uuid was provided then cells will hold a list with one CellMapping according to the location of the given instance.\n\nIf no instance_uuid was provided then cells will be a list of CellMapping, all cells (except cell0) in the deployment. \n\nSo I think at this point if a cell_id was also provided then we only need to filter the content of the cells variable according to the provided cell_id. The CellMapping object has both the uuid and the id of the cell[1].\n\n[1] https://github.com/openstack/nova/blob/2386b4c0a5b4d7c72baf2b09ea3f514455d30f9b/nova/objects/cell_mapping.py#L68","commit_id":"5eace91848e4aa258d7f70d9796d92aea338bb8a"},{"author":{"_account_id":31733,"name":"jayaditya gupta","email":"jayadityagupta11@gmail.com","username":"jgupta"},"change_message_id":"7bc57b1729efa04f54d2e6c04242ec214445aeb8","unresolved":false,"context_lines":[{"line_number":2177,"context_line":"            if not cells:"},{"line_number":2178,"context_line":"                output(_(\u0027No cells to process.\u0027))"},{"line_number":2179,"context_line":"                return 4"},{"line_number":2180,"context_line":""},{"line_number":2181,"context_line":"        # validate cell_id"},{"line_number":2182,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":2183,"context_line":"        if cell_id:"}],"source_content_type":"text/x-python","patch_set":2,"id":"df33271e_7047354d","line":2180,"in_reply_to":"df33271e_49f890c3","updated":"2020-04-03 08:13:50.000000000","message":"Done","commit_id":"5eace91848e4aa258d7f70d9796d92aea338bb8a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"02870d80cc1d1b190eb56a33f87675649d5b26d1","unresolved":false,"context_lines":[{"line_number":2098,"context_line":"               \u0027not use such a feature then the performance impact of \u0027"},{"line_number":2099,"context_line":"               \u0027querying neutron ports for each instance can be avoided with \u0027"},{"line_number":2100,"context_line":"               \u0027this flag.\u0027)"},{"line_number":2101,"context_line":"    @args(\u0027--cell\u0027, metavar\u003d\u0027\u003ccell_uuid\u003e\u0027, dest\u003d\u0027cell_uuid\u0027,"},{"line_number":2102,"context_line":"            help\u003d\u0027Provide heal allocation to specific cell\u0027)"},{"line_number":2103,"context_line":"    def heal_allocations(self, max_count\u003dNone, verbose\u003dFalse, dry_run\u003dFalse,"},{"line_number":2104,"context_line":"                        instance_uuid\u003dNone, skip_port_allocations\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":4,"id":"df33271e_ed223501","line":2101,"updated":"2020-03-25 15:00:35.000000000","message":"This should be in the docs as well:\n\nhttps://github.com/openstack/nova/blob/master/doc/source/cli/nova-manage.rst","commit_id":"aa8f06a384cb390ffbf9b004a3de7f88ecd7a6c5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"02870d80cc1d1b190eb56a33f87675649d5b26d1","unresolved":false,"context_lines":[{"line_number":2099,"context_line":"               \u0027querying neutron ports for each instance can be avoided with \u0027"},{"line_number":2100,"context_line":"               \u0027this flag.\u0027)"},{"line_number":2101,"context_line":"    @args(\u0027--cell\u0027, metavar\u003d\u0027\u003ccell_uuid\u003e\u0027, dest\u003d\u0027cell_uuid\u0027,"},{"line_number":2102,"context_line":"            help\u003d\u0027Provide heal allocation to specific cell\u0027)"},{"line_number":2103,"context_line":"    def heal_allocations(self, max_count\u003dNone, verbose\u003dFalse, dry_run\u003dFalse,"},{"line_number":2104,"context_line":"                        instance_uuid\u003dNone, skip_port_allocations\u003dFalse,"},{"line_number":2105,"context_line":"                        cell_uuid\u003dNone):"}],"source_content_type":"text/x-python","patch_set":4,"id":"df33271e_adeaeda8","line":2102,"range":{"start_line":2102,"start_character":18,"end_line":2102,"end_character":58},"updated":"2020-03-25 15:00:35.000000000","message":"\"Heal allocations within a specific cell.\"","commit_id":"aa8f06a384cb390ffbf9b004a3de7f88ecd7a6c5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"02870d80cc1d1b190eb56a33f87675649d5b26d1","unresolved":false,"context_lines":[{"line_number":2119,"context_line":"        * 127: Invalid input."},{"line_number":2120,"context_line":"        \"\"\""},{"line_number":2121,"context_line":"        # NOTE(mriedem): Thoughts on ways to expand this:"},{"line_number":2122,"context_line":"        # - allow passing a specific cell to heal"},{"line_number":2123,"context_line":"        # - allow filtering on enabled/disabled cells"},{"line_number":2124,"context_line":"        # - add a force option to force allocations for instances which have"},{"line_number":2125,"context_line":"        #   task_state is not None (would get complicated during a migration);"}],"source_content_type":"text/x-python","patch_set":4,"id":"df33271e_6de0e5cd","line":2122,"updated":"2020-03-25 15:00:35.000000000","message":"This line can be removed.","commit_id":"aa8f06a384cb390ffbf9b004a3de7f88ecd7a6c5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"02870d80cc1d1b190eb56a33f87675649d5b26d1","unresolved":false,"context_lines":[{"line_number":2139,"context_line":""},{"line_number":2140,"context_line":"        # If user has provided both cell and instance"},{"line_number":2141,"context_line":"        # Throw an error"},{"line_number":2142,"context_line":"        if instance_uuid and cell_uuid:"},{"line_number":2143,"context_line":"            print(_(\u0027Only supply cell ID or instance ID.\u0027))"},{"line_number":2144,"context_line":"            return 127"},{"line_number":2145,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"df33271e_cd00116b","line":2142,"updated":"2020-03-25 15:00:35.000000000","message":"Mention this in the help text for both options, e.g. for --instance you\u0027d say, \"This is mutually exclusive with the --cell option.\"","commit_id":"aa8f06a384cb390ffbf9b004a3de7f88ecd7a6c5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"02870d80cc1d1b190eb56a33f87675649d5b26d1","unresolved":false,"context_lines":[{"line_number":2140,"context_line":"        # If user has provided both cell and instance"},{"line_number":2141,"context_line":"        # Throw an error"},{"line_number":2142,"context_line":"        if instance_uuid and cell_uuid:"},{"line_number":2143,"context_line":"            print(_(\u0027Only supply cell ID or instance ID.\u0027))"},{"line_number":2144,"context_line":"            return 127"},{"line_number":2145,"context_line":""},{"line_number":2146,"context_line":"        # TODO(mriedem): Rather than --max-count being both a total and batch"}],"source_content_type":"text/x-python","patch_set":4,"id":"df33271e_4df40187","line":2143,"range":{"start_line":2143,"start_character":21,"end_line":2143,"end_character":56},"updated":"2020-03-25 15:00:35.000000000","message":"I\u0027d re-word this to \"The --cell and --instance options are mutually exclusive.\" The word \"only\" makes it sound like you have to provide one of those options but you don\u0027t need to provide either.","commit_id":"aa8f06a384cb390ffbf9b004a3de7f88ecd7a6c5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"02870d80cc1d1b190eb56a33f87675649d5b26d1","unresolved":false,"context_lines":[{"line_number":2179,"context_line":"                      instance_uuid)"},{"line_number":2180,"context_line":"                return 127"},{"line_number":2181,"context_line":"        else:"},{"line_number":2182,"context_line":"            cells \u003d objects.CellMappingList.get_all(ctxt)"},{"line_number":2183,"context_line":"            if not cells:"},{"line_number":2184,"context_line":"                output(_(\u0027No cells to process.\u0027))"},{"line_number":2185,"context_line":"                return 4"}],"source_content_type":"text/x-python","patch_set":4,"id":"df33271e_cd35b148","line":2182,"updated":"2020-03-25 15:00:35.000000000","message":"Your cell_uuid logic should be here - if a cell_uuid is given then just get that cell, otherwise get all cells. And that single cell should be put into the `cells` variable which would just be a list of one, then the for loop below just works and you don\u0027t need extra logic down there.","commit_id":"aa8f06a384cb390ffbf9b004a3de7f88ecd7a6c5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"02870d80cc1d1b190eb56a33f87675649d5b26d1","unresolved":false,"context_lines":[{"line_number":2208,"context_line":"                continue"},{"line_number":2209,"context_line":"            # If instance_id is not specified  and cell_uuid specified"},{"line_number":2210,"context_line":"            # filter cells and only process specified cell"},{"line_number":2211,"context_line":"            if not instance_uuid:"},{"line_number":2212,"context_line":"                if cell_uuid:"},{"line_number":2213,"context_line":"                    if cell_uuid !\u003d cell.uuid:"},{"line_number":2214,"context_line":"                        continue"}],"source_content_type":"text/x-python","patch_set":4,"id":"df33271e_0d3f9925","line":2211,"updated":"2020-03-25 15:00:35.000000000","message":"None of this new logic should be needed.","commit_id":"aa8f06a384cb390ffbf9b004a3de7f88ecd7a6c5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ac45742ccd96f16367d2cf4262d621cb5f3eb192","unresolved":false,"context_lines":[{"line_number":2089,"context_line":"               \u0027changes. The return code should be 4.\u0027)"},{"line_number":2090,"context_line":"    @args(\u0027--instance\u0027, metavar\u003d\u0027\u003cinstance_uuid\u003e\u0027, dest\u003d\u0027instance_uuid\u0027,"},{"line_number":2091,"context_line":"          help\u003d\u0027UUID of a specific instance to process. If specified \u0027"},{"line_number":2092,"context_line":"               \u0027--max-count has no effect.\u0027"},{"line_number":2093,"context_line":"               \u0027The --cell and --instance options are mutually exclusive.\u0027)"},{"line_number":2094,"context_line":"    @args(\u0027--skip-port-allocations\u0027, action\u003d\u0027store_true\u0027,"},{"line_number":2095,"context_line":"          dest\u003d\u0027skip_port_allocations\u0027, default\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":8,"id":"df33271e_c246d2c0","line":2092,"range":{"start_line":2092,"start_character":42,"end_line":2092,"end_character":43},"updated":"2020-03-30 13:50:01.000000000","message":"Assuming the help text wraps in the console output you should have a space between sentences.","commit_id":"ea95cce18c5a7986ff083d4a5f4f504ae05d58c2"},{"author":{"_account_id":31733,"name":"jayaditya gupta","email":"jayadityagupta11@gmail.com","username":"jgupta"},"change_message_id":"7bc57b1729efa04f54d2e6c04242ec214445aeb8","unresolved":false,"context_lines":[{"line_number":2089,"context_line":"               \u0027changes. The return code should be 4.\u0027)"},{"line_number":2090,"context_line":"    @args(\u0027--instance\u0027, metavar\u003d\u0027\u003cinstance_uuid\u003e\u0027, dest\u003d\u0027instance_uuid\u0027,"},{"line_number":2091,"context_line":"          help\u003d\u0027UUID of a specific instance to process. If specified \u0027"},{"line_number":2092,"context_line":"               \u0027--max-count has no effect.\u0027"},{"line_number":2093,"context_line":"               \u0027The --cell and --instance options are mutually exclusive.\u0027)"},{"line_number":2094,"context_line":"    @args(\u0027--skip-port-allocations\u0027, action\u003d\u0027store_true\u0027,"},{"line_number":2095,"context_line":"          dest\u003d\u0027skip_port_allocations\u0027, default\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":8,"id":"df33271e_dcdb45ea","line":2092,"range":{"start_line":2092,"start_character":42,"end_line":2092,"end_character":43},"in_reply_to":"df33271e_c246d2c0","updated":"2020-04-03 08:13:50.000000000","message":"Done","commit_id":"ea95cce18c5a7986ff083d4a5f4f504ae05d58c2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ac45742ccd96f16367d2cf4262d621cb5f3eb192","unresolved":false,"context_lines":[{"line_number":2100,"context_line":"               \u0027querying neutron ports for each instance can be avoided with \u0027"},{"line_number":2101,"context_line":"               \u0027this flag.\u0027)"},{"line_number":2102,"context_line":"    @args(\u0027--cell\u0027, metavar\u003d\u0027\u003ccell_uuid\u003e\u0027, dest\u003d\u0027cell_uuid\u0027,"},{"line_number":2103,"context_line":"            help\u003d\u0027Heal allocations within a specific cell.\u0027"},{"line_number":2104,"context_line":"                \u0027The --cell and --instance options are mutually exclusive.\u0027)"},{"line_number":2105,"context_line":"    def heal_allocations(self, max_count\u003dNone, verbose\u003dFalse, dry_run\u003dFalse,"},{"line_number":2106,"context_line":"                        instance_uuid\u003dNone, skip_port_allocations\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":8,"id":"df33271e_a243ceae","line":2103,"range":{"start_line":2103,"start_character":57,"end_line":2103,"end_character":59},"updated":"2020-03-30 13:50:01.000000000","message":"space","commit_id":"ea95cce18c5a7986ff083d4a5f4f504ae05d58c2"},{"author":{"_account_id":31733,"name":"jayaditya gupta","email":"jayadityagupta11@gmail.com","username":"jgupta"},"change_message_id":"7bc57b1729efa04f54d2e6c04242ec214445aeb8","unresolved":false,"context_lines":[{"line_number":2100,"context_line":"               \u0027querying neutron ports for each instance can be avoided with \u0027"},{"line_number":2101,"context_line":"               \u0027this flag.\u0027)"},{"line_number":2102,"context_line":"    @args(\u0027--cell\u0027, metavar\u003d\u0027\u003ccell_uuid\u003e\u0027, dest\u003d\u0027cell_uuid\u0027,"},{"line_number":2103,"context_line":"            help\u003d\u0027Heal allocations within a specific cell.\u0027"},{"line_number":2104,"context_line":"                \u0027The --cell and --instance options are mutually exclusive.\u0027)"},{"line_number":2105,"context_line":"    def heal_allocations(self, max_count\u003dNone, verbose\u003dFalse, dry_run\u003dFalse,"},{"line_number":2106,"context_line":"                        instance_uuid\u003dNone, skip_port_allocations\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":8,"id":"df33271e_1ce2cda0","line":2103,"range":{"start_line":2103,"start_character":57,"end_line":2103,"end_character":59},"in_reply_to":"df33271e_a243ceae","updated":"2020-04-03 08:13:50.000000000","message":"Done","commit_id":"ea95cce18c5a7986ff083d4a5f4f504ae05d58c2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ac45742ccd96f16367d2cf4262d621cb5f3eb192","unresolved":false,"context_lines":[{"line_number":2101,"context_line":"               \u0027this flag.\u0027)"},{"line_number":2102,"context_line":"    @args(\u0027--cell\u0027, metavar\u003d\u0027\u003ccell_uuid\u003e\u0027, dest\u003d\u0027cell_uuid\u0027,"},{"line_number":2103,"context_line":"            help\u003d\u0027Heal allocations within a specific cell.\u0027"},{"line_number":2104,"context_line":"                \u0027The --cell and --instance options are mutually exclusive.\u0027)"},{"line_number":2105,"context_line":"    def heal_allocations(self, max_count\u003dNone, verbose\u003dFalse, dry_run\u003dFalse,"},{"line_number":2106,"context_line":"                        instance_uuid\u003dNone, skip_port_allocations\u003dFalse,"},{"line_number":2107,"context_line":"                        cell_uuid\u003dNone):"}],"source_content_type":"text/x-python","patch_set":8,"id":"df33271e_82296ae7","line":2104,"updated":"2020-03-30 13:50:01.000000000","message":"Alignment is off here - please align the strings on this line and the previous line.","commit_id":"ea95cce18c5a7986ff083d4a5f4f504ae05d58c2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ac45742ccd96f16367d2cf4262d621cb5f3eb192","unresolved":false,"context_lines":[{"line_number":2142,"context_line":"        # Throw an error"},{"line_number":2143,"context_line":"        if instance_uuid and cell_uuid:"},{"line_number":2144,"context_line":"            print(_(\u0027The --cell and --instance options\u0027"},{"line_number":2145,"context_line":"                    \u0027 are mutually exclusive.\u0027))"},{"line_number":2146,"context_line":"            return 127"},{"line_number":2147,"context_line":""},{"line_number":2148,"context_line":"        # TODO(mriedem): Rather than --max-count being both a total and batch"}],"source_content_type":"text/x-python","patch_set":8,"id":"df33271e_6226e617","line":2145,"updated":"2020-03-30 13:50:01.000000000","message":"Couldn\u0027t this go on the previous line?","commit_id":"ea95cce18c5a7986ff083d4a5f4f504ae05d58c2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ac45742ccd96f16367d2cf4262d621cb5f3eb192","unresolved":false,"context_lines":[{"line_number":2180,"context_line":"                      \u0027\"nova-manage cell_v2 map_instances\".\u0027 %"},{"line_number":2181,"context_line":"                      instance_uuid)"},{"line_number":2182,"context_line":"                return 127"},{"line_number":2183,"context_line":""},{"line_number":2184,"context_line":"        elif cell_uuid:"},{"line_number":2185,"context_line":"            try:"},{"line_number":2186,"context_line":"                # validate cell_uuid"}],"source_content_type":"text/x-python","patch_set":8,"id":"df33271e_826e8a2c","line":2183,"updated":"2020-03-30 13:50:01.000000000","message":"Remove this blank line.","commit_id":"ea95cce18c5a7986ff083d4a5f4f504ae05d58c2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ac45742ccd96f16367d2cf4262d621cb5f3eb192","unresolved":false,"context_lines":[{"line_number":2187,"context_line":"                cell \u003d objects.CellMapping.get_by_uuid(ctxt, cell_uuid)"},{"line_number":2188,"context_line":"                # create CellMappingList"},{"line_number":2189,"context_line":"                cells \u003d objects.CellMappingList(objects\u003d[cell])"},{"line_number":2190,"context_line":"            except exception.CellMappingNotFound:"},{"line_number":2191,"context_line":"                print(_(\u0027Cell with uuid %s was not found.\u0027) % cell_uuid)"},{"line_number":2192,"context_line":"                return 127"},{"line_number":2193,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"df33271e_0501e405","line":2190,"updated":"2020-03-30 13:50:01.000000000","message":"Let\u0027s have a simple unit test to make sure we hit this case.","commit_id":"ea95cce18c5a7986ff083d4a5f4f504ae05d58c2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"27ac96bb4789ef00a32fad860222c6aa3d1df329","unresolved":false,"context_lines":[{"line_number":2089,"context_line":"               \u0027changes. The return code should be 4.\u0027)"},{"line_number":2090,"context_line":"    @args(\u0027--instance\u0027, metavar\u003d\u0027\u003cinstance_uuid\u003e\u0027, dest\u003d\u0027instance_uuid\u0027,"},{"line_number":2091,"context_line":"          help\u003d\u0027UUID of a specific instance to process. If specified \u0027"},{"line_number":2092,"context_line":"               \u0027--max-count has no effect.\u0027"},{"line_number":2093,"context_line":"               \u0027The --cell and --instance options are mutually exclusive.\u0027)"},{"line_number":2094,"context_line":"    @args(\u0027--skip-port-allocations\u0027, action\u003d\u0027store_true\u0027,"},{"line_number":2095,"context_line":"          dest\u003d\u0027skip_port_allocations\u0027, default\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":13,"id":"df33271e_337e96e3","line":2092,"range":{"start_line":2092,"start_character":41,"end_line":2092,"end_character":43},"updated":"2020-04-02 19:54:05.000000000","message":"Doesn\u0027t there need to be a space here?","commit_id":"1b07de85af46877affd92ae580cd31de40b22a67"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"16064964a4d0127931d31afc3980f3e3864e8a34","unresolved":false,"context_lines":[{"line_number":2089,"context_line":"               \u0027changes. The return code should be 4.\u0027)"},{"line_number":2090,"context_line":"    @args(\u0027--instance\u0027, metavar\u003d\u0027\u003cinstance_uuid\u003e\u0027, dest\u003d\u0027instance_uuid\u0027,"},{"line_number":2091,"context_line":"          help\u003d\u0027UUID of a specific instance to process. If specified \u0027"},{"line_number":2092,"context_line":"               \u0027--max-count has no effect.\u0027"},{"line_number":2093,"context_line":"               \u0027The --cell and --instance options are mutually exclusive.\u0027)"},{"line_number":2094,"context_line":"    @args(\u0027--skip-port-allocations\u0027, action\u003d\u0027store_true\u0027,"},{"line_number":2095,"context_line":"          dest\u003d\u0027skip_port_allocations\u0027, default\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":13,"id":"df33271e_1358b253","line":2092,"range":{"start_line":2092,"start_character":41,"end_line":2092,"end_character":43},"in_reply_to":"df33271e_337e96e3","updated":"2020-04-02 20:04:40.000000000","message":"Yes, this is the output I get on the command line:\n\n\u003e   --instance \u003cinstance_uuid\u003e\n                        UUID of a specific instance to process. If specified\n                        --max-count has no effect.The --cell and --instance\n                        options are mutually exclusive.","commit_id":"1b07de85af46877affd92ae580cd31de40b22a67"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"27ac96bb4789ef00a32fad860222c6aa3d1df329","unresolved":false,"context_lines":[{"line_number":2141,"context_line":"        # If user has provided both cell and instance"},{"line_number":2142,"context_line":"        # Throw an error"},{"line_number":2143,"context_line":"        if instance_uuid and cell_uuid:"},{"line_number":2144,"context_line":"            print(_(\u0027The --cell and --instance options \u0027"},{"line_number":2145,"context_line":"                    \u0027are mutually exclusive.\u0027))"},{"line_number":2146,"context_line":"            return 127"},{"line_number":2147,"context_line":""},{"line_number":2148,"context_line":"        # TODO(mriedem): Rather than --max-count being both a total and batch"}],"source_content_type":"text/x-python","patch_set":13,"id":"df33271e_d36e4a2d","line":2145,"range":{"start_line":2144,"start_character":12,"end_line":2145,"end_character":47},"updated":"2020-04-02 19:54:05.000000000","message":"nit: you should be able to fit this on one line.","commit_id":"1b07de85af46877affd92ae580cd31de40b22a67"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"16064964a4d0127931d31afc3980f3e3864e8a34","unresolved":false,"context_lines":[{"line_number":2141,"context_line":"        # If user has provided both cell and instance"},{"line_number":2142,"context_line":"        # Throw an error"},{"line_number":2143,"context_line":"        if instance_uuid and cell_uuid:"},{"line_number":2144,"context_line":"            print(_(\u0027The --cell and --instance options \u0027"},{"line_number":2145,"context_line":"                    \u0027are mutually exclusive.\u0027))"},{"line_number":2146,"context_line":"            return 127"},{"line_number":2147,"context_line":""},{"line_number":2148,"context_line":"        # TODO(mriedem): Rather than --max-count being both a total and batch"}],"source_content_type":"text/x-python","patch_set":13,"id":"df33271e_733c9ee0","line":2145,"range":{"start_line":2144,"start_character":12,"end_line":2145,"end_character":47},"in_reply_to":"df33271e_d36e4a2d","updated":"2020-04-02 20:04:40.000000000","message":"I guess not.","commit_id":"1b07de85af46877affd92ae580cd31de40b22a67"}],"nova/tests/functional/test_nova_manage.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ac45742ccd96f16367d2cf4262d621cb5f3eb192","unresolved":false,"context_lines":[{"line_number":758,"context_line":"            self.flavor, \u0027cell2\u0027)"},{"line_number":759,"context_line":""},{"line_number":760,"context_line":"        # get ID of cells"},{"line_number":761,"context_line":"        cell1_id \u003d {}"},{"line_number":762,"context_line":"        cell2_id \u003d {}"},{"line_number":763,"context_line":"        for cell_name, cell_mapping in self.cell_mappings.items():"},{"line_number":764,"context_line":"            if cell_name \u003d\u003d \u0027cell1\u0027:"}],"source_content_type":"text/x-python","patch_set":8,"id":"df33271e_e22036af","line":761,"updated":"2020-03-30 13:50:01.000000000","message":"This is never used.","commit_id":"ea95cce18c5a7986ff083d4a5f4f504ae05d58c2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ac45742ccd96f16367d2cf4262d621cb5f3eb192","unresolved":false,"context_lines":[{"line_number":759,"context_line":""},{"line_number":760,"context_line":"        # get ID of cells"},{"line_number":761,"context_line":"        cell1_id \u003d {}"},{"line_number":762,"context_line":"        cell2_id \u003d {}"},{"line_number":763,"context_line":"        for cell_name, cell_mapping in self.cell_mappings.items():"},{"line_number":764,"context_line":"            if cell_name \u003d\u003d \u0027cell1\u0027:"},{"line_number":765,"context_line":"                cell1_id[\u0027uuid\u0027] \u003d cell_mapping.uuid"},{"line_number":766,"context_line":"            if cell_name \u003d\u003d \u0027cell2\u0027:"},{"line_number":767,"context_line":"                cell2_id[\u0027uuid\u0027] \u003d cell_mapping.uuid"},{"line_number":768,"context_line":""},{"line_number":769,"context_line":"        # First do a dry run to make sure two instances need processing."},{"line_number":770,"context_line":"        result \u003d self.cli.heal_allocations("}],"source_content_type":"text/x-python","patch_set":8,"id":"df33271e_4212c263","line":767,"range":{"start_line":762,"start_character":8,"end_line":767,"end_character":52},"updated":"2020-03-30 13:50:01.000000000","message":"You don\u0027t really need this. If all you\u0027re looking for is the cell2 uuid for using it below, you can do this:\n\ncell2_uuid \u003d self.cell_mappings[\u0027cell2\u0027].uuid","commit_id":"ea95cce18c5a7986ff083d4a5f4f504ae05d58c2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ac45742ccd96f16367d2cf4262d621cb5f3eb192","unresolved":false,"context_lines":[{"line_number":772,"context_line":"        # Nothing changed so the return code should be 4."},{"line_number":773,"context_line":"        self.assertEqual(4, result, self.output.getvalue())"},{"line_number":774,"context_line":"        output \u003d self.output.getvalue()"},{"line_number":775,"context_line":"        self.assertIn(\u0027Looking for instances in cell\u0027, output)"},{"line_number":776,"context_line":""},{"line_number":777,"context_line":"        # Now run with our specific cell and it should be the only one"},{"line_number":778,"context_line":"        # processed. Also run with max_count specified to show it\u0027s ignored."}],"source_content_type":"text/x-python","patch_set":8,"id":"df33271e_622386be","line":775,"updated":"2020-03-30 13:50:01.000000000","message":"Wouldn\u0027t it be better to have this assertion instead?\n\nself.assertIn(\u0027Found 2 candidate instances\u0027, output)","commit_id":"ea95cce18c5a7986ff083d4a5f4f504ae05d58c2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ac45742ccd96f16367d2cf4262d621cb5f3eb192","unresolved":false,"context_lines":[{"line_number":775,"context_line":"        self.assertIn(\u0027Looking for instances in cell\u0027, output)"},{"line_number":776,"context_line":""},{"line_number":777,"context_line":"        # Now run with our specific cell and it should be the only one"},{"line_number":778,"context_line":"        # processed. Also run with max_count specified to show it\u0027s ignored."},{"line_number":779,"context_line":"        result \u003d self.cli.heal_allocations("},{"line_number":780,"context_line":"            max_count\u003d10, verbose\u003dTrue, cell_uuid\u003dcell2_id[\u0027uuid\u0027])"},{"line_number":781,"context_line":"        output \u003d self.output.getvalue()"}],"source_content_type":"text/x-python","patch_set":8,"id":"df33271e_a2a62e52","line":778,"range":{"start_line":778,"start_character":21,"end_line":778,"end_character":76},"updated":"2020-03-30 13:50:01.000000000","message":"Looks like you copied this from the test for the --instance option where --max-count is ignored. In the case of passing a specific cell we should *not* ignore --max-count, e.g. let\u0027s say I have 10 cells with 1000 instances in each, but I am running the heal command in batches of 50 over each cell. So just remove the max_count stuff from this test since it doesn\u0027t apply.","commit_id":"ea95cce18c5a7986ff083d4a5f4f504ae05d58c2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ac45742ccd96f16367d2cf4262d621cb5f3eb192","unresolved":false,"context_lines":[{"line_number":782,"context_line":"        self.assertEqual(0, result, self.output.getvalue())"},{"line_number":783,"context_line":"        self.assertIn(\u0027Found 1 candidate instances\u0027, output)"},{"line_number":784,"context_line":"        self.assertIn(\u0027Processed 1 instances.\u0027, output)"},{"line_number":785,"context_line":"        # There shouldn\u0027t be any messages about running in batches."},{"line_number":786,"context_line":"        self.assertNotIn(\u0027Running batches\u0027, output)"},{"line_number":787,"context_line":"        # There shouldn\u0027t be any message about max count reached."},{"line_number":788,"context_line":"        self.assertNotIn(\u0027Max count reached.\u0027, output)"},{"line_number":789,"context_line":""},{"line_number":790,"context_line":"        # Now run it again on the specific cell and it should be done."},{"line_number":791,"context_line":"        result \u003d self.cli.heal_allocations("}],"source_content_type":"text/x-python","patch_set":8,"id":"df33271e_42448274","line":788,"range":{"start_line":785,"start_character":8,"end_line":788,"end_character":54},"updated":"2020-03-30 13:50:01.000000000","message":"You can remove these when you remove the max_count\u003d10 arg above.","commit_id":"ea95cce18c5a7986ff083d4a5f4f504ae05d58c2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ac45742ccd96f16367d2cf4262d621cb5f3eb192","unresolved":false,"context_lines":[{"line_number":794,"context_line":"        self.assertEqual(4, result, self.output.getvalue())"},{"line_number":795,"context_line":"        self.assertIn(\u0027Found 1 candidate instances\u0027, output)"},{"line_number":796,"context_line":"        self.assertIn(\u0027Processed 0 instances.\u0027, output)"},{"line_number":797,"context_line":"        # There shouldn\u0027t be any message about max count reached."},{"line_number":798,"context_line":"        self.assertNotIn(\u0027Max count reached.\u0027, output)"},{"line_number":799,"context_line":""},{"line_number":800,"context_line":""},{"line_number":801,"context_line":"class TestNovaManagePlacementHealPortAllocations("}],"source_content_type":"text/x-python","patch_set":8,"id":"df33271e_423922f0","line":798,"range":{"start_line":797,"start_character":8,"end_line":798,"end_character":54},"updated":"2020-03-30 13:50:01.000000000","message":"You can also remove this.","commit_id":"ea95cce18c5a7986ff083d4a5f4f504ae05d58c2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"27ac96bb4789ef00a32fad860222c6aa3d1df329","unresolved":false,"context_lines":[{"line_number":766,"context_line":"        # Nothing changed so the return code should be 4."},{"line_number":767,"context_line":"        self.assertEqual(4, result, self.output.getvalue())"},{"line_number":768,"context_line":"        output \u003d self.output.getvalue()"},{"line_number":769,"context_line":"        self.assertIn(\u0027Found 1 candidate instances\u0027, output)"},{"line_number":770,"context_line":""},{"line_number":771,"context_line":"        # Now run with our specific cell and it should be the only one"},{"line_number":772,"context_line":"        # processed."}],"source_content_type":"text/x-python","patch_set":13,"id":"df33271e_53c99a23","line":769,"range":{"start_line":769,"start_character":29,"end_line":769,"end_character":30},"updated":"2020-04-02 19:54:05.000000000","message":"Why isn\u0027t this 2 if you\u0027ve got 2 instances in different cells and aren\u0027t filtering on a specific cell? Or is this logged per cell?\n\n(later)\n\nYeah I guess it\u0027s per cell.","commit_id":"1b07de85af46877affd92ae580cd31de40b22a67"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e461c5a3999b4cc00100d7b0c442cd2f7eac956b","unresolved":false,"context_lines":[{"line_number":766,"context_line":"        # Nothing changed so the return code should be 4."},{"line_number":767,"context_line":"        self.assertEqual(4, result, self.output.getvalue())"},{"line_number":768,"context_line":"        output \u003d self.output.getvalue()"},{"line_number":769,"context_line":"        self.assertIn(\u0027Found 1 candidate instances\u0027, output)"},{"line_number":770,"context_line":""},{"line_number":771,"context_line":"        # Now run with our specific cell and it should be the only one"},{"line_number":772,"context_line":"        # processed."}],"source_content_type":"text/x-python","patch_set":14,"id":"df33271e_415d3377","line":769,"updated":"2020-04-03 12:28:06.000000000","message":"nit: This is misleading as there are two instances but in different cells so this message is printed two times","commit_id":"1a39ed9005306b0d3f42480b1fedf36b0b7834ff"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c94e7c52015090a5ccaaf197ac2bdeb5db8f1bb8","unresolved":false,"context_lines":[{"line_number":766,"context_line":"        # Nothing changed so the return code should be 4."},{"line_number":767,"context_line":"        self.assertEqual(4, result, self.output.getvalue())"},{"line_number":768,"context_line":"        output \u003d self.output.getvalue()"},{"line_number":769,"context_line":"        self.assertIn(\u0027Found 1 candidate instances\u0027, output)"},{"line_number":770,"context_line":""},{"line_number":771,"context_line":"        # Now run with our specific cell and it should be the only one"},{"line_number":772,"context_line":"        # processed."}],"source_content_type":"text/x-python","patch_set":14,"id":"df33271e_4474209d","line":769,"in_reply_to":"df33271e_415d3377","updated":"2020-04-03 13:21:47.000000000","message":"I thought the same but there isn\u0027t a good way around that unless you start the CLI run with a clean stdout buffer. There is a way to run the stdout fixture as a context manager so that could be a clean way of doing it, but it doesn\u0027t really affect the overall test, it\u0027s just misleading.","commit_id":"1a39ed9005306b0d3f42480b1fedf36b0b7834ff"}],"nova/tests/unit/cmd/test_manage.py":[{"author":{"_account_id":31733,"name":"jayaditya gupta","email":"jayadityagupta11@gmail.com","username":"jgupta"},"change_message_id":"7bc57b1729efa04f54d2e6c04242ec214445aeb8","unresolved":false,"context_lines":[{"line_number":2346,"context_line":"        self.cli \u003d manage.PlacementCommands()"},{"line_number":2347,"context_line":"        self.useFixture(fixtures.MockPatch(\u0027nova.network.neutron.get_client\u0027))"},{"line_number":2348,"context_line":""},{"line_number":2349,"context_line":"    def test_heal_allocations_with_cell_id(self):"},{"line_number":2350,"context_line":"        \"\"\"Test heal allocation with cell id\"\"\""},{"line_number":2351,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":2352,"context_line":"        cell_id \u003d uuidutils.generate_uuid()"},{"line_number":2353,"context_line":"        self.assertIsNone(self.cli.heal_allocations(ctxt, cell_id\u003dcell_id))"},{"line_number":2354,"context_line":""},{"line_number":2355,"context_line":"    @ddt.data(-1, 0, \"one\")"},{"line_number":2356,"context_line":"    def test_heal_allocations_invalid_max_count(self, max_count):"}],"source_content_type":"text/x-python","patch_set":1,"id":"df33271e_9b7dd0e9","line":2353,"range":{"start_line":2349,"start_character":4,"end_line":2353,"end_character":75},"updated":"2020-04-03 08:13:50.000000000","message":"test case currently failing","commit_id":"b7bee8baff33218d32a4ced6a05b5941489fd2e4"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8780ec9ce4c008e9921bd2dc53bbf392c82aaf51","unresolved":false,"context_lines":[{"line_number":2350,"context_line":"        \"\"\"Test heal allocation with cell id\"\"\""},{"line_number":2351,"context_line":"        #ctxt \u003d context.get_admin_context()"},{"line_number":2352,"context_line":"        cell_id \u003d uuidutils.generate_uuid()        "},{"line_number":2353,"context_line":"        result \u003d self.cli.heal_allocations(cell_id\u003dcell_id)"},{"line_number":2354,"context_line":"        self.assertEqual(0, result)"},{"line_number":2355,"context_line":""},{"line_number":2356,"context_line":"    @ddt.data(-1, 0, \"one\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"df33271e_4921b04d","line":2353,"updated":"2020-03-24 10:54:33.000000000","message":"You can also use CellMapping.CELL0_UUID as a know UUID that will never result in any healing.","commit_id":"5eace91848e4aa258d7f70d9796d92aea338bb8a"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8780ec9ce4c008e9921bd2dc53bbf392c82aaf51","unresolved":false,"context_lines":[{"line_number":2352,"context_line":"        cell_id \u003d uuidutils.generate_uuid()        "},{"line_number":2353,"context_line":"        result \u003d self.cli.heal_allocations(cell_id\u003dcell_id)"},{"line_number":2354,"context_line":"        self.assertEqual(0, result)"},{"line_number":2355,"context_line":""},{"line_number":2356,"context_line":"    @ddt.data(-1, 0, \"one\")"},{"line_number":2357,"context_line":"    def test_heal_allocations_invalid_max_count(self, max_count):"},{"line_number":2358,"context_line":"        self.assertEqual(127, self.cli.heal_allocations(max_count\u003dmax_count))"}],"source_content_type":"text/x-python","patch_set":2,"id":"df33271e_891bb819","line":2355,"updated":"2020-03-24 10:54:33.000000000","message":"You can add a test case based on test_heal_allocations below. Just tweak the mock to return more than one cells then call the healing with the uuid of one of the cells.","commit_id":"5eace91848e4aa258d7f70d9796d92aea338bb8a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"02870d80cc1d1b190eb56a33f87675649d5b26d1","unresolved":false,"context_lines":[{"line_number":2350,"context_line":"        \"\"\"Test heal allocation with both cell id and instance id\"\"\""},{"line_number":2351,"context_line":"        cell_uuid \u003d uuidutils.generate_uuid()"},{"line_number":2352,"context_line":"        instance_uuid \u003d uuidutils.generate_uuid()"},{"line_number":2353,"context_line":"        self.assertEqual(127, self.cli.heal_allocations("},{"line_number":2354,"context_line":"        instance_uuid\u003dinstance_uuid, cell_uuid\u003dcell_uuid))"},{"line_number":2355,"context_line":""},{"line_number":2356,"context_line":"    def test_heal_allocations_with_cell_id(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"df33271e_8d79e9fd","line":2353,"updated":"2020-03-25 15:00:35.000000000","message":"The alignment on this is weird, indent the wrapped line.\n\nAlso, you should assert that the 127 return code is for the error you expect by checking the stdout stream (there should be other examples of how to assert that type of thing in these tests).","commit_id":"aa8f06a384cb390ffbf9b004a3de7f88ecd7a6c5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"02870d80cc1d1b190eb56a33f87675649d5b26d1","unresolved":false,"context_lines":[{"line_number":2353,"context_line":"        self.assertEqual(127, self.cli.heal_allocations("},{"line_number":2354,"context_line":"        instance_uuid\u003dinstance_uuid, cell_uuid\u003dcell_uuid))"},{"line_number":2355,"context_line":""},{"line_number":2356,"context_line":"    def test_heal_allocations_with_cell_id(self):"},{"line_number":2357,"context_line":"        \"\"\"Test heal allocation with cell id\"\"\""},{"line_number":2358,"context_line":"        # ctxt \u003d context.get_admin_context()"},{"line_number":2359,"context_line":"        cell_uuid \u003d objects.CellMapping.CELL0_UUID"}],"source_content_type":"text/x-python","patch_set":4,"id":"df33271e_0d6dd931","line":2356,"updated":"2020-03-25 15:00:35.000000000","message":"It would be better (IMO) to write a functional test for this rather than a unit test since the unit test isn\u0027t very clear. For example, this asserts that you get return code 4 back that nothing was done, but nothing was done not because you provided a specific cell, but because there are no instances in *any* cells. So a better functional test would be to have two cells with instances in each that need allocations to be healed, and you run the command with one specific cell and then assert that the instances in that cell now have allocations but the instances in the other cell still don\u0027t have allocations (it could just be simply 1 instance in each cell for the test).\n\nThe functional tests for this command are here:\n\nhttps://github.com/openstack/nova/blob/master/nova/tests/functional/test_nova_manage.py#L374\n\nThat test is already setup to have 2 cells so it should be pretty easy to add a new test like I described above, just look at the existing tests to see how the setup is done.","commit_id":"aa8f06a384cb390ffbf9b004a3de7f88ecd7a6c5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"be78c801d991ada51a2ec6a7bde61bd181e80617","unresolved":false,"context_lines":[{"line_number":2356,"context_line":"        self.assertIn(\u0027The --cell and --instance options\u0027,"},{"line_number":2357,"context_line":"        self.output.getvalue())"},{"line_number":2358,"context_line":""},{"line_number":2359,"context_line":"    def test_heal_allocations_with_cell_id_not_found(self):"},{"line_number":2360,"context_line":"        \"\"\"Test the case where cell_id is not found\"\"\""},{"line_number":2361,"context_line":"        cell_uuid \u003d uuidutils.generate_uuid()"},{"line_number":2362,"context_line":"        cell_uuid \u003d cell_uuid[:-3]"}],"source_content_type":"text/x-python","patch_set":12,"id":"df33271e_31b7b73c","line":2359,"updated":"2020-04-02 14:21:48.000000000","message":"This test is failing because of the DB poison fixture used because this class extends NoDBTestCase. So you need to mock the call that hits the DB. So add a decorator like this to the test:\n\n@mock.patch(\u0027nova.objects.CellMapping.get_by_uuid\u0027, side_effect\u003dexception.CellMappingNotFound(uuid\u003d\u0027fake\u0027))\ndef test_heal_allocations_with_cell_id_not_found(self, mock_get):\n   ...","commit_id":"f7b1b7a55a1055b48791d8122af7218e4469ded4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"be78c801d991ada51a2ec6a7bde61bd181e80617","unresolved":false,"context_lines":[{"line_number":2358,"context_line":""},{"line_number":2359,"context_line":"    def test_heal_allocations_with_cell_id_not_found(self):"},{"line_number":2360,"context_line":"        \"\"\"Test the case where cell_id is not found\"\"\""},{"line_number":2361,"context_line":"        cell_uuid \u003d uuidutils.generate_uuid()"},{"line_number":2362,"context_line":"        cell_uuid \u003d cell_uuid[:-3]"},{"line_number":2363,"context_line":"        self.assertEqual(127, self.cli.heal_allocations("},{"line_number":2364,"context_line":"                        cell_uuid\u003dcell_uuid))"}],"source_content_type":"text/x-python","patch_set":12,"id":"df33271e_d1948b8d","line":2361,"updated":"2020-04-02 14:21:48.000000000","message":"You could just use cell_uuid \u003d \u0027fake\u0027 for the uuid, it doesn\u0027t matter (I don\u0027t think anyway).","commit_id":"f7b1b7a55a1055b48791d8122af7218e4469ded4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"be78c801d991ada51a2ec6a7bde61bd181e80617","unresolved":false,"context_lines":[{"line_number":2359,"context_line":"    def test_heal_allocations_with_cell_id_not_found(self):"},{"line_number":2360,"context_line":"        \"\"\"Test the case where cell_id is not found\"\"\""},{"line_number":2361,"context_line":"        cell_uuid \u003d uuidutils.generate_uuid()"},{"line_number":2362,"context_line":"        cell_uuid \u003d cell_uuid[:-3]"},{"line_number":2363,"context_line":"        self.assertEqual(127, self.cli.heal_allocations("},{"line_number":2364,"context_line":"                        cell_uuid\u003dcell_uuid))"},{"line_number":2365,"context_line":"        output \u003d self.output.getvalue().strip()"}],"source_content_type":"text/x-python","patch_set":12,"id":"df33271e_11b27349","line":2362,"updated":"2020-04-02 14:21:48.000000000","message":"I don\u0027t know what this line is for, it doesn\u0027t really matter.","commit_id":"f7b1b7a55a1055b48791d8122af7218e4469ded4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"27ac96bb4789ef00a32fad860222c6aa3d1df329","unresolved":false,"context_lines":[{"line_number":2357,"context_line":"        self.output.getvalue())"},{"line_number":2358,"context_line":""},{"line_number":2359,"context_line":"    @mock.patch(\u0027nova.objects.CellMapping.get_by_uuid\u0027,"},{"line_number":2360,"context_line":"        side_effect\u003dexception.CellMappingNotFound(\u0027uuid\u0027))"},{"line_number":2361,"context_line":"    def test_heal_allocations_with_cell_id_not_found(self, cell_uuid):"},{"line_number":2362,"context_line":"        \"\"\"Test the case where cell_id is not found\"\"\""},{"line_number":2363,"context_line":"        self.assertEqual(127, self.cli.heal_allocations("}],"source_content_type":"text/x-python","patch_set":13,"id":"df33271e_73ebfe76","line":2360,"range":{"start_line":2360,"start_character":50,"end_line":2360,"end_character":56},"updated":"2020-04-02 19:54:05.000000000","message":"Make this: uuid\u003d\u0027fake\u0027","commit_id":"1b07de85af46877affd92ae580cd31de40b22a67"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"16064964a4d0127931d31afc3980f3e3864e8a34","unresolved":false,"context_lines":[{"line_number":2357,"context_line":"        self.output.getvalue())"},{"line_number":2358,"context_line":""},{"line_number":2359,"context_line":"    @mock.patch(\u0027nova.objects.CellMapping.get_by_uuid\u0027,"},{"line_number":2360,"context_line":"        side_effect\u003dexception.CellMappingNotFound(\u0027uuid\u0027))"},{"line_number":2361,"context_line":"    def test_heal_allocations_with_cell_id_not_found(self, cell_uuid):"},{"line_number":2362,"context_line":"        \"\"\"Test the case where cell_id is not found\"\"\""},{"line_number":2363,"context_line":"        self.assertEqual(127, self.cli.heal_allocations("}],"source_content_type":"text/x-python","patch_set":13,"id":"df33271e_93120261","line":2360,"range":{"start_line":2360,"start_character":50,"end_line":2360,"end_character":56},"in_reply_to":"df33271e_73ebfe76","updated":"2020-04-02 20:04:40.000000000","message":"Done","commit_id":"1b07de85af46877affd92ae580cd31de40b22a67"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"27ac96bb4789ef00a32fad860222c6aa3d1df329","unresolved":false,"context_lines":[{"line_number":2358,"context_line":""},{"line_number":2359,"context_line":"    @mock.patch(\u0027nova.objects.CellMapping.get_by_uuid\u0027,"},{"line_number":2360,"context_line":"        side_effect\u003dexception.CellMappingNotFound(\u0027uuid\u0027))"},{"line_number":2361,"context_line":"    def test_heal_allocations_with_cell_id_not_found(self, cell_uuid):"},{"line_number":2362,"context_line":"        \"\"\"Test the case where cell_id is not found\"\"\""},{"line_number":2363,"context_line":"        self.assertEqual(127, self.cli.heal_allocations("},{"line_number":2364,"context_line":"                        cell_uuid\u003dcell_uuid))"}],"source_content_type":"text/x-python","patch_set":13,"id":"df33271e_93e8427c","line":2361,"range":{"start_line":2361,"start_character":59,"end_line":2361,"end_character":68},"updated":"2020-04-02 19:54:05.000000000","message":"This isn\u0027t a cell_uuid, it\u0027s a Mock object, so call this something like mock_get_by_uuid or just mock_get.","commit_id":"1b07de85af46877affd92ae580cd31de40b22a67"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"16064964a4d0127931d31afc3980f3e3864e8a34","unresolved":false,"context_lines":[{"line_number":2358,"context_line":""},{"line_number":2359,"context_line":"    @mock.patch(\u0027nova.objects.CellMapping.get_by_uuid\u0027,"},{"line_number":2360,"context_line":"        side_effect\u003dexception.CellMappingNotFound(\u0027uuid\u0027))"},{"line_number":2361,"context_line":"    def test_heal_allocations_with_cell_id_not_found(self, cell_uuid):"},{"line_number":2362,"context_line":"        \"\"\"Test the case where cell_id is not found\"\"\""},{"line_number":2363,"context_line":"        self.assertEqual(127, self.cli.heal_allocations("},{"line_number":2364,"context_line":"                        cell_uuid\u003dcell_uuid))"}],"source_content_type":"text/x-python","patch_set":13,"id":"df33271e_7315be48","line":2361,"range":{"start_line":2361,"start_character":59,"end_line":2361,"end_character":68},"in_reply_to":"df33271e_93e8427c","updated":"2020-04-02 20:04:40.000000000","message":"Done","commit_id":"1b07de85af46877affd92ae580cd31de40b22a67"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"27ac96bb4789ef00a32fad860222c6aa3d1df329","unresolved":false,"context_lines":[{"line_number":2361,"context_line":"    def test_heal_allocations_with_cell_id_not_found(self, cell_uuid):"},{"line_number":2362,"context_line":"        \"\"\"Test the case where cell_id is not found\"\"\""},{"line_number":2363,"context_line":"        self.assertEqual(127, self.cli.heal_allocations("},{"line_number":2364,"context_line":"                        cell_uuid\u003dcell_uuid))"},{"line_number":2365,"context_line":"        output \u003d self.output.getvalue().strip()"},{"line_number":2366,"context_line":"        self.assertEqual(\u0027Cell with uuid %s was not found.\u0027 % cell_uuid,"},{"line_number":2367,"context_line":"                         output)"}],"source_content_type":"text/x-python","patch_set":13,"id":"df33271e_13fc323c","line":2364,"range":{"start_line":2364,"start_character":34,"end_line":2364,"end_character":43},"updated":"2020-04-02 19:54:05.000000000","message":"Just make this \u0027fake\u0027 since `cell_uuid` is a Mock object.","commit_id":"1b07de85af46877affd92ae580cd31de40b22a67"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"16064964a4d0127931d31afc3980f3e3864e8a34","unresolved":false,"context_lines":[{"line_number":2361,"context_line":"    def test_heal_allocations_with_cell_id_not_found(self, cell_uuid):"},{"line_number":2362,"context_line":"        \"\"\"Test the case where cell_id is not found\"\"\""},{"line_number":2363,"context_line":"        self.assertEqual(127, self.cli.heal_allocations("},{"line_number":2364,"context_line":"                        cell_uuid\u003dcell_uuid))"},{"line_number":2365,"context_line":"        output \u003d self.output.getvalue().strip()"},{"line_number":2366,"context_line":"        self.assertEqual(\u0027Cell with uuid %s was not found.\u0027 % cell_uuid,"},{"line_number":2367,"context_line":"                         output)"}],"source_content_type":"text/x-python","patch_set":13,"id":"df33271e_d30f6a34","line":2364,"range":{"start_line":2364,"start_character":34,"end_line":2364,"end_character":43},"in_reply_to":"df33271e_13fc323c","updated":"2020-04-02 20:04:40.000000000","message":"Done","commit_id":"1b07de85af46877affd92ae580cd31de40b22a67"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"27ac96bb4789ef00a32fad860222c6aa3d1df329","unresolved":false,"context_lines":[{"line_number":2363,"context_line":"        self.assertEqual(127, self.cli.heal_allocations("},{"line_number":2364,"context_line":"                        cell_uuid\u003dcell_uuid))"},{"line_number":2365,"context_line":"        output \u003d self.output.getvalue().strip()"},{"line_number":2366,"context_line":"        self.assertEqual(\u0027Cell with uuid %s was not found.\u0027 % cell_uuid,"},{"line_number":2367,"context_line":"                         output)"},{"line_number":2368,"context_line":""},{"line_number":2369,"context_line":"    @ddt.data(-1, 0, \"one\")"}],"source_content_type":"text/x-python","patch_set":13,"id":"df33271e_5397daec","line":2366,"range":{"start_line":2366,"start_character":41,"end_line":2366,"end_character":43},"updated":"2020-04-02 19:54:05.000000000","message":"You can just hard-code the replacement variable here and use \u0027fake\u0027 since that\u0027s the value you should pass in above (not the Mock object).","commit_id":"1b07de85af46877affd92ae580cd31de40b22a67"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"16064964a4d0127931d31afc3980f3e3864e8a34","unresolved":false,"context_lines":[{"line_number":2363,"context_line":"        self.assertEqual(127, self.cli.heal_allocations("},{"line_number":2364,"context_line":"                        cell_uuid\u003dcell_uuid))"},{"line_number":2365,"context_line":"        output \u003d self.output.getvalue().strip()"},{"line_number":2366,"context_line":"        self.assertEqual(\u0027Cell with uuid %s was not found.\u0027 % cell_uuid,"},{"line_number":2367,"context_line":"                         output)"},{"line_number":2368,"context_line":""},{"line_number":2369,"context_line":"    @ddt.data(-1, 0, \"one\")"}],"source_content_type":"text/x-python","patch_set":13,"id":"df33271e_b30aa622","line":2366,"range":{"start_line":2366,"start_character":41,"end_line":2366,"end_character":43},"in_reply_to":"df33271e_5397daec","updated":"2020-04-02 20:04:40.000000000","message":"Done","commit_id":"1b07de85af46877affd92ae580cd31de40b22a67"}],"releasenotes/notes/register-allocation-per-cell-9177b3e2161a632c.yaml":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"02870d80cc1d1b190eb56a33f87675649d5b26d1","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Add ``--cell`` options to the ``nova-manage placement heal_allocations``"},{"line_number":4,"context_line":"    command. We can use this option to provide support for registration per cell."}],"source_content_type":"text/x-yaml","patch_set":4,"id":"df33271e_cdb2d1e6","line":3,"range":{"start_line":3,"start_character":4,"end_line":3,"end_character":7},"updated":"2020-03-25 15:00:35.000000000","message":"Added","commit_id":"aa8f06a384cb390ffbf9b004a3de7f88ecd7a6c5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"02870d80cc1d1b190eb56a33f87675649d5b26d1","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Add ``--cell`` options to the ``nova-manage placement heal_allocations``"},{"line_number":4,"context_line":"    command. We can use this option to provide support for registration per cell."}],"source_content_type":"text/x-yaml","patch_set":4,"id":"df33271e_adb5cdcf","line":3,"range":{"start_line":3,"start_character":19,"end_line":3,"end_character":26},"updated":"2020-03-25 15:00:35.000000000","message":"option (singular)","commit_id":"aa8f06a384cb390ffbf9b004a3de7f88ecd7a6c5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"02870d80cc1d1b190eb56a33f87675649d5b26d1","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Add ``--cell`` options to the ``nova-manage placement heal_allocations``"},{"line_number":4,"context_line":"    command. We can use this option to provide support for registration per cell."}],"source_content_type":"text/x-yaml","patch_set":4,"id":"df33271e_8ddd6916","line":4,"range":{"start_line":4,"start_character":13,"end_line":4,"end_character":81},"updated":"2020-03-25 15:00:35.000000000","message":"I\u0027d reword this to say something like, \"This option allows healing instance allocations within a specific cell.\"","commit_id":"aa8f06a384cb390ffbf9b004a3de7f88ecd7a6c5"}]}
