)]}'
{"nova/compute/api.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"334eeeef5238e7c316d9ae88deab031101c4021b","unresolved":false,"context_lines":[{"line_number":1316,"context_line":""},{"line_number":1317,"context_line":"        if ((num_local \u003e 0)"},{"line_number":1318,"context_line":"            and (instance_type.get(\u0027local_disks\u0027, True) is False)):"},{"line_number":1319,"context_line":"            raise exception.InvalidBDMLocalsDisabled()"},{"line_number":1320,"context_line":""},{"line_number":1321,"context_line":"    def _populate_instance_names(self, instance, num_instances):"},{"line_number":1322,"context_line":"        \"\"\"Populate instance display_name and hostname.\"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"3aaa91ec_f7c71c43","line":1319,"updated":"2016-06-22 12:26:06.000000000","message":"I don\u0027t see a unit test for this one?","commit_id":"6867fc3667897061b69703b30a5d9c0b7f20da14"},{"author":{"_account_id":15371,"name":"Tom Patzig","email":"tom.patzig@sap.com","username":"tpatzig"},"change_message_id":"854ce00596368fd42b47924d0fceed2047d77814","unresolved":false,"context_lines":[{"line_number":1316,"context_line":""},{"line_number":1317,"context_line":"        if ((num_local \u003e 0)"},{"line_number":1318,"context_line":"            and (instance_type.get(\u0027local_disks\u0027, True) is False)):"},{"line_number":1319,"context_line":"            raise exception.InvalidBDMLocalsDisabled()"},{"line_number":1320,"context_line":""},{"line_number":1321,"context_line":"    def _populate_instance_names(self, instance, num_instances):"},{"line_number":1322,"context_line":"        \"\"\"Populate instance display_name and hostname.\"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"3aaa91ec_932505ad","line":1319,"in_reply_to":"3aaa91ec_f7c71c43","updated":"2016-06-22 14:15:42.000000000","message":"Will add one.","commit_id":"6867fc3667897061b69703b30a5d9c0b7f20da14"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"334eeeef5238e7c316d9ae88deab031101c4021b","unresolved":false,"context_lines":[{"line_number":2582,"context_line":"                is not new_instance_type.get(\u0027local_disks\u0027)):"},{"line_number":2583,"context_line":"            reason \u003d _(\u0027Resize only allowed if \"local disks\" is set to\u0027"},{"line_number":2584,"context_line":"                       \u0027the same value for source and target flavor.\u0027)"},{"line_number":2585,"context_line":"            raise exception.FlavorLocalDisksDisabled(reason\u003dreason)"},{"line_number":2586,"context_line":""},{"line_number":2587,"context_line":"        # ensure there is sufficient headroom for upsizes"},{"line_number":2588,"context_line":"        if flavor_id:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3aaa91ec_376084ce","line":2585,"updated":"2016-06-22 12:26:06.000000000","message":"Actually, I think this is also OK:\n\ncurrent_instance_type.get(\u0027local_disks\u0027) \u003d False and new_instance_type.get(\u0027local_disks\u0027) \u003d True\n\nIn fact, the reverse is also just fine, assuming the instance actually has no local disks.\n\nBut that might be overcomplicating things?","commit_id":"6867fc3667897061b69703b30a5d9c0b7f20da14"},{"author":{"_account_id":15371,"name":"Tom Patzig","email":"tom.patzig@sap.com","username":"tpatzig"},"change_message_id":"854ce00596368fd42b47924d0fceed2047d77814","unresolved":false,"context_lines":[{"line_number":2582,"context_line":"                is not new_instance_type.get(\u0027local_disks\u0027)):"},{"line_number":2583,"context_line":"            reason \u003d _(\u0027Resize only allowed if \"local disks\" is set to\u0027"},{"line_number":2584,"context_line":"                       \u0027the same value for source and target flavor.\u0027)"},{"line_number":2585,"context_line":"            raise exception.FlavorLocalDisksDisabled(reason\u003dreason)"},{"line_number":2586,"context_line":""},{"line_number":2587,"context_line":"        # ensure there is sufficient headroom for upsizes"},{"line_number":2588,"context_line":"        if flavor_id:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3aaa91ec_9817e450","line":2585,"in_reply_to":"3aaa91ec_376084ce","updated":"2016-06-22 14:15:42.000000000","message":"Yes you are right, The first case (resize from local_disks \u0027False\u0027 to local_disks \u0027True\u0027) is easy and could be allowed as well. This will result in an instance with no local disks, but after the resize it is allowed to add local ones (but i am not aware that this is possible). The other one is a bit more complex to check if really no local disks are in use, to resize to local_disks\u003dFalse flavor.\n\nI personally thing this just overcomplicates things. And due to the fact you only can add non-local disks after the instance was initially created, i think the resize between those different flavors (local_disks True/False) makes no sense.","commit_id":"6867fc3667897061b69703b30a5d9c0b7f20da14"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"334eeeef5238e7c316d9ae88deab031101c4021b","unresolved":false,"context_lines":[{"line_number":2583,"context_line":"            reason \u003d _(\u0027Resize only allowed if \"local disks\" is set to\u0027"},{"line_number":2584,"context_line":"                       \u0027the same value for source and target flavor.\u0027)"},{"line_number":2585,"context_line":"            raise exception.FlavorLocalDisksDisabled(reason\u003dreason)"},{"line_number":2586,"context_line":""},{"line_number":2587,"context_line":"        # ensure there is sufficient headroom for upsizes"},{"line_number":2588,"context_line":"        if flavor_id:"},{"line_number":2589,"context_line":"            deltas \u003d compute_utils.upsize_quota_delta(context,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3aaa91ec_d7e780e2","line":2586,"updated":"2016-06-22 12:26:06.000000000","message":"Oh, I also don\u0027t see any unit tests for this.","commit_id":"6867fc3667897061b69703b30a5d9c0b7f20da14"},{"author":{"_account_id":15371,"name":"Tom Patzig","email":"tom.patzig@sap.com","username":"tpatzig"},"change_message_id":"854ce00596368fd42b47924d0fceed2047d77814","unresolved":false,"context_lines":[{"line_number":2583,"context_line":"            reason \u003d _(\u0027Resize only allowed if \"local disks\" is set to\u0027"},{"line_number":2584,"context_line":"                       \u0027the same value for source and target flavor.\u0027)"},{"line_number":2585,"context_line":"            raise exception.FlavorLocalDisksDisabled(reason\u003dreason)"},{"line_number":2586,"context_line":""},{"line_number":2587,"context_line":"        # ensure there is sufficient headroom for upsizes"},{"line_number":2588,"context_line":"        if flavor_id:"},{"line_number":2589,"context_line":"            deltas \u003d compute_utils.upsize_quota_delta(context,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3aaa91ec_1332b5f1","line":2586,"in_reply_to":"3aaa91ec_d7e780e2","updated":"2016-06-22 14:15:42.000000000","message":"Will add one.","commit_id":"6867fc3667897061b69703b30a5d9c0b7f20da14"}],"nova/compute/flavors.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"334eeeef5238e7c316d9ae88deab031101c4021b","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        if (root_gb \u003e 0) or (ephemeral_gb \u003e 0) or (swap \u003e 0):"},{"line_number":136,"context_line":"            msg \u003d _(\"If local_disks are disabled, root_gb, ephemeral_gb and \""},{"line_number":137,"context_line":"                    \"swap must not be set.\")"},{"line_number":138,"context_line":"            raise exception.InvalidInput(reason\u003dmsg)"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    # rxtx_factor should be a positive float"},{"line_number":141,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3aaa91ec_375364e3","line":138,"updated":"2016-06-22 12:26:06.000000000","message":"Nit: Maybe we should have a more specific exception here, as that will make it easier to catch in the API?","commit_id":"6867fc3667897061b69703b30a5d9c0b7f20da14"}],"nova/compute/manager.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"334eeeef5238e7c316d9ae88deab031101c4021b","unresolved":false,"context_lines":[{"line_number":1906,"context_line":"                    reason\u003dmsg)"},{"line_number":1907,"context_line":"        except (exception.FlavorDiskTooSmall,"},{"line_number":1908,"context_line":"                exception.FlavorMemoryTooSmall,"},{"line_number":1909,"context_line":"                exception.FlavorLocalDisksDisabled,"},{"line_number":1910,"context_line":"                exception.ImageNotActive,"},{"line_number":1911,"context_line":"                exception.ImageUnacceptable,"},{"line_number":1912,"context_line":"                exception.InvalidDiskInfo) as e:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3aaa91ec_379d2466","line":1909,"updated":"2016-06-22 12:26:06.000000000","message":"Are you sure this is raised anywhere? I think this is always raised before you hit this code.","commit_id":"6867fc3667897061b69703b30a5d9c0b7f20da14"},{"author":{"_account_id":15371,"name":"Tom Patzig","email":"tom.patzig@sap.com","username":"tpatzig"},"change_message_id":"854ce00596368fd42b47924d0fceed2047d77814","unresolved":false,"context_lines":[{"line_number":1906,"context_line":"                    reason\u003dmsg)"},{"line_number":1907,"context_line":"        except (exception.FlavorDiskTooSmall,"},{"line_number":1908,"context_line":"                exception.FlavorMemoryTooSmall,"},{"line_number":1909,"context_line":"                exception.FlavorLocalDisksDisabled,"},{"line_number":1910,"context_line":"                exception.ImageNotActive,"},{"line_number":1911,"context_line":"                exception.ImageUnacceptable,"},{"line_number":1912,"context_line":"                exception.InvalidDiskInfo) as e:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3aaa91ec_3321b1fc","line":1909,"in_reply_to":"3aaa91ec_379d2466","updated":"2016-06-22 14:15:42.000000000","message":"Yes in nova/compute/api.py L639","commit_id":"6867fc3667897061b69703b30a5d9c0b7f20da14"}]}
