)]}'
{"openstack_dashboard/dashboards/admin/instances/tables.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"fc52c39e370725e193211cb93cfbe9d241dd0ad6","unresolved":false,"context_lines":[{"line_number":15,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":16,"context_line":"#    under the License."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from django.core import urlresolvers"},{"line_number":19,"context_line":"from django.template.defaultfilters import timesince  # noqa"},{"line_number":20,"context_line":"from django.template.defaultfilters import title  # noqa"},{"line_number":21,"context_line":"from django.utils.http import urlencode  # noqa"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BWok%3D","line":18,"updated":"2013-11-27 01:20:05.000000000","message":"In other places, \"import reverse\" is used. In general module level import are suggested, but it looks better to use \"from django.core.urlresolvers import reverse\" for consistency.","commit_id":"c9cb15b26df17539b0fc01df4cfa885a619816e1"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"6607e30eef624ba1e96a123abcab254736e7be87","unresolved":false,"context_lines":[{"line_number":15,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":16,"context_line":"#    under the License."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from django.core import urlresolvers"},{"line_number":19,"context_line":"from django.template.defaultfilters import timesince  # noqa"},{"line_number":20,"context_line":"from django.template.defaultfilters import title  # noqa"},{"line_number":21,"context_line":"from django.utils.http import urlencode  # noqa"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BWTs%3D","line":18,"in_reply_to":"AAAATn%2F%2BWok%3D","updated":"2013-11-27 03:33:13.000000000","message":"Done","commit_id":"c9cb15b26df17539b0fc01df4cfa885a619816e1"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"fc52c39e370725e193211cb93cfbe9d241dd0ad6","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        api.nova.server_migrate(request, obj_id)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"class LiveMigrateInstance(tables.LinkAction):"},{"line_number":54,"context_line":"    name \u003d \"live_migrate\""},{"line_number":55,"context_line":"    verbose_name \u003d _(\"Live Migrate Instance\")"},{"line_number":56,"context_line":"    url \u003d \"horizon:admin:instances:live_migrate\""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BWvw%3D","line":53,"updated":"2013-11-27 01:20:05.000000000","message":"Isn\u0027t it better to use BatchAction rather than LinkAction because live migration takes time to complete?","commit_id":"c9cb15b26df17539b0fc01df4cfa885a619816e1"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"b4987252e8384caa508ec06049805925ed6d0c73","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        api.nova.server_migrate(request, obj_id)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"class LiveMigrateInstance(tables.LinkAction):"},{"line_number":54,"context_line":"    name \u003d \"live_migrate\""},{"line_number":55,"context_line":"    verbose_name \u003d _(\"Live Migrate Instance\")"},{"line_number":56,"context_line":"    url \u003d \"horizon:admin:instances:live_migrate\""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BWEg%3D","line":53,"in_reply_to":"AAAATn%2F%2BWSU%3D","updated":"2013-11-27 05:21:12.000000000","message":"Ah... I forgot to remove the comment. I agree with LinkAction fits here.","commit_id":"c9cb15b26df17539b0fc01df4cfa885a619816e1"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"6607e30eef624ba1e96a123abcab254736e7be87","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        api.nova.server_migrate(request, obj_id)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"class LiveMigrateInstance(tables.LinkAction):"},{"line_number":54,"context_line":"    name \u003d \"live_migrate\""},{"line_number":55,"context_line":"    verbose_name \u003d _(\"Live Migrate Instance\")"},{"line_number":56,"context_line":"    url \u003d \"horizon:admin:instances:live_migrate\""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BWSU%3D","line":53,"in_reply_to":"AAAATn%2F%2BWvw%3D","updated":"2013-11-27 03:33:13.000000000","message":"The BatchAction should not require user input on a per-object basis. So i think BatchAction may not fit here.","commit_id":"c9cb15b26df17539b0fc01df4cfa885a619816e1"},{"author":{"_account_id":4978,"name":"Julie Pichon","email":"jpichon@redhat.com","username":"jpichon"},"change_message_id":"1d01206115443de85d1cceab7a3a6d357b8161a3","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    def _get_link_url(self, project, step_slug):"},{"line_number":63,"context_line":"        base_url \u003d reverse(self.url, args\u003d[project.id])"},{"line_number":64,"context_line":"        param \u003d urlencode({\"step\": step_slug})"},{"line_number":65,"context_line":"        return \"?\".join([base_url, param])"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def allowed(self, request, instance):"},{"line_number":68,"context_line":"        return ((instance.status in project_tables.ACTIVE_STATES)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2BGJE%3D","line":65,"updated":"2013-12-02 16:34:34.000000000","message":"These 2 methods are not used - if I understand correctly, they would only be helpful to link to the correct tab if we had a workflow. Here, the link is correctly handled already via the \u0027url\u0027 attribute.","commit_id":"72945595b78118b34ec796cc8d612b728e457fe9"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"469750c2ae6f147107ae6db69bfa8876049a2ac8","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    def _get_link_url(self, project, step_slug):"},{"line_number":63,"context_line":"        base_url \u003d reverse(self.url, args\u003d[project.id])"},{"line_number":64,"context_line":"        param \u003d urlencode({\"step\": step_slug})"},{"line_number":65,"context_line":"        return \"?\".join([base_url, param])"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def allowed(self, request, instance):"},{"line_number":68,"context_line":"        return ((instance.status in project_tables.ACTIVE_STATES)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2BDyA%3D","line":65,"in_reply_to":"AAAATn%2F%2BGJE%3D","updated":"2013-12-02 23:31:25.000000000","message":"Done","commit_id":"72945595b78118b34ec796cc8d612b728e457fe9"}],"openstack_dashboard/dashboards/admin/instances/views.py":[{"author":{"_account_id":4978,"name":"Julie Pichon","email":"jpichon@redhat.com","username":"jpichon"},"change_message_id":"2a3b2725ce22c295e4b1a603e04ff52ccbe060f5","unresolved":false,"context_lines":[{"line_number":132,"context_line":"                redirect \u003d reverse(\"horizon:admin:instances:index\")"},{"line_number":133,"context_line":"                exceptions.handle(self.request,"},{"line_number":134,"context_line":"                    _(\u0027Unable to retrieve hypervisor information.\u0027),"},{"line_number":135,"context_line":"                    redirect\u003dredirect)"},{"line_number":136,"context_line":"        return self._hypervisors"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def get_object(self, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FBe4%3D","line":135,"updated":"2013-11-15 15:27:12.000000000","message":"This makes the indentation look a bit strange, how about defining the message in a separate variable beforehand like on line 145?","commit_id":"9985f5c43a51a3c0c57fd10839a206721a61f5a0"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"12b5f2e0e723fc454cc8d9f32825954c056f3d16","unresolved":false,"context_lines":[{"line_number":132,"context_line":"                redirect \u003d reverse(\"horizon:admin:instances:index\")"},{"line_number":133,"context_line":"                exceptions.handle(self.request,"},{"line_number":134,"context_line":"                    _(\u0027Unable to retrieve hypervisor information.\u0027),"},{"line_number":135,"context_line":"                    redirect\u003dredirect)"},{"line_number":136,"context_line":"        return self._hypervisors"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def get_object(self, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2B9tU%3D","line":135,"in_reply_to":"AAAATn%2F%2FBe4%3D","updated":"2013-11-18 03:29:17.000000000","message":"Done","commit_id":"9985f5c43a51a3c0c57fd10839a206721a61f5a0"},{"author":{"_account_id":4978,"name":"Julie Pichon","email":"jpichon@redhat.com","username":"jpichon"},"change_message_id":"2a3b2725ce22c295e4b1a603e04ff52ccbe060f5","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        _object \u003d self.get_object()"},{"line_number":152,"context_line":"        if _object:"},{"line_number":153,"context_line":"            initial.update({\u0027instance_id\u0027: self.kwargs[\u0027instance_id\u0027],"},{"line_number":154,"context_line":"                            \u0027old_hypervisor\u0027: getattr(_object,"},{"line_number":155,"context_line":"                                    \u0027OS-EXT-SRV-ATTR:host\u0027, \u0027\u0027),"},{"line_number":156,"context_line":"                            \u0027hypervisors\u0027: self.get_hypervisors()})"},{"line_number":157,"context_line":"        return initial"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FBd4%3D","line":154,"updated":"2013-11-15 15:27:12.000000000","message":"Likewise, how about defining this in a separate variable before the update, and avoid cutting the getattr() in the middle? (IMO it makes it harder to read).","commit_id":"9985f5c43a51a3c0c57fd10839a206721a61f5a0"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"12b5f2e0e723fc454cc8d9f32825954c056f3d16","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        _object \u003d self.get_object()"},{"line_number":152,"context_line":"        if _object:"},{"line_number":153,"context_line":"            initial.update({\u0027instance_id\u0027: self.kwargs[\u0027instance_id\u0027],"},{"line_number":154,"context_line":"                            \u0027old_hypervisor\u0027: getattr(_object,"},{"line_number":155,"context_line":"                                    \u0027OS-EXT-SRV-ATTR:host\u0027, \u0027\u0027),"},{"line_number":156,"context_line":"                            \u0027hypervisors\u0027: self.get_hypervisors()})"},{"line_number":157,"context_line":"        return initial"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2B9tM%3D","line":154,"in_reply_to":"AAAATn%2F%2FBd4%3D","updated":"2013-11-18 03:29:17.000000000","message":"Done","commit_id":"9985f5c43a51a3c0c57fd10839a206721a61f5a0"}],"openstack_dashboard/dashboards/admin/instances/workflows.py":[{"author":{"_account_id":4978,"name":"Julie Pichon","email":"jpichon@redhat.com","username":"jpichon"},"change_message_id":"2a3b2725ce22c295e4b1a603e04ff52ccbe060f5","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class LiveMigrateAction(workflows.Action):"},{"line_number":28,"context_line":"    old_hypervisor \u003d forms.CharField(label\u003d_(\"Old Hypervisor\"),"},{"line_number":29,"context_line":"                                 required\u003dFalse,"},{"line_number":30,"context_line":"                                 widget\u003dforms.TextInput("},{"line_number":31,"context_line":"                                     attrs\u003d{\u0027readonly\u0027: \u0027readonly\u0027}))"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FBcM%3D","line":28,"updated":"2013-11-15 15:27:12.000000000","message":"I think \"Current hypervisor\" would be more accurate, it\u0027s not old yet :-)","commit_id":"9985f5c43a51a3c0c57fd10839a206721a61f5a0"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"12b5f2e0e723fc454cc8d9f32825954c056f3d16","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class LiveMigrateAction(workflows.Action):"},{"line_number":28,"context_line":"    old_hypervisor \u003d forms.CharField(label\u003d_(\"Old Hypervisor\"),"},{"line_number":29,"context_line":"                                 required\u003dFalse,"},{"line_number":30,"context_line":"                                 widget\u003dforms.TextInput("},{"line_number":31,"context_line":"                                     attrs\u003d{\u0027readonly\u0027: \u0027readonly\u0027}))"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2B9tI%3D","line":28,"in_reply_to":"AAAATn%2F%2FBcM%3D","updated":"2013-11-18 03:29:17.000000000","message":"Done","commit_id":"9985f5c43a51a3c0c57fd10839a206721a61f5a0"},{"author":{"_account_id":4978,"name":"Julie Pichon","email":"jpichon@redhat.com","username":"jpichon"},"change_message_id":"2a3b2725ce22c295e4b1a603e04ff52ccbe060f5","unresolved":false,"context_lines":[{"line_number":27,"context_line":"class LiveMigrateAction(workflows.Action):"},{"line_number":28,"context_line":"    old_hypervisor \u003d forms.CharField(label\u003d_(\"Old Hypervisor\"),"},{"line_number":29,"context_line":"                                 required\u003dFalse,"},{"line_number":30,"context_line":"                                 widget\u003dforms.TextInput("},{"line_number":31,"context_line":"                                     attrs\u003d{\u0027readonly\u0027: \u0027readonly\u0027}))"},{"line_number":32,"context_line":"    hypervisor \u003d forms.ChoiceField(label\u003d_(\"New Hypervisor\"),"},{"line_number":33,"context_line":"                        required\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FBdY%3D","line":30,"updated":"2013-11-15 15:27:12.000000000","message":"The indentation is a bit funky, ideally all related arguments should live at the same indentation level.","commit_id":"9985f5c43a51a3c0c57fd10839a206721a61f5a0"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"12b5f2e0e723fc454cc8d9f32825954c056f3d16","unresolved":false,"context_lines":[{"line_number":27,"context_line":"class LiveMigrateAction(workflows.Action):"},{"line_number":28,"context_line":"    old_hypervisor \u003d forms.CharField(label\u003d_(\"Old Hypervisor\"),"},{"line_number":29,"context_line":"                                 required\u003dFalse,"},{"line_number":30,"context_line":"                                 widget\u003dforms.TextInput("},{"line_number":31,"context_line":"                                     attrs\u003d{\u0027readonly\u0027: \u0027readonly\u0027}))"},{"line_number":32,"context_line":"    hypervisor \u003d forms.ChoiceField(label\u003d_(\"New Hypervisor\"),"},{"line_number":33,"context_line":"                        required\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2B9tE%3D","line":30,"in_reply_to":"AAAATn%2F%2FBdY%3D","updated":"2013-11-18 03:29:17.000000000","message":"Done","commit_id":"9985f5c43a51a3c0c57fd10839a206721a61f5a0"},{"author":{"_account_id":4978,"name":"Julie Pichon","email":"jpichon@redhat.com","username":"jpichon"},"change_message_id":"2a3b2725ce22c295e4b1a603e04ff52ccbe060f5","unresolved":false,"context_lines":[{"line_number":31,"context_line":"                                     attrs\u003d{\u0027readonly\u0027: \u0027readonly\u0027}))"},{"line_number":32,"context_line":"    hypervisor \u003d forms.ChoiceField(label\u003d_(\"New Hypervisor\"),"},{"line_number":33,"context_line":"                        required\u003dTrue,"},{"line_number":34,"context_line":"                        help_text\u003d_(\"Choose the Hypervisor to migrate.\"))"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    class Meta:"},{"line_number":37,"context_line":"        name \u003d _(\"Live Migrate\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FBdU%3D","line":34,"updated":"2013-11-15 15:27:12.000000000","message":"Likewise.\n\nAdditionally, I think there\u0027s a missing \u0027to\u0027 at the end of the help_text - \"Choose the hypervisor to migrate to.\"","commit_id":"9985f5c43a51a3c0c57fd10839a206721a61f5a0"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"12b5f2e0e723fc454cc8d9f32825954c056f3d16","unresolved":false,"context_lines":[{"line_number":31,"context_line":"                                     attrs\u003d{\u0027readonly\u0027: \u0027readonly\u0027}))"},{"line_number":32,"context_line":"    hypervisor \u003d forms.ChoiceField(label\u003d_(\"New Hypervisor\"),"},{"line_number":33,"context_line":"                        required\u003dTrue,"},{"line_number":34,"context_line":"                        help_text\u003d_(\"Choose the Hypervisor to migrate.\"))"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    class Meta:"},{"line_number":37,"context_line":"        name \u003d _(\"Live Migrate\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2B9tA%3D","line":34,"in_reply_to":"AAAATn%2F%2FBdU%3D","updated":"2013-11-18 03:29:17.000000000","message":"Done","commit_id":"9985f5c43a51a3c0c57fd10839a206721a61f5a0"},{"author":{"_account_id":4978,"name":"Julie Pichon","email":"jpichon@redhat.com","username":"jpichon"},"change_message_id":"2a3b2725ce22c295e4b1a603e04ff52ccbe060f5","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        hypervisor \u003d cleaned_data.get(\u0027hypervisor\u0027, None)"},{"line_number":45,"context_line":"        if hypervisor is None or hypervisor \u003d\u003d cleaned_data[\u0027old_hypervisor\u0027]:"},{"line_number":46,"context_line":"            raise forms.ValidationError(_(\u0027Please choose a new hypervisor that\u0027"},{"line_number":47,"context_line":"                                          \u0027 can not be same as the old one.\u0027))"},{"line_number":48,"context_line":"        return cleaned_data"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def populate_hypervisor_choices(self, request, context):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FBc4%3D","line":47,"updated":"2013-11-15 15:27:12.000000000","message":"The message reads a bit awkwardly to me - I\u0027m not a native speaker but would like to suggest something like: \"The new hypervisor cannot be the same as the old one. Please select a new hypervisor.\"","commit_id":"9985f5c43a51a3c0c57fd10839a206721a61f5a0"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"12b5f2e0e723fc454cc8d9f32825954c056f3d16","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        hypervisor \u003d cleaned_data.get(\u0027hypervisor\u0027, None)"},{"line_number":45,"context_line":"        if hypervisor is None or hypervisor \u003d\u003d cleaned_data[\u0027old_hypervisor\u0027]:"},{"line_number":46,"context_line":"            raise forms.ValidationError(_(\u0027Please choose a new hypervisor that\u0027"},{"line_number":47,"context_line":"                                          \u0027 can not be same as the old one.\u0027))"},{"line_number":48,"context_line":"        return cleaned_data"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def populate_hypervisor_choices(self, request, context):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2B9s8%3D","line":47,"in_reply_to":"AAAATn%2F%2FBc4%3D","updated":"2013-11-18 03:29:17.000000000","message":"Done","commit_id":"9985f5c43a51a3c0c57fd10839a206721a61f5a0"},{"author":{"_account_id":4978,"name":"Julie Pichon","email":"jpichon@redhat.com","username":"jpichon"},"change_message_id":"2a3b2725ce22c295e4b1a603e04ff52ccbe060f5","unresolved":false,"context_lines":[{"line_number":69,"context_line":"    slug \u003d \"live_migrate\""},{"line_number":70,"context_line":"    name \u003d _(\"Live Migrate\")"},{"line_number":71,"context_line":"    finalize_button_name \u003d _(\"Live Migrate Instance\")"},{"line_number":72,"context_line":"    success_message \u003d _(\u0027Instance is preparing to live migrated \u0027"},{"line_number":73,"context_line":"                        \u0027to hypervisor \"%s\".\u0027)"},{"line_number":74,"context_line":"    failure_message \u003d _(\u0027Failed to live migrate instance to hypervisor \"%s\".\u0027)"},{"line_number":75,"context_line":"    success_url \u003d \"horizon:admin:instances:index\""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FBbI%3D","line":72,"updated":"2013-11-15 15:27:12.000000000","message":"\"The instance\", \"to live migrate\"\n\nOr maybe: \"The instance is preparing the live migration to hypervisor \"%s\"\"?","commit_id":"9985f5c43a51a3c0c57fd10839a206721a61f5a0"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"12b5f2e0e723fc454cc8d9f32825954c056f3d16","unresolved":false,"context_lines":[{"line_number":69,"context_line":"    slug \u003d \"live_migrate\""},{"line_number":70,"context_line":"    name \u003d _(\"Live Migrate\")"},{"line_number":71,"context_line":"    finalize_button_name \u003d _(\"Live Migrate Instance\")"},{"line_number":72,"context_line":"    success_message \u003d _(\u0027Instance is preparing to live migrated \u0027"},{"line_number":73,"context_line":"                        \u0027to hypervisor \"%s\".\u0027)"},{"line_number":74,"context_line":"    failure_message \u003d _(\u0027Failed to live migrate instance to hypervisor \"%s\".\u0027)"},{"line_number":75,"context_line":"    success_url \u003d \"horizon:admin:instances:index\""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2B9s4%3D","line":72,"in_reply_to":"AAAATn%2F%2FBbI%3D","updated":"2013-11-18 03:29:17.000000000","message":"Done","commit_id":"9985f5c43a51a3c0c57fd10839a206721a61f5a0"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"fc52c39e370725e193211cb93cfbe9d241dd0ad6","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from openstack_dashboard import api"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class LiveMigrateAction(workflows.Action):"},{"line_number":28,"context_line":"    current_host \u003d forms.CharField(label\u003d_(\"Current Host\"),"},{"line_number":29,"context_line":"                                   required\u003dFalse,"},{"line_number":30,"context_line":"                                   widget\u003dforms.TextInput("}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BWpY%3D","line":27,"updated":"2013-11-27 01:20:05.000000000","message":"Why do we need to implement this class as a workflow instead of a form? I believe a form fits this feature.","commit_id":"c9cb15b26df17539b0fc01df4cfa885a619816e1"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"946a8df1665b6b6bc7b8b2ff458d1a99d86dd878","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from openstack_dashboard import api"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class LiveMigrateAction(workflows.Action):"},{"line_number":28,"context_line":"    current_host \u003d forms.CharField(label\u003d_(\"Current Host\"),"},{"line_number":29,"context_line":"                                   required\u003dFalse,"},{"line_number":30,"context_line":"                                   widget\u003dforms.TextInput("}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BVsY%3D","line":27,"in_reply_to":"AAAATn%2F%2BWEE%3D","updated":"2013-11-27 07:35:13.000000000","message":"Seems reasonable, i will use form instead.","commit_id":"c9cb15b26df17539b0fc01df4cfa885a619816e1"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"b4987252e8384caa508ec06049805925ed6d0c73","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from openstack_dashboard import api"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class LiveMigrateAction(workflows.Action):"},{"line_number":28,"context_line":"    current_host \u003d forms.CharField(label\u003d_(\"Current Host\"),"},{"line_number":29,"context_line":"                                   required\u003dFalse,"},{"line_number":30,"context_line":"                                   widget\u003dforms.TextInput("}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BWEE%3D","line":27,"in_reply_to":"AAAATn%2F%2BWRA%3D","updated":"2013-11-27 05:21:12.000000000","message":"From user visibility point, in case of workflow with a single tab, we have two duplicate title (\"Live Migrate\" in this case). I really feels it strange and meaningless information. This is the reason I suggest a form in this case. Thought?","commit_id":"c9cb15b26df17539b0fc01df4cfa885a619816e1"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"6607e30eef624ba1e96a123abcab254736e7be87","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from openstack_dashboard import api"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class LiveMigrateAction(workflows.Action):"},{"line_number":28,"context_line":"    current_host \u003d forms.CharField(label\u003d_(\"Current Host\"),"},{"line_number":29,"context_line":"                                   required\u003dFalse,"},{"line_number":30,"context_line":"                                   widget\u003dforms.TextInput("}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BWRA%3D","line":27,"in_reply_to":"AAAATn%2F%2BWpY%3D","updated":"2013-11-27 03:33:13.000000000","message":"The form needs to add the related html files, so i did not use form. And i didn\u0027t see any other differences between form and workflow.","commit_id":"c9cb15b26df17539b0fc01df4cfa885a619816e1"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"fc52c39e370725e193211cb93cfbe9d241dd0ad6","unresolved":false,"context_lines":[{"line_number":31,"context_line":"                                   attrs\u003d{\u0027readonly\u0027: \u0027readonly\u0027}))"},{"line_number":32,"context_line":"    host \u003d forms.ChoiceField(label\u003d_(\"New Host\"),"},{"line_number":33,"context_line":"                             required\u003dTrue,"},{"line_number":34,"context_line":"                             help_text\u003d_(\"Choose the Host to migrate to.\"))"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    class Meta:"},{"line_number":37,"context_line":"        name \u003d _(\"Live Migrate\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BWp0%3D","line":34,"updated":"2013-11-27 01:20:05.000000000","message":"the host -\u003e a host","commit_id":"c9cb15b26df17539b0fc01df4cfa885a619816e1"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"6607e30eef624ba1e96a123abcab254736e7be87","unresolved":false,"context_lines":[{"line_number":31,"context_line":"                                   attrs\u003d{\u0027readonly\u0027: \u0027readonly\u0027}))"},{"line_number":32,"context_line":"    host \u003d forms.ChoiceField(label\u003d_(\"New Host\"),"},{"line_number":33,"context_line":"                             required\u003dTrue,"},{"line_number":34,"context_line":"                             help_text\u003d_(\"Choose the Host to migrate to.\"))"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    class Meta:"},{"line_number":37,"context_line":"        name \u003d _(\"Live Migrate\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BWQ8%3D","line":34,"in_reply_to":"AAAATn%2F%2BWp0%3D","updated":"2013-11-27 03:33:13.000000000","message":"Done","commit_id":"c9cb15b26df17539b0fc01df4cfa885a619816e1"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"fc52c39e370725e193211cb93cfbe9d241dd0ad6","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    class Meta:"},{"line_number":37,"context_line":"        name \u003d _(\"Live Migrate\")"},{"line_number":38,"context_line":"        slug \u003d \u0027live_migrate\u0027"},{"line_number":39,"context_line":"        help_text \u003d _(\"From here you can live migrate a instance \""},{"line_number":40,"context_line":"                      \"to a specific host.\")"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def clean(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BWtM%3D","line":39,"updated":"2013-11-27 01:20:05.000000000","message":"\"an instance\"","commit_id":"c9cb15b26df17539b0fc01df4cfa885a619816e1"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"6607e30eef624ba1e96a123abcab254736e7be87","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    class Meta:"},{"line_number":37,"context_line":"        name \u003d _(\"Live Migrate\")"},{"line_number":38,"context_line":"        slug \u003d \u0027live_migrate\u0027"},{"line_number":39,"context_line":"        help_text \u003d _(\"From here you can live migrate a instance \""},{"line_number":40,"context_line":"                      \"to a specific host.\")"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def clean(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BWQ4%3D","line":39,"in_reply_to":"AAAATn%2F%2BWtM%3D","updated":"2013-11-27 03:33:13.000000000","message":"Done","commit_id":"c9cb15b26df17539b0fc01df4cfa885a619816e1"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"fc52c39e370725e193211cb93cfbe9d241dd0ad6","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def clean(self):"},{"line_number":43,"context_line":"        cleaned_data \u003d super(LiveMigrateAction, self).clean()"},{"line_number":44,"context_line":"        host \u003d cleaned_data.get(\u0027host\u0027, None)"},{"line_number":45,"context_line":"        if host is None or host \u003d\u003d cleaned_data[\u0027current_host\u0027]:"},{"line_number":46,"context_line":"            msg \u003d _(\u0027The new host cannot be the same as the old one.\u0027"},{"line_number":47,"context_line":"                    \u0027 Please select a new host.\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BWr8%3D","line":44,"updated":"2013-11-27 01:20:05.000000000","message":"The default value of get() is None. Please consider:\n\n  cleaned_data.get(\u0027host\u0027)","commit_id":"c9cb15b26df17539b0fc01df4cfa885a619816e1"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"6607e30eef624ba1e96a123abcab254736e7be87","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def clean(self):"},{"line_number":43,"context_line":"        cleaned_data \u003d super(LiveMigrateAction, self).clean()"},{"line_number":44,"context_line":"        host \u003d cleaned_data.get(\u0027host\u0027, None)"},{"line_number":45,"context_line":"        if host is None or host \u003d\u003d cleaned_data[\u0027current_host\u0027]:"},{"line_number":46,"context_line":"            msg \u003d _(\u0027The new host cannot be the same as the old one.\u0027"},{"line_number":47,"context_line":"                    \u0027 Please select a new host.\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BWQw%3D","line":44,"in_reply_to":"AAAATn%2F%2BWr8%3D","updated":"2013-11-27 03:33:13.000000000","message":"Done","commit_id":"c9cb15b26df17539b0fc01df4cfa885a619816e1"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"fc52c39e370725e193211cb93cfbe9d241dd0ad6","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        hosts \u003d context.get(\u0027hosts\u0027)"},{"line_number":53,"context_line":"        host_list \u003d [(host.hypervisor_hostname,"},{"line_number":54,"context_line":"                      host.hypervisor_hostname)"},{"line_number":55,"context_line":"                     for host in hosts]"},{"line_number":56,"context_line":"        if host_list:"},{"line_number":57,"context_line":"            host_list.insert(0, (\"\", _(\"Select an New Host\")))"},{"line_number":58,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BWq0%3D","line":55,"updated":"2013-11-27 01:20:05.000000000","message":"I think it is better to exclude the current host from host_list. It is more user-friendly.","commit_id":"c9cb15b26df17539b0fc01df4cfa885a619816e1"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"6607e30eef624ba1e96a123abcab254736e7be87","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        hosts \u003d context.get(\u0027hosts\u0027)"},{"line_number":53,"context_line":"        host_list \u003d [(host.hypervisor_hostname,"},{"line_number":54,"context_line":"                      host.hypervisor_hostname)"},{"line_number":55,"context_line":"                     for host in hosts]"},{"line_number":56,"context_line":"        if host_list:"},{"line_number":57,"context_line":"            host_list.insert(0, (\"\", _(\"Select an New Host\")))"},{"line_number":58,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BWQs%3D","line":55,"in_reply_to":"AAAATn%2F%2BWq0%3D","updated":"2013-11-27 03:33:13.000000000","message":"Good point. thanks.","commit_id":"c9cb15b26df17539b0fc01df4cfa885a619816e1"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"fc52c39e370725e193211cb93cfbe9d241dd0ad6","unresolved":false,"context_lines":[{"line_number":54,"context_line":"                      host.hypervisor_hostname)"},{"line_number":55,"context_line":"                     for host in hosts]"},{"line_number":56,"context_line":"        if host_list:"},{"line_number":57,"context_line":"            host_list.insert(0, (\"\", _(\"Select an New Host\")))"},{"line_number":58,"context_line":"        else:"},{"line_number":59,"context_line":"            host_list.insert(0, (\"\", _(\"No Hosts available.\")))"},{"line_number":60,"context_line":"        return sorted(host_list)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BWp8%3D","line":57,"updated":"2013-11-27 01:20:05.000000000","message":"I don\u0027t think we need to capitalize each word.\n\n  \"Select a new host\"","commit_id":"c9cb15b26df17539b0fc01df4cfa885a619816e1"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"6607e30eef624ba1e96a123abcab254736e7be87","unresolved":false,"context_lines":[{"line_number":54,"context_line":"                      host.hypervisor_hostname)"},{"line_number":55,"context_line":"                     for host in hosts]"},{"line_number":56,"context_line":"        if host_list:"},{"line_number":57,"context_line":"            host_list.insert(0, (\"\", _(\"Select an New Host\")))"},{"line_number":58,"context_line":"        else:"},{"line_number":59,"context_line":"            host_list.insert(0, (\"\", _(\"No Hosts available.\")))"},{"line_number":60,"context_line":"        return sorted(host_list)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BWQk%3D","line":57,"in_reply_to":"AAAATn%2F%2BWp8%3D","updated":"2013-11-27 03:33:13.000000000","message":"Done","commit_id":"c9cb15b26df17539b0fc01df4cfa885a619816e1"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"fc52c39e370725e193211cb93cfbe9d241dd0ad6","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        if host_list:"},{"line_number":57,"context_line":"            host_list.insert(0, (\"\", _(\"Select an New Host\")))"},{"line_number":58,"context_line":"        else:"},{"line_number":59,"context_line":"            host_list.insert(0, (\"\", _(\"No Hosts available.\")))"},{"line_number":60,"context_line":"        return sorted(host_list)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BWqE%3D","line":59,"updated":"2013-11-27 01:20:05.000000000","message":"If host_list does not contain the current host (as commented above), this help should be \"No other hosts available\".","commit_id":"c9cb15b26df17539b0fc01df4cfa885a619816e1"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"6607e30eef624ba1e96a123abcab254736e7be87","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        if host_list:"},{"line_number":57,"context_line":"            host_list.insert(0, (\"\", _(\"Select an New Host\")))"},{"line_number":58,"context_line":"        else:"},{"line_number":59,"context_line":"            host_list.insert(0, (\"\", _(\"No Hosts available.\")))"},{"line_number":60,"context_line":"        return sorted(host_list)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BWQg%3D","line":59,"in_reply_to":"AAAATn%2F%2BWqE%3D","updated":"2013-11-27 03:33:13.000000000","message":"Done","commit_id":"c9cb15b26df17539b0fc01df4cfa885a619816e1"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"fc52c39e370725e193211cb93cfbe9d241dd0ad6","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        try:"},{"line_number":84,"context_line":"            api.nova.server_live_migrate(request,"},{"line_number":85,"context_line":"                                         data[\u0027instance_id\u0027],"},{"line_number":86,"context_line":"                                         data[\u0027host\u0027])"},{"line_number":87,"context_line":"        except Exception:"},{"line_number":88,"context_line":"            exceptions.handle(request, ignore\u003dTrue)"},{"line_number":89,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BWpA%3D","line":86,"updated":"2013-11-27 01:20:05.000000000","message":"Cannot block_migration and over_commit flag be specified?","commit_id":"c9cb15b26df17539b0fc01df4cfa885a619816e1"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"6607e30eef624ba1e96a123abcab254736e7be87","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        try:"},{"line_number":84,"context_line":"            api.nova.server_live_migrate(request,"},{"line_number":85,"context_line":"                                         data[\u0027instance_id\u0027],"},{"line_number":86,"context_line":"                                         data[\u0027host\u0027])"},{"line_number":87,"context_line":"        except Exception:"},{"line_number":88,"context_line":"            exceptions.handle(request, ignore\u003dTrue)"},{"line_number":89,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BWQc%3D","line":86,"in_reply_to":"AAAATn%2F%2BWpA%3D","updated":"2013-11-27 03:33:13.000000000","message":"Done","commit_id":"c9cb15b26df17539b0fc01df4cfa885a619816e1"}]}
