)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"825c6187624d9bc032d4114aad5d19846cacfafe","unresolved":true,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"* The machine type is supported. The supported list includes alias and"},{"line_number":17,"context_line":"  versioned types of ``pc``, ``pc-i440fx``, ``pc-q35``, ``q35``, ``virt``,"},{"line_number":18,"context_line":"  ``s390-ccw-virtio``, ``hyperv-gen1`` and ``hyperv-gen2`` as supported by"},{"line_number":19,"context_line":"  the hyperv driver."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"* The update will not move the instance between underlying machine types."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"bf54072d_9882ec85","line":18,"range":{"start_line":18,"start_character":23,"end_line":18,"end_character":74},"updated":"2021-03-01 17:30:28.000000000","message":"This is no longer true","commit_id":"064633821b1f128510d89d33e300c689e6fd1c40"}],"doc/source/cli/nova-manage.rst":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"aa72ae183df2ddfb517ef5c83cfd64ea17492af7","unresolved":true,"context_lines":[{"line_number":740,"context_line":"       * - 3"},{"line_number":741,"context_line":"         - No machine type found for instance"},{"line_number":742,"context_line":""},{"line_number":743,"context_line":"``nova-manage machine_type update [instance-uuid] [machine_type] [--force]``"},{"line_number":744,"context_line":"    Set or update the recorded machine type of an instance."},{"line_number":745,"context_line":""},{"line_number":746,"context_line":"    The following criteria must also be met when using this command:"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7dd97fb1_0c101654","line":743,"updated":"2021-02-15 18:04:09.000000000","message":"Okay, now this one (and perhaps the previous one, thinking on it more) really feels like a \u0027db\u0027 command.","commit_id":"4dfd77a9b7733ebfa6e8b0bced2adc2975b09170"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"8490497b50a984bb716903c7666b5a944ae065c6","unresolved":true,"context_lines":[{"line_number":740,"context_line":"       * - 3"},{"line_number":741,"context_line":"         - No machine type found for instance"},{"line_number":742,"context_line":""},{"line_number":743,"context_line":"``nova-manage machine_type update [instance-uuid] [machine_type] [--force]``"},{"line_number":744,"context_line":"    Set or update the recorded machine type of an instance."},{"line_number":745,"context_line":""},{"line_number":746,"context_line":"    The following criteria must also be met when using this command:"}],"source_content_type":"text/x-rst","patch_set":4,"id":"37108bc8_12ccb179","line":743,"in_reply_to":"0201d386_78543783","updated":"2021-02-16 10:27:38.000000000","message":"Yeah I\u0027m really not a fan of not codifying the below caveats in the command. --force is there as a compromise for admins that know best.","commit_id":"4dfd77a9b7733ebfa6e8b0bced2adc2975b09170"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"c69a5f1e339e12ee384cb3b79a7ceee0e2fc6352","unresolved":true,"context_lines":[{"line_number":740,"context_line":"       * - 3"},{"line_number":741,"context_line":"         - No machine type found for instance"},{"line_number":742,"context_line":""},{"line_number":743,"context_line":"``nova-manage machine_type update [instance-uuid] [machine_type] [--force]``"},{"line_number":744,"context_line":"    Set or update the recorded machine type of an instance."},{"line_number":745,"context_line":""},{"line_number":746,"context_line":"    The following criteria must also be met when using this command:"}],"source_content_type":"text/x-rst","patch_set":4,"id":"897223bb_9d45c471","line":743,"in_reply_to":"7dd97fb1_0c101654","updated":"2021-02-15 19:56:11.000000000","message":"Even with the instance state caveats below?","commit_id":"4dfd77a9b7733ebfa6e8b0bced2adc2975b09170"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"defc677e8613ac1eea8faded25aee7733436db0e","unresolved":true,"context_lines":[{"line_number":740,"context_line":"       * - 3"},{"line_number":741,"context_line":"         - No machine type found for instance"},{"line_number":742,"context_line":""},{"line_number":743,"context_line":"``nova-manage machine_type update [instance-uuid] [machine_type] [--force]``"},{"line_number":744,"context_line":"    Set or update the recorded machine type of an instance."},{"line_number":745,"context_line":""},{"line_number":746,"context_line":"    The following criteria must also be met when using this command:"}],"source_content_type":"text/x-rst","patch_set":4,"id":"0201d386_78543783","line":743,"in_reply_to":"897223bb_9d45c471","updated":"2021-02-16 10:00:59.000000000","message":"I _think_ it\u0027s okay to codify against the in-tree virt drivers, so long as we\u0027re doing more than one of them and provide a way to override them. Alternatively, one could argue that perhaps we\u0027re doing too much here and this configuration could be addressed with docs rather than hardcoded checks, on the basis that the operator knows best. I\u0027m not necessarily advocating for that position, mind you, but\n\n  nova-manage db update-instance-meta $INSTANCE $PROP $VALUE\n\nwould also wfm. Probably best to get a second opinion here","commit_id":"4dfd77a9b7733ebfa6e8b0bced2adc2975b09170"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"825c6187624d9bc032d4114aad5d19846cacfafe","unresolved":true,"context_lines":[{"line_number":741,"context_line":""},{"line_number":742,"context_line":"    * The machine type is supported. The supported list includes alias and"},{"line_number":743,"context_line":"      versioned types of ``pc``, ``pc-i440fx``, ``pc-q35``, ``q35``, ``virt``,"},{"line_number":744,"context_line":"      ``s390-ccw-virtio``, ``hyperv-gen1`` and ``hyperv-gen2`` as supported by"},{"line_number":745,"context_line":"      the hyperv driver."},{"line_number":746,"context_line":""},{"line_number":747,"context_line":"    * The update will not move the instance between underlying machine types."}],"source_content_type":"text/x-rst","patch_set":6,"id":"4cfbe3bb_11a90ee6","line":744,"range":{"start_line":744,"start_character":27,"end_line":744,"end_character":78},"updated":"2021-03-01 17:30:28.000000000","message":"This is no longer true","commit_id":"064633821b1f128510d89d33e300c689e6fd1c40"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"78c2433d48cac29b98a62132bda218050aeffeda","unresolved":false,"context_lines":[{"line_number":741,"context_line":""},{"line_number":742,"context_line":"    * The machine type is supported. The supported list includes alias and"},{"line_number":743,"context_line":"      versioned types of ``pc``, ``pc-i440fx``, ``pc-q35``, ``q35``, ``virt``,"},{"line_number":744,"context_line":"      ``s390-ccw-virtio``, ``hyperv-gen1`` and ``hyperv-gen2`` as supported by"},{"line_number":745,"context_line":"      the hyperv driver."},{"line_number":746,"context_line":""},{"line_number":747,"context_line":"    * The update will not move the instance between underlying machine types."}],"source_content_type":"text/x-rst","patch_set":6,"id":"72655cb3_7a746c6d","line":744,"range":{"start_line":744,"start_character":27,"end_line":744,"end_character":78},"in_reply_to":"4cfbe3bb_11a90ee6","updated":"2021-03-01 21:50:41.000000000","message":"Done","commit_id":"064633821b1f128510d89d33e300c689e6fd1c40"}],"nova/cmd/manage.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"aa72ae183df2ddfb517ef5c83cfd64ea17492af7","unresolved":true,"context_lines":[{"line_number":2794,"context_line":"          help\u003d\u0027UUID of instance to update\u0027)"},{"line_number":2795,"context_line":"    @args(\u0027machine_type\u0027, metavar\u003d\u0027\u003cmachine_type\u003e\u0027,"},{"line_number":2796,"context_line":"          help\u003d\u0027Machine type to set\u0027)"},{"line_number":2797,"context_line":"    @args(\u0027--force\u0027, action\u003d\u0027store_true\u0027, default\u003dFalse, dest\u003d\u0027force\u0027,"},{"line_number":2798,"context_line":"          help\u003d\u0027Force the update of the stored machine type\u0027)"},{"line_number":2799,"context_line":"    def update("},{"line_number":2800,"context_line":"        self,"}],"source_content_type":"text/x-python","patch_set":4,"id":"bba85b22_e9faad8b","line":2797,"range":{"start_line":2797,"start_character":56,"end_line":2797,"end_character":70},"updated":"2021-02-15 18:04:09.000000000","message":"unnecessary","commit_id":"4dfd77a9b7733ebfa6e8b0bced2adc2975b09170"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"c69a5f1e339e12ee384cb3b79a7ceee0e2fc6352","unresolved":false,"context_lines":[{"line_number":2794,"context_line":"          help\u003d\u0027UUID of instance to update\u0027)"},{"line_number":2795,"context_line":"    @args(\u0027machine_type\u0027, metavar\u003d\u0027\u003cmachine_type\u003e\u0027,"},{"line_number":2796,"context_line":"          help\u003d\u0027Machine type to set\u0027)"},{"line_number":2797,"context_line":"    @args(\u0027--force\u0027, action\u003d\u0027store_true\u0027, default\u003dFalse, dest\u003d\u0027force\u0027,"},{"line_number":2798,"context_line":"          help\u003d\u0027Force the update of the stored machine type\u0027)"},{"line_number":2799,"context_line":"    def update("},{"line_number":2800,"context_line":"        self,"}],"source_content_type":"text/x-python","patch_set":4,"id":"abdd6ad8_9dccac6d","line":2797,"range":{"start_line":2797,"start_character":56,"end_line":2797,"end_character":70},"in_reply_to":"bba85b22_e9faad8b","updated":"2021-02-15 19:56:11.000000000","message":"Ack","commit_id":"4dfd77a9b7733ebfa6e8b0bced2adc2975b09170"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"a734e93357acc9652b1027313c3efb87a2bd0f2d","unresolved":true,"context_lines":[{"line_number":2798,"context_line":"          help\u003d\u0027Force the update of the stored machine type\u0027)"},{"line_number":2799,"context_line":"    def update("},{"line_number":2800,"context_line":"        self,"},{"line_number":2801,"context_line":"        instance_uuid\u003dNone,"},{"line_number":2802,"context_line":"        machine_type\u003dNone,"},{"line_number":2803,"context_line":"        force\u003dFalse"},{"line_number":2804,"context_line":"    ):"}],"source_content_type":"text/x-python","patch_set":4,"id":"b12f5a10_5d38f54c","line":2801,"updated":"2021-02-16 08:22:43.000000000","message":"I\u0027m wondering if the admin needs a bulk update command, maybe per compute node as doing this update instance by instance might be a bit boring. Sure it can be automated outside of nova if needed. So it is more like a question than a request","commit_id":"4dfd77a9b7733ebfa6e8b0bced2adc2975b09170"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"89a30244c7c6655c84bc14cb269d1150a950b7e9","unresolved":false,"context_lines":[{"line_number":2798,"context_line":"          help\u003d\u0027Force the update of the stored machine type\u0027)"},{"line_number":2799,"context_line":"    def update("},{"line_number":2800,"context_line":"        self,"},{"line_number":2801,"context_line":"        instance_uuid\u003dNone,"},{"line_number":2802,"context_line":"        machine_type\u003dNone,"},{"line_number":2803,"context_line":"        force\u003dFalse"},{"line_number":2804,"context_line":"    ):"}],"source_content_type":"text/x-python","patch_set":4,"id":"e6745265_d744d4df","line":2801,"in_reply_to":"5a6336ec_2b4ab619","updated":"2021-02-18 10:59:41.000000000","message":"Ack","commit_id":"4dfd77a9b7733ebfa6e8b0bced2adc2975b09170"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"8490497b50a984bb716903c7666b5a944ae065c6","unresolved":true,"context_lines":[{"line_number":2798,"context_line":"          help\u003d\u0027Force the update of the stored machine type\u0027)"},{"line_number":2799,"context_line":"    def update("},{"line_number":2800,"context_line":"        self,"},{"line_number":2801,"context_line":"        instance_uuid\u003dNone,"},{"line_number":2802,"context_line":"        machine_type\u003dNone,"},{"line_number":2803,"context_line":"        force\u003dFalse"},{"line_number":2804,"context_line":"    ):"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a6336ec_2b4ab619","line":2801,"in_reply_to":"b12f5a10_5d38f54c","updated":"2021-02-16 10:27:38.000000000","message":"That\u0027s why I wrote the list_unset command that just dumps a list of instance UUIDs for the entire env or per cell that should be easy to automate with a simple bash loop etc.","commit_id":"4dfd77a9b7733ebfa6e8b0bced2adc2975b09170"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"aa72ae183df2ddfb517ef5c83cfd64ea17492af7","unresolved":true,"context_lines":[{"line_number":2820,"context_line":"            if force:"},{"line_number":2821,"context_line":"                print(_(\"Forcing update of machine type.\"))"},{"line_number":2822,"context_line":""},{"line_number":2823,"context_line":"            (rtype, ptype) \u003d machine_type_utils.update_machine_type("},{"line_number":2824,"context_line":"                ctxt, instance_uuid, machine_type, force\u003dforce)"},{"line_number":2825,"context_line":""},{"line_number":2826,"context_line":"            print(_(\"Updated instance %(instance_uuid)s machine type to \""}],"source_content_type":"text/x-python","patch_set":4,"id":"a8507243_038e7d4d","line":2823,"range":{"start_line":2823,"start_character":12,"end_line":2823,"end_character":13},"updated":"2021-02-15 18:04:09.000000000","message":"nit: you don\u0027t really need these","commit_id":"4dfd77a9b7733ebfa6e8b0bced2adc2975b09170"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"c69a5f1e339e12ee384cb3b79a7ceee0e2fc6352","unresolved":false,"context_lines":[{"line_number":2820,"context_line":"            if force:"},{"line_number":2821,"context_line":"                print(_(\"Forcing update of machine type.\"))"},{"line_number":2822,"context_line":""},{"line_number":2823,"context_line":"            (rtype, ptype) \u003d machine_type_utils.update_machine_type("},{"line_number":2824,"context_line":"                ctxt, instance_uuid, machine_type, force\u003dforce)"},{"line_number":2825,"context_line":""},{"line_number":2826,"context_line":"            print(_(\"Updated instance %(instance_uuid)s machine type to \""}],"source_content_type":"text/x-python","patch_set":4,"id":"bb97dec1_5f4e6fab","line":2823,"range":{"start_line":2823,"start_character":12,"end_line":2823,"end_character":13},"in_reply_to":"a8507243_038e7d4d","updated":"2021-02-15 19:56:11.000000000","message":"Ack","commit_id":"4dfd77a9b7733ebfa6e8b0bced2adc2975b09170"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"aa72ae183df2ddfb517ef5c83cfd64ea17492af7","unresolved":true,"context_lines":[{"line_number":2824,"context_line":"                ctxt, instance_uuid, machine_type, force\u003dforce)"},{"line_number":2825,"context_line":""},{"line_number":2826,"context_line":"            print(_(\"Updated instance %(instance_uuid)s machine type to \""},{"line_number":2827,"context_line":"                    \"%(machine_type)s (previously %(previous_type)s)\") %"},{"line_number":2828,"context_line":"                    {\u0027instance_uuid\u0027: instance_uuid,"},{"line_number":2829,"context_line":"                     \u0027machine_type\u0027: rtype,"},{"line_number":2830,"context_line":"                     \u0027previous_type\u0027: ptype})"}],"source_content_type":"text/x-python","patch_set":4,"id":"e92911e5_d5bb764d","line":2827,"range":{"start_line":2827,"start_character":39,"end_line":2827,"end_character":49},"updated":"2021-02-15 18:04:09.000000000","message":"nit: was ?","commit_id":"4dfd77a9b7733ebfa6e8b0bced2adc2975b09170"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"c69a5f1e339e12ee384cb3b79a7ceee0e2fc6352","unresolved":false,"context_lines":[{"line_number":2824,"context_line":"                ctxt, instance_uuid, machine_type, force\u003dforce)"},{"line_number":2825,"context_line":""},{"line_number":2826,"context_line":"            print(_(\"Updated instance %(instance_uuid)s machine type to \""},{"line_number":2827,"context_line":"                    \"%(machine_type)s (previously %(previous_type)s)\") %"},{"line_number":2828,"context_line":"                    {\u0027instance_uuid\u0027: instance_uuid,"},{"line_number":2829,"context_line":"                     \u0027machine_type\u0027: rtype,"},{"line_number":2830,"context_line":"                     \u0027previous_type\u0027: ptype})"}],"source_content_type":"text/x-python","patch_set":4,"id":"4848433b_ab4fb1ff","line":2827,"range":{"start_line":2827,"start_character":39,"end_line":2827,"end_character":49},"in_reply_to":"e92911e5_d5bb764d","updated":"2021-02-15 19:56:11.000000000","message":"Ack","commit_id":"4dfd77a9b7733ebfa6e8b0bced2adc2975b09170"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"defc677e8613ac1eea8faded25aee7733436db0e","unresolved":true,"context_lines":[{"line_number":2830,"context_line":"                     \u0027previous_type\u0027: ptype})"},{"line_number":2831,"context_line":"            return 0"},{"line_number":2832,"context_line":"        except exception.UnsupportedMachineType as e:"},{"line_number":2833,"context_line":"            print(_(str(e)))"},{"line_number":2834,"context_line":"            return 5"},{"line_number":2835,"context_line":"        except exception.InvalidMachineTypeUpdate as e:"},{"line_number":2836,"context_line":"            print(_(str(e)))"}],"source_content_type":"text/x-python","patch_set":4,"id":"1b36a2da_d0cf870d","line":2833,"updated":"2021-02-16 10:00:59.000000000","message":"As noted elsewhere, do we want to translate these?","commit_id":"4dfd77a9b7733ebfa6e8b0bced2adc2975b09170"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"8490497b50a984bb716903c7666b5a944ae065c6","unresolved":true,"context_lines":[{"line_number":2830,"context_line":"                     \u0027previous_type\u0027: ptype})"},{"line_number":2831,"context_line":"            return 0"},{"line_number":2832,"context_line":"        except exception.UnsupportedMachineType as e:"},{"line_number":2833,"context_line":"            print(_(str(e)))"},{"line_number":2834,"context_line":"            return 5"},{"line_number":2835,"context_line":"        except exception.InvalidMachineTypeUpdate as e:"},{"line_number":2836,"context_line":"            print(_(str(e)))"}],"source_content_type":"text/x-python","patch_set":4,"id":"fc56f8a8_de1bc45b","line":2833,"in_reply_to":"1b36a2da_d0cf870d","updated":"2021-02-16 10:27:38.000000000","message":"Yeah ack I\u0027ll sort this.","commit_id":"4dfd77a9b7733ebfa6e8b0bced2adc2975b09170"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"defc677e8613ac1eea8faded25aee7733436db0e","unresolved":true,"context_lines":[{"line_number":2843,"context_line":"            print(_(str(e)))"},{"line_number":2844,"context_line":"            return 2"},{"line_number":2845,"context_line":"        except Exception:"},{"line_number":2846,"context_line":"            LOG.exception(\u0027Unexpected error\u0027)"},{"line_number":2847,"context_line":"            return 1"},{"line_number":2848,"context_line":""},{"line_number":2849,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"550a7f59_a9e66252","line":2846,"updated":"2021-02-16 10:00:59.000000000","message":"Weird that you log here but print elsewhere","commit_id":"4dfd77a9b7733ebfa6e8b0bced2adc2975b09170"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"8490497b50a984bb716903c7666b5a944ae065c6","unresolved":true,"context_lines":[{"line_number":2843,"context_line":"            print(_(str(e)))"},{"line_number":2844,"context_line":"            return 2"},{"line_number":2845,"context_line":"        except Exception:"},{"line_number":2846,"context_line":"            LOG.exception(\u0027Unexpected error\u0027)"},{"line_number":2847,"context_line":"            return 1"},{"line_number":2848,"context_line":""},{"line_number":2849,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"f89a5c91_06355e00","line":2846,"in_reply_to":"550a7f59_a9e66252","updated":"2021-02-16 10:27:38.000000000","message":"I wanted the actual trace captured here if it isn\u0027t a known exception.","commit_id":"4dfd77a9b7733ebfa6e8b0bced2adc2975b09170"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"825c6187624d9bc032d4114aad5d19846cacfafe","unresolved":true,"context_lines":[{"line_number":2689,"context_line":"            ctxt \u003d context.get_admin_context()"},{"line_number":2690,"context_line":""},{"line_number":2691,"context_line":"            if force:"},{"line_number":2692,"context_line":"                print(_(\"Forcing update of machine type.\"))"},{"line_number":2693,"context_line":""},{"line_number":2694,"context_line":"            rtype, ptype \u003d machine_type_utils.update_machine_type("},{"line_number":2695,"context_line":"                ctxt, instance_uuid, machine_type, force\u003dforce)"}],"source_content_type":"text/x-python","patch_set":6,"id":"a3629ac3_f2384b82","line":2692,"updated":"2021-03-01 17:30:28.000000000","message":"nit: Everything above here could go outside the try-except","commit_id":"064633821b1f128510d89d33e300c689e6fd1c40"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"78c2433d48cac29b98a62132bda218050aeffeda","unresolved":false,"context_lines":[{"line_number":2689,"context_line":"            ctxt \u003d context.get_admin_context()"},{"line_number":2690,"context_line":""},{"line_number":2691,"context_line":"            if force:"},{"line_number":2692,"context_line":"                print(_(\"Forcing update of machine type.\"))"},{"line_number":2693,"context_line":""},{"line_number":2694,"context_line":"            rtype, ptype \u003d machine_type_utils.update_machine_type("},{"line_number":2695,"context_line":"                ctxt, instance_uuid, machine_type, force\u003dforce)"}],"source_content_type":"text/x-python","patch_set":6,"id":"6e70273b_614add4d","line":2692,"in_reply_to":"a3629ac3_f2384b82","updated":"2021-03-01 21:50:41.000000000","message":"Done","commit_id":"064633821b1f128510d89d33e300c689e6fd1c40"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"825c6187624d9bc032d4114aad5d19846cacfafe","unresolved":true,"context_lines":[{"line_number":2694,"context_line":"            rtype, ptype \u003d machine_type_utils.update_machine_type("},{"line_number":2695,"context_line":"                ctxt, instance_uuid, machine_type, force\u003dforce)"},{"line_number":2696,"context_line":""},{"line_number":2697,"context_line":"            print(_(\"Updated instance %(instance_uuid)s machine type to \""},{"line_number":2698,"context_line":"                    \"%(machine_type)s (previously %(previous_type)s)\") %"},{"line_number":2699,"context_line":"                    {\u0027instance_uuid\u0027: instance_uuid,"},{"line_number":2700,"context_line":"                     \u0027machine_type\u0027: rtype,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f6f66fe_0c97f2cc","line":2697,"updated":"2021-03-01 17:30:28.000000000","message":"ditto for everything from here down (or in an else)","commit_id":"064633821b1f128510d89d33e300c689e6fd1c40"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"78c2433d48cac29b98a62132bda218050aeffeda","unresolved":false,"context_lines":[{"line_number":2694,"context_line":"            rtype, ptype \u003d machine_type_utils.update_machine_type("},{"line_number":2695,"context_line":"                ctxt, instance_uuid, machine_type, force\u003dforce)"},{"line_number":2696,"context_line":""},{"line_number":2697,"context_line":"            print(_(\"Updated instance %(instance_uuid)s machine type to \""},{"line_number":2698,"context_line":"                    \"%(machine_type)s (previously %(previous_type)s)\") %"},{"line_number":2699,"context_line":"                    {\u0027instance_uuid\u0027: instance_uuid,"},{"line_number":2700,"context_line":"                     \u0027machine_type\u0027: rtype,"}],"source_content_type":"text/x-python","patch_set":6,"id":"f2fcc929_4dd92a68","line":2697,"in_reply_to":"9f6f66fe_0c97f2cc","updated":"2021-03-01 21:50:41.000000000","message":"Done","commit_id":"064633821b1f128510d89d33e300c689e6fd1c40"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"825c6187624d9bc032d4114aad5d19846cacfafe","unresolved":true,"context_lines":[{"line_number":2710,"context_line":"            print(str(e))"},{"line_number":2711,"context_line":"            return 3"},{"line_number":2712,"context_line":"        except (exception.InstanceNotFound,"},{"line_number":2713,"context_line":"                exception.InstanceMappingNotFound) as e:"},{"line_number":2714,"context_line":"            print(str(e))"},{"line_number":2715,"context_line":"            return 2"},{"line_number":2716,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":6,"id":"a01dd087_623071c8","line":2713,"updated":"2021-03-01 17:30:28.000000000","message":"style nit:\n\n  except (\n      exception.InstanceNotFound,\n      exception.InstanceMappingNotFound,\n  ) as e:\n\n?","commit_id":"064633821b1f128510d89d33e300c689e6fd1c40"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"78c2433d48cac29b98a62132bda218050aeffeda","unresolved":false,"context_lines":[{"line_number":2710,"context_line":"            print(str(e))"},{"line_number":2711,"context_line":"            return 3"},{"line_number":2712,"context_line":"        except (exception.InstanceNotFound,"},{"line_number":2713,"context_line":"                exception.InstanceMappingNotFound) as e:"},{"line_number":2714,"context_line":"            print(str(e))"},{"line_number":2715,"context_line":"            return 2"},{"line_number":2716,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":6,"id":"d189a2f4_00b1740c","line":2713,"in_reply_to":"a01dd087_623071c8","updated":"2021-03-01 21:50:41.000000000","message":"Done","commit_id":"064633821b1f128510d89d33e300c689e6fd1c40"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"282551a03494781197f000a2db6edc8328ec0078","unresolved":false,"context_lines":[{"line_number":2667,"context_line":"          help\u003d\u0027Machine type to set\u0027)"},{"line_number":2668,"context_line":"    @args(\u0027--force\u0027, action\u003d\u0027store_true\u0027, default\u003dFalse, dest\u003d\u0027force\u0027,"},{"line_number":2669,"context_line":"          help\u003d\u0027Force the update of the stored machine type\u0027)"},{"line_number":2670,"context_line":"    def update_machine_type("},{"line_number":2671,"context_line":"        self,"},{"line_number":2672,"context_line":"        instance_uuid\u003dNone,"},{"line_number":2673,"context_line":"        machine_type\u003dNone,"}],"source_content_type":"text/x-python","patch_set":7,"id":"c7c2daa2_b3dc5c68","line":2670,"range":{"start_line":2670,"start_character":8,"end_line":2670,"end_character":27},"updated":"2021-03-03 12:53:37.000000000","message":"cool here the doc and the command name is in sync","commit_id":"0acf61eff222144762732d6477038f95ea647a96"}],"nova/tests/functional/integrated_helpers.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"aa72ae183df2ddfb517ef5c83cfd64ea17492af7","unresolved":false,"context_lines":[{"line_number":527,"context_line":"        return self._wait_for_server_parameter(server, expected_result)"},{"line_number":528,"context_line":""},{"line_number":529,"context_line":"    def _start_server(self, server):"},{"line_number":530,"context_line":"        self.api.post_server_action(server[\u0027id\u0027], {\u0027os-start\u0027: None})"},{"line_number":531,"context_line":"        return self._wait_for_state_change(server, \u0027ACTIVE\u0027)"},{"line_number":532,"context_line":""},{"line_number":533,"context_line":"    def _stop_server(self, server):"}],"source_content_type":"text/x-python","patch_set":4,"id":"ec32192f_a1f5929a","line":530,"updated":"2021-02-15 18:04:09.000000000","message":"Mad that we don\u0027t have these already","commit_id":"4dfd77a9b7733ebfa6e8b0bced2adc2975b09170"}],"nova/tests/functional/libvirt/test_machine_type.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"aa72ae183df2ddfb517ef5c83cfd64ea17492af7","unresolved":true,"context_lines":[{"line_number":9,"context_line":"# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":10,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"# under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"import fixtures"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from oslo_utils.fixture import uuidsentinel"}],"source_content_type":"text/x-python","patch_set":4,"id":"e8d6c172_3e0690fd","side":"PARENT","line":12,"updated":"2021-02-15 18:04:09.000000000","message":"this was correct? (at least I always have a space after the license)","commit_id":"33f90b9a49f0c97b158bb59da8bf93914bc82192"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"c69a5f1e339e12ee384cb3b79a7ceee0e2fc6352","unresolved":false,"context_lines":[{"line_number":9,"context_line":"# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":10,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"# under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"import fixtures"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from oslo_utils.fixture import uuidsentinel"}],"source_content_type":"text/x-python","patch_set":4,"id":"37d7ca22_277eee38","side":"PARENT","line":12,"in_reply_to":"e8d6c172_3e0690fd","updated":"2021-02-15 19:56:11.000000000","message":"A mistake, I\u0027ll revert.","commit_id":"33f90b9a49f0c97b158bb59da8bf93914bc82192"}],"nova/tests/unit/virt/libvirt/test_machine_type_utils.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"825c6187624d9bc032d4114aad5d19846cacfafe","unresolved":true,"context_lines":[{"line_number":96,"context_line":"        \u0027virt-2.12\u0027,"},{"line_number":97,"context_line":"        \u0027pc-i440fx-rhel8.2.0\u0027,"},{"line_number":98,"context_line":"        \u0027pc-q35-rhel8.2.0\u0027,"},{"line_number":99,"context_line":"        \u0027hyperv-gen1\u0027,"},{"line_number":100,"context_line":"        \u0027hyperv-gen2\u0027)"},{"line_number":101,"context_line":"    def test_check_machine_type_support(self, machine_type):"},{"line_number":102,"context_line":"        # Assert UnsupportedMachineType isn\u0027t raised for supported types"}],"source_content_type":"text/x-python","patch_set":6,"id":"c44d153c_57edade2","line":99,"updated":"2021-03-01 17:30:28.000000000","message":"Can you drop this logic?","commit_id":"064633821b1f128510d89d33e300c689e6fd1c40"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"78c2433d48cac29b98a62132bda218050aeffeda","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        \u0027virt-2.12\u0027,"},{"line_number":97,"context_line":"        \u0027pc-i440fx-rhel8.2.0\u0027,"},{"line_number":98,"context_line":"        \u0027pc-q35-rhel8.2.0\u0027,"},{"line_number":99,"context_line":"        \u0027hyperv-gen1\u0027,"},{"line_number":100,"context_line":"        \u0027hyperv-gen2\u0027)"},{"line_number":101,"context_line":"    def test_check_machine_type_support(self, machine_type):"},{"line_number":102,"context_line":"        # Assert UnsupportedMachineType isn\u0027t raised for supported types"}],"source_content_type":"text/x-python","patch_set":6,"id":"564456da_a8845eb5","line":99,"in_reply_to":"c44d153c_57edade2","updated":"2021-03-01 21:50:41.000000000","message":"Done","commit_id":"064633821b1f128510d89d33e300c689e6fd1c40"}],"nova/tests/unit/virt/test_machine_type_utils.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"aa72ae183df2ddfb517ef5c83cfd64ea17492af7","unresolved":true,"context_lines":[{"line_number":9,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":10,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"import mock"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from oslo_utils.fixture import uuidsentinel"}],"source_content_type":"text/x-python","patch_set":4,"id":"47b2f606_a395f4ef","side":"PARENT","line":12,"updated":"2021-02-15 18:04:09.000000000","message":"ditto","commit_id":"33f90b9a49f0c97b158bb59da8bf93914bc82192"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"c69a5f1e339e12ee384cb3b79a7ceee0e2fc6352","unresolved":false,"context_lines":[{"line_number":9,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":10,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"import mock"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from oslo_utils.fixture import uuidsentinel"}],"source_content_type":"text/x-python","patch_set":4,"id":"575a58c8_5c04bef1","side":"PARENT","line":12,"in_reply_to":"47b2f606_a395f4ef","updated":"2021-02-15 19:56:11.000000000","message":"Ack","commit_id":"33f90b9a49f0c97b158bb59da8bf93914bc82192"}],"nova/virt/libvirt/machine_type_utils.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"825c6187624d9bc032d4114aad5d19846cacfafe","unresolved":true,"context_lines":[{"line_number":37,"context_line":"    r\u0027^pc-q35-rhel\\d.\\d+.\\d+\u0027,"},{"line_number":38,"context_line":"    # As defined by nova.virt.hyperv.constants.IMAGE_PROP_VM_GEN_{1,2}"},{"line_number":39,"context_line":"    r\u0027^hyperv-gen1\u0027,"},{"line_number":40,"context_line":"    r\u0027^hyperv-gen2\u0027,"},{"line_number":41,"context_line":"]"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"c5036106_74589d8f","line":40,"updated":"2021-03-01 17:30:28.000000000","message":"Can you drop this?","commit_id":"064633821b1f128510d89d33e300c689e6fd1c40"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"78c2433d48cac29b98a62132bda218050aeffeda","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    r\u0027^pc-q35-rhel\\d.\\d+.\\d+\u0027,"},{"line_number":38,"context_line":"    # As defined by nova.virt.hyperv.constants.IMAGE_PROP_VM_GEN_{1,2}"},{"line_number":39,"context_line":"    r\u0027^hyperv-gen1\u0027,"},{"line_number":40,"context_line":"    r\u0027^hyperv-gen2\u0027,"},{"line_number":41,"context_line":"]"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"f7360873_d8e6f90e","line":40,"in_reply_to":"c5036106_74589d8f","updated":"2021-03-01 21:50:41.000000000","message":"Done","commit_id":"064633821b1f128510d89d33e300c689e6fd1c40"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"825c6187624d9bc032d4114aad5d19846cacfafe","unresolved":true,"context_lines":[{"line_number":135,"context_line":""},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"def update_machine_type("},{"line_number":138,"context_line":"    context: \u0027nova_context.RequestContext\u0027,"},{"line_number":139,"context_line":"    instance_uuid: str,"},{"line_number":140,"context_line":"    machine_type: str,"},{"line_number":141,"context_line":"    force: bool \u003d False,"}],"source_content_type":"text/x-python","patch_set":6,"id":"621e6e36_b1f8f204","line":138,"updated":"2021-03-01 17:30:28.000000000","message":"You shouldn\u0027t need to quote this since you have imported it","commit_id":"064633821b1f128510d89d33e300c689e6fd1c40"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"78c2433d48cac29b98a62132bda218050aeffeda","unresolved":false,"context_lines":[{"line_number":135,"context_line":""},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"def update_machine_type("},{"line_number":138,"context_line":"    context: \u0027nova_context.RequestContext\u0027,"},{"line_number":139,"context_line":"    instance_uuid: str,"},{"line_number":140,"context_line":"    machine_type: str,"},{"line_number":141,"context_line":"    force: bool \u003d False,"}],"source_content_type":"text/x-python","patch_set":6,"id":"7eb9ccaf_e10416de","line":138,"in_reply_to":"621e6e36_b1f8f204","updated":"2021-03-01 21:50:41.000000000","message":"Done","commit_id":"064633821b1f128510d89d33e300c689e6fd1c40"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"825c6187624d9bc032d4114aad5d19846cacfafe","unresolved":true,"context_lines":[{"line_number":164,"context_line":"        if force:"},{"line_number":165,"context_line":"            instance.system_metadata[\u0027image_hw_machine_type\u0027] \u003d machine_type"},{"line_number":166,"context_line":"            instance.save()"},{"line_number":167,"context_line":"            return (machine_type, existing_mtype)"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"        # Ensure the instance is in a suitable vm_state to update"},{"line_number":170,"context_line":"        _check_vm_state(instance)"}],"source_content_type":"text/x-python","patch_set":6,"id":"4e300874_37cce197","line":167,"updated":"2021-03-01 17:30:28.000000000","message":"nit: no need for brackets (you don\u0027t have them above)\n\nditto below","commit_id":"064633821b1f128510d89d33e300c689e6fd1c40"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"78c2433d48cac29b98a62132bda218050aeffeda","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        if force:"},{"line_number":165,"context_line":"            instance.system_metadata[\u0027image_hw_machine_type\u0027] \u003d machine_type"},{"line_number":166,"context_line":"            instance.save()"},{"line_number":167,"context_line":"            return (machine_type, existing_mtype)"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"        # Ensure the instance is in a suitable vm_state to update"},{"line_number":170,"context_line":"        _check_vm_state(instance)"}],"source_content_type":"text/x-python","patch_set":6,"id":"76f72a84_ff9afc46","line":167,"in_reply_to":"4e300874_37cce197","updated":"2021-03-01 21:50:41.000000000","message":"Done","commit_id":"064633821b1f128510d89d33e300c689e6fd1c40"}],"nova/virt/machine_type_utils.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"aa72ae183df2ddfb517ef5c83cfd64ea17492af7","unresolved":true,"context_lines":[{"line_number":9,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":10,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"from nova import context as nova_context"},{"line_number":14,"context_line":"from nova import objects"},{"line_number":15,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"6de4eb1e_01dee940","side":"PARENT","line":12,"updated":"2021-02-15 18:04:09.000000000","message":"ditto","commit_id":"33f90b9a49f0c97b158bb59da8bf93914bc82192"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"c69a5f1e339e12ee384cb3b79a7ceee0e2fc6352","unresolved":false,"context_lines":[{"line_number":9,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":10,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"from nova import context as nova_context"},{"line_number":14,"context_line":"from nova import objects"},{"line_number":15,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9d00aeb9_bb4ed464","side":"PARENT","line":12,"in_reply_to":"6de4eb1e_01dee940","updated":"2021-02-15 19:56:11.000000000","message":"Ack","commit_id":"33f90b9a49f0c97b158bb59da8bf93914bc82192"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"aa72ae183df2ddfb517ef5c83cfd64ea17492af7","unresolved":true,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"def _check_machine_type_support("},{"line_number":70,"context_line":"    mtype: str"},{"line_number":71,"context_line":"):"},{"line_number":72,"context_line":"    \"\"\"Check that the provided machine type is supported"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    This check is done without access to the compute host and"}],"source_content_type":"text/x-python","patch_set":4,"id":"36cc60e8_e441861d","line":71,"updated":"2021-02-15 18:04:09.000000000","message":"return type? (-\u003e None) Same for below","commit_id":"4dfd77a9b7733ebfa6e8b0bced2adc2975b09170"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"c69a5f1e339e12ee384cb3b79a7ceee0e2fc6352","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"def _check_machine_type_support("},{"line_number":70,"context_line":"    mtype: str"},{"line_number":71,"context_line":"):"},{"line_number":72,"context_line":"    \"\"\"Check that the provided machine type is supported"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    This check is done without access to the compute host and"}],"source_content_type":"text/x-python","patch_set":4,"id":"06d16751_f9cca32b","line":71,"in_reply_to":"36cc60e8_e441861d","updated":"2021-02-15 19:56:11.000000000","message":"Ack","commit_id":"4dfd77a9b7733ebfa6e8b0bced2adc2975b09170"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"a734e93357acc9652b1027313c3efb87a2bd0f2d","unresolved":true,"context_lines":[{"line_number":82,"context_line":"        raise exception.UnsupportedMachineType(machine_type\u003dmtype)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"def _check_update_to_existing_type("},{"line_number":86,"context_line":"    existing_type: str,"},{"line_number":87,"context_line":"    machine_type: str"},{"line_number":88,"context_line":"):"}],"source_content_type":"text/x-python","patch_set":4,"id":"0221c2ed_26d6222e","line":85,"range":{"start_line":85,"start_character":4,"end_line":85,"end_character":34},"updated":"2021-02-16 08:22:43.000000000","message":"this function also checks that we are not updating to an older version of the type the instance currently uses. Maybe this function can be split to two","commit_id":"4dfd77a9b7733ebfa6e8b0bced2adc2975b09170"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"8490497b50a984bb716903c7666b5a944ae065c6","unresolved":true,"context_lines":[{"line_number":82,"context_line":"        raise exception.UnsupportedMachineType(machine_type\u003dmtype)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"def _check_update_to_existing_type("},{"line_number":86,"context_line":"    existing_type: str,"},{"line_number":87,"context_line":"    machine_type: str"},{"line_number":88,"context_line":"):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3330264e_83addd91","line":85,"range":{"start_line":85,"start_character":4,"end_line":85,"end_character":34},"in_reply_to":"0221c2ed_26d6222e","updated":"2021-02-16 10:27:38.000000000","message":"Potentially, I thought the name was generic enough to get away with both checks but I don\u0027t mind breaking this up. The tests cover both cases FWIW.","commit_id":"4dfd77a9b7733ebfa6e8b0bced2adc2975b09170"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"89a30244c7c6655c84bc14cb269d1150a950b7e9","unresolved":true,"context_lines":[{"line_number":82,"context_line":"        raise exception.UnsupportedMachineType(machine_type\u003dmtype)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"def _check_update_to_existing_type("},{"line_number":86,"context_line":"    existing_type: str,"},{"line_number":87,"context_line":"    machine_type: str"},{"line_number":88,"context_line":"):"}],"source_content_type":"text/x-python","patch_set":4,"id":"434b9940_19147256","line":85,"range":{"start_line":85,"start_character":4,"end_line":85,"end_character":34},"in_reply_to":"3330264e_83addd91","updated":"2021-02-18 10:59:41.000000000","message":"it is not blocker for me","commit_id":"4dfd77a9b7733ebfa6e8b0bced2adc2975b09170"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"a734e93357acc9652b1027313c3efb87a2bd0f2d","unresolved":true,"context_lines":[{"line_number":96,"context_line":"    :param machine_type: The new machine type"},{"line_number":97,"context_line":"    :raises: nova.exception.InvalidMachineTypeUpdate"},{"line_number":98,"context_line":"    \"\"\""},{"line_number":99,"context_line":"    # Check that we are not switching between types or between an alias and"},{"line_number":100,"context_line":"    # versioned type such as q35 to pc-q35-5.2.0 etc."},{"line_number":101,"context_line":"    for m in SUPPORTED_TYPE_PATTERNS:"},{"line_number":102,"context_line":"        if re.match(m, existing_type) and not re.match(m, machine_type):"}],"source_content_type":"text/x-python","patch_set":4,"id":"ca66a820_c456276c","line":99,"range":{"start_line":99,"start_character":24,"end_line":99,"end_character":51},"updated":"2021-02-16 08:22:43.000000000","message":"does the code below prevents switching from pc to q35?","commit_id":"4dfd77a9b7733ebfa6e8b0bced2adc2975b09170"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"a71cb61612fa008c7251749ff5d6dcae21d563c4","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    :param machine_type: The new machine type"},{"line_number":97,"context_line":"    :raises: nova.exception.InvalidMachineTypeUpdate"},{"line_number":98,"context_line":"    \"\"\""},{"line_number":99,"context_line":"    # Check that we are not switching between types or between an alias and"},{"line_number":100,"context_line":"    # versioned type such as q35 to pc-q35-5.2.0 etc."},{"line_number":101,"context_line":"    for m in SUPPORTED_TYPE_PATTERNS:"},{"line_number":102,"context_line":"        if re.match(m, existing_type) and not re.match(m, machine_type):"}],"source_content_type":"text/x-python","patch_set":4,"id":"ced62e0b_d0bfe5a6","line":99,"range":{"start_line":99,"start_character":24,"end_line":99,"end_character":51},"in_reply_to":"087f4336_0634af4a","updated":"2021-02-16 13:57:17.000000000","message":"Done","commit_id":"4dfd77a9b7733ebfa6e8b0bced2adc2975b09170"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"8490497b50a984bb716903c7666b5a944ae065c6","unresolved":true,"context_lines":[{"line_number":96,"context_line":"    :param machine_type: The new machine type"},{"line_number":97,"context_line":"    :raises: nova.exception.InvalidMachineTypeUpdate"},{"line_number":98,"context_line":"    \"\"\""},{"line_number":99,"context_line":"    # Check that we are not switching between types or between an alias and"},{"line_number":100,"context_line":"    # versioned type such as q35 to pc-q35-5.2.0 etc."},{"line_number":101,"context_line":"    for m in SUPPORTED_TYPE_PATTERNS:"},{"line_number":102,"context_line":"        if re.match(m, existing_type) and not re.match(m, machine_type):"}],"source_content_type":"text/x-python","patch_set":4,"id":"087f4336_0634af4a","line":99,"range":{"start_line":99,"start_character":24,"end_line":99,"end_character":51},"in_reply_to":"ca66a820_c456276c","updated":"2021-02-16 10:27:38.000000000","message":"Yes, both existing_type and machine_type have to match the same SUPPORTED_TYPE_PATTERN, so in your example `pc` and `q35` wouldn\u0027t match the same pattern and so InvalidMachineTypeUpdate is raised.","commit_id":"4dfd77a9b7733ebfa6e8b0bced2adc2975b09170"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"89a30244c7c6655c84bc14cb269d1150a950b7e9","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    :param machine_type: The new machine type"},{"line_number":97,"context_line":"    :raises: nova.exception.InvalidMachineTypeUpdate"},{"line_number":98,"context_line":"    \"\"\""},{"line_number":99,"context_line":"    # Check that we are not switching between types or between an alias and"},{"line_number":100,"context_line":"    # versioned type such as q35 to pc-q35-5.2.0 etc."},{"line_number":101,"context_line":"    for m in SUPPORTED_TYPE_PATTERNS:"},{"line_number":102,"context_line":"        if re.match(m, existing_type) and not re.match(m, machine_type):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9eed49a6_31a8ab4e","line":99,"range":{"start_line":99,"start_character":24,"end_line":99,"end_character":51},"in_reply_to":"ced62e0b_d0bfe5a6","updated":"2021-02-18 10:59:41.000000000","message":"My bad. Now I see it now. I missed the fact that both value needs to match the _same_ patter. Cool!","commit_id":"4dfd77a9b7733ebfa6e8b0bced2adc2975b09170"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"a734e93357acc9652b1027313c3efb87a2bd0f2d","unresolved":true,"context_lines":[{"line_number":134,"context_line":"    context: \u0027nova_context.RequestContext\u0027,"},{"line_number":135,"context_line":"    instance_uuid: str,"},{"line_number":136,"context_line":"    machine_type: str,"},{"line_number":137,"context_line":"    force: ty.Optional[bool] \u003d False,"},{"line_number":138,"context_line":") -\u003e ty.Tuple[str, str]:"},{"line_number":139,"context_line":"    \"\"\"Set or update the stored machine type of an instance"},{"line_number":140,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"272676d4_694bc4a8","line":137,"range":{"start_line":137,"start_character":11,"end_line":137,"end_character":28},"updated":"2021-02-16 08:22:43.000000000","message":"this is just \n\n    : bool\n\nas we don\u0027t want to allow None to be passed in","commit_id":"4dfd77a9b7733ebfa6e8b0bced2adc2975b09170"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"8490497b50a984bb716903c7666b5a944ae065c6","unresolved":false,"context_lines":[{"line_number":134,"context_line":"    context: \u0027nova_context.RequestContext\u0027,"},{"line_number":135,"context_line":"    instance_uuid: str,"},{"line_number":136,"context_line":"    machine_type: str,"},{"line_number":137,"context_line":"    force: ty.Optional[bool] \u003d False,"},{"line_number":138,"context_line":") -\u003e ty.Tuple[str, str]:"},{"line_number":139,"context_line":"    \"\"\"Set or update the stored machine type of an instance"},{"line_number":140,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"433b264c_21393650","line":137,"range":{"start_line":137,"start_character":11,"end_line":137,"end_character":28},"in_reply_to":"272676d4_694bc4a8","updated":"2021-02-16 10:27:38.000000000","message":"Ack","commit_id":"4dfd77a9b7733ebfa6e8b0bced2adc2975b09170"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"defc677e8613ac1eea8faded25aee7733436db0e","unresolved":true,"context_lines":[{"line_number":144,"context_line":"    :returns: A tuple of the updated machine type and original machine type."},{"line_number":145,"context_line":"    \"\"\""},{"line_number":146,"context_line":"    im \u003d objects.InstanceMapping.get_by_instance_uuid("},{"line_number":147,"context_line":"        context, instance_uuid)"},{"line_number":148,"context_line":"    with nova_context.target_cell(context, im.cell_mapping) as cctxt:"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        instance \u003d objects.instance.Instance.get_by_uuid("}],"source_content_type":"text/x-python","patch_set":4,"id":"bb7debde_8209d880","line":147,"updated":"2021-02-16 10:00:59.000000000","message":"nit: one line?","commit_id":"4dfd77a9b7733ebfa6e8b0bced2adc2975b09170"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"8490497b50a984bb716903c7666b5a944ae065c6","unresolved":false,"context_lines":[{"line_number":144,"context_line":"    :returns: A tuple of the updated machine type and original machine type."},{"line_number":145,"context_line":"    \"\"\""},{"line_number":146,"context_line":"    im \u003d objects.InstanceMapping.get_by_instance_uuid("},{"line_number":147,"context_line":"        context, instance_uuid)"},{"line_number":148,"context_line":"    with nova_context.target_cell(context, im.cell_mapping) as cctxt:"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        instance \u003d objects.instance.Instance.get_by_uuid("}],"source_content_type":"text/x-python","patch_set":4,"id":"5fc3ca59_1f1d8a28","line":147,"in_reply_to":"bb7debde_8209d880","updated":"2021-02-16 10:27:38.000000000","message":"Ack","commit_id":"4dfd77a9b7733ebfa6e8b0bced2adc2975b09170"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"defc677e8613ac1eea8faded25aee7733436db0e","unresolved":true,"context_lines":[{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        # Return if the type is already updated"},{"line_number":157,"context_line":"        if existing_mtype and existing_mtype \u003d\u003d machine_type:"},{"line_number":158,"context_line":"            return (machine_type, existing_mtype)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        # If the caller wants to force the update now is the time to do it."},{"line_number":161,"context_line":"        if force:"}],"source_content_type":"text/x-python","patch_set":4,"id":"13ae3418_fec1b25f","line":158,"updated":"2021-02-16 10:00:59.000000000","message":"nit: don\u0027t really need the brackets here either","commit_id":"4dfd77a9b7733ebfa6e8b0bced2adc2975b09170"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"8490497b50a984bb716903c7666b5a944ae065c6","unresolved":false,"context_lines":[{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        # Return if the type is already updated"},{"line_number":157,"context_line":"        if existing_mtype and existing_mtype \u003d\u003d machine_type:"},{"line_number":158,"context_line":"            return (machine_type, existing_mtype)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        # If the caller wants to force the update now is the time to do it."},{"line_number":161,"context_line":"        if force:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7ae1a664_0ecec3b4","line":158,"in_reply_to":"13ae3418_fec1b25f","updated":"2021-02-16 10:27:38.000000000","message":"Ack","commit_id":"4dfd77a9b7733ebfa6e8b0bced2adc2975b09170"}]}
