)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ef5e8b2a15d6b0138f00ee8161eaf11b85b2a8f0","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Adding image multiple location support"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Image now support multiple locations within its metadata and it maybe"},{"line_number":10,"context_line":"stored more then one backend storage. Nova should add a layer to"},{"line_number":11,"context_line":"transparent handle image preparing and removing for an instance by the"},{"line_number":12,"context_line":"best approach/location, and it should allow administrator to configure"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"AAAATH%2F%2FfwQ%3D","line":9,"updated":"2013-10-15 13:16:02.000000000","message":"Image \u003d\u003e Images\n\nmaybe \u003d\u003e may be","commit_id":"084f927506337c4007a80c0156790155668c0f78"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ef5e8b2a15d6b0138f00ee8161eaf11b85b2a8f0","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Adding image multiple location support"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Image now support multiple locations within its metadata and it maybe"},{"line_number":10,"context_line":"stored more then one backend storage. Nova should add a layer to"},{"line_number":11,"context_line":"transparent handle image preparing and removing for an instance by the"},{"line_number":12,"context_line":"best approach/location, and it should allow administrator to configure"},{"line_number":13,"context_line":"the image handler pipline with the order who preferred to the layer."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"AAAATH%2F%2FfwE%3D","line":10,"updated":"2013-10-15 13:16:02.000000000","message":"stored more then one \u003d\u003e stored on more than one","commit_id":"084f927506337c4007a80c0156790155668c0f78"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ef5e8b2a15d6b0138f00ee8161eaf11b85b2a8f0","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Image now support multiple locations within its metadata and it maybe"},{"line_number":10,"context_line":"stored more then one backend storage. Nova should add a layer to"},{"line_number":11,"context_line":"transparent handle image preparing and removing for an instance by the"},{"line_number":12,"context_line":"best approach/location, and it should allow administrator to configure"},{"line_number":13,"context_line":"the image handler pipline with the order who preferred to the layer."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"AAAATH%2F%2Ffv8%3D","line":11,"updated":"2013-10-15 13:16:02.000000000","message":"transparent \u003d\u003e transparently","commit_id":"084f927506337c4007a80c0156790155668c0f78"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ef5e8b2a15d6b0138f00ee8161eaf11b85b2a8f0","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Image now support multiple locations within its metadata and it maybe"},{"line_number":10,"context_line":"stored more then one backend storage. Nova should add a layer to"},{"line_number":11,"context_line":"transparent handle image preparing and removing for an instance by the"},{"line_number":12,"context_line":"best approach/location, and it should allow administrator to configure"},{"line_number":13,"context_line":"the image handler pipline with the order who preferred to the layer."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Also, base on this structure we could implement particular sub-class in"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"AAAATH%2F%2Ffvo%3D","line":12,"updated":"2013-10-15 13:16:02.000000000","message":"administrator \u003d\u003e administrators","commit_id":"084f927506337c4007a80c0156790155668c0f78"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ef5e8b2a15d6b0138f00ee8161eaf11b85b2a8f0","unresolved":false,"context_lines":[{"line_number":10,"context_line":"stored more then one backend storage. Nova should add a layer to"},{"line_number":11,"context_line":"transparent handle image preparing and removing for an instance by the"},{"line_number":12,"context_line":"best approach/location, and it should allow administrator to configure"},{"line_number":13,"context_line":"the image handler pipline with the order who preferred to the layer."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Also, base on this structure we could implement particular sub-class in"},{"line_number":16,"context_line":"relevant hypervisor layer with more advanced functions, such as COW"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"AAAATH%2F%2Ffvc%3D","line":13,"updated":"2013-10-15 13:16:02.000000000","message":"pipline \u003d\u003e pipelen","commit_id":"084f927506337c4007a80c0156790155668c0f78"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ef5e8b2a15d6b0138f00ee8161eaf11b85b2a8f0","unresolved":false,"context_lines":[{"line_number":12,"context_line":"best approach/location, and it should allow administrator to configure"},{"line_number":13,"context_line":"the image handler pipline with the order who preferred to the layer."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Also, base on this structure we could implement particular sub-class in"},{"line_number":16,"context_line":"relevant hypervisor layer with more advanced functions, such as COW"},{"line_number":17,"context_line":"making, snapshot capturing and etc. in feature."},{"line_number":18,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"AAAATH%2F%2FfvU%3D","line":15,"updated":"2013-10-15 13:16:02.000000000","message":"base \u003d\u003e based","commit_id":"084f927506337c4007a80c0156790155668c0f78"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"1977eba9dd09827fa35ad0af98a5c1ea688d62b5","unresolved":false,"context_lines":[{"line_number":12,"context_line":"best approach/location, and it should allow administrator to configure"},{"line_number":13,"context_line":"the image handler pipline with the order who preferred to the layer."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Also, base on this structure we could implement particular sub-class in"},{"line_number":16,"context_line":"relevant hypervisor layer with more advanced functions, such as COW"},{"line_number":17,"context_line":"making, snapshot capturing and etc. in feature."},{"line_number":18,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"AAAATH%2F%2FcBE%3D","line":15,"in_reply_to":"AAAATH%2F%2FfvU%3D","updated":"2013-10-16 07:25:54.000000000","message":"Thank you very much for your above great suggestions garyk!","commit_id":"084f927506337c4007a80c0156790155668c0f78"},{"author":{"_account_id":7040,"name":"GuoHui LIu","email":"liuguohui@gmail.com","username":"guohliu"},"change_message_id":"f07975f1a22c914e14f57aa3d50c08ebf4c28191","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Adding image multiple location support"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Images now support multiple locations within its metadata and it may be"},{"line_number":10,"context_line":"stored on more then one backend storage. Nova should add a layer to"},{"line_number":11,"context_line":"transparently handle image preparing and removing for an instance by the"},{"line_number":12,"context_line":"best approach/location, and it should allow administrators to configure"},{"line_number":13,"context_line":"the image handler pipelen with the order who preferred to the layer."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"AAAATX%2F%2F9pQ%3D","line":10,"updated":"2013-10-23 15:49:31.000000000","message":"s/then/than","commit_id":"3112359b904030d47a6e76a1341585251beb52b1"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"fa0a692aa2214ebdd0f9a997b007c1e6e75d6ed7","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Adding image multiple location support"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Images now support multiple locations within its metadata and it may be"},{"line_number":10,"context_line":"stored on more then one backend storage. Nova should add a layer to"},{"line_number":11,"context_line":"transparently handle image preparing and removing for an instance by the"},{"line_number":12,"context_line":"best approach/location, and it should allow administrators to configure"},{"line_number":13,"context_line":"the image handler pipelen with the order who preferred to the layer."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"AAAATX%2F%2F9e8%3D","line":10,"in_reply_to":"AAAATX%2F%2F9pQ%3D","updated":"2013-10-23 16:30:04.000000000","message":"Done","commit_id":"3112359b904030d47a6e76a1341585251beb52b1"},{"author":{"_account_id":7040,"name":"GuoHui LIu","email":"liuguohui@gmail.com","username":"guohliu"},"change_message_id":"f07975f1a22c914e14f57aa3d50c08ebf4c28191","unresolved":false,"context_lines":[{"line_number":10,"context_line":"stored on more then one backend storage. Nova should add a layer to"},{"line_number":11,"context_line":"transparently handle image preparing and removing for an instance by the"},{"line_number":12,"context_line":"best approach/location, and it should allow administrators to configure"},{"line_number":13,"context_line":"the image handler pipelen with the order who preferred to the layer."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Also, based on this structure we could implement particular sub-class in"},{"line_number":16,"context_line":"relevant hypervisor layer with more advanced functions, such as CoW"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"AAAATX%2F%2F9oo%3D","line":13,"updated":"2013-10-23 15:49:31.000000000","message":"s/pipelen/pipeline","commit_id":"3112359b904030d47a6e76a1341585251beb52b1"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"fa0a692aa2214ebdd0f9a997b007c1e6e75d6ed7","unresolved":false,"context_lines":[{"line_number":10,"context_line":"stored on more then one backend storage. Nova should add a layer to"},{"line_number":11,"context_line":"transparently handle image preparing and removing for an instance by the"},{"line_number":12,"context_line":"best approach/location, and it should allow administrators to configure"},{"line_number":13,"context_line":"the image handler pipelen with the order who preferred to the layer."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Also, based on this structure we could implement particular sub-class in"},{"line_number":16,"context_line":"relevant hypervisor layer with more advanced functions, such as CoW"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"AAAATX%2F%2F9e4%3D","line":13,"in_reply_to":"AAAATX%2F%2F9oo%3D","updated":"2013-10-23 16:30:04.000000000","message":"Done","commit_id":"3112359b904030d47a6e76a1341585251beb52b1"},{"author":{"_account_id":7040,"name":"GuoHui LIu","email":"liuguohui@gmail.com","username":"guohliu"},"change_message_id":"f07975f1a22c914e14f57aa3d50c08ebf4c28191","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Also, based on this structure we could implement particular sub-class in"},{"line_number":16,"context_line":"relevant hypervisor layer with more advanced functions, such as CoW"},{"line_number":17,"context_line":"making, snapshot capturing and etc. in feature."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Implement bp: image-multiple-location"},{"line_number":20,"context_line":"docimpact"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"AAAATX%2F%2F9pU%3D","line":17,"updated":"2013-10-23 15:49:31.000000000","message":"s/feature/future","commit_id":"3112359b904030d47a6e76a1341585251beb52b1"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"fa0a692aa2214ebdd0f9a997b007c1e6e75d6ed7","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Also, based on this structure we could implement particular sub-class in"},{"line_number":16,"context_line":"relevant hypervisor layer with more advanced functions, such as CoW"},{"line_number":17,"context_line":"making, snapshot capturing and etc. in feature."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Implement bp: image-multiple-location"},{"line_number":20,"context_line":"docimpact"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"AAAATX%2F%2F9ew%3D","line":17,"in_reply_to":"AAAATX%2F%2F9pU%3D","updated":"2013-10-23 16:30:04.000000000","message":"Done","commit_id":"3112359b904030d47a6e76a1341585251beb52b1"},{"author":{"_account_id":7040,"name":"GuoHui LIu","email":"liuguohui@gmail.com","username":"guohliu"},"change_message_id":"f07975f1a22c914e14f57aa3d50c08ebf4c28191","unresolved":false,"context_lines":[{"line_number":17,"context_line":"making, snapshot capturing and etc. in feature."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Implement bp: image-multiple-location"},{"line_number":20,"context_line":"docimpact"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Change-Id: Idce8d21ae37bfdbb28a2567120a83d1061061904"},{"line_number":23,"context_line":"Signed-off-by: Zhi Yan Liu \u003czhiyanl@cn.ibm.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"AAAATX%2F%2F9pc%3D","line":20,"updated":"2013-10-23 15:49:31.000000000","message":"nit: DocImpact","commit_id":"3112359b904030d47a6e76a1341585251beb52b1"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"fa0a692aa2214ebdd0f9a997b007c1e6e75d6ed7","unresolved":false,"context_lines":[{"line_number":17,"context_line":"making, snapshot capturing and etc. in feature."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Implement bp: image-multiple-location"},{"line_number":20,"context_line":"docimpact"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Change-Id: Idce8d21ae37bfdbb28a2567120a83d1061061904"},{"line_number":23,"context_line":"Signed-off-by: Zhi Yan Liu \u003czhiyanl@cn.ibm.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"AAAATX%2F%2F9es%3D","line":20,"in_reply_to":"AAAATX%2F%2F9pc%3D","updated":"2013-10-23 16:30:04.000000000","message":"Done. Thanks!","commit_id":"3112359b904030d47a6e76a1341585251beb52b1"}],"etc/nova/nova.conf.sample":[{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"b72c8984557e6ce42d09f8ca8e0b3f2bbbd56f79","unresolved":false,"context_lines":[{"line_number":1913,"context_line":"# Force backing images to raw format (boolean value)"},{"line_number":1914,"context_line":"#force_raw_images\u003dtrue"},{"line_number":1915,"context_line":""},{"line_number":1916,"context_line":"# Which handler class names to use for handling image.Checking"},{"line_number":1917,"context_line":"# class from the list by its order and choice first handler"},{"line_number":1918,"context_line":"# which can handle the image with a particular suitable"},{"line_number":1919,"context_line":"# location. (list value)"}],"source_content_type":"application/octet-stream","patch_set":9,"id":"AAAAQn%2F%2FJ5Y%3D","line":1916,"updated":"2013-08-06 09:27:38.000000000","message":"s/image/images/","commit_id":"f481fb0c36c670434f5a585095814e71e4c8804a"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"9139f48001e810f25c065ac90df6dbe17dc389a7","unresolved":false,"context_lines":[{"line_number":1913,"context_line":"# Force backing images to raw format (boolean value)"},{"line_number":1914,"context_line":"#force_raw_images\u003dtrue"},{"line_number":1915,"context_line":""},{"line_number":1916,"context_line":"# Which handler class names to use for handling image.Checking"},{"line_number":1917,"context_line":"# class from the list by its order and choice first handler"},{"line_number":1918,"context_line":"# which can handle the image with a particular suitable"},{"line_number":1919,"context_line":"# location. (list value)"}],"source_content_type":"application/octet-stream","patch_set":9,"id":"AAAAQn%2F%2FGAE%3D","line":1916,"in_reply_to":"AAAAQn%2F%2FJ5Y%3D","updated":"2013-08-07 12:14:37.000000000","message":"Done","commit_id":"f481fb0c36c670434f5a585095814e71e4c8804a"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"b72c8984557e6ce42d09f8ca8e0b3f2bbbd56f79","unresolved":false,"context_lines":[{"line_number":1916,"context_line":"# Which handler class names to use for handling image.Checking"},{"line_number":1917,"context_line":"# class from the list by its order and choice first handler"},{"line_number":1918,"context_line":"# which can handle the image with a particular suitable"},{"line_number":1919,"context_line":"# location. (list value)"},{"line_number":1920,"context_line":"#image_handlers\u003dnova.virt.images.DefaultImageHandler"},{"line_number":1921,"context_line":""},{"line_number":1922,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":9,"id":"AAAAQn%2F%2FJ48%3D","line":1919,"updated":"2013-08-06 09:27:38.000000000","message":"I\u0027d rephrase this comment.","commit_id":"f481fb0c36c670434f5a585095814e71e4c8804a"},{"author":{"_account_id":7040,"name":"GuoHui LIu","email":"liuguohui@gmail.com","username":"guohliu"},"change_message_id":"f07975f1a22c914e14f57aa3d50c08ebf4c28191","unresolved":false,"context_lines":[{"line_number":1944,"context_line":""},{"line_number":1945,"context_line":"# Specifies which image handler extension names to use for"},{"line_number":1946,"context_line":"# handling images. The first extension in the list which can"},{"line_number":1947,"context_line":"# handle the image with a suitable location will be used."},{"line_number":1948,"context_line":"# (list value)"},{"line_number":1949,"context_line":"#image_handlers\u003ddefault"},{"line_number":1950,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":15,"id":"AAAATX%2F%2F9pg%3D","line":1947,"updated":"2013-10-23 15:49:31.000000000","message":"nit: is that useful to explain what is default handler here?","commit_id":"3112359b904030d47a6e76a1341585251beb52b1"}],"nova/exception.py":[{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"03f7cd8ad34c6c66e0cfbac02bdf7a8455299365","unresolved":false,"context_lines":[{"line_number":1325,"context_line":""},{"line_number":1326,"context_line":""},{"line_number":1327,"context_line":"class NoImageHandlerAvailable(NovaException):"},{"line_number":1328,"context_line":"    msg_fmt \u003d _(\"All image handlers are not availalbe.\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAQn%2F%2Fx24%3D","line":1328,"updated":"2013-07-23 12:50:23.000000000","message":"\"Image handlers specified in the configuration are not available\"?","commit_id":"ecb15f7432dbc40aeb8ce6e8b965a07891f27b5b"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"15ef419f841ff252b9ce0e74ef9e5fd6475ff01c","unresolved":false,"context_lines":[{"line_number":1325,"context_line":""},{"line_number":1326,"context_line":""},{"line_number":1327,"context_line":"class NoImageHandlerAvailable(NovaException):"},{"line_number":1328,"context_line":"    msg_fmt \u003d _(\"All image handlers are not availalbe.\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAQn%2F%2FvOE%3D","line":1328,"in_reply_to":"AAAAQn%2F%2Fx24%3D","updated":"2013-07-24 07:11:24.000000000","message":"Done","commit_id":"ecb15f7432dbc40aeb8ce6e8b965a07891f27b5b"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"a9525afb79b91339c45db89b6ffb55a97ff155a3","unresolved":false,"context_lines":[{"line_number":1326,"context_line":""},{"line_number":1327,"context_line":"class NoImageHandlerAvailable(NovaException):"},{"line_number":1328,"context_line":"    msg_fmt \u003d _(\"Image handlers specified in the configuration \""},{"line_number":1329,"context_line":"                \"are not available\")"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAQn%2F%2FKrc%3D","line":1329,"updated":"2013-08-06 03:51:26.000000000","message":"Could details about the specific handler needed be added?","commit_id":"f481fb0c36c670434f5a585095814e71e4c8804a"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"9ebcbc9f4dbc93cdf5fd647f045076854fd71167","unresolved":false,"context_lines":[{"line_number":1326,"context_line":""},{"line_number":1327,"context_line":"class NoImageHandlerAvailable(NovaException):"},{"line_number":1328,"context_line":"    msg_fmt \u003d _(\"Image handlers specified in the configuration \""},{"line_number":1329,"context_line":"                \"are not available\")"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAQn%2F%2FEWY%3D","line":1329,"in_reply_to":"AAAAQn%2F%2FEjE%3D","updated":"2013-08-07 17:00:50.000000000","message":"Hey John happy to see your quick reply here!\n\nCould you pls check Line 510, 524, 530 within https://review.openstack.org/#/c/33409/10/nova/virt/images.py , under my current design, if handler can not handle the image the framework will move to next handler which configured in pipeline. So even \u0027image handling failed\u0027 issue happened for a particular image, this issue should not block/stop the pipeline, so at last only #1 can be raised by handling pipeline. But at this situation, the context is not enough to give this exception required information to provide \u0027specific handler needed be added\u0027.","commit_id":"f481fb0c36c670434f5a585095814e71e4c8804a"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"9a8ff21fe7ef0d2578f29dc95891df814c406115","unresolved":false,"context_lines":[{"line_number":1326,"context_line":""},{"line_number":1327,"context_line":"class NoImageHandlerAvailable(NovaException):"},{"line_number":1328,"context_line":"    msg_fmt \u003d _(\"Image handlers specified in the configuration \""},{"line_number":1329,"context_line":"                \"are not available\")"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAQn%2F%2FEjE%3D","line":1329,"in_reply_to":"AAAAQn%2F%2FGAg%3D","updated":"2013-08-07 16:20:45.000000000","message":"It sounds to me like they should be different exceptions.  If #2 is the case when \"Specific image handler is existed there but it can\u0027t handling the image location\", then NoImageHandlerAvailable gives the worng impression.  Perhaps another exception \u0027ImageHandlerFailed\u0027 (?) would be better.","commit_id":"f481fb0c36c670434f5a585095814e71e4c8804a"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"9139f48001e810f25c065ac90df6dbe17dc389a7","unresolved":false,"context_lines":[{"line_number":1326,"context_line":""},{"line_number":1327,"context_line":"class NoImageHandlerAvailable(NovaException):"},{"line_number":1328,"context_line":"    msg_fmt \u003d _(\"Image handlers specified in the configuration \""},{"line_number":1329,"context_line":"                \"are not available\")"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAQn%2F%2FGAY%3D","line":1329,"in_reply_to":"AAAAQn%2F%2FJ44%3D","updated":"2013-08-07 12:14:37.000000000","message":"Yes.","commit_id":"f481fb0c36c670434f5a585095814e71e4c8804a"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"b72c8984557e6ce42d09f8ca8e0b3f2bbbd56f79","unresolved":false,"context_lines":[{"line_number":1326,"context_line":""},{"line_number":1327,"context_line":"class NoImageHandlerAvailable(NovaException):"},{"line_number":1328,"context_line":"    msg_fmt \u003d _(\"Image handlers specified in the configuration \""},{"line_number":1329,"context_line":"                \"are not available\")"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAQn%2F%2FJ44%3D","line":1329,"in_reply_to":"AAAAQn%2F%2FKrc%3D","updated":"2013-08-06 09:27:38.000000000","message":"+1 to John\u0027s comment.","commit_id":"f481fb0c36c670434f5a585095814e71e4c8804a"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"9139f48001e810f25c065ac90df6dbe17dc389a7","unresolved":false,"context_lines":[{"line_number":1326,"context_line":""},{"line_number":1327,"context_line":"class NoImageHandlerAvailable(NovaException):"},{"line_number":1328,"context_line":"    msg_fmt \u003d _(\"Image handlers specified in the configuration \""},{"line_number":1329,"context_line":"                \"are not available\")"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAQn%2F%2FGAg%3D","line":1329,"in_reply_to":"AAAAQn%2F%2FKrc%3D","updated":"2013-08-07 12:14:37.000000000","message":"Good point. I\u0027d like add image id to here to help client debug. But I don\u0027t think I can give an exact \u0027specific handler which nova needed\u0027 information to here. Because code can reach here from two ways: 1. image handler is not enough to handle specific image (for its all locations). 2. Specific image handler is existed there but it can\u0027t handling the image location, a failed status be returned by the method of a configured handler.\n\nSo,for #1, it will make sense if we put a location schema here to ask client configure a handler which can take care that. But for #2, it will not make sense since under this situation, the exception not meaning handler configuration missing, but handler handling failed for specific image.","commit_id":"f481fb0c36c670434f5a585095814e71e4c8804a"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"ebcf2e686ba1a059a17fb8020a7975198cafcc4e","unresolved":false,"context_lines":[{"line_number":1346,"context_line":"    msg_fmt \u003d _(\"The method %(method_name)s is not implemented.\")"},{"line_number":1347,"context_line":""},{"line_number":1348,"context_line":""},{"line_number":1349,"context_line":"class ImageDownloadModuleMetaDataError(ImageDownloadModuleError):"},{"line_number":1350,"context_line":"    msg_fmt \u003d _(\"The metadata for this location will not work with this \""},{"line_number":1351,"context_line":"                \"module %(module)s.  %(reason)s.\")"},{"line_number":1352,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAQn%2F%2B9lE%3D","side":"PARENT","line":1349,"updated":"2013-08-09 09:01:14.000000000","message":"Nice catch.  This was in there twice.","commit_id":"a943f1403f66272655c337c5863c79dc2ed79549"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"9c12b3bdc20bee6b05c477fa0b9df5601c8daa2a","unresolved":false,"context_lines":[{"line_number":1474,"context_line":""},{"line_number":1475,"context_line":"class NoImageHandlerAvailable(NovaException):"},{"line_number":1476,"context_line":"    msg_fmt \u003d _(\"Image handlers specified in the configuration \""},{"line_number":1477,"context_line":"                \"are all not available for image %(image_id)s.\")"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATH%2F%2FH0w%3D","line":1477,"updated":"2013-10-22 20:58:47.000000000","message":"s/all not/not all/","commit_id":"8a63c659a5bcb3fc1edcc4b9df06c5a6d9ff8e2b"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"e48c985032a5ff83dcb3fc49a7d53924254d0d68","unresolved":false,"context_lines":[{"line_number":1474,"context_line":""},{"line_number":1475,"context_line":"class NoImageHandlerAvailable(NovaException):"},{"line_number":1476,"context_line":"    msg_fmt \u003d _(\"Image handlers specified in the configuration \""},{"line_number":1477,"context_line":"                \"are all not available for image %(image_id)s.\")"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F%2B78%3D","line":1477,"in_reply_to":"AAAATH%2F%2FH0w%3D","updated":"2013-10-23 15:21:12.000000000","message":"Firstly I\u0027m not a native English speaker. This exception will be raised when Nova tried all admin configured image handlers but no one handler could handle that image. So it seems original message is more make sense to me. For English, please correct me if I\u0027m wrong. thanks!","commit_id":"8a63c659a5bcb3fc1edcc4b9df06c5a6d9ff8e2b"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"5b8823b5f644e6602f9a8c5761478adb5d9c8686","unresolved":false,"context_lines":[{"line_number":1474,"context_line":""},{"line_number":1475,"context_line":"class NoImageHandlerAvailable(NovaException):"},{"line_number":1476,"context_line":"    msg_fmt \u003d _(\"Image handlers specified in the configuration \""},{"line_number":1477,"context_line":"                \"are all not available for image %(image_id)s.\")"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F9w4%3D","line":1477,"in_reply_to":"AAAATX%2F%2F%2B78%3D","updated":"2013-10-23 15:25:05.000000000","message":"It might be best to just reword it to \"No image handlers specified in the configuration are available for image [image]\".  That matches the class name too. :-)","commit_id":"8a63c659a5bcb3fc1edcc4b9df06c5a6d9ff8e2b"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"09983d0908b7cf4caa75b79dc376bb37f757ad34","unresolved":false,"context_lines":[{"line_number":1474,"context_line":""},{"line_number":1475,"context_line":"class NoImageHandlerAvailable(NovaException):"},{"line_number":1476,"context_line":"    msg_fmt \u003d _(\"Image handlers specified in the configuration \""},{"line_number":1477,"context_line":"                \"are all not available for image %(image_id)s.\")"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F9vs%3D","line":1477,"in_reply_to":"AAAATX%2F%2F9w4%3D","updated":"2013-10-23 15:32:26.000000000","message":"Done, cool :)","commit_id":"8a63c659a5bcb3fc1edcc4b9df06c5a6d9ff8e2b"}],"nova/hacking/checks.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"9e832e6332ce06fb50eb4f37c2018ba79fe1109a","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        return None"},{"line_number":75,"context_line":"    driver \u003d m.group(1)"},{"line_number":76,"context_line":"    # Ignore things we mis-detect as virt drivers in the regex"},{"line_number":77,"context_line":"    if driver in [\"test_virt_drivers\", \"driver\", \"imagehandler\","},{"line_number":78,"context_line":"                  \"disk\", \"api\", \"imagecache\", \"cpu\"]:"},{"line_number":79,"context_line":"        return None"},{"line_number":80,"context_line":"    # TODO(berrange): remove once bugs 1261826 and 126182 are"}],"source_content_type":"text/x-python","patch_set":49,"id":"AAAAUX%2F%2Fnwo%3D","line":77,"updated":"2014-02-11 22:58:21.000000000","message":"You can\u0027t just replace \"firewall\" with \"imagehandler\"","commit_id":"c454469dcaba53ece3a219f4fca1a71ef00b1fe0"}],"nova/image/glance.py":[{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"03f7cd8ad34c6c66e0cfbac02bdf7a8455299365","unresolved":false,"context_lines":[{"line_number":263,"context_line":"        storage location, or None if this attribute is not shown by Glance."},{"line_number":264,"context_line":"        \"\"\""},{"line_number":265,"context_line":"        (direct_url, multi_locs) \u003d self._get_location_attr(context, image_id)"},{"line_number":266,"context_line":"        if multi_locs:"},{"line_number":267,"context_line":"            return multi_locs"},{"line_number":268,"context_line":"        elif direct_url:"},{"line_number":269,"context_line":"            return [direct_url]"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAQn%2F%2Fx2U%3D","line":266,"updated":"2013-07-23 12:50:23.000000000","message":"This if condition checks for multi_locs first, the above if condition checks for direct_url first. can you please fix one or the other to be consistent?","commit_id":"ecb15f7432dbc40aeb8ce6e8b965a07891f27b5b"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"15ef419f841ff252b9ce0e74ef9e5fd6475ff01c","unresolved":false,"context_lines":[{"line_number":263,"context_line":"        storage location, or None if this attribute is not shown by Glance."},{"line_number":264,"context_line":"        \"\"\""},{"line_number":265,"context_line":"        (direct_url, multi_locs) \u003d self._get_location_attr(context, image_id)"},{"line_number":266,"context_line":"        if multi_locs:"},{"line_number":267,"context_line":"            return multi_locs"},{"line_number":268,"context_line":"        elif direct_url:"},{"line_number":269,"context_line":"            return [direct_url]"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAQn%2F%2FvN4%3D","line":266,"in_reply_to":"AAAAQn%2F%2Fx2U%3D","updated":"2013-07-24 07:11:24.000000000","message":"Done","commit_id":"ecb15f7432dbc40aeb8ce6e8b965a07891f27b5b"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"b72c8984557e6ce42d09f8ca8e0b3f2bbbd56f79","unresolved":false,"context_lines":[{"line_number":253,"context_line":"        \"\"\"Returns the direct url representing the backend storage location,"},{"line_number":254,"context_line":"        or None if this attribute is not shown by Glance."},{"line_number":255,"context_line":"        \"\"\""},{"line_number":256,"context_line":"        (direct_url, multi_locs) \u003d self._get_location_attr(context, image_id)"},{"line_number":257,"context_line":"        if direct_url:"},{"line_number":258,"context_line":"            return direct_url"},{"line_number":259,"context_line":"        elif multi_locs:"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAQn%2F%2FJ4A%3D","line":256,"updated":"2013-08-06 09:27:38.000000000","message":"Why don\u0027t you use here the function defined below? (you are duplicating code)\n\n    locations \u003d self.get_locations(context, image_id)\n    if locations:\n        return locations[0]\n    return None","commit_id":"f481fb0c36c670434f5a585095814e71e4c8804a"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"9139f48001e810f25c065ac90df6dbe17dc389a7","unresolved":false,"context_lines":[{"line_number":253,"context_line":"        \"\"\"Returns the direct url representing the backend storage location,"},{"line_number":254,"context_line":"        or None if this attribute is not shown by Glance."},{"line_number":255,"context_line":"        \"\"\""},{"line_number":256,"context_line":"        (direct_url, multi_locs) \u003d self._get_location_attr(context, image_id)"},{"line_number":257,"context_line":"        if direct_url:"},{"line_number":258,"context_line":"            return direct_url"},{"line_number":259,"context_line":"        elif multi_locs:"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAQn%2F%2FF%2Fo%3D","line":256,"in_reply_to":"AAAAQn%2F%2FJ4A%3D","updated":"2013-08-07 12:14:37.000000000","message":"Done","commit_id":"f481fb0c36c670434f5a585095814e71e4c8804a"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"b72c8984557e6ce42d09f8ca8e0b3f2bbbd56f79","unresolved":false,"context_lines":[{"line_number":261,"context_line":"        else:"},{"line_number":262,"context_line":"            return None"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    def get_locations(self, context, image_id):"},{"line_number":265,"context_line":"        \"\"\"Returns the multiple locations representing the backend"},{"line_number":266,"context_line":"        storage location, or None if this attribute is not shown by Glance."},{"line_number":267,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAQn%2F%2FJ4k%3D","line":264,"updated":"2013-08-06 09:27:38.000000000","message":"I would name this to \"get_multiple_locations\" and not \"get_locations\". It can be easily confused with \"get_location\", since they only differ in one character.","commit_id":"f481fb0c36c670434f5a585095814e71e4c8804a"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"9139f48001e810f25c065ac90df6dbe17dc389a7","unresolved":false,"context_lines":[{"line_number":261,"context_line":"        else:"},{"line_number":262,"context_line":"            return None"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    def get_locations(self, context, image_id):"},{"line_number":265,"context_line":"        \"\"\"Returns the multiple locations representing the backend"},{"line_number":266,"context_line":"        storage location, or None if this attribute is not shown by Glance."},{"line_number":267,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAQn%2F%2FF%2Fg%3D","line":264,"in_reply_to":"AAAAQn%2F%2FJ4k%3D","updated":"2013-08-07 12:14:37.000000000","message":"Done","commit_id":"f481fb0c36c670434f5a585095814e71e4c8804a"},{"author":{"_account_id":8267,"name":"Chenggang (Bob) ZHANG","email":"cgzhang.hk@gmail.com","username":"cgzhang"},"change_message_id":"94370e1ed90d0566e20419a1e3a39e3ff7e1bb4c","unresolved":false,"context_lines":[{"line_number":268,"context_line":"        (direct_url, multi_locs) \u003d self._get_location_attr(context, image_id)"},{"line_number":269,"context_line":"        # NOTE(zhiyan): We need checking \u0027multi_locs\u0027 before \u0027direct_url\u0027"},{"line_number":270,"context_line":"        # Since if glance-api enable \u0027show-multiple_locations\u0027 option, the"},{"line_number":271,"context_line":"        # the \u0027locations\u0027 response list will contains \u0027direct_url\u0027 value."},{"line_number":272,"context_line":"        if multi_locs:"},{"line_number":273,"context_line":"            return multi_locs"},{"line_number":274,"context_line":"        elif direct_url:"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAQn%2F%2FqXo%3D","line":271,"updated":"2013-07-25 15:19:54.000000000","message":"Some typos as follows:\n\n1. Duplicate \"the\" here; Pls remove one.\n\n2. \"enable\" -\u003e \"enables\"\n\n3. \"contains\" -\u003e \"contain\"","commit_id":"f481fb0c36c670434f5a585095814e71e4c8804a"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"21c813e7e253020c6de99d3a0a9fed9cd946f66b","unresolved":false,"context_lines":[{"line_number":268,"context_line":"        (direct_url, multi_locs) \u003d self._get_location_attr(context, image_id)"},{"line_number":269,"context_line":"        # NOTE(zhiyan): We need checking \u0027multi_locs\u0027 before \u0027direct_url\u0027"},{"line_number":270,"context_line":"        # Since if glance-api enable \u0027show-multiple_locations\u0027 option, the"},{"line_number":271,"context_line":"        # the \u0027locations\u0027 response list will contains \u0027direct_url\u0027 value."},{"line_number":272,"context_line":"        if multi_locs:"},{"line_number":273,"context_line":"            return multi_locs"},{"line_number":274,"context_line":"        elif direct_url:"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAQn%2F%2FpRs%3D","line":271,"in_reply_to":"AAAAQn%2F%2FqXo%3D","updated":"2013-07-25 21:32:46.000000000","message":"Oops, thanks, will do that in next PS.","commit_id":"f481fb0c36c670434f5a585095814e71e4c8804a"}],"nova/tests/image/fake.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"e518b781b771e21b1768b97cb2bf67201c7f95eb","unresolved":false,"context_lines":[{"line_number":235,"context_line":"    def get_locations(self, context, image_id):"},{"line_number":236,"context_line":"        if image_id in self.images:"},{"line_number":237,"context_line":"            return [\u0027fake_location\u0027, \u0027fake_location2\u0027]"},{"line_number":238,"context_line":"        return None"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"_fakeImageService \u003d _FakeImageService()"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAATn%2F%2F1Dc%3D","line":238,"updated":"2013-10-28 11:01:59.000000000","message":"by default the meth returns None","commit_id":"d82919e81822db3b228715912c0be898bd36a405"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"756b400c37ee8397b19e58c6da3cf11b77d711b6","unresolved":false,"context_lines":[{"line_number":235,"context_line":"    def get_locations(self, context, image_id):"},{"line_number":236,"context_line":"        if image_id in self.images:"},{"line_number":237,"context_line":"            return [\u0027fake_location\u0027, \u0027fake_location2\u0027]"},{"line_number":238,"context_line":"        return None"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"_fakeImageService \u003d _FakeImageService()"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAATn%2F%2Ftbw%3D","line":238,"in_reply_to":"AAAATn%2F%2F1Dc%3D","updated":"2013-10-30 14:34:19.000000000","message":"do you think it\u0027s fine if I keep this like above \"get_location()\" did? and I think it\u0027s more explicit.","commit_id":"d82919e81822db3b228715912c0be898bd36a405"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"754fc2cd784307993c607b5e31513ea250bdc190","unresolved":false,"context_lines":[{"line_number":235,"context_line":"    def get_locations(self, context, image_id):"},{"line_number":236,"context_line":"        if image_id in self.images:"},{"line_number":237,"context_line":"            return [\u0027fake_location\u0027, \u0027fake_location2\u0027]"},{"line_number":238,"context_line":"        return None"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"_fakeImageService \u003d _FakeImageService()"}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAAT3%2F%2F1nY%3D","line":238,"updated":"2013-12-30 12:51:59.000000000","message":"by default None is returned. you do not need None here. Also, why not return an empty array?","commit_id":"51b03501cc21c9f20bb9d281713b6dbf98c4760f"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"be4d5fdf34eef06280a41b46ac64f98e1147d717","unresolved":false,"context_lines":[{"line_number":235,"context_line":"    def get_locations(self, context, image_id):"},{"line_number":236,"context_line":"        if image_id in self.images:"},{"line_number":237,"context_line":"            return [\u0027fake_location\u0027, \u0027fake_location2\u0027]"},{"line_number":238,"context_line":"        return None"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"_fakeImageService \u003d _FakeImageService()"}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAAT3%2F%2F1iU%3D","line":238,"in_reply_to":"AAAAT3%2F%2F1nY%3D","updated":"2013-12-30 14:37:52.000000000","message":"Done","commit_id":"51b03501cc21c9f20bb9d281713b6dbf98c4760f"}],"nova/tests/virt/libvirt/test_libvirt.py":[{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"64d5eebb6c06d7e935d33993ec68652c1f062216","unresolved":false,"context_lines":[{"line_number":5288,"context_line":"            if path in [\u0027t.qcow2\u0027, \u0027t.raw\u0027]:"},{"line_number":5289,"context_line":"                return True"},{"line_number":5290,"context_line":"            else:"},{"line_number":5291,"context_line":"                # path in [\u0027t.qcow2.part\u0027, \u0027t.raw.part\u0027,"},{"line_number":5292,"context_line":"                #          \u0027backing.qcow2.part\u0027]"},{"line_number":5293,"context_line":"                return False"},{"line_number":5294,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAQ3%2F%2F%2FY0%3D","line":5291,"updated":"2013-08-11 16:29:26.000000000","message":"Should be removed?\n\nIn fact, isn\u0027t this whole if block just the same as \"return path in [\u0027t.qcow2\u0027, \u0027t.raw\u0027]\"?","commit_id":"4a8a7b90b18d8b838ff2d4aabddfff826c9bc5ad"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"b52def4066fb96275a7a0665152944a456f935aa","unresolved":false,"context_lines":[{"line_number":5288,"context_line":"            if path in [\u0027t.qcow2\u0027, \u0027t.raw\u0027]:"},{"line_number":5289,"context_line":"                return True"},{"line_number":5290,"context_line":"            else:"},{"line_number":5291,"context_line":"                # path in [\u0027t.qcow2.part\u0027, \u0027t.raw.part\u0027,"},{"line_number":5292,"context_line":"                #          \u0027backing.qcow2.part\u0027]"},{"line_number":5293,"context_line":"                return False"},{"line_number":5294,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAQ3%2F%2F%2B08%3D","line":5291,"in_reply_to":"AAAAQ3%2F%2F%2FY0%3D","updated":"2013-08-12 04:26:45.000000000","message":"Done, removed.","commit_id":"4a8a7b90b18d8b838ff2d4aabddfff826c9bc5ad"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"754fc2cd784307993c607b5e31513ea250bdc190","unresolved":false,"context_lines":[{"line_number":6956,"context_line":""},{"line_number":6957,"context_line":"        def fake_exists(path):"},{"line_number":6958,"context_line":"            self.executes.append((\u0027test\u0027, \u0027-f\u0027, path))"},{"line_number":6959,"context_line":"            if path in [\u0027t.qcow2\u0027, \u0027t.raw\u0027]:"},{"line_number":6960,"context_line":"                return True"},{"line_number":6961,"context_line":"            else:"},{"line_number":6962,"context_line":"                return False"}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAAT3%2F%2F1nU%3D","line":6959,"updated":"2013-12-30 12:51:59.000000000","message":"consider:\nreturn path in [\u0027t.qcow2\u0027, \u0027t.raw\u0027]","commit_id":"51b03501cc21c9f20bb9d281713b6dbf98c4760f"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"be4d5fdf34eef06280a41b46ac64f98e1147d717","unresolved":false,"context_lines":[{"line_number":6956,"context_line":""},{"line_number":6957,"context_line":"        def fake_exists(path):"},{"line_number":6958,"context_line":"            self.executes.append((\u0027test\u0027, \u0027-f\u0027, path))"},{"line_number":6959,"context_line":"            if path in [\u0027t.qcow2\u0027, \u0027t.raw\u0027]:"},{"line_number":6960,"context_line":"                return True"},{"line_number":6961,"context_line":"            else:"},{"line_number":6962,"context_line":"                return False"}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAAT3%2F%2F1h8%3D","line":6959,"in_reply_to":"AAAAT3%2F%2F1nU%3D","updated":"2013-12-30 14:37:52.000000000","message":"Done","commit_id":"51b03501cc21c9f20bb9d281713b6dbf98c4760f"}],"nova/tests/virt/test_imagehandler.py":[{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"a09fcd7f876b1f3921d6659a46a8532f2c83eb7d","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        fake_locations \u003d [{\u0027url\u0027: \u0027fake1://url\u0027, \u0027metadata\u0027: {}},"},{"line_number":40,"context_line":"                          {\u0027url\u0027: \u0027fake2://url\u0027, \u0027metadata\u0027: {}}]"},{"line_number":41,"context_line":"        matched \u003d imagehandler._match_locations(fake_locations, ())"},{"line_number":42,"context_line":"        self.assertEqual(matched, fake_locations)"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAATn%2F%2F1TY%3D","line":42,"updated":"2013-10-28 09:37:26.000000000","message":"This test suite is very incomplete. You\u0027re just testing one single method in the imagehandlers module. Please do full unit test coverage of the new APIs.","commit_id":"d82919e81822db3b228715912c0be898bd36a405"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"756b400c37ee8397b19e58c6da3cf11b77d711b6","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        fake_locations \u003d [{\u0027url\u0027: \u0027fake1://url\u0027, \u0027metadata\u0027: {}},"},{"line_number":40,"context_line":"                          {\u0027url\u0027: \u0027fake2://url\u0027, \u0027metadata\u0027: {}}]"},{"line_number":41,"context_line":"        matched \u003d imagehandler._match_locations(fake_locations, ())"},{"line_number":42,"context_line":"        self.assertEqual(matched, fake_locations)"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAATn%2F%2FrfM%3D","line":42,"in_reply_to":"AAAATn%2F%2F1TY%3D","updated":"2013-10-30 14:34:19.000000000","message":"Pls check next PS, thanks.","commit_id":"d82919e81822db3b228715912c0be898bd36a405"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"6a88876079cbacb7e857087680c81ad350eb1a52","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    def setUp(self):"},{"line_number":30,"context_line":"        super(ImageHandlerTestCase, self).setUp()"},{"line_number":31,"context_line":"        self.context \u003d context.get_admin_context()"},{"line_number":32,"context_line":"        fake_image.stub_out_image_service(self.stubs)"},{"line_number":33,"context_line":"        imagehandler._IMAGE_HANDLERS \u003d []"},{"line_number":34,"context_line":"        imagehandler._IMAGE_HANDLERS_ASSO \u003d {}"},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"AAAAT3%2F%2F0f4%3D","line":32,"updated":"2013-12-30 20:28:52.000000000","message":"I would encourage you to make use of mock for stubbing.  It may be a bit of work, though, so no down-vote because of this.","commit_id":"c4bd476f319964adfcf6d47447fa630c3e070048"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"be515a72527db9537a9cda32229718e78e0ee98c","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    def setUp(self):"},{"line_number":30,"context_line":"        super(ImageHandlerTestCase, self).setUp()"},{"line_number":31,"context_line":"        self.context \u003d context.get_admin_context()"},{"line_number":32,"context_line":"        fake_image.stub_out_image_service(self.stubs)"},{"line_number":33,"context_line":"        imagehandler._IMAGE_HANDLERS \u003d []"},{"line_number":34,"context_line":"        imagehandler._IMAGE_HANDLERS_ASSO \u003d {}"},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"AAAAT3%2F%2FvRI%3D","line":32,"in_reply_to":"AAAAT3%2F%2F0f4%3D","updated":"2014-01-02 20:44:40.000000000","message":"@Kevin, I believe this is a good point, but do you think it should be done by a dedicated code refactoring on stub_out_image_service() but in this change? Let me know what\u0027s your position on this, thanks!","commit_id":"c4bd476f319964adfcf6d47447fa630c3e070048"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"174f9c1e14ada1443b72ece544b5254941ebc845","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    def setUp(self):"},{"line_number":30,"context_line":"        super(ImageHandlerTestCase, self).setUp()"},{"line_number":31,"context_line":"        self.context \u003d context.get_admin_context()"},{"line_number":32,"context_line":"        fake_image.stub_out_image_service(self.stubs)"},{"line_number":33,"context_line":"        imagehandler._IMAGE_HANDLERS \u003d []"},{"line_number":34,"context_line":"        imagehandler._IMAGE_HANDLERS_ASSO \u003d {}"},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"AAAAT3%2F%2FuYk%3D","line":32,"in_reply_to":"AAAAT3%2F%2FvRI%3D","updated":"2014-01-02 21:15:10.000000000","message":"Well, I pointed this out because this is a new test file, but since I didn\u0027t take a look at the actual stub out routine, I don\u0027t know how extensive the stubbing is.  As I say, I won\u0027t down-vote for this change at all, because it may indeed be more appropriate for a dedicated code refactoring rather than for this change :)","commit_id":"c4bd476f319964adfcf6d47447fa630c3e070048"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"6a88876079cbacb7e857087680c81ad350eb1a52","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            ret.driver \u003d kwargs[\u0027name\u0027]"},{"line_number":106,"context_line":"            return ret"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        self.stub \u003d self.stubs.Set(stevedore.extension, \"ExtensionManager\","},{"line_number":109,"context_line":"                                   _fake_stevedore_extension_manager)"},{"line_number":110,"context_line":"        self.stub \u003d self.stubs.Set(stevedore.driver, \"DriverManager\","},{"line_number":111,"context_line":"                                   _fake_stevedore_driver_manager)"}],"source_content_type":"text/x-python","patch_set":25,"id":"AAAAT3%2F%2F0f0%3D","line":108,"updated":"2013-12-30 20:28:52.000000000","message":"I would encourage you to use mock in preference to what you have here.","commit_id":"c4bd476f319964adfcf6d47447fa630c3e070048"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"be515a72527db9537a9cda32229718e78e0ee98c","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            ret.driver \u003d kwargs[\u0027name\u0027]"},{"line_number":106,"context_line":"            return ret"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        self.stub \u003d self.stubs.Set(stevedore.extension, \"ExtensionManager\","},{"line_number":109,"context_line":"                                   _fake_stevedore_extension_manager)"},{"line_number":110,"context_line":"        self.stub \u003d self.stubs.Set(stevedore.driver, \"DriverManager\","},{"line_number":111,"context_line":"                                   _fake_stevedore_driver_manager)"}],"source_content_type":"text/x-python","patch_set":25,"id":"AAAAT3%2F%2FuoA%3D","line":108,"in_reply_to":"AAAAT3%2F%2F0f0%3D","updated":"2014-01-02 20:44:40.000000000","message":"Done","commit_id":"c4bd476f319964adfcf6d47447fa630c3e070048"},{"author":{"_account_id":8759,"name":"Arnaud Legendre","email":"arnaudleg@gmail.com","username":"arnaud"},"change_message_id":"5fdc78de99d52709ca976cc92478e062515b3d3c","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        matched \u003d imagehandler._match_locations(fake_locations, ())"},{"line_number":62,"context_line":"        self.assertEqual(matched, fake_locations)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    def test_image_handler_assoation_hooks(self):"},{"line_number":65,"context_line":"        handler \u003d \u0027fake_handler\u0027"},{"line_number":66,"context_line":"        path \u003d \u0027fake/image/path\u0027"},{"line_number":67,"context_line":"        location \u003d \u0027fake://image_location_url\u0027"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAAUH%2F%2Fvlg%3D","line":64,"updated":"2014-01-08 23:39:05.000000000","message":"association?","commit_id":"62223689d19918dad0ffc0970aeea95260450ce6"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"e908beddb2d179ceb5cdfe7a1b59ae10d630a32d","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        matched \u003d imagehandler._match_locations(fake_locations, ())"},{"line_number":62,"context_line":"        self.assertEqual(matched, fake_locations)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    def test_image_handler_assoation_hooks(self):"},{"line_number":65,"context_line":"        handler \u003d \u0027fake_handler\u0027"},{"line_number":66,"context_line":"        path \u003d \u0027fake/image/path\u0027"},{"line_number":67,"context_line":"        location \u003d \u0027fake://image_location_url\u0027"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAAUH%2F%2Ftw8%3D","line":64,"in_reply_to":"AAAAUH%2F%2Fvlg%3D","updated":"2014-01-09 09:58:48.000000000","message":"Done","commit_id":"62223689d19918dad0ffc0970aeea95260450ce6"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"202398acf8af40029bc69a95d50f84d71be6f020","unresolved":false,"context_lines":[{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def test_load_image_handlers(self):"},{"line_number":82,"context_line":"        self.flags(image_handlers\u003d[\u0027download\u0027])"},{"line_number":83,"context_line":"        imagehandler.load_image_handlers(self.FakeLibvirtDriver())"},{"line_number":84,"context_line":"        self.assertEqual(len(imagehandler._IMAGE_HANDLERS), 1)"},{"line_number":85,"context_line":"        self.assertTrue(isinstance(imagehandler._IMAGE_HANDLERS[0],"},{"line_number":86,"context_line":"                        download_imagehandler.DownloadImageHandler))"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAUH%2F%2FE8E%3D","line":83,"updated":"2014-01-17 16:59:37.000000000","message":"Why use a blank class at all?  Use mock.Mock()","commit_id":"8fdee6872564dd0084427509954abde909023562"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"5b8757031c959aefa1343993d68b1f1f5267be4d","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"class ImageHandlerTestCase(test.TestCase):"},{"line_number":27,"context_line":"    class FakeLibvirtDriver(object):"},{"line_number":28,"context_line":"        pass"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":38,"id":"AAAAUH%2F%2B7UY%3D","line":27,"updated":"2014-01-20 17:27:23.000000000","message":"I still don\u0027t understand why you have an empty class at all; this need could be filled with mock.Mock() or mock.MagicMock() (whichever you prefer).","commit_id":"5f3043f11e359d1896ed1b3809ec4a8de637ec20"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"bcb07071decf795aa78b90e3b4ee7277185b277a","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def test_match_locations_empty(self):"},{"line_number":40,"context_line":"        matched \u003d imagehandler._match_locations([], ())"},{"line_number":41,"context_line":"        self.assertEqual(matched, [])"},{"line_number":42,"context_line":"        matched \u003d imagehandler._match_locations(None, ())"},{"line_number":43,"context_line":"        self.assertEqual(matched, [])"},{"line_number":44,"context_line":"        matched \u003d imagehandler._match_locations([], None)"}],"source_content_type":"text/x-python","patch_set":53,"id":"AAAAUX%2F%2FIdk%3D","line":41,"updated":"2014-02-16 16:05:51.000000000","message":"in general the first parameter should be the expected one (same for all below)","commit_id":"efad55a6deac418c73d754a46290bc55b87ea5a7"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"c3d73f77152ec59a891d85d5e3a8d8ae550ea2c3","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def test_match_locations_empty(self):"},{"line_number":40,"context_line":"        matched \u003d imagehandler._match_locations([], ())"},{"line_number":41,"context_line":"        self.assertEqual(matched, [])"},{"line_number":42,"context_line":"        matched \u003d imagehandler._match_locations(None, ())"},{"line_number":43,"context_line":"        self.assertEqual(matched, [])"},{"line_number":44,"context_line":"        matched \u003d imagehandler._match_locations([], None)"}],"source_content_type":"text/x-python","patch_set":53,"id":"AAAAUX%2F%2B7Go%3D","line":41,"in_reply_to":"AAAAUX%2F%2FIdk%3D","updated":"2014-02-18 07:41:38.000000000","message":"Done","commit_id":"efad55a6deac418c73d754a46290bc55b87ea5a7"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"bcb07071decf795aa78b90e3b4ee7277185b277a","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        self.assertEqual(matched, [{\u0027url\u0027: \u0027fake1://url\u0027, \u0027metadata\u0027: {}}])"},{"line_number":52,"context_line":"        matched \u003d imagehandler._match_locations(fake_locations,"},{"line_number":53,"context_line":"                                                (\u0027no_existing\u0027))"},{"line_number":54,"context_line":"        self.assertEqual(matched, [])"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def test_match_locations_location_independent(self):"},{"line_number":57,"context_line":"        fake_locations \u003d [{\u0027url\u0027: \u0027fake1://url\u0027, \u0027metadata\u0027: {}},"}],"source_content_type":"text/x-python","patch_set":53,"id":"AAAAUX%2F%2FIeY%3D","line":54,"updated":"2014-02-16 16:05:51.000000000","message":"ditto","commit_id":"efad55a6deac418c73d754a46290bc55b87ea5a7"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"c3d73f77152ec59a891d85d5e3a8d8ae550ea2c3","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        self.assertEqual(matched, [{\u0027url\u0027: \u0027fake1://url\u0027, \u0027metadata\u0027: {}}])"},{"line_number":52,"context_line":"        matched \u003d imagehandler._match_locations(fake_locations,"},{"line_number":53,"context_line":"                                                (\u0027no_existing\u0027))"},{"line_number":54,"context_line":"        self.assertEqual(matched, [])"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def test_match_locations_location_independent(self):"},{"line_number":57,"context_line":"        fake_locations \u003d [{\u0027url\u0027: \u0027fake1://url\u0027, \u0027metadata\u0027: {}},"}],"source_content_type":"text/x-python","patch_set":53,"id":"AAAAUX%2F%2B7Gk%3D","line":54,"in_reply_to":"AAAAUX%2F%2FIeY%3D","updated":"2014-02-18 07:41:38.000000000","message":"Done","commit_id":"efad55a6deac418c73d754a46290bc55b87ea5a7"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"bcb07071decf795aa78b90e3b4ee7277185b277a","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        fake_locations \u003d [{\u0027url\u0027: \u0027fake1://url\u0027, \u0027metadata\u0027: {}},"},{"line_number":58,"context_line":"                          {\u0027url\u0027: \u0027fake2://url\u0027, \u0027metadata\u0027: {}}]"},{"line_number":59,"context_line":"        matched \u003d imagehandler._match_locations(fake_locations, ())"},{"line_number":60,"context_line":"        self.assertEqual(matched, fake_locations)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def test_image_handler_association_hooks(self):"},{"line_number":63,"context_line":"        handler \u003d \u0027fake_handler\u0027"}],"source_content_type":"text/x-python","patch_set":53,"id":"AAAAUX%2F%2FIeQ%3D","line":60,"updated":"2014-02-16 16:05:51.000000000","message":"ditto","commit_id":"efad55a6deac418c73d754a46290bc55b87ea5a7"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"c3d73f77152ec59a891d85d5e3a8d8ae550ea2c3","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        fake_locations \u003d [{\u0027url\u0027: \u0027fake1://url\u0027, \u0027metadata\u0027: {}},"},{"line_number":58,"context_line":"                          {\u0027url\u0027: \u0027fake2://url\u0027, \u0027metadata\u0027: {}}]"},{"line_number":59,"context_line":"        matched \u003d imagehandler._match_locations(fake_locations, ())"},{"line_number":60,"context_line":"        self.assertEqual(matched, fake_locations)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def test_image_handler_association_hooks(self):"},{"line_number":63,"context_line":"        handler \u003d \u0027fake_handler\u0027"}],"source_content_type":"text/x-python","patch_set":53,"id":"AAAAUX%2F%2B7Gg%3D","line":60,"in_reply_to":"AAAAUX%2F%2FIeQ%3D","updated":"2014-02-18 07:41:38.000000000","message":"Done","commit_id":"efad55a6deac418c73d754a46290bc55b87ea5a7"}],"nova/virt/driver.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"c4915fbafc9236cd12843ffd3e8dc7b2b5757b83","unresolved":false,"context_lines":[{"line_number":132,"context_line":"    def __init__(self, virtapi):"},{"line_number":133,"context_line":"        self.virtapi \u003d virtapi"},{"line_number":134,"context_line":"        self._compute_event_callback \u003d None"},{"line_number":135,"context_line":"        imagehandler.load_image_handlers(self)"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def init_host(self, host):"},{"line_number":138,"context_line":"        \"\"\"Initialize anything that is necessary for the driver to function,"}],"source_content_type":"text/x-python","patch_set":57,"id":"AAAAVn%2F%2F6bo%3D","line":135,"updated":"2014-03-03 13:43:02.000000000","message":"Given this is not used by all drivers, I wonder if this should be in the specific driver.\n\nThis would help with the change where you try to give each hypervisor its own image hander settings, but I am not really sure why that is needed.","commit_id":"bc16eb4887f160a07efc085883acf0a552f16daa"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"a944bdc3087d3b7c7981c7f092c048d370b24f4f","unresolved":false,"context_lines":[{"line_number":132,"context_line":"    def __init__(self, virtapi):"},{"line_number":133,"context_line":"        self.virtapi \u003d virtapi"},{"line_number":134,"context_line":"        self._compute_event_callback \u003d None"},{"line_number":135,"context_line":"        imagehandler.load_image_handlers(self)"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def init_host(self, host):"},{"line_number":138,"context_line":"        \"\"\"Initialize anything that is necessary for the driver to function,"}],"source_content_type":"text/x-python","patch_set":57,"id":"AAAAVn%2F%2Fv44%3D","line":135,"in_reply_to":"AAAAVn%2F%2F6bo%3D","updated":"2014-03-04 10:18:56.000000000","message":"Hi John Garbutt:\n\nFor this point the reason to me is that IMO this way is easier than to change each hypervisor, I think image handler mechanism could be used by most drivers.\n\nbtw, I persontly don\u0027t think that change is essential since I think the flat option is easier for end user, actually each handler can automatic \"skip\" those hypervisors which it is not applicable.","commit_id":"bc16eb4887f160a07efc085883acf0a552f16daa"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"2b2cae831a3fa22fbc9399d79ca5e70bd355e523","unresolved":false,"context_lines":[{"line_number":132,"context_line":"    def __init__(self, virtapi):"},{"line_number":133,"context_line":"        self.virtapi \u003d virtapi"},{"line_number":134,"context_line":"        self._compute_event_callback \u003d None"},{"line_number":135,"context_line":"        imagehandler.load_image_handlers(self)"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def init_host(self, host):"},{"line_number":138,"context_line":"        \"\"\"Initialize anything that is necessary for the driver to function,"}],"source_content_type":"text/x-python","patch_set":57,"id":"AAAAVn%2F%2FtPE%3D","line":135,"in_reply_to":"AAAAVn%2F%2Fv44%3D","updated":"2014-03-04 15:19:48.000000000","message":"I think it is a real 50/50 choice as to whether this is better here vs in the sub-classes. I\u0027m willing to give it the benefit for the doubt for now and merge it with it loaded here. It is easy to revisit should we need to","commit_id":"bc16eb4887f160a07efc085883acf0a552f16daa"}],"nova/virt/imagehandler/__init__.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"e518b781b771e21b1768b97cb2bf67201c7f95eb","unresolved":false,"context_lines":[{"line_number":24,"context_line":"import urlparse"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"import stevedore"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"from oslo.config import cfg"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"from nova import exception"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAATn%2F%2F1C8%3D","line":27,"updated":"2013-10-28 11:01:59.000000000","message":"this new line is unnecessary the oslo.config should be in the same group","commit_id":"d82919e81822db3b228715912c0be898bd36a405"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"756b400c37ee8397b19e58c6da3cf11b77d711b6","unresolved":false,"context_lines":[{"line_number":24,"context_line":"import urlparse"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"import stevedore"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"from oslo.config import cfg"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"from nova import exception"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAATn%2F%2Ftb0%3D","line":27,"in_reply_to":"AAAATn%2F%2F1C8%3D","updated":"2013-10-30 14:34:19.000000000","message":"Done, thanks.","commit_id":"d82919e81822db3b228715912c0be898bd36a405"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"a09fcd7f876b1f3921d6659a46a8532f2c83eb7d","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    if not handled:"},{"line_number":157,"context_line":"        LOG.error(_(\"Can\u0027t handle image: %(image_id)s %(target_path)s\") %"},{"line_number":158,"context_line":"                  {\u0027image_id\u0027: image_id, \u0027target_path\u0027: target_path})"},{"line_number":159,"context_line":"        raise exception.NoImageHandlerAvailable(image_id\u003dimage_id)"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAATn%2F%2F1TM%3D","line":159,"updated":"2013-10-28 09:37:26.000000000","message":"If you\u0027re not going to do anything to persist this global state across restarts, then I\u0027d expect additions to the test suite to validate that the behaviour is correct when IMAGE_HANDLERS_ASSO data is discarded.","commit_id":"d82919e81822db3b228715912c0be898bd36a405"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"756b400c37ee8397b19e58c6da3cf11b77d711b6","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    if not handled:"},{"line_number":157,"context_line":"        LOG.error(_(\"Can\u0027t handle image: %(image_id)s %(target_path)s\") %"},{"line_number":158,"context_line":"                  {\u0027image_id\u0027: image_id, \u0027target_path\u0027: target_path})"},{"line_number":159,"context_line":"        raise exception.NoImageHandlerAvailable(image_id\u003dimage_id)"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAATn%2F%2Fre4%3D","line":159,"in_reply_to":"AAAATn%2F%2F1TM%3D","updated":"2013-10-30 14:34:19.000000000","message":"Pls review next PS, thanks.","commit_id":"d82919e81822db3b228715912c0be898bd36a405"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"754fc2cd784307993c607b5e31513ea250bdc190","unresolved":false,"context_lines":[{"line_number":85,"context_line":"    \"\"\""},{"line_number":86,"context_line":"    global _IMAGE_HANDLERS, _IMAGE_HANDLERS_ASSO"},{"line_number":87,"context_line":"    if _IMAGE_HANDLERS:"},{"line_number":88,"context_line":"        # Some unit test cases call this more then one time"},{"line_number":89,"context_line":"        _IMAGE_HANDLERS \u003d []"},{"line_number":90,"context_line":"        _IMAGE_HANDLERS_ASSO \u003d {}"},{"line_number":91,"context_line":"    # for de-duplicate. using ordereddict lib to support both py26 and py27?"}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAAT3%2F%2F1nQ%3D","line":88,"updated":"2013-12-30 12:51:59.000000000","message":"would it be an option to reset these in the test Setup or Teardown?","commit_id":"51b03501cc21c9f20bb9d281713b6dbf98c4760f"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"754fc2cd784307993c607b5e31513ea250bdc190","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        name \u003d name.strip()"},{"line_number":98,"context_line":"        if name in processed_handler_names:"},{"line_number":99,"context_line":"            LOG.warn(_(\"Duplicated handler extension name in \u0027image_handlers\u0027 \""},{"line_number":100,"context_line":"                       \"option: %s, skip.\") % name)"},{"line_number":101,"context_line":"            continue"},{"line_number":102,"context_line":"        elif name not in ex.names():"},{"line_number":103,"context_line":"            LOG.warn(_(\"Invalid handler extension name in \u0027image_handlers\u0027 \""}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAAT3%2F%2F1nM%3D","line":100,"updated":"2013-12-30 12:51:59.000000000","message":"please use a , instead of as %","commit_id":"51b03501cc21c9f20bb9d281713b6dbf98c4760f"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"be4d5fdf34eef06280a41b46ac64f98e1147d717","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        name \u003d name.strip()"},{"line_number":98,"context_line":"        if name in processed_handler_names:"},{"line_number":99,"context_line":"            LOG.warn(_(\"Duplicated handler extension name in \u0027image_handlers\u0027 \""},{"line_number":100,"context_line":"                       \"option: %s, skip.\") % name)"},{"line_number":101,"context_line":"            continue"},{"line_number":102,"context_line":"        elif name not in ex.names():"},{"line_number":103,"context_line":"            LOG.warn(_(\"Invalid handler extension name in \u0027image_handlers\u0027 \""}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAAT3%2F%2F1go%3D","line":100,"in_reply_to":"AAAAT3%2F%2F1nM%3D","updated":"2013-12-30 14:37:52.000000000","message":"Done","commit_id":"51b03501cc21c9f20bb9d281713b6dbf98c4760f"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"754fc2cd784307993c607b5e31513ea250bdc190","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            continue"},{"line_number":102,"context_line":"        elif name not in ex.names():"},{"line_number":103,"context_line":"            LOG.warn(_(\"Invalid handler extension name in \u0027image_handlers\u0027 \""},{"line_number":104,"context_line":"                       \"option: %s, skip.\") % name)"},{"line_number":105,"context_line":"            continue"},{"line_number":106,"context_line":"        processed_handler_names.append(name)"},{"line_number":107,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAAT3%2F%2F1nE%3D","line":104,"updated":"2013-12-30 12:51:59.000000000","message":"ditto","commit_id":"51b03501cc21c9f20bb9d281713b6dbf98c4760f"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"be4d5fdf34eef06280a41b46ac64f98e1147d717","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            continue"},{"line_number":102,"context_line":"        elif name not in ex.names():"},{"line_number":103,"context_line":"            LOG.warn(_(\"Invalid handler extension name in \u0027image_handlers\u0027 \""},{"line_number":104,"context_line":"                       \"option: %s, skip.\") % name)"},{"line_number":105,"context_line":"            continue"},{"line_number":106,"context_line":"        processed_handler_names.append(name)"},{"line_number":107,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAAT3%2F%2F1gk%3D","line":104,"in_reply_to":"AAAAT3%2F%2F1nE%3D","updated":"2013-12-30 14:37:52.000000000","message":"Done","commit_id":"51b03501cc21c9f20bb9d281713b6dbf98c4760f"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"754fc2cd784307993c607b5e31513ea250bdc190","unresolved":false,"context_lines":[{"line_number":115,"context_line":"            _IMAGE_HANDLERS.append(mgr.driver)"},{"line_number":116,"context_line":"        except Exception as e:"},{"line_number":117,"context_line":"            LOG.warn(_(\"Failed to import image handler extension \""},{"line_number":118,"context_line":"                       \"%(name)s: %(e)s\") % {\u0027name\u0027: name, \u0027e\u0027: e})"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"def handle_image(context\u003dNone, image_id\u003dNone,"}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAAT3%2F%2F1lQ%3D","line":118,"updated":"2013-12-30 12:51:59.000000000","message":"is this exception raised?","commit_id":"51b03501cc21c9f20bb9d281713b6dbf98c4760f"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"be4d5fdf34eef06280a41b46ac64f98e1147d717","unresolved":false,"context_lines":[{"line_number":115,"context_line":"            _IMAGE_HANDLERS.append(mgr.driver)"},{"line_number":116,"context_line":"        except Exception as e:"},{"line_number":117,"context_line":"            LOG.warn(_(\"Failed to import image handler extension \""},{"line_number":118,"context_line":"                       \"%(name)s: %(e)s\") % {\u0027name\u0027: name, \u0027e\u0027: e})"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"def handle_image(context\u003dNone, image_id\u003dNone,"}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAAT3%2F%2F1g0%3D","line":118,"in_reply_to":"AAAAT3%2F%2F1lQ%3D","updated":"2013-12-30 14:37:52.000000000","message":"I think we\u0027d better just skip wrong ones and allow other normal handlers be initialized?","commit_id":"51b03501cc21c9f20bb9d281713b6dbf98c4760f"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"754fc2cd784307993c607b5e31513ea250bdc190","unresolved":false,"context_lines":[{"line_number":158,"context_line":"                    if handled:"},{"line_number":159,"context_line":"                        break"},{"line_number":160,"context_line":"    if not handled:"},{"line_number":161,"context_line":"        LOG.error(_(\"Can\u0027t handle image: %(image_id)s %(target_path)s\") %"},{"line_number":162,"context_line":"                  {\u0027image_id\u0027: image_id, \u0027target_path\u0027: target_path})"},{"line_number":163,"context_line":"        raise exception.NoImageHandlerAvailable(image_id\u003dimage_id)"}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAAT3%2F%2F1m8%3D","line":161,"updated":"2013-12-30 12:51:59.000000000","message":"ditto","commit_id":"51b03501cc21c9f20bb9d281713b6dbf98c4760f"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"be4d5fdf34eef06280a41b46ac64f98e1147d717","unresolved":false,"context_lines":[{"line_number":158,"context_line":"                    if handled:"},{"line_number":159,"context_line":"                        break"},{"line_number":160,"context_line":"    if not handled:"},{"line_number":161,"context_line":"        LOG.error(_(\"Can\u0027t handle image: %(image_id)s %(target_path)s\") %"},{"line_number":162,"context_line":"                  {\u0027image_id\u0027: image_id, \u0027target_path\u0027: target_path})"},{"line_number":163,"context_line":"        raise exception.NoImageHandlerAvailable(image_id\u003dimage_id)"}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAAT3%2F%2F1gs%3D","line":161,"in_reply_to":"AAAAT3%2F%2F1m8%3D","updated":"2013-12-30 14:37:52.000000000","message":"Done","commit_id":"51b03501cc21c9f20bb9d281713b6dbf98c4760f"},{"author":{"_account_id":8759,"name":"Arnaud Legendre","email":"arnaudleg@gmail.com","username":"arnaud"},"change_message_id":"27584a03d33aab636f68f0b4d9ceca06731c3f59","unresolved":false,"context_lines":[{"line_number":119,"context_line":""},{"line_number":120,"context_line":"def handle_image(context\u003dNone, image_id\u003dNone,"},{"line_number":121,"context_line":"                 user_id\u003dNone, project_id\u003dNone,"},{"line_number":122,"context_line":"                 target_path\u003dNone):"},{"line_number":123,"context_line":"    handled \u003d False"},{"line_number":124,"context_line":"    if target_path is not None:"},{"line_number":125,"context_line":"        target_path \u003d target_path.strip()"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAAUH%2F%2FvNo%3D","line":122,"updated":"2014-01-09 01:20:34.000000000","message":"could you add documentation for this function?\ncalling handle_image() without any param will throw an exception. Don\u0027t we want them required?","commit_id":"62223689d19918dad0ffc0970aeea95260450ce6"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"e908beddb2d179ceb5cdfe7a1b59ae10d630a32d","unresolved":false,"context_lines":[{"line_number":119,"context_line":""},{"line_number":120,"context_line":"def handle_image(context\u003dNone, image_id\u003dNone,"},{"line_number":121,"context_line":"                 user_id\u003dNone, project_id\u003dNone,"},{"line_number":122,"context_line":"                 target_path\u003dNone):"},{"line_number":123,"context_line":"    handled \u003d False"},{"line_number":124,"context_line":"    if target_path is not None:"},{"line_number":125,"context_line":"        target_path \u003d target_path.strip()"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAAUH%2F%2FtvE%3D","line":122,"in_reply_to":"AAAAUH%2F%2FvNo%3D","updated":"2014-01-09 09:58:48.000000000","message":"Yes you can\u0027t ignore them all, but from above logic you can see in different path it need different arguments.","commit_id":"62223689d19918dad0ffc0970aeea95260450ce6"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"892afb46e3d7a4a743f2b083cb7901c6803a5dca","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Copyright 2010 United States Government as represented by the"},{"line_number":4,"context_line":"# Administrator of the National Aeronautics and Space Administration."}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAAUH%2F%2FtrU%3D","line":1,"updated":"2014-01-09 10:00:13.000000000","message":"this is no longer needed - there are/were efforts to remove the #vim: ... from all headers","commit_id":"d110b6667c22b54868e5b7fe12c9a8305099d615"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"706885de52a70f486a99ef78a1cd6bd15713ba48","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Copyright 2010 United States Government as represented by the"},{"line_number":4,"context_line":"# Administrator of the National Aeronautics and Space Administration."}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAAUH%2F%2FtqU%3D","line":1,"in_reply_to":"AAAAUH%2F%2FtrU%3D","updated":"2014-01-09 10:05:12.000000000","message":"Done","commit_id":"d110b6667c22b54868e5b7fe12c9a8305099d615"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"892afb46e3d7a4a743f2b083cb7901c6803a5dca","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            _IMAGE_HANDLERS.append(mgr.driver)"},{"line_number":115,"context_line":"        except Exception as e:"},{"line_number":116,"context_line":"            LOG.warn(_(\"Failed to import image handler extension \""},{"line_number":117,"context_line":"                       \"%(name)s: %(e)s\") % {\u0027name\u0027: name, \u0027e\u0027: e})"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"def handle_image(context\u003dNone, image_id\u003dNone,"}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAAUH%2F%2Ftr8%3D","line":117,"updated":"2014-01-09 10:00:13.000000000","message":"please use a , instead of a %","commit_id":"d110b6667c22b54868e5b7fe12c9a8305099d615"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"706885de52a70f486a99ef78a1cd6bd15713ba48","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            _IMAGE_HANDLERS.append(mgr.driver)"},{"line_number":115,"context_line":"        except Exception as e:"},{"line_number":116,"context_line":"            LOG.warn(_(\"Failed to import image handler extension \""},{"line_number":117,"context_line":"                       \"%(name)s: %(e)s\") % {\u0027name\u0027: name, \u0027e\u0027: e})"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"def handle_image(context\u003dNone, image_id\u003dNone,"}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAAUH%2F%2Ftpc%3D","line":117,"in_reply_to":"AAAAUH%2F%2Ftr8%3D","updated":"2014-01-09 10:05:12.000000000","message":"Done","commit_id":"d110b6667c22b54868e5b7fe12c9a8305099d615"},{"author":{"_account_id":1107,"name":"Josh Durgin","email":"jdurgin@redhat.com","username":"jdurgin"},"change_message_id":"13ceb26295ddab66b26ecd7443d0d013629417fe","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        if context and image_id:"},{"line_number":149,"context_line":"            (image_service, _image_id) \u003d glance.get_remote_image_service("},{"line_number":150,"context_line":"                                                            context, image_id)"},{"line_number":151,"context_line":"            image_meta \u003d image_service.show(context, image_id)"},{"line_number":152,"context_line":"            # Note(zhiyan): Glance maybe can not receive image"},{"line_number":153,"context_line":"            # location property since Glance disable it by default."},{"line_number":154,"context_line":"            img_locs \u003d image_service.get_locations(image_meta)"}],"source_content_type":"text/x-python","patch_set":36,"id":"AAAAUH%2F%2FJRU%3D","line":151,"updated":"2014-01-17 01:19:30.000000000","message":"With this version, show is using glance\u0027s v1 api, which returns no locations, so get_locations(image_meta) below will always return [].\n\nIf you want to minimize the number of calls to glance, maybe adding a show_with_locations() to glance.py would make sense.","commit_id":"bc5644c107c4c0d8ebaad6134afbe95691fad056"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"4aa194a1b33a40480102b97d47c8af3d4fe81e12","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        if context and image_id:"},{"line_number":149,"context_line":"            (image_service, _image_id) \u003d glance.get_remote_image_service("},{"line_number":150,"context_line":"                                                            context, image_id)"},{"line_number":151,"context_line":"            image_meta \u003d image_service.show(context, image_id)"},{"line_number":152,"context_line":"            # Note(zhiyan): Glance maybe can not receive image"},{"line_number":153,"context_line":"            # location property since Glance disable it by default."},{"line_number":154,"context_line":"            img_locs \u003d image_service.get_locations(image_meta)"}],"source_content_type":"text/x-python","patch_set":36,"id":"AAAAUH%2F%2FHt8%3D","line":151,"in_reply_to":"AAAAUH%2F%2FJRU%3D","updated":"2014-01-17 08:44:55.000000000","message":"Done. Thanks.","commit_id":"bc5644c107c4c0d8ebaad6134afbe95691fad056"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"bcb07071decf795aa78b90e3b4ee7277185b277a","unresolved":false,"context_lines":[{"line_number":60,"context_line":"            # Note(zhiyan): location \u003d {\u0027url\u0027: \u0027string\u0027,"},{"line_number":61,"context_line":"            #                           \u0027metadata\u0027: {...}}"},{"line_number":62,"context_line":"            if len(schemes) \u003d\u003d 0:"},{"line_number":63,"context_line":"                # Note(zhiyan): handler have not scheme limitation."},{"line_number":64,"context_line":"                matched.append(loc)"},{"line_number":65,"context_line":"            elif urlparse.urlparse(loc[\u0027url\u0027]).scheme in schemes:"},{"line_number":66,"context_line":"                matched.append(loc)"}],"source_content_type":"text/x-python","patch_set":53,"id":"AAAAUX%2F%2FIeI%3D","line":63,"updated":"2014-02-16 16:05:51.000000000","message":"handler have not scheme limitation \u003d\u003e handler has no scheme limitation","commit_id":"efad55a6deac418c73d754a46290bc55b87ea5a7"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"c3d73f77152ec59a891d85d5e3a8d8ae550ea2c3","unresolved":false,"context_lines":[{"line_number":60,"context_line":"            # Note(zhiyan): location \u003d {\u0027url\u0027: \u0027string\u0027,"},{"line_number":61,"context_line":"            #                           \u0027metadata\u0027: {...}}"},{"line_number":62,"context_line":"            if len(schemes) \u003d\u003d 0:"},{"line_number":63,"context_line":"                # Note(zhiyan): handler have not scheme limitation."},{"line_number":64,"context_line":"                matched.append(loc)"},{"line_number":65,"context_line":"            elif urlparse.urlparse(loc[\u0027url\u0027]).scheme in schemes:"},{"line_number":66,"context_line":"                matched.append(loc)"}],"source_content_type":"text/x-python","patch_set":53,"id":"AAAAUX%2F%2B7EY%3D","line":63,"in_reply_to":"AAAAUX%2F%2FIeI%3D","updated":"2014-02-18 07:41:38.000000000","message":"Good catch!","commit_id":"efad55a6deac418c73d754a46290bc55b87ea5a7"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"bcb07071decf795aa78b90e3b4ee7277185b277a","unresolved":false,"context_lines":[{"line_number":150,"context_line":"                                                            context, image_id)"},{"line_number":151,"context_line":"            image_meta \u003d image_service.show(context, image_id)"},{"line_number":152,"context_line":"            # Note(zhiyan): Glance maybe can not receive image"},{"line_number":153,"context_line":"            # location property since Glance disable it by default."},{"line_number":154,"context_line":"            img_locs \u003d image_service.get_locations(context, image_id)"},{"line_number":155,"context_line":"            for image_handler in _IMAGE_HANDLERS:"},{"line_number":156,"context_line":"                matched_locs \u003d _match_locations(img_locs,"}],"source_content_type":"text/x-python","patch_set":53,"id":"AAAAUX%2F%2FIeE%3D","line":153,"updated":"2014-02-16 16:05:51.000000000","message":"disable \u003d\u003e disabled","commit_id":"efad55a6deac418c73d754a46290bc55b87ea5a7"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"c3d73f77152ec59a891d85d5e3a8d8ae550ea2c3","unresolved":false,"context_lines":[{"line_number":150,"context_line":"                                                            context, image_id)"},{"line_number":151,"context_line":"            image_meta \u003d image_service.show(context, image_id)"},{"line_number":152,"context_line":"            # Note(zhiyan): Glance maybe can not receive image"},{"line_number":153,"context_line":"            # location property since Glance disable it by default."},{"line_number":154,"context_line":"            img_locs \u003d image_service.get_locations(context, image_id)"},{"line_number":155,"context_line":"            for image_handler in _IMAGE_HANDLERS:"},{"line_number":156,"context_line":"                matched_locs \u003d _match_locations(img_locs,"}],"source_content_type":"text/x-python","patch_set":53,"id":"AAAAUX%2F%2B7EM%3D","line":153,"in_reply_to":"AAAAUX%2F%2FIeE%3D","updated":"2014-02-18 07:41:38.000000000","message":"Done","commit_id":"efad55a6deac418c73d754a46290bc55b87ea5a7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fd92810e3da3c05ed260d5e99277cabd78b5fc44","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    return matched"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"def load_image_handlers(driver):"},{"line_number":71,"context_line":"    \"\"\"Loading construct user configured image handlers."},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    Handler objects will be cached to keep handler instance as singleton"}],"source_content_type":"text/x-python","patch_set":60,"id":"AAAAVn%2F%2Fqik%3D","line":70,"updated":"2014-03-04 19:35:48.000000000","message":"Should this be synchronized on the driver?","commit_id":"a55bbbfa1957d02b3006a51afcf4984a1f8ff886"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"73edf513c090c84fcaa0a7590301e9739b5b07af","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    return matched"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"def load_image_handlers(driver):"},{"line_number":71,"context_line":"    \"\"\"Loading construct user configured image handlers."},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    Handler objects will be cached to keep handler instance as singleton"}],"source_content_type":"text/x-python","patch_set":60,"id":"AAAAVn%2F%2FqRw%3D","line":70,"in_reply_to":"AAAAVn%2F%2Fqik%3D","updated":"2014-03-04 19:53:31.000000000","message":"I think it\u0027s OK since this code will be called only once when hypervisor driver creation.","commit_id":"a55bbbfa1957d02b3006a51afcf4984a1f8ff886"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fd92810e3da3c05ed260d5e99277cabd78b5fc44","unresolved":false,"context_lines":[{"line_number":76,"context_line":"    layer with more advanced functions."},{"line_number":77,"context_line":"    The handler\u0027s __init__() need do some re-preparing work if it needed,"},{"line_number":78,"context_line":"    for example when nova-compute service restart or host reboot,"},{"line_number":79,"context_line":"    CinderImageHandler will need to re-preapre iscsi/fc link for volumes"},{"line_number":80,"context_line":"    those already be cached on compute host as template image previously."},{"line_number":81,"context_line":"    \"\"\""},{"line_number":82,"context_line":"    global _IMAGE_HANDLERS, _IMAGE_HANDLERS_ASSO"}],"source_content_type":"text/x-python","patch_set":60,"id":"AAAAVn%2F%2Fqi8%3D","line":79,"updated":"2014-03-04 19:35:48.000000000","message":"s/preapre/prepare/","commit_id":"a55bbbfa1957d02b3006a51afcf4984a1f8ff886"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"73edf513c090c84fcaa0a7590301e9739b5b07af","unresolved":false,"context_lines":[{"line_number":76,"context_line":"    layer with more advanced functions."},{"line_number":77,"context_line":"    The handler\u0027s __init__() need do some re-preparing work if it needed,"},{"line_number":78,"context_line":"    for example when nova-compute service restart or host reboot,"},{"line_number":79,"context_line":"    CinderImageHandler will need to re-preapre iscsi/fc link for volumes"},{"line_number":80,"context_line":"    those already be cached on compute host as template image previously."},{"line_number":81,"context_line":"    \"\"\""},{"line_number":82,"context_line":"    global _IMAGE_HANDLERS, _IMAGE_HANDLERS_ASSO"}],"source_content_type":"text/x-python","patch_set":60,"id":"AAAAVn%2F%2FqVE%3D","line":79,"in_reply_to":"AAAAVn%2F%2Fqi8%3D","updated":"2014-03-04 19:53:31.000000000","message":"Done","commit_id":"a55bbbfa1957d02b3006a51afcf4984a1f8ff886"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fd92810e3da3c05ed260d5e99277cabd78b5fc44","unresolved":false,"context_lines":[{"line_number":171,"context_line":"                        return"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    if not handled:"},{"line_number":174,"context_line":"        LOG.error(_(\"Can\u0027t handle image: %(image_id)s %(target_path)s\"),"},{"line_number":175,"context_line":"                  {\u0027image_id\u0027: image_id, \u0027target_path\u0027: target_path})"},{"line_number":176,"context_line":"        raise exception.NoImageHandlerAvailable(image_id\u003dimage_id)"}],"source_content_type":"text/x-python","patch_set":60,"id":"AAAAVn%2F%2Fqgc%3D","line":174,"updated":"2014-03-04 19:35:48.000000000","message":"nit: avoid apostrophes in translatable messages.","commit_id":"a55bbbfa1957d02b3006a51afcf4984a1f8ff886"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"73edf513c090c84fcaa0a7590301e9739b5b07af","unresolved":false,"context_lines":[{"line_number":171,"context_line":"                        return"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    if not handled:"},{"line_number":174,"context_line":"        LOG.error(_(\"Can\u0027t handle image: %(image_id)s %(target_path)s\"),"},{"line_number":175,"context_line":"                  {\u0027image_id\u0027: image_id, \u0027target_path\u0027: target_path})"},{"line_number":176,"context_line":"        raise exception.NoImageHandlerAvailable(image_id\u003dimage_id)"}],"source_content_type":"text/x-python","patch_set":60,"id":"AAAAVn%2F%2FqV0%3D","line":174,"in_reply_to":"AAAAVn%2F%2Fqgc%3D","updated":"2014-03-04 19:53:31.000000000","message":"Done","commit_id":"a55bbbfa1957d02b3006a51afcf4984a1f8ff886"}],"nova/virt/imagehandler/base.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"754fc2cd784307993c607b5e31513ea250bdc190","unresolved":false,"context_lines":[{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        :retval a boolean value to inform handling success or not"},{"line_number":82,"context_line":"        \"\"\""},{"line_number":83,"context_line":"        with lockutils.lock(\"nova-imagehandler-%s\" % image_id,"},{"line_number":84,"context_line":"                            lock_file_prefix\u003d\u0027nova-\u0027, external\u003dTrue):"},{"line_number":85,"context_line":"            ret \u003d self._fetch_image(context, image_id, path,"},{"line_number":86,"context_line":"                                    user_id, project_id, location,"}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAAT3%2F%2F1l8%3D","line":83,"updated":"2013-12-30 12:51:59.000000000","message":"if this code is invoked twice with the same image, then the one will wait for other to complete. will the image be fetched again?","commit_id":"51b03501cc21c9f20bb9d281713b6dbf98c4760f"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"be4d5fdf34eef06280a41b46ac64f98e1147d717","unresolved":false,"context_lines":[{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        :retval a boolean value to inform handling success or not"},{"line_number":82,"context_line":"        \"\"\""},{"line_number":83,"context_line":"        with lockutils.lock(\"nova-imagehandler-%s\" % image_id,"},{"line_number":84,"context_line":"                            lock_file_prefix\u003d\u0027nova-\u0027, external\u003dTrue):"},{"line_number":85,"context_line":"            ret \u003d self._fetch_image(context, image_id, path,"},{"line_number":86,"context_line":"                                    user_id, project_id, location,"}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAAT3%2F%2F1fY%3D","line":83,"in_reply_to":"AAAAT3%2F%2F1l8%3D","updated":"2013-12-30 14:37:52.000000000","message":"I think the answer is yes. And IMO whether fetch an existing image again or not is a responsibility of upper layer code, other word, this function just do image fetching when upper layer code call it. btw, I consider prevent race condition issue is a responsibility of it so I put a lock here.\n\nSo garyk, are you meaning add a image existing checking before the call at line #85? tbh I still think we need left this right to upper layer code, since, for example, it probably just want to re-fetch image. And if upper layer code need, he can do existing checking before call this fetch_image() method as he need. (it also means we need add an image_existing() new method to handler, and I believe this method is worth absolutely)\n\nThanks garyk.","commit_id":"51b03501cc21c9f20bb9d281713b6dbf98c4760f"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"754fc2cd784307993c607b5e31513ea250bdc190","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        \"\"\""},{"line_number":108,"context_line":"        with lockutils.lock(\"nova-imagehandler-%s\" % image_id,"},{"line_number":109,"context_line":"                            lock_file_prefix\u003d\u0027nova-\u0027, external\u003dTrue):"},{"line_number":110,"context_line":"            ret \u003d self._remove_image(path, context, image_id,"},{"line_number":111,"context_line":"                                     user_id, project_id, location,"},{"line_number":112,"context_line":"                                     **kwargs)"},{"line_number":113,"context_line":"            if ret:"}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAAT3%2F%2F1l0%3D","line":110,"updated":"2013-12-30 12:51:59.000000000","message":"similar question here","commit_id":"51b03501cc21c9f20bb9d281713b6dbf98c4760f"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"754fc2cd784307993c607b5e31513ea250bdc190","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        \"\"\""},{"line_number":134,"context_line":"        with lockutils.lock(\"nova-imagehandler-%s\" % image_id,"},{"line_number":135,"context_line":"                            lock_file_prefix\u003d\u0027nova-\u0027, external\u003dTrue):"},{"line_number":136,"context_line":"            ret \u003d self._move_image(src_path, dst_path, context, image_id,"},{"line_number":137,"context_line":"                                   user_id, project_id, location,"},{"line_number":138,"context_line":"                                   **kwargs)"},{"line_number":139,"context_line":"            if ret:"}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAAT3%2F%2F1l4%3D","line":136,"updated":"2013-12-30 12:51:59.000000000","message":"similar question here","commit_id":"51b03501cc21c9f20bb9d281713b6dbf98c4760f"},{"author":{"_account_id":8759,"name":"Arnaud Legendre","email":"arnaudleg@gmail.com","username":"arnaud"},"change_message_id":"f8f9622e4589d107c3884c96a8db14fba3dfa8d8","unresolved":false,"context_lines":[{"line_number":87,"context_line":"                                    **kwargs)"},{"line_number":88,"context_line":"            if ret:"},{"line_number":89,"context_line":"                self._associate(path, location)"},{"line_number":90,"context_line":"            self._set_handled(ret)"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def remove_image(self, path,"},{"line_number":93,"context_line":"                     context\u003dNone, image_id\u003dNone,"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAAUH%2F%2Fu9I%3D","line":90,"updated":"2014-01-09 02:45:03.000000000","message":"could you explain how _last_ops_handled works?\nhandle_image() in __init__ will return without exceptions only if this variable is set to True.\n\nThis is not totally clear to me what is the requirement to have this variable switched to True.","commit_id":"62223689d19918dad0ffc0970aeea95260450ce6"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"e908beddb2d179ceb5cdfe7a1b59ae10d630a32d","unresolved":false,"context_lines":[{"line_number":87,"context_line":"                                    **kwargs)"},{"line_number":88,"context_line":"            if ret:"},{"line_number":89,"context_line":"                self._associate(path, location)"},{"line_number":90,"context_line":"            self._set_handled(ret)"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def remove_image(self, path,"},{"line_number":93,"context_line":"                     context\u003dNone, image_id\u003dNone,"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAAUH%2F%2Ftrs%3D","line":90,"in_reply_to":"AAAAUH%2F%2Fu9I%3D","updated":"2014-01-09 09:58:48.000000000","message":"handle_image() as a generator will return each available handle for the upper layer code do particular image handling which just like this \"fetch_image\" calls, e.g. https://review.openstack.org/#/c/33409/26/nova/virt/imagehandler/__init__.py Line 147, and a handler should has a way to tell handle_image() stop trying next handler since it already handle image successful. We know \"yield\" has no way to return a value, so I use _last_ops_handled as a flag to control handle_image() looping, and in each handler interface I update this flag.","commit_id":"62223689d19918dad0ffc0970aeea95260450ce6"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"892afb46e3d7a4a743f2b083cb7901c6803a5dca","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Copyright 2010 United States Government as represented by the"},{"line_number":4,"context_line":"# Administrator of the National Aeronautics and Space Administration."}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAAUH%2F%2FtrE%3D","line":1,"updated":"2014-01-09 10:00:13.000000000","message":"ditto","commit_id":"d110b6667c22b54868e5b7fe12c9a8305099d615"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"706885de52a70f486a99ef78a1cd6bd15713ba48","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Copyright 2010 United States Government as represented by the"},{"line_number":4,"context_line":"# Administrator of the National Aeronautics and Space Administration."}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAAUH%2F%2FtqQ%3D","line":1,"in_reply_to":"AAAAUH%2F%2FtrE%3D","updated":"2014-01-09 10:05:12.000000000","message":"Done","commit_id":"d110b6667c22b54868e5b7fe12c9a8305099d615"},{"author":{"_account_id":8759,"name":"Arnaud Legendre","email":"arnaudleg@gmail.com","username":"arnaud"},"change_message_id":"81b71241d6a96b6d39271b66bf57748237fadb4c","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        \"\"\"Returns a tuple of schemes which this handler can handle.\"\"\""},{"line_number":64,"context_line":"        pass"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def fetch_image(self, context, image_id, path,"},{"line_number":67,"context_line":"                    user_id\u003dNone, project_id\u003dNone, location\u003dNone,"},{"line_number":68,"context_line":"                    **kwargs):"},{"line_number":69,"context_line":"        \"\"\"Fetch an image from a location to local."}],"source_content_type":"text/x-python","patch_set":30,"id":"AAAAUH%2F%2FkT0%3D","line":66,"updated":"2014-01-10 23:57:20.000000000","message":"ZhiYan, I am a bit worried about the \u0027path\u0027 parameter.\nFor the vmware image handler, there is no path (since we HTTP PUT the file to the destination).\nConsequently, if we do not specify image_handlers\u003d\u0027vmware\u0027 in the configuration, fetch_image will use the DownloadImageHandler (by default)\nSince, path will be None, fetch_image will fail...\n\nI think this is very problematic.\nOne way to solve this would be to force a specific image handler without using the configuration file: for example by adding an extra parameter to the function load_image_handler.\n\nThe vmware driver will use exclusively the vmware image handler. I don\u0027t think it can work with the download image handler.\n\nHope you get my point. Let me know what you think.\n\nThanks,\nArnaud","commit_id":"798ed6d6cfaec8a55d81a2eaf3d8446ca772cf1e"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"a47e5463aadd16bb50b91016bb5477255c8b51e9","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        \"\"\"Returns a tuple of schemes which this handler can handle.\"\"\""},{"line_number":64,"context_line":"        pass"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def fetch_image(self, context, image_id, path,"},{"line_number":67,"context_line":"                    user_id\u003dNone, project_id\u003dNone, location\u003dNone,"},{"line_number":68,"context_line":"                    **kwargs):"},{"line_number":69,"context_line":"        \"\"\"Fetch an image from a location to local."}],"source_content_type":"text/x-python","patch_set":30,"id":"AAAAUH%2F%2FguU%3D","line":66,"in_reply_to":"AAAAUH%2F%2FkT0%3D","updated":"2014-01-13 05:55:41.000000000","message":"Hi Arnaud, thanks for your input, I have replied you for this by inline comments in https://review.openstack.org/#/c/63975/4/nova/virt/imagehandler/vmware.py , and we can talk it more in IRC if you needed.","commit_id":"798ed6d6cfaec8a55d81a2eaf3d8446ca772cf1e"},{"author":{"_account_id":1107,"name":"Josh Durgin","email":"jdurgin@redhat.com","username":"jdurgin"},"change_message_id":"bb77d883a728a84f4a6c628e0498cb4dc381fe93","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        :retval a boolean value to inform handling success or not"},{"line_number":79,"context_line":"        \"\"\""},{"line_number":80,"context_line":"        with lockutils.lock(\"nova-imagehandler-%s\" % uuid.uuid4(),"},{"line_number":81,"context_line":"                            lock_file_prefix\u003d\u0027nova-\u0027, external\u003dTrue):"},{"line_number":82,"context_line":"            ret \u003d self._fetch_image(context, image_meta, path,"},{"line_number":83,"context_line":"                                    user_id, project_id, location,"}],"source_content_type":"text/x-python","patch_set":35,"id":"AAAAUH%2F%2FPD0%3D","line":80,"updated":"2014-01-16 03:28:04.000000000","message":"Why have the lock if it\u0027s a randomly generated name? Same for remove_image() and move_image().","commit_id":"903a6d884e8ba0a41051021664e100a4e26aba89"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"c2e9548ce303949f049483096edf3db99f6b1814","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        :retval a boolean value to inform handling success or not"},{"line_number":79,"context_line":"        \"\"\""},{"line_number":80,"context_line":"        with lockutils.lock(\"nova-imagehandler-%s\" % uuid.uuid4(),"},{"line_number":81,"context_line":"                            lock_file_prefix\u003d\u0027nova-\u0027, external\u003dTrue):"},{"line_number":82,"context_line":"            ret \u003d self._fetch_image(context, image_meta, path,"},{"line_number":83,"context_line":"                                    user_id, project_id, location,"}],"source_content_type":"text/x-python","patch_set":35,"id":"AAAAUH%2F%2FKPM%3D","line":80,"in_reply_to":"AAAAUH%2F%2FPD0%3D","updated":"2014-01-16 21:00:35.000000000","message":"Nice catch…","commit_id":"903a6d884e8ba0a41051021664e100a4e26aba89"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"57486e8bea425d10acb7f954336725c756f91510","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        :retval a boolean value to inform handling success or not"},{"line_number":79,"context_line":"        \"\"\""},{"line_number":80,"context_line":"        with lockutils.lock(\"nova-imagehandler-%s\" % uuid.uuid4(),"},{"line_number":81,"context_line":"                            lock_file_prefix\u003d\u0027nova-\u0027, external\u003dTrue):"},{"line_number":82,"context_line":"            ret \u003d self._fetch_image(context, image_meta, path,"},{"line_number":83,"context_line":"                                    user_id, project_id, location,"}],"source_content_type":"text/x-python","patch_set":35,"id":"AAAAUH%2F%2FO0o%3D","line":80,"in_reply_to":"AAAAUH%2F%2FPD0%3D","updated":"2014-01-16 05:22:21.000000000","message":"oops, will fix in next PS. thanks!","commit_id":"903a6d884e8ba0a41051021664e100a4e26aba89"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"85f072b3c892e7c040c662277f9884f871f48ab2","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        :param location: Image location to handling"},{"line_number":122,"context_line":"        :param kwargs: Other handler-specified arguments"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        :retval a boolean value to inform handling success or not"},{"line_number":125,"context_line":"        \"\"\""},{"line_number":126,"context_line":"        with lockutils.lock(\"nova-imagehandler-%s\" % image_id,"},{"line_number":127,"context_line":"                            lock_file_prefix\u003d\u0027nova-\u0027, external\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":38,"id":"AAAAUH%2F%2Bx0Q%3D","line":124,"updated":"2014-01-22 08:35:29.000000000","message":"i do not see a Boolean returned. am i missing something here?","commit_id":"5f3043f11e359d1896ed1b3809ec4a8de637ec20"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"86e3ead16cbd1e5f44811d471f5498e8ecb0e00c","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        :param location: Image location to handling"},{"line_number":122,"context_line":"        :param kwargs: Other handler-specified arguments"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        :retval a boolean value to inform handling success or not"},{"line_number":125,"context_line":"        \"\"\""},{"line_number":126,"context_line":"        with lockutils.lock(\"nova-imagehandler-%s\" % image_id,"},{"line_number":127,"context_line":"                            lock_file_prefix\u003d\u0027nova-\u0027, external\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":38,"id":"AAAAUH%2F%2Bxxc%3D","line":124,"in_reply_to":"AAAAUH%2F%2Bx0Q%3D","updated":"2014-01-22 08:53:17.000000000","message":"good catch garyk, thanks! I believe this is a wrong docs and need to be updated in next PS.","commit_id":"5f3043f11e359d1896ed1b3809ec4a8de637ec20"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"a5851f7a954d418abe3d256bbc83f3646b638cc6","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        :param location: Image location to handling"},{"line_number":122,"context_line":"        :param kwargs: Other handler-specified arguments"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        :retval a boolean value to inform handling success or not"},{"line_number":125,"context_line":"        \"\"\""},{"line_number":126,"context_line":"        with lockutils.lock(\"nova-imagehandler-%s\" % image_id,"},{"line_number":127,"context_line":"                            lock_file_prefix\u003d\u0027nova-\u0027, external\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":38,"id":"AAAAUH%2F%2BwHM%3D","line":124,"in_reply_to":"AAAAUH%2F%2Bxxc%3D","updated":"2014-01-22 14:30:22.000000000","message":"ok, thanks!","commit_id":"5f3043f11e359d1896ed1b3809ec4a8de637ec20"}],"nova/virt/imagehandler/download.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"892afb46e3d7a4a743f2b083cb7901c6803a5dca","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Copyright 2010 United States Government as represented by the"},{"line_number":4,"context_line":"# Administrator of the National Aeronautics and Space Administration."}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAAUH%2F%2FtrA%3D","line":1,"updated":"2014-01-09 10:00:13.000000000","message":"ditto","commit_id":"d110b6667c22b54868e5b7fe12c9a8305099d615"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"706885de52a70f486a99ef78a1cd6bd15713ba48","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Copyright 2010 United States Government as represented by the"},{"line_number":4,"context_line":"# Administrator of the National Aeronautics and Space Administration."}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAAUH%2F%2FtqI%3D","line":1,"in_reply_to":"AAAAUH%2F%2FtrA%3D","updated":"2014-01-09 10:05:12.000000000","message":"Done","commit_id":"d110b6667c22b54868e5b7fe12c9a8305099d615"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fd92810e3da3c05ed260d5e99277cabd78b5fc44","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    def _fetch_image(self, context, image_id, image_meta, path,"},{"line_number":41,"context_line":"                     user_id\u003dNone, project_id\u003dNone, location\u003dNone,"},{"line_number":42,"context_line":"                     **kwargs):"},{"line_number":43,"context_line":"        # TODO(vish): Improve context handling and add owner and auth data"},{"line_number":44,"context_line":"        #             when it is added to glance.  Right now there is no"},{"line_number":45,"context_line":"        #             auth checking in glance, so we assume that access was"},{"line_number":46,"context_line":"        #             checked before we got here."}],"source_content_type":"text/x-python","patch_set":60,"id":"AAAAVn%2F%2Fqdw%3D","line":43,"updated":"2014-03-04 19:35:48.000000000","message":"Is this TODO still valid? Typically don\u0027t like to see TODOs carried around in refactored code.","commit_id":"a55bbbfa1957d02b3006a51afcf4984a1f8ff886"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"73edf513c090c84fcaa0a7590301e9739b5b07af","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    def _fetch_image(self, context, image_id, image_meta, path,"},{"line_number":41,"context_line":"                     user_id\u003dNone, project_id\u003dNone, location\u003dNone,"},{"line_number":42,"context_line":"                     **kwargs):"},{"line_number":43,"context_line":"        # TODO(vish): Improve context handling and add owner and auth data"},{"line_number":44,"context_line":"        #             when it is added to glance.  Right now there is no"},{"line_number":45,"context_line":"        #             auth checking in glance, so we assume that access was"},{"line_number":46,"context_line":"        #             checked before we got here."}],"source_content_type":"text/x-python","patch_set":60,"id":"AAAAVn%2F%2FqTs%3D","line":43,"in_reply_to":"AAAAVn%2F%2Fqdw%3D","updated":"2014-03-04 19:53:31.000000000","message":"I believe it is still valid.","commit_id":"a55bbbfa1957d02b3006a51afcf4984a1f8ff886"}],"nova/virt/imagehandler/downloading.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"754fc2cd784307993c607b5e31513ea250bdc190","unresolved":false,"context_lines":[{"line_number":65,"context_line":"                    context\u003dNone, image_id\u003dNone,"},{"line_number":66,"context_line":"                    user_id\u003dNone, project_id\u003dNone, location\u003dNone,"},{"line_number":67,"context_line":"                    **kwargs):"},{"line_number":68,"context_line":"        os.rename(src_path, dst_path)"},{"line_number":69,"context_line":"        return os.path.exists(dst_path) and not os.path.exists(src_path)"}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAAT3%2F%2F1lk%3D","line":68,"updated":"2013-12-30 12:51:59.000000000","message":"what if the file was already moved? do we need to check that it exists?","commit_id":"51b03501cc21c9f20bb9d281713b6dbf98c4760f"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"be4d5fdf34eef06280a41b46ac64f98e1147d717","unresolved":false,"context_lines":[{"line_number":65,"context_line":"                    context\u003dNone, image_id\u003dNone,"},{"line_number":66,"context_line":"                    user_id\u003dNone, project_id\u003dNone, location\u003dNone,"},{"line_number":67,"context_line":"                    **kwargs):"},{"line_number":68,"context_line":"        os.rename(src_path, dst_path)"},{"line_number":69,"context_line":"        return os.path.exists(dst_path) and not os.path.exists(src_path)"}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAAT3%2F%2F1fE%3D","line":68,"in_reply_to":"AAAAT3%2F%2F1lk%3D","updated":"2013-12-30 14:37:52.000000000","message":"Yes I can.","commit_id":"51b03501cc21c9f20bb9d281713b6dbf98c4760f"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"6a88876079cbacb7e857087680c81ad350eb1a52","unresolved":false,"context_lines":[{"line_number":18,"context_line":"#    under the License."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"\"\"\""},{"line_number":21,"context_line":"Downloading image handler implementation."},{"line_number":22,"context_line":"\"\"\""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"import os"}],"source_content_type":"text/x-python","patch_set":25,"id":"AAAAT3%2F%2F0fc%3D","line":21,"updated":"2013-12-30 20:28:52.000000000","message":"I might suggest using \"download.py\" instead of \"downloading.py\" for the name of this file/image handler","commit_id":"c4bd476f319964adfcf6d47447fa630c3e070048"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"be515a72527db9537a9cda32229718e78e0ee98c","unresolved":false,"context_lines":[{"line_number":18,"context_line":"#    under the License."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"\"\"\""},{"line_number":21,"context_line":"Downloading image handler implementation."},{"line_number":22,"context_line":"\"\"\""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"import os"}],"source_content_type":"text/x-python","patch_set":25,"id":"AAAAT3%2F%2FvAs%3D","line":21,"in_reply_to":"AAAAT3%2F%2F0fc%3D","updated":"2014-01-02 20:44:40.000000000","message":"Done","commit_id":"c4bd476f319964adfcf6d47447fa630c3e070048"}],"nova/virt/images.py":[{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"03f7cd8ad34c6c66e0cfbac02bdf7a8455299365","unresolved":false,"context_lines":[{"line_number":48,"context_line":"                default\u003d["},{"line_number":49,"context_line":"                  \u0027nova.virt.images.DefaultImageHandler\u0027"},{"line_number":50,"context_line":"                  ],"},{"line_number":51,"context_line":"                help\u003d\u0027Which handler class names to use for handling image.\u0027"},{"line_number":52,"context_line":"                     \u0027Choice class from the list by its order.\u0027),"},{"line_number":53,"context_line":"]"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAQn%2F%2Fx1E%3D","line":51,"updated":"2013-07-23 12:50:23.000000000","message":"Are you saying that first available one is chosen always? or each specified handler is called and the first one that returns something is used? Please reword the sentence to make it clear.","commit_id":"ecb15f7432dbc40aeb8ce6e8b965a07891f27b5b"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"15ef419f841ff252b9ce0e74ef9e5fd6475ff01c","unresolved":false,"context_lines":[{"line_number":48,"context_line":"                default\u003d["},{"line_number":49,"context_line":"                  \u0027nova.virt.images.DefaultImageHandler\u0027"},{"line_number":50,"context_line":"                  ],"},{"line_number":51,"context_line":"                help\u003d\u0027Which handler class names to use for handling image.\u0027"},{"line_number":52,"context_line":"                     \u0027Choice class from the list by its order.\u0027),"},{"line_number":53,"context_line":"]"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAQn%2F%2FvIE%3D","line":51,"in_reply_to":"AAAAQn%2F%2Fx1E%3D","updated":"2013-07-24 07:11:24.000000000","message":"Done","commit_id":"ecb15f7432dbc40aeb8ce6e8b965a07891f27b5b"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"b72c8984557e6ce42d09f8ca8e0b3f2bbbd56f79","unresolved":false,"context_lines":[{"line_number":286,"context_line":"        self.driver \u003d driver"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"    @abc.abstractmethod"},{"line_number":289,"context_line":"    def get_schemes(self):"},{"line_number":290,"context_line":"        pass"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"    def fetch_image(self, context, image_id, path,"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAQn%2F%2FJ3U%3D","line":289,"updated":"2013-08-06 09:27:38.000000000","message":"Please document what it is expected to be returned here.","commit_id":"f481fb0c36c670434f5a585095814e71e4c8804a"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"9139f48001e810f25c065ac90df6dbe17dc389a7","unresolved":false,"context_lines":[{"line_number":286,"context_line":"        self.driver \u003d driver"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"    @abc.abstractmethod"},{"line_number":289,"context_line":"    def get_schemes(self):"},{"line_number":290,"context_line":"        pass"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"    def fetch_image(self, context, image_id, path,"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAQn%2F%2FF%2BM%3D","line":289,"in_reply_to":"AAAAQn%2F%2FJ3U%3D","updated":"2013-08-07 12:14:37.000000000","message":"Done","commit_id":"f481fb0c36c670434f5a585095814e71e4c8804a"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"b72c8984557e6ce42d09f8ca8e0b3f2bbbd56f79","unresolved":false,"context_lines":[{"line_number":336,"context_line":""},{"line_number":337,"context_line":"    @abc.abstractmethod"},{"line_number":338,"context_line":"    def _fetch_image(self, context, image_id, path,"},{"line_number":339,"context_line":"                     user_id\u003dNone, project_id\u003dNone, location\u003dNone):"},{"line_number":340,"context_line":"        pass"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAQn%2F%2FJ3Q%3D","line":339,"updated":"2013-08-06 09:27:38.000000000","message":"Please document what it is expected from this method when implemented.","commit_id":"f481fb0c36c670434f5a585095814e71e4c8804a"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"9139f48001e810f25c065ac90df6dbe17dc389a7","unresolved":false,"context_lines":[{"line_number":336,"context_line":""},{"line_number":337,"context_line":"    @abc.abstractmethod"},{"line_number":338,"context_line":"    def _fetch_image(self, context, image_id, path,"},{"line_number":339,"context_line":"                     user_id\u003dNone, project_id\u003dNone, location\u003dNone):"},{"line_number":340,"context_line":"        pass"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAQn%2F%2FF9o%3D","line":339,"in_reply_to":"AAAAQn%2F%2FJ3Q%3D","updated":"2013-08-07 12:14:37.000000000","message":"Done","commit_id":"f481fb0c36c670434f5a585095814e71e4c8804a"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"b72c8984557e6ce42d09f8ca8e0b3f2bbbd56f79","unresolved":false,"context_lines":[{"line_number":343,"context_line":"    def _remove_image(self, path,"},{"line_number":344,"context_line":"                      context\u003dNone, image_id\u003dNone,"},{"line_number":345,"context_line":"                      user_id\u003dNone, project_id\u003dNone,"},{"line_number":346,"context_line":"                      location\u003dNone):"},{"line_number":347,"context_line":"        pass"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAQn%2F%2FJ3M%3D","line":346,"updated":"2013-08-06 09:27:38.000000000","message":"Same here.","commit_id":"f481fb0c36c670434f5a585095814e71e4c8804a"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"9139f48001e810f25c065ac90df6dbe17dc389a7","unresolved":false,"context_lines":[{"line_number":343,"context_line":"    def _remove_image(self, path,"},{"line_number":344,"context_line":"                      context\u003dNone, image_id\u003dNone,"},{"line_number":345,"context_line":"                      user_id\u003dNone, project_id\u003dNone,"},{"line_number":346,"context_line":"                      location\u003dNone):"},{"line_number":347,"context_line":"        pass"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAQn%2F%2FF8s%3D","line":346,"in_reply_to":"AAAAQn%2F%2FJ3M%3D","updated":"2013-08-07 12:14:37.000000000","message":"Done","commit_id":"f481fb0c36c670434f5a585095814e71e4c8804a"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"b72c8984557e6ce42d09f8ca8e0b3f2bbbd56f79","unresolved":false,"context_lines":[{"line_number":349,"context_line":"    @abc.abstractmethod"},{"line_number":350,"context_line":"    def _move_image(self, src_path, dst_path,"},{"line_number":351,"context_line":"                    context\u003dNone, image_id\u003dNone, user_id\u003dNone, project_id\u003dNone,"},{"line_number":352,"context_line":"                    location\u003dNone):"},{"line_number":353,"context_line":"        pass"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"    def _associate(self, path, location):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAQn%2F%2FJ3I%3D","line":352,"updated":"2013-08-06 09:27:38.000000000","message":"Same here.","commit_id":"f481fb0c36c670434f5a585095814e71e4c8804a"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"9139f48001e810f25c065ac90df6dbe17dc389a7","unresolved":false,"context_lines":[{"line_number":349,"context_line":"    @abc.abstractmethod"},{"line_number":350,"context_line":"    def _move_image(self, src_path, dst_path,"},{"line_number":351,"context_line":"                    context\u003dNone, image_id\u003dNone, user_id\u003dNone, project_id\u003dNone,"},{"line_number":352,"context_line":"                    location\u003dNone):"},{"line_number":353,"context_line":"        pass"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"    def _associate(self, path, location):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAQn%2F%2FF8w%3D","line":352,"in_reply_to":"AAAAQn%2F%2FJ3I%3D","updated":"2013-08-07 12:14:37.000000000","message":"Done","commit_id":"f481fb0c36c670434f5a585095814e71e4c8804a"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"a9525afb79b91339c45db89b6ffb55a97ff155a3","unresolved":false,"context_lines":[{"line_number":499,"context_line":"                    if handled:"},{"line_number":500,"context_line":"                        break"},{"line_number":501,"context_line":"    if not handled:"},{"line_number":502,"context_line":"        LOG.error(_(\"Cann\u0027t handle image: %(image_id)s %(target_path)s\") % {"},{"line_number":503,"context_line":"                        \u0027image_id\u0027: image_id, \u0027target_path\u0027: target_path})"},{"line_number":504,"context_line":"        raise exception.NoImageHandlerAvailable()"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAQn%2F%2FKro%3D","line":502,"updated":"2013-08-06 03:51:26.000000000","message":"Can\u0027t should only have 1 n, and probably be Cannot.","commit_id":"f481fb0c36c670434f5a585095814e71e4c8804a"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"9139f48001e810f25c065ac90df6dbe17dc389a7","unresolved":false,"context_lines":[{"line_number":499,"context_line":"                    if handled:"},{"line_number":500,"context_line":"                        break"},{"line_number":501,"context_line":"    if not handled:"},{"line_number":502,"context_line":"        LOG.error(_(\"Cann\u0027t handle image: %(image_id)s %(target_path)s\") % {"},{"line_number":503,"context_line":"                        \u0027image_id\u0027: image_id, \u0027target_path\u0027: target_path})"},{"line_number":504,"context_line":"        raise exception.NoImageHandlerAvailable()"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAQn%2F%2FF%2FA%3D","line":502,"in_reply_to":"AAAAQn%2F%2FKro%3D","updated":"2013-08-07 12:14:37.000000000","message":"Done","commit_id":"f481fb0c36c670434f5a585095814e71e4c8804a"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"64d5eebb6c06d7e935d33993ec68652c1f062216","unresolved":false,"context_lines":[{"line_number":48,"context_line":"                help\u003d\u0027Force backing images to raw format\u0027),"},{"line_number":49,"context_line":"    cfg.ListOpt(\u0027image_handlers\u0027,"},{"line_number":50,"context_line":"                default\u003d[\u0027default\u0027],"},{"line_number":51,"context_line":"                help\u003d\u0027Which image handler extension names to use for \u0027"},{"line_number":52,"context_line":"                     \u0027handling images. Checking extension from the list by \u0027"},{"line_number":53,"context_line":"                     \u0027its order and choice first handler which can handle \u0027"},{"line_number":54,"context_line":"                     \u0027the image with a particular suitable location.\u0027),"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAQ3%2F%2F%2FYI%3D","line":51,"updated":"2013-08-11 16:29:26.000000000","message":"This doesn\u0027t read very well.  How about:\n\nSpecifies which image handler extension names to use for handling images.  The first extension in the list which can handle the image with a suitable location will be used.","commit_id":"4a8a7b90b18d8b838ff2d4aabddfff826c9bc5ad"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"b52def4066fb96275a7a0665152944a456f935aa","unresolved":false,"context_lines":[{"line_number":48,"context_line":"                help\u003d\u0027Force backing images to raw format\u0027),"},{"line_number":49,"context_line":"    cfg.ListOpt(\u0027image_handlers\u0027,"},{"line_number":50,"context_line":"                default\u003d[\u0027default\u0027],"},{"line_number":51,"context_line":"                help\u003d\u0027Which image handler extension names to use for \u0027"},{"line_number":52,"context_line":"                     \u0027handling images. Checking extension from the list by \u0027"},{"line_number":53,"context_line":"                     \u0027its order and choice first handler which can handle \u0027"},{"line_number":54,"context_line":"                     \u0027the image with a particular suitable location.\u0027),"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAQ3%2F%2F%2B04%3D","line":51,"in_reply_to":"AAAAQ3%2F%2F%2FYI%3D","updated":"2013-08-12 04:26:45.000000000","message":"Thanks for your English. Done.","commit_id":"4a8a7b90b18d8b838ff2d4aabddfff826c9bc5ad"},{"author":{"_account_id":1812,"name":"p-draigbrady","email":"P@draigBrady.com","username":"p-draigbrady"},"change_message_id":"4edf364e37202f1e03751f68a68d26c2fc3b2b15","unresolved":false,"context_lines":[{"line_number":210,"context_line":"    path_tmp \u003d \"%s.part\" % path"},{"line_number":211,"context_line":"    fetch(context, image_href, path_tmp, user_id, project_id)"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"    try:"},{"line_number":214,"context_line":"        data \u003d qemu_img_info(path_tmp)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"        fmt \u003d data.file_format"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAQn%2F%2B9Ro%3D","line":213,"updated":"2013-08-09 10:34:24.000000000","message":"rather than reimplementing this context manager in place,\nI\u0027d augment fileutils.remove_path_on_error() to take a \"remover\" param that defaults to delete_if_exists and which you could set to:\n\n  def my_remover(...):\n    handler.remove_image()\n    fileutils.delete_if_exists()","commit_id":"4a8a7b90b18d8b838ff2d4aabddfff826c9bc5ad"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"b361aaa84bb72ba934e2ec1092a415e0ff219b54","unresolved":false,"context_lines":[{"line_number":210,"context_line":"    path_tmp \u003d \"%s.part\" % path"},{"line_number":211,"context_line":"    fetch(context, image_href, path_tmp, user_id, project_id)"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"    try:"},{"line_number":214,"context_line":"        data \u003d qemu_img_info(path_tmp)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"        fmt \u003d data.file_format"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAASn%2F%2FMMc%3D","line":213,"in_reply_to":"AAAAQn%2F%2B8kc%3D","updated":"2013-09-10 09:49:12.000000000","message":"Done","commit_id":"4a8a7b90b18d8b838ff2d4aabddfff826c9bc5ad"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"8118b1dddabb01fb4ccf8c278dd66449486daa87","unresolved":false,"context_lines":[{"line_number":210,"context_line":"    path_tmp \u003d \"%s.part\" % path"},{"line_number":211,"context_line":"    fetch(context, image_href, path_tmp, user_id, project_id)"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"    try:"},{"line_number":214,"context_line":"        data \u003d qemu_img_info(path_tmp)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"        fmt \u003d data.file_format"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAQn%2F%2B8kc%3D","line":213,"in_reply_to":"AAAAQn%2F%2B9Fc%3D","updated":"2013-08-09 14:57:29.000000000","message":"Cool, I have +1 for it :)\n\nI will use that approach which you mentioned in above comments after #41073 merge. I just not sure the time, I hope it can be quick since you know this patch stay here too long time for review. btw, thanks you.","commit_id":"4a8a7b90b18d8b838ff2d4aabddfff826c9bc5ad"},{"author":{"_account_id":1812,"name":"p-draigbrady","email":"P@draigBrady.com","username":"p-draigbrady"},"change_message_id":"89f45991fc2abcc527895d8a20f905598aa6e105","unresolved":false,"context_lines":[{"line_number":210,"context_line":"    path_tmp \u003d \"%s.part\" % path"},{"line_number":211,"context_line":"    fetch(context, image_href, path_tmp, user_id, project_id)"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"    try:"},{"line_number":214,"context_line":"        data \u003d qemu_img_info(path_tmp)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"        fmt \u003d data.file_format"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAQn%2F%2B9Fc%3D","line":213,"in_reply_to":"AAAAQn%2F%2B9Ro%3D","updated":"2013-08-09 12:03:50.000000000","message":"I\u0027ve proposed a new \u0027remove\u0027 param in https://review.openstack.org/41073","commit_id":"4a8a7b90b18d8b838ff2d4aabddfff826c9bc5ad"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"64d5eebb6c06d7e935d33993ec68652c1f062216","unresolved":false,"context_lines":[{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    def _fetch_image(self, context, image_id, path,"},{"line_number":417,"context_line":"                     user_id\u003dNone, project_id\u003dNone, location\u003dNone):"},{"line_number":418,"context_line":"        # TODO(vish): Improve context handling and add owner and auth data"},{"line_number":419,"context_line":"        #             when it is added to glance.  Right now there is no"},{"line_number":420,"context_line":"        #             auth checking in glance, so we assume that access was"},{"line_number":421,"context_line":"        #             checked before we got here."}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAQ3%2F%2F%2FWw%3D","line":418,"updated":"2013-08-11 16:29:26.000000000","message":"Was this copied from somewhere else then?  Wondering if there should be some refactoring to reduce code duplication.","commit_id":"4a8a7b90b18d8b838ff2d4aabddfff826c9bc5ad"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"b7a0b960087ee2438cad208b7ec4f5a9004d1633","unresolved":false,"context_lines":[{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    def _fetch_image(self, context, image_id, path,"},{"line_number":417,"context_line":"                     user_id\u003dNone, project_id\u003dNone, location\u003dNone):"},{"line_number":418,"context_line":"        # TODO(vish): Improve context handling and add owner and auth data"},{"line_number":419,"context_line":"        #             when it is added to glance.  Right now there is no"},{"line_number":420,"context_line":"        #             auth checking in glance, so we assume that access was"},{"line_number":421,"context_line":"        #             checked before we got here."}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAQ3%2F%2F4Rk%3D","line":418,"in_reply_to":"AAAAQ3%2F%2F%2B0g%3D","updated":"2013-08-19 14:07:40.000000000","message":"Ah, okay, I see.  Thanks.","commit_id":"4a8a7b90b18d8b838ff2d4aabddfff826c9bc5ad"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"b52def4066fb96275a7a0665152944a456f935aa","unresolved":false,"context_lines":[{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    def _fetch_image(self, context, image_id, path,"},{"line_number":417,"context_line":"                     user_id\u003dNone, project_id\u003dNone, location\u003dNone):"},{"line_number":418,"context_line":"        # TODO(vish): Improve context handling and add owner and auth data"},{"line_number":419,"context_line":"        #             when it is added to glance.  Right now there is no"},{"line_number":420,"context_line":"        #             auth checking in glance, so we assume that access was"},{"line_number":421,"context_line":"        #             checked before we got here."}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAQ3%2F%2F%2B0g%3D","line":418,"in_reply_to":"AAAAQ3%2F%2F%2FWw%3D","updated":"2013-08-12 04:26:45.000000000","message":"It was not copied it from somewhere, I just move the original code from Line183~187 to here as the change needed.","commit_id":"4a8a7b90b18d8b838ff2d4aabddfff826c9bc5ad"},{"author":{"_account_id":1812,"name":"p-draigbrady","email":"P@draigBrady.com","username":"p-draigbrady"},"change_message_id":"4edf364e37202f1e03751f68a68d26c2fc3b2b15","unresolved":false,"context_lines":[{"line_number":492,"context_line":"    return matched"},{"line_number":493,"context_line":""},{"line_number":494,"context_line":""},{"line_number":495,"context_line":"@contextlib.contextmanager"},{"line_number":496,"context_line":"def handle_image(context\u003dNone, image_id\u003dNone,"},{"line_number":497,"context_line":"                 user_id\u003dNone, project_id\u003dNone,"},{"line_number":498,"context_line":"                 target_path\u003dNone):"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAQn%2F%2B9RU%3D","line":495,"updated":"2013-08-09 10:34:24.000000000","message":"Why is this a contextmanager?\nCan it just be a normal function?","commit_id":"4a8a7b90b18d8b838ff2d4aabddfff826c9bc5ad"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"8118b1dddabb01fb4ccf8c278dd66449486daa87","unresolved":false,"context_lines":[{"line_number":492,"context_line":"    return matched"},{"line_number":493,"context_line":""},{"line_number":494,"context_line":""},{"line_number":495,"context_line":"@contextlib.contextmanager"},{"line_number":496,"context_line":"def handle_image(context\u003dNone, image_id\u003dNone,"},{"line_number":497,"context_line":"                 user_id\u003dNone, project_id\u003dNone,"},{"line_number":498,"context_line":"                 target_path\u003dNone):"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAQn%2F%2B8jw%3D","line":495,"in_reply_to":"AAAAQn%2F%2B9RU%3D","updated":"2013-08-09 14:57:29.000000000","message":"IMO this is useful, since I need using python \u0027with\u0027 statement to allow caller easy to use this handler structure, for example Line 196-199 within this file.","commit_id":"4a8a7b90b18d8b838ff2d4aabddfff826c9bc5ad"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ef5e8b2a15d6b0138f00ee8161eaf11b85b2a8f0","unresolved":false,"context_lines":[{"line_number":26,"context_line":"import functools"},{"line_number":27,"context_line":"import os"},{"line_number":28,"context_line":"import re"},{"line_number":29,"context_line":"import stevedore.driver"},{"line_number":30,"context_line":"import stevedore.extension"},{"line_number":31,"context_line":"import urlparse"},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAATH%2F%2Ffto%3D","line":29,"updated":"2013-10-15 13:16:02.000000000","message":"Can you please clarify why you do not just import stevedore and then use stevedore.driver or extension?","commit_id":"084f927506337c4007a80c0156790155668c0f78"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"1977eba9dd09827fa35ad0af98a5c1ea688d62b5","unresolved":false,"context_lines":[{"line_number":26,"context_line":"import functools"},{"line_number":27,"context_line":"import os"},{"line_number":28,"context_line":"import re"},{"line_number":29,"context_line":"import stevedore.driver"},{"line_number":30,"context_line":"import stevedore.extension"},{"line_number":31,"context_line":"import urlparse"},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAATH%2F%2FcSg%3D","line":29,"in_reply_to":"AAAATH%2F%2Ffto%3D","updated":"2013-10-16 07:25:54.000000000","message":"Done, good point thanks.","commit_id":"084f927506337c4007a80c0156790155668c0f78"},{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"61ef508e7bc2445371e73ad602a9c470f958f017","unresolved":false,"context_lines":[{"line_number":47,"context_line":"                default\u003dTrue,"},{"line_number":48,"context_line":"                help\u003d\u0027Force backing images to raw format\u0027),"},{"line_number":49,"context_line":"    cfg.ListOpt(\u0027image_handlers\u0027,"},{"line_number":50,"context_line":"                default\u003d[\u0027default\u0027],"},{"line_number":51,"context_line":"                help\u003d\u0027Specifies which image handler extension names to use \u0027"},{"line_number":52,"context_line":"                     \u0027for handling images. The first extension in the list \u0027"},{"line_number":53,"context_line":"                     \u0027which can handle the image with a suitable location \u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAATH%2F%2F8W4%3D","line":50,"updated":"2013-10-07 17:34:18.000000000","message":"Is there another patch coming that adds something else?  I\u0027m not sure it makes sense to add an interface like this if we don\u0027t have another implementation to offer","commit_id":"084f927506337c4007a80c0156790155668c0f78"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"f68387d98cc4244d5858ec0f8405f553c2c229c8","unresolved":false,"context_lines":[{"line_number":47,"context_line":"                default\u003dTrue,"},{"line_number":48,"context_line":"                help\u003d\u0027Force backing images to raw format\u0027),"},{"line_number":49,"context_line":"    cfg.ListOpt(\u0027image_handlers\u0027,"},{"line_number":50,"context_line":"                default\u003d[\u0027default\u0027],"},{"line_number":51,"context_line":"                help\u003d\u0027Specifies which image handler extension names to use \u0027"},{"line_number":52,"context_line":"                     \u0027for handling images. The first extension in the list \u0027"},{"line_number":53,"context_line":"                     \u0027which can handle the image with a suitable location \u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAATH%2F%2F7BY%3D","line":50,"in_reply_to":"AAAATH%2F%2F8W4%3D","updated":"2013-10-08 01:13:39.000000000","message":"Yes there are two currently:\n\n1. I planned to add a CinderImageHandler base on this framework, its design is clear but it depends on glance and cinder side (like brick lib, and multi-attach change), so it still need pay more effort to be achieved. Actually I have do a lot of works such as glance-cinder-store, r/o-volume for cinder, and multi-attach for cinder (on going).\n\n2. I have talked this with Josh Durgin, we planned to landing #46879 change via this approach as a RBDImageHandler.\n\nAnd also I\u0027d like propose a topic to design session for this summit, to introduce this framework and my zero-copy image preparing whole plan to folks. Of cause we can do them simultaneously: prepare patchs and prepare later talking.","commit_id":"084f927506337c4007a80c0156790155668c0f78"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ef5e8b2a15d6b0138f00ee8161eaf11b85b2a8f0","unresolved":false,"context_lines":[{"line_number":265,"context_line":""},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"_image_handlers \u003d []"},{"line_number":268,"context_line":"_image_handlers_asso \u003d {}"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"class ImageHandler(object):"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAATH%2F%2Ffsg%3D","line":268,"updated":"2013-10-15 13:16:02.000000000","message":"the name here is confusing. If it is a global should it be a in capital letters?","commit_id":"084f927506337c4007a80c0156790155668c0f78"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"1977eba9dd09827fa35ad0af98a5c1ea688d62b5","unresolved":false,"context_lines":[{"line_number":265,"context_line":""},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"_image_handlers \u003d []"},{"line_number":268,"context_line":"_image_handlers_asso \u003d {}"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"class ImageHandler(object):"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAATH%2F%2FcDE%3D","line":268,"in_reply_to":"AAAATH%2F%2Ffsg%3D","updated":"2013-10-16 07:25:54.000000000","message":"Done","commit_id":"084f927506337c4007a80c0156790155668c0f78"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ef5e8b2a15d6b0138f00ee8161eaf11b85b2a8f0","unresolved":false,"context_lines":[{"line_number":268,"context_line":"_image_handlers_asso \u003d {}"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"class ImageHandler(object):"},{"line_number":272,"context_line":"    \"\"\"Image handler base class."},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"    Currently the behavior of this image handler class just"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAATH%2F%2FfnI%3D","line":271,"updated":"2013-10-15 13:16:02.000000000","message":"any reason not to have this in a bew file - say for example imagehandler.py","commit_id":"084f927506337c4007a80c0156790155668c0f78"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"1977eba9dd09827fa35ad0af98a5c1ea688d62b5","unresolved":false,"context_lines":[{"line_number":268,"context_line":"_image_handlers_asso \u003d {}"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"class ImageHandler(object):"},{"line_number":272,"context_line":"    \"\"\"Image handler base class."},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"    Currently the behavior of this image handler class just"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAATH%2F%2FcDI%3D","line":271,"in_reply_to":"AAAATH%2F%2FfnI%3D","updated":"2013-10-16 07:25:54.000000000","message":"Currently contains this parts in this file is enough IMO, as this file named, it contains all image related basic code, including this base and default handlers. In future when we implement particular sub-class handlers for particular hypervisor as a Nova built-in plugin, we can/should put it into a hypervisor sub-direcltory such as libvirt or etc. .","commit_id":"084f927506337c4007a80c0156790155668c0f78"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ef5e8b2a15d6b0138f00ee8161eaf11b85b2a8f0","unresolved":false,"context_lines":[{"line_number":392,"context_line":"    def _disassociate(self, path):"},{"line_number":393,"context_line":"        global _image_handlers_asso"},{"line_number":394,"context_line":"        try:"},{"line_number":395,"context_line":"            del _image_handlers_asso[path]"},{"line_number":396,"context_line":"        except KeyError:"},{"line_number":397,"context_line":"            # Some unit test cases not call fetch_image before reach here"},{"line_number":398,"context_line":"            pass"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAATH%2F%2Ffsw%3D","line":395,"updated":"2013-10-15 13:16:02.000000000","message":"Can we do _image_handlers_asso.pop(path, None)? This can replaces lines 394-398","commit_id":"084f927506337c4007a80c0156790155668c0f78"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"1977eba9dd09827fa35ad0af98a5c1ea688d62b5","unresolved":false,"context_lines":[{"line_number":392,"context_line":"    def _disassociate(self, path):"},{"line_number":393,"context_line":"        global _image_handlers_asso"},{"line_number":394,"context_line":"        try:"},{"line_number":395,"context_line":"            del _image_handlers_asso[path]"},{"line_number":396,"context_line":"        except KeyError:"},{"line_number":397,"context_line":"            # Some unit test cases not call fetch_image before reach here"},{"line_number":398,"context_line":"            pass"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAATH%2F%2FcC0%3D","line":395,"in_reply_to":"AAAATH%2F%2Ffsw%3D","updated":"2013-10-16 07:25:54.000000000","message":"Done, good point thanks.","commit_id":"084f927506337c4007a80c0156790155668c0f78"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ef5e8b2a15d6b0138f00ee8161eaf11b85b2a8f0","unresolved":false,"context_lines":[{"line_number":473,"context_line":"        except Exception as e:"},{"line_number":474,"context_line":"            LOG.warn(_(\"Failed to import image handler extension\""},{"line_number":475,"context_line":"                       \"%(image_handler_ext)s: %(e)s\") %"},{"line_number":476,"context_line":"                     dict(image_handler_ext\u003dimage_handler_ext, e\u003de))"},{"line_number":477,"context_line":""},{"line_number":478,"context_line":""},{"line_number":479,"context_line":"def _match_locations(locations, schemes):"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAATH%2F%2FfsE%3D","line":476,"updated":"2013-10-15 13:16:02.000000000","message":"please use {} instead of dict (http://doughellmann.com/2012/11/the-performance-impact-of-using-dict-instead-of-in-cpython-2-7-2.html)","commit_id":"084f927506337c4007a80c0156790155668c0f78"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"1977eba9dd09827fa35ad0af98a5c1ea688d62b5","unresolved":false,"context_lines":[{"line_number":473,"context_line":"        except Exception as e:"},{"line_number":474,"context_line":"            LOG.warn(_(\"Failed to import image handler extension\""},{"line_number":475,"context_line":"                       \"%(image_handler_ext)s: %(e)s\") %"},{"line_number":476,"context_line":"                     dict(image_handler_ext\u003dimage_handler_ext, e\u003de))"},{"line_number":477,"context_line":""},{"line_number":478,"context_line":""},{"line_number":479,"context_line":"def _match_locations(locations, schemes):"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAATH%2F%2FcCY%3D","line":476,"in_reply_to":"AAAATH%2F%2FfsE%3D","updated":"2013-10-16 07:25:54.000000000","message":"Done, good point thanks! It\u0027s a very worth link.","commit_id":"084f927506337c4007a80c0156790155668c0f78"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"9c12b3bdc20bee6b05c477fa0b9df5601c8daa2a","unresolved":false,"context_lines":[{"line_number":280,"context_line":"    def __init__(self, driver, *args, **kwargs):"},{"line_number":281,"context_line":"        self.driver \u003d driver"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"    @abc.abstractmethod"},{"line_number":284,"context_line":"    def get_schemes(self):"},{"line_number":285,"context_line":"        \"\"\"Returns a tuple of schemes which this handler can handle.\"\"\""},{"line_number":286,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATH%2F%2FH0I%3D","line":283,"updated":"2013-10-22 20:58:47.000000000","message":"You also have to declare a metaclass for ImageHandler, or the @abstractmethod decorator is meaningless.  To declare a metaclass—since we have six\u003e\u003d1.4.1 available—use the @six.add_metaclass() class decorator, e.g.:\n\n    @six.add_metaclass(abc.ABCMeta)\n    class ImageHandler(object):\n        …","commit_id":"8a63c659a5bcb3fc1edcc4b9df06c5a6d9ff8e2b"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"e48c985032a5ff83dcb3fc49a7d53924254d0d68","unresolved":false,"context_lines":[{"line_number":280,"context_line":"    def __init__(self, driver, *args, **kwargs):"},{"line_number":281,"context_line":"        self.driver \u003d driver"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"    @abc.abstractmethod"},{"line_number":284,"context_line":"    def get_schemes(self):"},{"line_number":285,"context_line":"        \"\"\"Returns a tuple of schemes which this handler can handle.\"\"\""},{"line_number":286,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F%2B7o%3D","line":283,"in_reply_to":"AAAATH%2F%2FH0I%3D","updated":"2013-10-23 15:21:12.000000000","message":"Done, thanks.","commit_id":"8a63c659a5bcb3fc1edcc4b9df06c5a6d9ff8e2b"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"9c12b3bdc20bee6b05c477fa0b9df5601c8daa2a","unresolved":false,"context_lines":[{"line_number":287,"context_line":""},{"line_number":288,"context_line":"    def fetch_image(self, context, image_id, path,"},{"line_number":289,"context_line":"                    user_id\u003dNone, project_id\u003dNone, location\u003dNone):"},{"line_number":290,"context_line":"        @utils.synchronized(path)"},{"line_number":291,"context_line":"        def _fetch():"},{"line_number":292,"context_line":"            ret \u003d self._fetch_image(context, image_id, path,"},{"line_number":293,"context_line":"                                    user_id, project_id, location)"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATH%2F%2FH0A%3D","line":290,"updated":"2013-10-22 20:58:47.000000000","message":"Ugh.  Is there not a better way of doing this than having to decorate an inner function?","commit_id":"8a63c659a5bcb3fc1edcc4b9df06c5a6d9ff8e2b"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"e48c985032a5ff83dcb3fc49a7d53924254d0d68","unresolved":false,"context_lines":[{"line_number":287,"context_line":""},{"line_number":288,"context_line":"    def fetch_image(self, context, image_id, path,"},{"line_number":289,"context_line":"                    user_id\u003dNone, project_id\u003dNone, location\u003dNone):"},{"line_number":290,"context_line":"        @utils.synchronized(path)"},{"line_number":291,"context_line":"        def _fetch():"},{"line_number":292,"context_line":"            ret \u003d self._fetch_image(context, image_id, path,"},{"line_number":293,"context_line":"                                    user_id, project_id, location)"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F%2B18%3D","line":290,"in_reply_to":"AAAATH%2F%2FH0A%3D","updated":"2013-10-23 15:21:12.000000000","message":"Good point, and we need using an external lock at here also. Done.","commit_id":"8a63c659a5bcb3fc1edcc4b9df06c5a6d9ff8e2b"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"9c12b3bdc20bee6b05c477fa0b9df5601c8daa2a","unresolved":false,"context_lines":[{"line_number":385,"context_line":"        pass"},{"line_number":386,"context_line":""},{"line_number":387,"context_line":"    def _associate(self, path, location):"},{"line_number":388,"context_line":"        global _IMAGE_HANDLERS_ASSO"},{"line_number":389,"context_line":"        _IMAGE_HANDLERS_ASSO[path] \u003d (self, location)"},{"line_number":390,"context_line":""},{"line_number":391,"context_line":"    def _disassociate(self, path):"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATH%2F%2FHz0%3D","line":388,"updated":"2013-10-22 20:58:47.000000000","message":"You don\u0027t need to use \u0027global\u0027 here; you\u0027re modifying an existing global, not assigning to it.","commit_id":"8a63c659a5bcb3fc1edcc4b9df06c5a6d9ff8e2b"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"e48c985032a5ff83dcb3fc49a7d53924254d0d68","unresolved":false,"context_lines":[{"line_number":385,"context_line":"        pass"},{"line_number":386,"context_line":""},{"line_number":387,"context_line":"    def _associate(self, path, location):"},{"line_number":388,"context_line":"        global _IMAGE_HANDLERS_ASSO"},{"line_number":389,"context_line":"        _IMAGE_HANDLERS_ASSO[path] \u003d (self, location)"},{"line_number":390,"context_line":""},{"line_number":391,"context_line":"    def _disassociate(self, path):"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F%2B5c%3D","line":388,"in_reply_to":"AAAATH%2F%2FHz0%3D","updated":"2013-10-23 15:21:12.000000000","message":"Done","commit_id":"8a63c659a5bcb3fc1edcc4b9df06c5a6d9ff8e2b"},{"author":{"_account_id":7040,"name":"GuoHui LIu","email":"liuguohui@gmail.com","username":"guohliu"},"change_message_id":"f07975f1a22c914e14f57aa3d50c08ebf4c28191","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Copyright 2010 United States Government as represented by the"},{"line_number":4,"context_line":"# Administrator of the National Aeronautics and Space Administration."},{"line_number":5,"context_line":"# All Rights Reserved."}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAATX%2F%2F9qY%3D","line":2,"updated":"2013-10-23 15:49:31.000000000","message":"you can adding IBM copy right.","commit_id":"3112359b904030d47a6e76a1341585251beb52b1"},{"author":{"_account_id":7040,"name":"GuoHui LIu","email":"liuguohui@gmail.com","username":"guohliu"},"change_message_id":"f07975f1a22c914e14f57aa3d50c08ebf4c28191","unresolved":false,"context_lines":[{"line_number":348,"context_line":"                invoke_kwds\u003d{\"driver\": driver})"},{"line_number":349,"context_line":"            _IMAGE_HANDLERS.append(mgr.driver)"},{"line_number":350,"context_line":"        except Exception as e:"},{"line_number":351,"context_line":"            LOG.warn(_(\"Failed to import image handler extension\""},{"line_number":352,"context_line":"                       \"%(image_handler_ext)s: %(e)s\") %"},{"line_number":353,"context_line":"                     {\u0027image_handler_ext\u0027: image_handler_ext, \u0027e\u0027: e})"},{"line_number":354,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAATX%2F%2F9qU%3D","line":351,"updated":"2013-10-23 15:49:31.000000000","message":"nit: we need a extra space ends of extension, otherwise i18n can not work properly.","commit_id":"3112359b904030d47a6e76a1341585251beb52b1"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"fa0a692aa2214ebdd0f9a997b007c1e6e75d6ed7","unresolved":false,"context_lines":[{"line_number":348,"context_line":"                invoke_kwds\u003d{\"driver\": driver})"},{"line_number":349,"context_line":"            _IMAGE_HANDLERS.append(mgr.driver)"},{"line_number":350,"context_line":"        except Exception as e:"},{"line_number":351,"context_line":"            LOG.warn(_(\"Failed to import image handler extension\""},{"line_number":352,"context_line":"                       \"%(image_handler_ext)s: %(e)s\") %"},{"line_number":353,"context_line":"                     {\u0027image_handler_ext\u0027: image_handler_ext, \u0027e\u0027: e})"},{"line_number":354,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAATX%2F%2F9fQ%3D","line":351,"in_reply_to":"AAAATX%2F%2F9qU%3D","updated":"2013-10-23 16:30:04.000000000","message":"Done","commit_id":"3112359b904030d47a6e76a1341585251beb52b1"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"6c0577ea96e8b09557e85dc3ba0b6e66c5fb7489","unresolved":false,"context_lines":[{"line_number":28,"context_line":"import urlparse"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"import six"},{"line_number":31,"context_line":"import stevedore"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"from oslo.config import cfg"},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAATn%2F%2F6ak%3D","line":31,"updated":"2013-10-25 10:53:32.000000000","message":"These imports are not in alphabetical order","commit_id":"193a3f8bdd08a453a6335fe7b09db406020397b5"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"7f92ee1b2c043716346edac4a3853bccabd0f8c0","unresolved":false,"context_lines":[{"line_number":28,"context_line":"import urlparse"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"import six"},{"line_number":31,"context_line":"import stevedore"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"from oslo.config import cfg"},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAATn%2F%2F2p4%3D","line":31,"in_reply_to":"AAAATn%2F%2F6ak%3D","updated":"2013-10-27 16:16:59.000000000","message":"I\u0027m not sure what\u0027s wrong here, can you tell me? I\u0027m spliting two groups here, one for python built-in packages, and one from 3rd-part packages.","commit_id":"193a3f8bdd08a453a6335fe7b09db406020397b5"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"6c0577ea96e8b09557e85dc3ba0b6e66c5fb7489","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        return imageutils.QemuImgInfo()"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    out, _err \u003d utils.execute(\u0027env\u0027, \u0027LC_ALL\u003dC\u0027, \u0027LANG\u003dC\u0027,"},{"line_number":69,"context_line":"                             \u0027qemu-img\u0027, \u0027info\u0027, path)"},{"line_number":70,"context_line":"    return imageutils.QemuImgInfo(out)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAATn%2F%2F6bQ%3D","line":69,"updated":"2013-10-25 10:53:32.000000000","message":"This looks like a gratuitous unneccessary change, just remove it.","commit_id":"193a3f8bdd08a453a6335fe7b09db406020397b5"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"7f92ee1b2c043716346edac4a3853bccabd0f8c0","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        return imageutils.QemuImgInfo()"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    out, _err \u003d utils.execute(\u0027env\u0027, \u0027LC_ALL\u003dC\u0027, \u0027LANG\u003dC\u0027,"},{"line_number":69,"context_line":"                             \u0027qemu-img\u0027, \u0027info\u0027, path)"},{"line_number":70,"context_line":"    return imageutils.QemuImgInfo(out)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAATn%2F%2F2qA%3D","line":69,"in_reply_to":"AAAATn%2F%2F6bQ%3D","updated":"2013-10-27 16:16:59.000000000","message":"Done","commit_id":"193a3f8bdd08a453a6335fe7b09db406020397b5"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"6c0577ea96e8b09557e85dc3ba0b6e66c5fb7489","unresolved":false,"context_lines":[{"line_number":162,"context_line":"    particular sub-class in relevant hypervisor layer with more"},{"line_number":163,"context_line":"    advanced functions base on this structure, such as"},{"line_number":164,"context_line":"    CoW creating and snapshot capturing, etc.."},{"line_number":165,"context_line":"    \"\"\""},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    def __init__(self, driver, *args, **kwargs):"},{"line_number":168,"context_line":"        self.driver \u003d driver"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAATn%2F%2F6dQ%3D","line":165,"updated":"2013-10-25 10:53:32.000000000","message":"I\u0027m thinking that this class (and its future subclasses) should live in a separate file and/or directory. eg perhaps this class goes in nova/virt/imagehandlers/base.py  and the DefaultImageHandler go in nova/virt/imagehandles/default.py","commit_id":"193a3f8bdd08a453a6335fe7b09db406020397b5"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"7f92ee1b2c043716346edac4a3853bccabd0f8c0","unresolved":false,"context_lines":[{"line_number":162,"context_line":"    particular sub-class in relevant hypervisor layer with more"},{"line_number":163,"context_line":"    advanced functions base on this structure, such as"},{"line_number":164,"context_line":"    CoW creating and snapshot capturing, etc.."},{"line_number":165,"context_line":"    \"\"\""},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    def __init__(self, driver, *args, **kwargs):"},{"line_number":168,"context_line":"        self.driver \u003d driver"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAATn%2F%2F2pk%3D","line":165,"in_reply_to":"AAAATn%2F%2F6dQ%3D","updated":"2013-10-27 16:16:59.000000000","message":"Seems you and garyk all like this (his comments at https://review.openstack.org/#/c/33409/12/nova/virt/images.py) path, I will do that to make you happy.\n\nActually, as I said in PS12, IMO write this parts in this file here is enough, since as this file named, it contains all image related basic code, including this base and default handlers. And the key to me is, in future when we implement particular sub-class handlers for particular hypervisor as a Nova built-in plugin, we can/should put it into a hypervisor sub-direcltory such as libvirt or etc. , but input nova/virt/imagehandles folder.\n\nThe reason why I\u0027m going to accept your bew image handler directly is that I\u0027m thinking probably we can put some common handlers into there, says something like \u0027default\u0027 handler (download approach) which not belongs to such particular hypervisor driver. thanks.","commit_id":"193a3f8bdd08a453a6335fe7b09db406020397b5"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"6c0577ea96e8b09557e85dc3ba0b6e66c5fb7489","unresolved":false,"context_lines":[{"line_number":165,"context_line":"    \"\"\""},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    def __init__(self, driver, *args, **kwargs):"},{"line_number":168,"context_line":"        self.driver \u003d driver"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    @abc.abstractmethod"},{"line_number":171,"context_line":"    def get_schemes(self):"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAATn%2F%2F6ZY%3D","line":168,"updated":"2013-10-25 10:53:32.000000000","message":"Please document this method and its parameters - in particular what are valid values for  \u0027driver\u0027","commit_id":"193a3f8bdd08a453a6335fe7b09db406020397b5"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"7f92ee1b2c043716346edac4a3853bccabd0f8c0","unresolved":false,"context_lines":[{"line_number":165,"context_line":"    \"\"\""},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    def __init__(self, driver, *args, **kwargs):"},{"line_number":168,"context_line":"        self.driver \u003d driver"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    @abc.abstractmethod"},{"line_number":171,"context_line":"    def get_schemes(self):"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAATn%2F%2F2os%3D","line":168,"in_reply_to":"AAAATn%2F%2F6ZY%3D","updated":"2013-10-27 16:16:59.000000000","message":"Done","commit_id":"193a3f8bdd08a453a6335fe7b09db406020397b5"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"6c0577ea96e8b09557e85dc3ba0b6e66c5fb7489","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        pass"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    def fetch_image(self, context, image_id, path,"},{"line_number":176,"context_line":"                    user_id\u003dNone, project_id\u003dNone, location\u003dNone):"},{"line_number":177,"context_line":"        with lockutils.lock(\"nova-imagehandler-%s\" % image_id,"},{"line_number":178,"context_line":"                            lock_file_prefix\u003d\u0027nova-\u0027, external\u003dTrue):"},{"line_number":179,"context_line":"            ret \u003d self._fetch_image(context, image_id, path,"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAATn%2F%2F6aI%3D","line":176,"updated":"2013-10-25 10:53:32.000000000","message":"Please document this method and its parameters","commit_id":"193a3f8bdd08a453a6335fe7b09db406020397b5"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"7f92ee1b2c043716346edac4a3853bccabd0f8c0","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        pass"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    def fetch_image(self, context, image_id, path,"},{"line_number":176,"context_line":"                    user_id\u003dNone, project_id\u003dNone, location\u003dNone):"},{"line_number":177,"context_line":"        with lockutils.lock(\"nova-imagehandler-%s\" % image_id,"},{"line_number":178,"context_line":"                            lock_file_prefix\u003d\u0027nova-\u0027, external\u003dTrue):"},{"line_number":179,"context_line":"            ret \u003d self._fetch_image(context, image_id, path,"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAATn%2F%2F2oc%3D","line":176,"in_reply_to":"AAAATn%2F%2F6aI%3D","updated":"2013-10-27 16:16:59.000000000","message":"Done","commit_id":"193a3f8bdd08a453a6335fe7b09db406020397b5"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"6c0577ea96e8b09557e85dc3ba0b6e66c5fb7489","unresolved":false,"context_lines":[{"line_number":185,"context_line":"    def remove_image(self, path,"},{"line_number":186,"context_line":"                     context\u003dNone, image_id\u003dNone,"},{"line_number":187,"context_line":"                     user_id\u003dNone, project_id\u003dNone,"},{"line_number":188,"context_line":"                     location\u003dNone):"},{"line_number":189,"context_line":"        with lockutils.lock(\"nova-imagehandler-%s\" % image_id,"},{"line_number":190,"context_line":"                            lock_file_prefix\u003d\u0027nova-\u0027, external\u003dTrue):"},{"line_number":191,"context_line":"            ret \u003d self._remove_image(path, context, image_id,"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAATn%2F%2F6aA%3D","line":188,"updated":"2013-10-25 10:53:32.000000000","message":"Please document this method and its parameters","commit_id":"193a3f8bdd08a453a6335fe7b09db406020397b5"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"7f92ee1b2c043716346edac4a3853bccabd0f8c0","unresolved":false,"context_lines":[{"line_number":185,"context_line":"    def remove_image(self, path,"},{"line_number":186,"context_line":"                     context\u003dNone, image_id\u003dNone,"},{"line_number":187,"context_line":"                     user_id\u003dNone, project_id\u003dNone,"},{"line_number":188,"context_line":"                     location\u003dNone):"},{"line_number":189,"context_line":"        with lockutils.lock(\"nova-imagehandler-%s\" % image_id,"},{"line_number":190,"context_line":"                            lock_file_prefix\u003d\u0027nova-\u0027, external\u003dTrue):"},{"line_number":191,"context_line":"            ret \u003d self._remove_image(path, context, image_id,"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAATn%2F%2F2oY%3D","line":188,"in_reply_to":"AAAATn%2F%2F6aA%3D","updated":"2013-10-27 16:16:59.000000000","message":"Done","commit_id":"193a3f8bdd08a453a6335fe7b09db406020397b5"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"6c0577ea96e8b09557e85dc3ba0b6e66c5fb7489","unresolved":false,"context_lines":[{"line_number":196,"context_line":""},{"line_number":197,"context_line":"    def move_image(self, src_path, dst_path,"},{"line_number":198,"context_line":"                   context\u003dNone, image_id\u003dNone, user_id\u003dNone, project_id\u003dNone,"},{"line_number":199,"context_line":"                   location\u003dNone):"},{"line_number":200,"context_line":"        with lockutils.lock(\"nova-imagehandler-%s\" % image_id,"},{"line_number":201,"context_line":"                            lock_file_prefix\u003d\u0027nova-\u0027, external\u003dTrue):"},{"line_number":202,"context_line":"            ret \u003d self._move_image(src_path, dst_path, context, image_id,"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAATn%2F%2F6Zk%3D","line":199,"updated":"2013-10-25 10:53:32.000000000","message":"Please document this method and its parameters","commit_id":"193a3f8bdd08a453a6335fe7b09db406020397b5"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"7f92ee1b2c043716346edac4a3853bccabd0f8c0","unresolved":false,"context_lines":[{"line_number":196,"context_line":""},{"line_number":197,"context_line":"    def move_image(self, src_path, dst_path,"},{"line_number":198,"context_line":"                   context\u003dNone, image_id\u003dNone, user_id\u003dNone, project_id\u003dNone,"},{"line_number":199,"context_line":"                   location\u003dNone):"},{"line_number":200,"context_line":"        with lockutils.lock(\"nova-imagehandler-%s\" % image_id,"},{"line_number":201,"context_line":"                            lock_file_prefix\u003d\u0027nova-\u0027, external\u003dTrue):"},{"line_number":202,"context_line":"            ret \u003d self._move_image(src_path, dst_path, context, image_id,"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAATn%2F%2F2oU%3D","line":199,"in_reply_to":"AAAATn%2F%2F6Zk%3D","updated":"2013-10-27 16:16:59.000000000","message":"Done","commit_id":"193a3f8bdd08a453a6335fe7b09db406020397b5"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"6c0577ea96e8b09557e85dc3ba0b6e66c5fb7489","unresolved":false,"context_lines":[{"line_number":370,"context_line":"@contextlib.contextmanager"},{"line_number":371,"context_line":"def handle_image(context\u003dNone, image_id\u003dNone,"},{"line_number":372,"context_line":"                 user_id\u003dNone, project_id\u003dNone,"},{"line_number":373,"context_line":"                 target_path\u003dNone):"},{"line_number":374,"context_line":"    handled \u003d False"},{"line_number":375,"context_line":""},{"line_number":376,"context_line":"    # Check if target image has been handled before,"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAATn%2F%2F6dM%3D","line":373,"updated":"2013-10-25 10:53:32.000000000","message":"And these few static methods could do in nova/virt/imagehandlers/__init__.py","commit_id":"193a3f8bdd08a453a6335fe7b09db406020397b5"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"7f92ee1b2c043716346edac4a3853bccabd0f8c0","unresolved":false,"context_lines":[{"line_number":370,"context_line":"@contextlib.contextmanager"},{"line_number":371,"context_line":"def handle_image(context\u003dNone, image_id\u003dNone,"},{"line_number":372,"context_line":"                 user_id\u003dNone, project_id\u003dNone,"},{"line_number":373,"context_line":"                 target_path\u003dNone):"},{"line_number":374,"context_line":"    handled \u003d False"},{"line_number":375,"context_line":""},{"line_number":376,"context_line":"    # Check if target image has been handled before,"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAATn%2F%2F2mE%3D","line":373,"in_reply_to":"AAAATn%2F%2F6dM%3D","updated":"2013-10-27 16:16:59.000000000","message":"Done","commit_id":"193a3f8bdd08a453a6335fe7b09db406020397b5"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"6c0577ea96e8b09557e85dc3ba0b6e66c5fb7489","unresolved":false,"context_lines":[{"line_number":404,"context_line":"                    yield image_handler, None"},{"line_number":405,"context_line":"                    handled \u003d image_handler.last_ops_handled()"},{"line_number":406,"context_line":"                    if handled:"},{"line_number":407,"context_line":"                        break"},{"line_number":408,"context_line":"    if not handled:"},{"line_number":409,"context_line":"        LOG.error(_(\"Can\u0027t handle image: %(image_id)s %(target_path)s\") %"},{"line_number":410,"context_line":"                  {\u0027image_id\u0027: image_id, \u0027target_path\u0027: target_path})"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAATn%2F%2F6ZE%3D","line":407,"updated":"2013-10-25 10:53:32.000000000","message":"A large part of this method relies on state added to the _IMAGE_HANDLER_ASSO global variable.\n\nIf the nova process is restarted, this data will obviously be lost. So will this \u0027handle_image\u0027 method do the right thing when an existing running VM shuts down, after nova has been restarted. the _IMAGE_HANDLER_ASSO data stored when the VM was started  will be missing in this scenario. If it operates correctly even when the IMAGE_HANDLER_ASSO data is missing, then can we just delete all this global caching and thus simplify the code.","commit_id":"193a3f8bdd08a453a6335fe7b09db406020397b5"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"7f92ee1b2c043716346edac4a3853bccabd0f8c0","unresolved":false,"context_lines":[{"line_number":404,"context_line":"                    yield image_handler, None"},{"line_number":405,"context_line":"                    handled \u003d image_handler.last_ops_handled()"},{"line_number":406,"context_line":"                    if handled:"},{"line_number":407,"context_line":"                        break"},{"line_number":408,"context_line":"    if not handled:"},{"line_number":409,"context_line":"        LOG.error(_(\"Can\u0027t handle image: %(image_id)s %(target_path)s\") %"},{"line_number":410,"context_line":"                  {\u0027image_id\u0027: image_id, \u0027target_path\u0027: target_path})"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAATn%2F%2F2mY%3D","line":407,"in_reply_to":"AAAATn%2F%2F6ZE%3D","updated":"2013-10-27 16:16:59.000000000","message":"Smart question! I\u0027d like answer it.\n\nFirstly I need to clarify is that under my design each particular image handler implementation/class should has a capability to make sure which image was handled by itself (and whether it can handle it), that says 1. if handler can\u0027t handle the image (by image id or path or something internal checking mechanism) then \"fetch_image()\" should return \"false\", and other followed handler will take over; 2. if it did not fetch the image (by image id or path or something internal checking mechanism), then \"remove_image()\" should return \"false\" too.\n\nSecondly, I consider there are two reasons to me for using _IMAGE_HANDLER_ASSO:\n1. Under current implementation stage, using _IMAGE_HANDLER_ASSO could improve handler matching performance efficiently, and don\u0027t need do a lot of works between Line #385-407 (some http/restful communications between Glance and Nova will all be saved).\n\n2. In future enhancement, (of cause only if we really needed, so it\u0027s a reserved space here for enhancement in future), we can using some persistent approach to save _IMAGE_HANDLER_ASSO (db or a metadata file), and above \"load_image_handlers()\" can reload it when Nova process restart (IMO the stuff can be added to Line #350), this will help keep handler matching performance obviously (above point). And more, we can using this to allow Nova do such fetched-image-destroy function, that say if admin remove a handler option from \"image_handlers\" then when Nova startup we can using _IMAGE_HANDLER_ASSO info to remove those handled images by that removed image handler but always using \"default\" handler.\n\nthanks.","commit_id":"193a3f8bdd08a453a6335fe7b09db406020397b5"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"6a88876079cbacb7e857087680c81ad350eb1a52","unresolved":false,"context_lines":[{"line_number":39,"context_line":"image_opts \u003d ["},{"line_number":40,"context_line":"    cfg.BoolOpt(\u0027force_raw_images\u0027,"},{"line_number":41,"context_line":"                default\u003dTrue,"},{"line_number":42,"context_line":"                help\u003d\u0027Force backing images to raw format\u0027)"},{"line_number":43,"context_line":"]"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":25,"id":"AAAAT3%2F%2F0fM%3D","line":42,"updated":"2013-12-30 20:28:52.000000000","message":"Revert the change on this line; it seems unrelated to the rest of your patch, and I like trailing commas.","commit_id":"c4bd476f319964adfcf6d47447fa630c3e070048"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"be515a72527db9537a9cda32229718e78e0ee98c","unresolved":false,"context_lines":[{"line_number":39,"context_line":"image_opts \u003d ["},{"line_number":40,"context_line":"    cfg.BoolOpt(\u0027force_raw_images\u0027,"},{"line_number":41,"context_line":"                default\u003dTrue,"},{"line_number":42,"context_line":"                help\u003d\u0027Force backing images to raw format\u0027)"},{"line_number":43,"context_line":"]"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":25,"id":"AAAAT3%2F%2FvAg%3D","line":42,"in_reply_to":"AAAAT3%2F%2F0fM%3D","updated":"2014-01-02 20:44:40.000000000","message":"Done","commit_id":"c4bd476f319964adfcf6d47447fa630c3e070048"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"6a88876079cbacb7e857087680c81ad350eb1a52","unresolved":false,"context_lines":[{"line_number":66,"context_line":""},{"line_number":67,"context_line":"def _remove_image_on_exec(context, image_href, user_id, project_id,"},{"line_number":68,"context_line":"                          image_path):"},{"line_number":69,"context_line":"    for (handler, loc) in imagehandler.handle_image(context, image_href,"},{"line_number":70,"context_line":"                                       user_id, project_id, image_path):"},{"line_number":71,"context_line":"        # The loop will stop when the handle function return success."},{"line_number":72,"context_line":"        handler.remove_image(image_path, context, image_href,"}],"source_content_type":"text/x-python","patch_set":25,"id":"AAAAT3%2F%2F0es%3D","line":69,"updated":"2013-12-30 20:28:52.000000000","message":"Just an educational note: you don\u0027t actually need the parentheses around the variables in the \"for\" loop.  They might be useful if you\u0027re doing complex tuple assignments, but most of the time if you need that, you should probably be doing something different anyway :)","commit_id":"c4bd476f319964adfcf6d47447fa630c3e070048"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"be515a72527db9537a9cda32229718e78e0ee98c","unresolved":false,"context_lines":[{"line_number":66,"context_line":""},{"line_number":67,"context_line":"def _remove_image_on_exec(context, image_href, user_id, project_id,"},{"line_number":68,"context_line":"                          image_path):"},{"line_number":69,"context_line":"    for (handler, loc) in imagehandler.handle_image(context, image_href,"},{"line_number":70,"context_line":"                                       user_id, project_id, image_path):"},{"line_number":71,"context_line":"        # The loop will stop when the handle function return success."},{"line_number":72,"context_line":"        handler.remove_image(image_path, context, image_href,"}],"source_content_type":"text/x-python","patch_set":25,"id":"AAAAT3%2F%2FvAM%3D","line":69,"in_reply_to":"AAAAT3%2F%2F0es%3D","updated":"2014-01-02 20:44:40.000000000","message":"Done all.","commit_id":"c4bd476f319964adfcf6d47447fa630c3e070048"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"bcb07071decf795aa78b90e3b4ee7277185b277a","unresolved":false,"context_lines":[{"line_number":69,"context_line":"                                                              user_id,"},{"line_number":70,"context_line":"                                                              project_id,"},{"line_number":71,"context_line":"                                                              image_path):"},{"line_number":72,"context_line":"        # The loop will stop when the handle function return success."},{"line_number":73,"context_line":"        handler.remove_image(context, image_href, image_meta, image_path,"},{"line_number":74,"context_line":"                             user_id, project_id, loc, **imagehandler_args)"},{"line_number":75,"context_line":"    fileutils.delete_if_exists(image_path)"}],"source_content_type":"text/x-python","patch_set":53,"id":"AAAAUX%2F%2FId4%3D","line":72,"updated":"2014-02-16 16:05:51.000000000","message":"return \u003d\u003e returns","commit_id":"efad55a6deac418c73d754a46290bc55b87ea5a7"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"c3d73f77152ec59a891d85d5e3a8d8ae550ea2c3","unresolved":false,"context_lines":[{"line_number":69,"context_line":"                                                              user_id,"},{"line_number":70,"context_line":"                                                              project_id,"},{"line_number":71,"context_line":"                                                              image_path):"},{"line_number":72,"context_line":"        # The loop will stop when the handle function return success."},{"line_number":73,"context_line":"        handler.remove_image(context, image_href, image_meta, image_path,"},{"line_number":74,"context_line":"                             user_id, project_id, loc, **imagehandler_args)"},{"line_number":75,"context_line":"    fileutils.delete_if_exists(image_path)"}],"source_content_type":"text/x-python","patch_set":53,"id":"AAAAUX%2F%2B7Dk%3D","line":72,"in_reply_to":"AAAAUX%2F%2FId4%3D","updated":"2014-02-18 07:41:38.000000000","message":"Done","commit_id":"efad55a6deac418c73d754a46290bc55b87ea5a7"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"bcb07071decf795aa78b90e3b4ee7277185b277a","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                                                                  _user_id,"},{"line_number":92,"context_line":"                                                                  _project_id,"},{"line_number":93,"context_line":"                                                                  path):"},{"line_number":94,"context_line":"            # The loop will stop when the handle function return success."},{"line_number":95,"context_line":"            handler.fetch_image(context, image_href, image_meta, path,"},{"line_number":96,"context_line":"                                _user_id, _project_id, loc,"},{"line_number":97,"context_line":"                                **imagehandler_args)"}],"source_content_type":"text/x-python","patch_set":53,"id":"AAAAUX%2F%2FIdw%3D","line":94,"updated":"2014-02-16 16:05:51.000000000","message":"ditto","commit_id":"efad55a6deac418c73d754a46290bc55b87ea5a7"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"c3d73f77152ec59a891d85d5e3a8d8ae550ea2c3","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                                                                  _user_id,"},{"line_number":92,"context_line":"                                                                  _project_id,"},{"line_number":93,"context_line":"                                                                  path):"},{"line_number":94,"context_line":"            # The loop will stop when the handle function return success."},{"line_number":95,"context_line":"            handler.fetch_image(context, image_href, image_meta, path,"},{"line_number":96,"context_line":"                                _user_id, _project_id, loc,"},{"line_number":97,"context_line":"                                **imagehandler_args)"}],"source_content_type":"text/x-python","patch_set":53,"id":"AAAAUX%2F%2B7Dc%3D","line":94,"in_reply_to":"AAAAUX%2F%2FIdw%3D","updated":"2014-02-18 07:41:38.000000000","message":"Done","commit_id":"efad55a6deac418c73d754a46290bc55b87ea5a7"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"03f7cd8ad34c6c66e0cfbac02bdf7a8455299365","unresolved":false,"context_lines":[{"line_number":1383,"context_line":"        #             FLAG defines depending on how long the get_info"},{"line_number":1384,"context_line":"        #             call takes to return."},{"line_number":1385,"context_line":"        for x in xrange(CONF.libvirt_wait_soft_reboot_seconds):"},{"line_number":1386,"context_line":"            dom \u003d self._lookup_by_name(instance[\"name\"])"},{"line_number":1387,"context_line":"            (state, _max_mem, _mem, _cpus, _t) \u003d dom.info()"},{"line_number":1388,"context_line":"            state \u003d LIBVIRT_POWER_STATE[state]"},{"line_number":1389,"context_line":"            new_domid \u003d dom.ID()"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAQn%2F%2Fx1w%3D","side":"PARENT","line":1386,"updated":"2013-07-23 12:50:23.000000000","message":"change unrelated to feature?","commit_id":"3b517c3d5a9388136822942a674b1b337ca5579b"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"15ef419f841ff252b9ce0e74ef9e5fd6475ff01c","unresolved":false,"context_lines":[{"line_number":1383,"context_line":"        #             FLAG defines depending on how long the get_info"},{"line_number":1384,"context_line":"        #             call takes to return."},{"line_number":1385,"context_line":"        for x in xrange(CONF.libvirt_wait_soft_reboot_seconds):"},{"line_number":1386,"context_line":"            dom \u003d self._lookup_by_name(instance[\"name\"])"},{"line_number":1387,"context_line":"            (state, _max_mem, _mem, _cpus, _t) \u003d dom.info()"},{"line_number":1388,"context_line":"            state \u003d LIBVIRT_POWER_STATE[state]"},{"line_number":1389,"context_line":"            new_domid \u003d dom.ID()"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAQn%2F%2FvI8%3D","side":"PARENT","line":1386,"in_reply_to":"AAAAQn%2F%2Fx1w%3D","updated":"2013-07-24 07:11:24.000000000","message":"yes, removed.","commit_id":"3b517c3d5a9388136822942a674b1b337ca5579b"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"03f7cd8ad34c6c66e0cfbac02bdf7a8455299365","unresolved":false,"context_lines":[{"line_number":349,"context_line":"                                ]"},{"line_number":350,"context_line":""},{"line_number":351,"context_line":"        for mode_str in CONF.disk_cachemodes:"},{"line_number":352,"context_line":"            disk_type, _sep, cache_mode \u003d mode_str.partition(\u0027\u003d\u0027)"},{"line_number":353,"context_line":"            if cache_mode not in self.valid_cachemodes:"},{"line_number":354,"context_line":"                LOG.warn(_(\u0027Invalid cachemode %(cache_mode)s specified \u0027"},{"line_number":355,"context_line":"                           \u0027for disk type %(disk_type)s.\u0027),"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAQn%2F%2Fx1k%3D","line":352,"updated":"2013-07-23 12:50:23.000000000","message":"change unrelated to feature?","commit_id":"ecb15f7432dbc40aeb8ce6e8b965a07891f27b5b"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"15ef419f841ff252b9ce0e74ef9e5fd6475ff01c","unresolved":false,"context_lines":[{"line_number":349,"context_line":"                                ]"},{"line_number":350,"context_line":""},{"line_number":351,"context_line":"        for mode_str in CONF.disk_cachemodes:"},{"line_number":352,"context_line":"            disk_type, _sep, cache_mode \u003d mode_str.partition(\u0027\u003d\u0027)"},{"line_number":353,"context_line":"            if cache_mode not in self.valid_cachemodes:"},{"line_number":354,"context_line":"                LOG.warn(_(\u0027Invalid cachemode %(cache_mode)s specified \u0027"},{"line_number":355,"context_line":"                           \u0027for disk type %(disk_type)s.\u0027),"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAQn%2F%2FvJI%3D","line":352,"in_reply_to":"AAAAQn%2F%2Fx1k%3D","updated":"2013-07-24 07:11:24.000000000","message":"yes, removed.","commit_id":"ecb15f7432dbc40aeb8ce6e8b965a07891f27b5b"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"03f7cd8ad34c6c66e0cfbac02bdf7a8455299365","unresolved":false,"context_lines":[{"line_number":531,"context_line":"            csock \u003d eventlet_util.__original_socket__(socket.AF_INET,"},{"line_number":532,"context_line":"                                                      socket.SOCK_STREAM)"},{"line_number":533,"context_line":"            csock.connect((\u0027localhost\u0027, sock.getsockname()[1]))"},{"line_number":534,"context_line":"            nsock, _addr \u003d sock.accept()"},{"line_number":535,"context_line":"            self._event_notify_send \u003d nsock.makefile(\u0027wb\u0027, 0)"},{"line_number":536,"context_line":"            gsock \u003d greenio.GreenSocket(csock)"},{"line_number":537,"context_line":"            self._event_notify_recv \u003d gsock.makefile(\u0027rb\u0027, 0)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAQn%2F%2Fx1o%3D","line":534,"updated":"2013-07-23 12:50:23.000000000","message":"change unrelated to feature?","commit_id":"ecb15f7432dbc40aeb8ce6e8b965a07891f27b5b"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"15ef419f841ff252b9ce0e74ef9e5fd6475ff01c","unresolved":false,"context_lines":[{"line_number":531,"context_line":"            csock \u003d eventlet_util.__original_socket__(socket.AF_INET,"},{"line_number":532,"context_line":"                                                      socket.SOCK_STREAM)"},{"line_number":533,"context_line":"            csock.connect((\u0027localhost\u0027, sock.getsockname()[1]))"},{"line_number":534,"context_line":"            nsock, _addr \u003d sock.accept()"},{"line_number":535,"context_line":"            self._event_notify_send \u003d nsock.makefile(\u0027wb\u0027, 0)"},{"line_number":536,"context_line":"            gsock \u003d greenio.GreenSocket(csock)"},{"line_number":537,"context_line":"            self._event_notify_recv \u003d gsock.makefile(\u0027rb\u0027, 0)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAQn%2F%2FvJE%3D","line":534,"in_reply_to":"AAAAQn%2F%2Fx1o%3D","updated":"2013-07-24 07:11:24.000000000","message":"yes, removed.","commit_id":"ecb15f7432dbc40aeb8ce6e8b965a07891f27b5b"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"03f7cd8ad34c6c66e0cfbac02bdf7a8455299365","unresolved":false,"context_lines":[{"line_number":1611,"context_line":"        timer.start(interval\u003d0.5).wait()"},{"line_number":1612,"context_line":""},{"line_number":1613,"context_line":"    def _flush_libvirt_console(self, pty):"},{"line_number":1614,"context_line":"        out, _err \u003d utils.execute(\u0027dd\u0027,"},{"line_number":1615,"context_line":"                                  \u0027if\u003d%s\u0027 % pty,"},{"line_number":1616,"context_line":"                                  \u0027iflag\u003dnonblock\u0027,"},{"line_number":1617,"context_line":"                                  run_as_root\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAQn%2F%2Fx14%3D","line":1614,"updated":"2013-07-23 12:50:23.000000000","message":"change unrelated to feature?","commit_id":"ecb15f7432dbc40aeb8ce6e8b965a07891f27b5b"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"15ef419f841ff252b9ce0e74ef9e5fd6475ff01c","unresolved":false,"context_lines":[{"line_number":1611,"context_line":"        timer.start(interval\u003d0.5).wait()"},{"line_number":1612,"context_line":""},{"line_number":1613,"context_line":"    def _flush_libvirt_console(self, pty):"},{"line_number":1614,"context_line":"        out, _err \u003d utils.execute(\u0027dd\u0027,"},{"line_number":1615,"context_line":"                                  \u0027if\u003d%s\u0027 % pty,"},{"line_number":1616,"context_line":"                                  \u0027iflag\u003dnonblock\u0027,"},{"line_number":1617,"context_line":"                                  run_as_root\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAQn%2F%2FvI4%3D","line":1614,"in_reply_to":"AAAAQn%2F%2Fx14%3D","updated":"2013-07-24 07:11:24.000000000","message":"yes, removed.","commit_id":"ecb15f7432dbc40aeb8ce6e8b965a07891f27b5b"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"6c0577ea96e8b09557e85dc3ba0b6e66c5fb7489","unresolved":false,"context_lines":[{"line_number":4129,"context_line":"                                     filename\u003dfname,"},{"line_number":4130,"context_line":"                                     image_id\u003ddisk_images[\u0027ramdisk_id\u0027],"},{"line_number":4131,"context_line":"                                     user_id\u003dinstance[\u0027user_id\u0027],"},{"line_number":4132,"context_line":"                                     project_id\u003dinstance[\u0027project_id\u0027])"},{"line_number":4133,"context_line":""},{"line_number":4134,"context_line":"    def pre_live_migration(self, context, instance, block_device_info,"},{"line_number":4135,"context_line":"                           network_info, disk_info, migrate_data\u003dNone):"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAATn%2F%2F6bo%3D","line":4132,"updated":"2013-10-25 10:53:32.000000000","message":"It looks to me that this code change is a separate task from the main job of support multiple image locations. eg this code change is just adding caching of kernel/ramdisk files that are fetched. As such I think this chunk should be done as a separate pre-requisite commit..","commit_id":"193a3f8bdd08a453a6335fe7b09db406020397b5"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"7f92ee1b2c043716346edac4a3853bccabd0f8c0","unresolved":false,"context_lines":[{"line_number":4129,"context_line":"                                     filename\u003dfname,"},{"line_number":4130,"context_line":"                                     image_id\u003ddisk_images[\u0027ramdisk_id\u0027],"},{"line_number":4131,"context_line":"                                     user_id\u003dinstance[\u0027user_id\u0027],"},{"line_number":4132,"context_line":"                                     project_id\u003dinstance[\u0027project_id\u0027])"},{"line_number":4133,"context_line":""},{"line_number":4134,"context_line":"    def pre_live_migration(self, context, instance, block_device_info,"},{"line_number":4135,"context_line":"                           network_info, disk_info, migrate_data\u003dNone):"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAATn%2F%2F2nc%3D","line":4132,"in_reply_to":"AAAATn%2F%2F6bo%3D","updated":"2013-10-27 16:16:59.000000000","message":"IMO this change snippet is significant to this change, since we using fetch_image() to receive image at here but when the instance home directory destroy the imagecahce\u0027s remove related method will not be called. So, I see, as you mentioned above this is a \"pre-requiste\u0027 change, but I\u0027d like involve this part in this patch as integrated one anyway. thanks.","commit_id":"193a3f8bdd08a453a6335fe7b09db406020397b5"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"6a88876079cbacb7e857087680c81ad350eb1a52","unresolved":false,"context_lines":[{"line_number":4426,"context_line":"                            project_id\u003dinstance[\u0027project_id\u0027],"},{"line_number":4427,"context_line":"                            size\u003dinfo[\u0027virt_disk_size\u0027])"},{"line_number":4428,"context_line":""},{"line_number":4429,"context_line":"        # if image has kernel and ramdisk, just fetch"},{"line_number":4430,"context_line":"        # following normal way."},{"line_number":4431,"context_line":"        self._fetch_instance_kernel_ramdisk(context, instance)"},{"line_number":4432,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"AAAAT3%2F%2F0ek%3D","line":4429,"updated":"2013-12-30 20:28:52.000000000","message":"This change doesn\u0027t really seem related to your patch.  This one is no big deal, but I\u0027d still advise reverting it…","commit_id":"c4bd476f319964adfcf6d47447fa630c3e070048"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"7a858026790385523b9783b483eff24a6bb57309","unresolved":false,"context_lines":[{"line_number":4426,"context_line":"                            project_id\u003dinstance[\u0027project_id\u0027],"},{"line_number":4427,"context_line":"                            size\u003dinfo[\u0027virt_disk_size\u0027])"},{"line_number":4428,"context_line":""},{"line_number":4429,"context_line":"        # if image has kernel and ramdisk, just fetch"},{"line_number":4430,"context_line":"        # following normal way."},{"line_number":4431,"context_line":"        self._fetch_instance_kernel_ramdisk(context, instance)"},{"line_number":4432,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAAT3%2F%2FuXA%3D","line":4429,"updated":"2014-01-02 21:22:28.000000000","message":"This change doesn\u0027t really seem related to your patch. This one is no big deal, but I\u0027d still advise reverting it…","commit_id":"62223689d19918dad0ffc0970aeea95260450ce6"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"e908beddb2d179ceb5cdfe7a1b59ae10d630a32d","unresolved":false,"context_lines":[{"line_number":4426,"context_line":"                            project_id\u003dinstance[\u0027project_id\u0027],"},{"line_number":4427,"context_line":"                            size\u003dinfo[\u0027virt_disk_size\u0027])"},{"line_number":4428,"context_line":""},{"line_number":4429,"context_line":"        # if image has kernel and ramdisk, just fetch"},{"line_number":4430,"context_line":"        # following normal way."},{"line_number":4431,"context_line":"        self._fetch_instance_kernel_ramdisk(context, instance)"},{"line_number":4432,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAAUH%2F%2FtxI%3D","line":4429,"in_reply_to":"AAAAT3%2F%2FuXA%3D","updated":"2014-01-09 09:58:48.000000000","message":"Done","commit_id":"62223689d19918dad0ffc0970aeea95260450ce6"}],"nova/virt/libvirt/imagecache.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"bcb07071decf795aa78b90e3b4ee7277185b277a","unresolved":false,"context_lines":[{"line_number":446,"context_line":"                                                    target_path\u003dbase_file):"},{"line_number":447,"context_line":"                    (handler, loc, image_meta) \u003d handler_context"},{"line_number":448,"context_line":"                    # The loop will stop when the handle function"},{"line_number":449,"context_line":"                    # return success."},{"line_number":450,"context_line":"                    handler.remove_image(context, image_id, image_meta,"},{"line_number":451,"context_line":"                                         base_file, location\u003dloc)"},{"line_number":452,"context_line":"                signature \u003d get_info_filename(base_file)"}],"source_content_type":"text/x-python","patch_set":53,"id":"AAAAUX%2F%2FIds%3D","line":449,"updated":"2014-02-16 16:05:51.000000000","message":"return \u003d\u003e returns","commit_id":"efad55a6deac418c73d754a46290bc55b87ea5a7"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"c3d73f77152ec59a891d85d5e3a8d8ae550ea2c3","unresolved":false,"context_lines":[{"line_number":446,"context_line":"                                                    target_path\u003dbase_file):"},{"line_number":447,"context_line":"                    (handler, loc, image_meta) \u003d handler_context"},{"line_number":448,"context_line":"                    # The loop will stop when the handle function"},{"line_number":449,"context_line":"                    # return success."},{"line_number":450,"context_line":"                    handler.remove_image(context, image_id, image_meta,"},{"line_number":451,"context_line":"                                         base_file, location\u003dloc)"},{"line_number":452,"context_line":"                signature \u003d get_info_filename(base_file)"}],"source_content_type":"text/x-python","patch_set":53,"id":"AAAAUX%2F%2B7CU%3D","line":449,"in_reply_to":"AAAAUX%2F%2FIds%3D","updated":"2014-02-18 07:41:38.000000000","message":"Done","commit_id":"efad55a6deac418c73d754a46290bc55b87ea5a7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fd92810e3da3c05ed260d5e99277cabd78b5fc44","unresolved":false,"context_lines":[{"line_number":438,"context_line":"            maxage \u003d CONF.remove_unused_original_minimum_age_seconds"},{"line_number":439,"context_line":""},{"line_number":440,"context_line":"        if age \u003c maxage:"},{"line_number":441,"context_line":"            LOG.info(_(\u0027Base file too young to remove: %s\u0027), base_file)"},{"line_number":442,"context_line":"        else:"},{"line_number":443,"context_line":"            LOG.info(_(\u0027Removing base file: %s\u0027), base_file)"},{"line_number":444,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":60,"id":"AAAAVn%2F%2Fqc0%3D","line":441,"updated":"2014-03-04 19:35:48.000000000","message":"Unnecessary change.","commit_id":"a55bbbfa1957d02b3006a51afcf4984a1f8ff886"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"73edf513c090c84fcaa0a7590301e9739b5b07af","unresolved":false,"context_lines":[{"line_number":438,"context_line":"            maxage \u003d CONF.remove_unused_original_minimum_age_seconds"},{"line_number":439,"context_line":""},{"line_number":440,"context_line":"        if age \u003c maxage:"},{"line_number":441,"context_line":"            LOG.info(_(\u0027Base file too young to remove: %s\u0027), base_file)"},{"line_number":442,"context_line":"        else:"},{"line_number":443,"context_line":"            LOG.info(_(\u0027Removing base file: %s\u0027), base_file)"},{"line_number":444,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":60,"id":"AAAAVn%2F%2FqTU%3D","line":441,"in_reply_to":"AAAAVn%2F%2Fqc0%3D","updated":"2014-03-04 19:53:31.000000000","message":"Done.","commit_id":"a55bbbfa1957d02b3006a51afcf4984a1f8ff886"}]}
