)]}'
{"horizon/horizon/dashboards/nova/images_and_snapshots/images/views.py":[{"author":{"_account_id":1816,"name":"Gabriel Hurley","email":"gabriel.hurley@nebula.com","username":"gabriel-hurley"},"change_message_id":"22c70a3aeee3d2b8fd809c71395d6134a9fa5874","unresolved":false,"context_lines":[{"line_number":112,"context_line":"    def volume_list(self):"},{"line_number":113,"context_line":"        try:"},{"line_number":114,"context_line":"            volumes \u003d [v for v in api.volume_list(self.request) \\"},{"line_number":115,"context_line":"                    if v.status \u003d\u003d \"available\"]"},{"line_number":116,"context_line":"            volume_sel \u003d [(v.id, (\"%s (%s GB)\" % (v.displayName, v.size))) \\"},{"line_number":117,"context_line":"                    for v in volumes]"},{"line_number":118,"context_line":"            volume_sel.insert(0, (\"\", \"Select Volume\"))"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAD3%2F%2F7qE%3D","line":115,"updated":"2012-01-22 19:48:41.000000000","message":"I\u0027m thinking \"magic strings\" like this should be defined as globals someplace like the horizon.api.[service] file, e.g.:\n\n[horizon.api.nova]\nVOLUME_OK \u003d (\"available\", \"in-use\")  # not wedded to the var name\n...\n\n[views.py]\nfrom horizon.api import nova\n...\nif v.status in nova.VOLUME_OK:\n    foo\n\n\nThat way if status names get added/changed we don\u0027t have to go altering them everywhere.","commit_id":"f9382686e6ad6f748f40999d4a3651d4ab82657e"},{"author":{"_account_id":1816,"name":"Gabriel Hurley","email":"gabriel.hurley@nebula.com","username":"gabriel-hurley"},"change_message_id":"22c70a3aeee3d2b8fd809c71395d6134a9fa5874","unresolved":false,"context_lines":[{"line_number":120,"context_line":"            exceptions.handle(self.request,"},{"line_number":121,"context_line":"                              _(\u0027Unable to retrieve list of volumes\u0027))"},{"line_number":122,"context_line":"            volume_sel \u003d []"},{"line_number":123,"context_line":"        return volume_sel"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"class UpdateView(forms.ModalFormView):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAD3%2F%2F7qA%3D","line":123,"updated":"2012-01-22 19:48:41.000000000","message":"If there are no volumes available, let\u0027s change the message for the default option from \"Select Volume\" to \"No volumes available.\"","commit_id":"f9382686e6ad6f748f40999d4a3651d4ab82657e"},{"author":{"_account_id":543,"name":"Tres Henry","username":"tres"},"change_message_id":"1dcd42358550eba79850bbd17cde18d0b7c8b8e5","unresolved":false,"context_lines":[{"line_number":120,"context_line":"            exceptions.handle(self.request,"},{"line_number":121,"context_line":"                              _(\u0027Unable to retrieve list of volumes\u0027))"},{"line_number":122,"context_line":"            volume_sel \u003d []"},{"line_number":123,"context_line":"        return volume_sel"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"class UpdateView(forms.ModalFormView):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEH%2F%2F%2FXg%3D","line":123,"in_reply_to":"AAAAD3%2F%2F7qA%3D","updated":"2012-01-24 01:24:05.000000000","message":"If there are no volumes available this UI will be hidden.","commit_id":"f9382686e6ad6f748f40999d4a3651d4ab82657e"}]}
