)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"b165088eaf0feff60014f0811f525e24df44dd78","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Adding image location selection strategies"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"An image can be save to more then one backend storage by multi-location"},{"line_number":10,"context_line":"mechanism, Glance should has a capability to select a best backend"},{"line_number":11,"context_line":"storage for improve image consuming performance. This change implemented"},{"line_number":12,"context_line":"two strategy modules: \"location_order\" and \"store_type\", and allow Admin"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAATn%2F%2BfpU%3D","line":9,"updated":"2013-11-25 16:01:34.000000000","message":"can be SAVED to more THAN","commit_id":"39945b4712fad18c03082f01cab6d93ef10aef6d"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"832fac16d610c6a552492c5bf4daf4137948407c","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Adding image location selection strategies"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"An image can be save to more then one backend storage by multi-location"},{"line_number":10,"context_line":"mechanism, Glance should has a capability to select a best backend"},{"line_number":11,"context_line":"storage for improve image consuming performance. This change implemented"},{"line_number":12,"context_line":"two strategy modules: \"location_order\" and \"store_type\", and allow Admin"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAATn%2F%2BbkU%3D","line":9,"in_reply_to":"AAAATn%2F%2BfpU%3D","updated":"2013-11-26 06:34:29.000000000","message":"Done","commit_id":"39945b4712fad18c03082f01cab6d93ef10aef6d"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"b165088eaf0feff60014f0811f525e24df44dd78","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Adding image location selection strategies"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"An image can be save to more then one backend storage by multi-location"},{"line_number":10,"context_line":"mechanism, Glance should has a capability to select a best backend"},{"line_number":11,"context_line":"storage for improve image consuming performance. This change implemented"},{"line_number":12,"context_line":"two strategy modules: \"location_order\" and \"store_type\", and allow Admin"},{"line_number":13,"context_line":"configure some strategy-specified options for Glance as their deployment"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAATn%2F%2BfpI%3D","line":10,"updated":"2013-11-25 16:01:34.000000000","message":"should HAVE\n\nTHE best","commit_id":"39945b4712fad18c03082f01cab6d93ef10aef6d"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"832fac16d610c6a552492c5bf4daf4137948407c","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Adding image location selection strategies"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"An image can be save to more then one backend storage by multi-location"},{"line_number":10,"context_line":"mechanism, Glance should has a capability to select a best backend"},{"line_number":11,"context_line":"storage for improve image consuming performance. This change implemented"},{"line_number":12,"context_line":"two strategy modules: \"location_order\" and \"store_type\", and allow Admin"},{"line_number":13,"context_line":"configure some strategy-specified options for Glance as their deployment"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAATn%2F%2BbkM%3D","line":10,"in_reply_to":"AAAATn%2F%2BfpI%3D","updated":"2013-11-26 06:34:29.000000000","message":"Done","commit_id":"39945b4712fad18c03082f01cab6d93ef10aef6d"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"b165088eaf0feff60014f0811f525e24df44dd78","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"An image can be save to more then one backend storage by multi-location"},{"line_number":10,"context_line":"mechanism, Glance should has a capability to select a best backend"},{"line_number":11,"context_line":"storage for improve image consuming performance. This change implemented"},{"line_number":12,"context_line":"two strategy modules: \"location_order\" and \"store_type\", and allow Admin"},{"line_number":13,"context_line":"configure some strategy-specified options for Glance as their deployment"},{"line_number":14,"context_line":"required."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAATn%2F%2BfpE%3D","line":11,"updated":"2013-11-25 16:01:34.000000000","message":"for improving\n\nimplements","commit_id":"39945b4712fad18c03082f01cab6d93ef10aef6d"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"832fac16d610c6a552492c5bf4daf4137948407c","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"An image can be save to more then one backend storage by multi-location"},{"line_number":10,"context_line":"mechanism, Glance should has a capability to select a best backend"},{"line_number":11,"context_line":"storage for improve image consuming performance. This change implemented"},{"line_number":12,"context_line":"two strategy modules: \"location_order\" and \"store_type\", and allow Admin"},{"line_number":13,"context_line":"configure some strategy-specified options for Glance as their deployment"},{"line_number":14,"context_line":"required."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAATn%2F%2BbkE%3D","line":11,"in_reply_to":"AAAATn%2F%2BfpE%3D","updated":"2013-11-26 06:34:29.000000000","message":"Done","commit_id":"39945b4712fad18c03082f01cab6d93ef10aef6d"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"b165088eaf0feff60014f0811f525e24df44dd78","unresolved":false,"context_lines":[{"line_number":16,"context_line":"As an end user, he can get VM or consuming image faster base on this"},{"line_number":17,"context_line":"enhancement. This is not only for \u0027download\u0027 transport handling on the"},{"line_number":18,"context_line":"API server side but also for client since they can obtain locations by"},{"line_number":19,"context_line":"standard \u0027direct URL\u0027 interface. "},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Implements bp: image-location-selection-strategy"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAATn%2F%2Bfok%3D","line":19,"updated":"2013-11-25 16:01:34.000000000","message":"remove the whitespace","commit_id":"39945b4712fad18c03082f01cab6d93ef10aef6d"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"832fac16d610c6a552492c5bf4daf4137948407c","unresolved":false,"context_lines":[{"line_number":16,"context_line":"As an end user, he can get VM or consuming image faster base on this"},{"line_number":17,"context_line":"enhancement. This is not only for \u0027download\u0027 transport handling on the"},{"line_number":18,"context_line":"API server side but also for client since they can obtain locations by"},{"line_number":19,"context_line":"standard \u0027direct URL\u0027 interface. "},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Implements bp: image-location-selection-strategy"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAATn%2F%2Bbj4%3D","line":19,"in_reply_to":"AAAATn%2F%2Bfok%3D","updated":"2013-11-26 06:34:29.000000000","message":"Done","commit_id":"39945b4712fad18c03082f01cab6d93ef10aef6d"}],"etc/glance-api.conf":[{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"7e5fc30e3b19194c95d24eb203c1f8a58a59a48e","unresolved":false,"context_lines":[{"line_number":127,"context_line":""},{"line_number":128,"context_line":"# Using which strategy to determine image backend storage selection order"},{"line_number":129,"context_line":"# from multiple locations. Currently Glance support \u0027location_order\u0027 and"},{"line_number":130,"context_line":"# \u0027store_type\u0027 two built-in strategies."},{"line_number":131,"context_line":"#location_strategy \u003d location_order"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"# The scheme list to use to get store preference order. The scheme must be"}],"source_content_type":"text/plain","patch_set":4,"id":"AAAATn%2F%2BbeI%3D","line":130,"updated":"2013-11-26 08:00:45.000000000","message":"Minor issue but I think it would be more clear with:\n\nThis value sets what strategy will be used to determine the image location order.  Currently two strategies are packaged with Glance location_order\u0027 and \u0027store_type\u0027.","commit_id":"31652ca569d44ed514edf23be7e628c1ed240d0a"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"18e6ea8c0d5ffa215950d181511679772c500f0f","unresolved":false,"context_lines":[{"line_number":127,"context_line":""},{"line_number":128,"context_line":"# Using which strategy to determine image backend storage selection order"},{"line_number":129,"context_line":"# from multiple locations. Currently Glance support \u0027location_order\u0027 and"},{"line_number":130,"context_line":"# \u0027store_type\u0027 two built-in strategies."},{"line_number":131,"context_line":"#location_strategy \u003d location_order"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"# The scheme list to use to get store preference order. The scheme must be"}],"source_content_type":"text/plain","patch_set":4,"id":"AAAATn%2F%2BbWQ%3D","line":130,"in_reply_to":"AAAATn%2F%2BbeI%3D","updated":"2013-11-26 09:42:22.000000000","message":"Done","commit_id":"31652ca569d44ed514edf23be7e628c1ed240d0a"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"7e5fc30e3b19194c95d24eb203c1f8a58a59a48e","unresolved":false,"context_lines":[{"line_number":134,"context_line":"# registered by one of the stores defined by the \u0027known_stores\u0027 config option."},{"line_number":135,"context_line":"# This option will be applied when you using \u0027store_type\u0027 option as image"},{"line_number":136,"context_line":"# location strategy defined by the \u0027location_strategy\u0027 config option."},{"line_number":137,"context_line":"#store_type_preference \u003d"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"# Whether excluding unpreferred store location from image location list."},{"line_number":140,"context_line":"#exclude_unpreferred_location \u003d False"}],"source_content_type":"text/plain","patch_set":4,"id":"AAAATn%2F%2BbdQ%3D","line":137,"updated":"2013-11-26 08:00:45.000000000","message":"I do not like having each module register its options under the default heading.  I realize that Glance set the precedent of having everything under the single group and thus it is hard to break away, however in this case I think we have a pretty clear distinction.  Can we make each loadable module have its own group where options are listed?  This would also avoid any namespace collisions that could occur from 3rd party strategies that are created down the road.","commit_id":"31652ca569d44ed514edf23be7e628c1ed240d0a"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"166bde4629c658a9479bdbb95d55fe619e2f43ff","unresolved":false,"context_lines":[{"line_number":134,"context_line":"# registered by one of the stores defined by the \u0027known_stores\u0027 config option."},{"line_number":135,"context_line":"# This option will be applied when you using \u0027store_type\u0027 option as image"},{"line_number":136,"context_line":"# location strategy defined by the \u0027location_strategy\u0027 config option."},{"line_number":137,"context_line":"#store_type_preference \u003d"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"# Whether excluding unpreferred store location from image location list."},{"line_number":140,"context_line":"#exclude_unpreferred_location \u003d False"}],"source_content_type":"text/plain","patch_set":4,"id":"AAAATn%2F%2BbUQ%3D","line":137,"in_reply_to":"AAAATn%2F%2BbdQ%3D","updated":"2013-11-26 08:36:15.000000000","message":"Good point, +1","commit_id":"31652ca569d44ed514edf23be7e628c1ed240d0a"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"18e6ea8c0d5ffa215950d181511679772c500f0f","unresolved":false,"context_lines":[{"line_number":134,"context_line":"# registered by one of the stores defined by the \u0027known_stores\u0027 config option."},{"line_number":135,"context_line":"# This option will be applied when you using \u0027store_type\u0027 option as image"},{"line_number":136,"context_line":"# location strategy defined by the \u0027location_strategy\u0027 config option."},{"line_number":137,"context_line":"#store_type_preference \u003d"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"# Whether excluding unpreferred store location from image location list."},{"line_number":140,"context_line":"#exclude_unpreferred_location \u003d False"}],"source_content_type":"text/plain","patch_set":4,"id":"AAAATn%2F%2BbV0%3D","line":137,"in_reply_to":"AAAATn%2F%2BbdQ%3D","updated":"2013-11-26 09:42:22.000000000","message":"Make sense, thanks.","commit_id":"31652ca569d44ed514edf23be7e628c1ed240d0a"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"7aec91d19f3d1aa638d2245e8ab97bdc75b05b28","unresolved":false,"context_lines":[{"line_number":472,"context_line":"# registered by one of the stores defined by the \u0027known_stores\u0027 config option."},{"line_number":473,"context_line":"# This option will be applied when you using \u0027store_type\u0027 option as image"},{"line_number":474,"context_line":"# location strategy defined by the \u0027location_strategy\u0027 config option."},{"line_number":475,"context_line":"#store_type_preference \u003d"},{"line_number":476,"context_line":""},{"line_number":477,"context_line":"# Whether excluding unpreferred store location from image location list."},{"line_number":478,"context_line":"#exclude_unpreferred_location \u003d False"}],"source_content_type":"text/plain","patch_set":8,"id":"AAAAUH%2F%2F1LU%3D","line":475,"updated":"2014-01-07 23:38:33.000000000","message":"It seems like using the same types of strings as used by \"known_stores\", rather than using schemes, would be a better approach, but I\u0027d like to know your thoughts.","commit_id":"e700fc18a8224949fb3776a217b98c0446563539"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"bf5191f26dfca8d42cf59cfae20607119e5590e6","unresolved":false,"context_lines":[{"line_number":472,"context_line":"# registered by one of the stores defined by the \u0027known_stores\u0027 config option."},{"line_number":473,"context_line":"# This option will be applied when you using \u0027store_type\u0027 option as image"},{"line_number":474,"context_line":"# location strategy defined by the \u0027location_strategy\u0027 config option."},{"line_number":475,"context_line":"#store_type_preference \u003d"},{"line_number":476,"context_line":""},{"line_number":477,"context_line":"# Whether excluding unpreferred store location from image location list."},{"line_number":478,"context_line":"#exclude_unpreferred_location \u003d False"}],"source_content_type":"text/plain","patch_set":8,"id":"AAAAUH%2F%2FwwA%3D","line":475,"in_reply_to":"AAAAUH%2F%2F0KU%3D","updated":"2014-01-08 19:07:17.000000000","message":"It seems like it will make configuration errors rather easy, as well. For example, suppose I don\u0027t know that swift can support several schemes like \"swift://\", \"swift+http://\", and \"swift+https://\". Then I may only be adding support for some of my images and would be very confused why it was not selecting the right images.\n\nThis can get even worse if a store at some point in the future starts to support more schemes than it did in the past, which has happened.\n\nMaybe using the store library import paths is wrong because it shares the wrong information, but we need some sort of key that is at the same granularity. Scheme is at a finer granularity and I think it will create problems.","commit_id":"e700fc18a8224949fb3776a217b98c0446563539"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"d2f1ec4b29b4ec61be75a2807a6bb95b50c8aa14","unresolved":false,"context_lines":[{"line_number":472,"context_line":"# registered by one of the stores defined by the \u0027known_stores\u0027 config option."},{"line_number":473,"context_line":"# This option will be applied when you using \u0027store_type\u0027 option as image"},{"line_number":474,"context_line":"# location strategy defined by the \u0027location_strategy\u0027 config option."},{"line_number":475,"context_line":"#store_type_preference \u003d"},{"line_number":476,"context_line":""},{"line_number":477,"context_line":"# Whether excluding unpreferred store location from image location list."},{"line_number":478,"context_line":"#exclude_unpreferred_location \u003d False"}],"source_content_type":"text/plain","patch_set":8,"id":"AAAAUH%2F%2F0KU%3D","line":475,"in_reply_to":"AAAAUH%2F%2F1LU%3D","updated":"2014-01-08 06:29:48.000000000","message":"Yes it make sense, thanks. The key reason to me why using schema here but \"known_stores\" is that we have plan to share this stuff with other projects like Nova via \"glance-lib\", but IMO \"known_stores\" is a concept for Glance area only, and \"schema\" is more easy to understand for cloud admin cross different project, actually we have already exposed similar \"schema\" info to nova: https://github.com/openstack/nova/blob/master/nova/image/glance.py#L246 , so IMO if admin already has knowledge for that, we\u0027d better keep the same concept to make this stuff to be configured easily.","commit_id":"e700fc18a8224949fb3776a217b98c0446563539"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"7c4bd69e6d999e6199780910e3d3ef2672db6368","unresolved":false,"context_lines":[{"line_number":472,"context_line":"# registered by one of the stores defined by the \u0027known_stores\u0027 config option."},{"line_number":473,"context_line":"# This option will be applied when you using \u0027store_type\u0027 option as image"},{"line_number":474,"context_line":"# location strategy defined by the \u0027location_strategy\u0027 config option."},{"line_number":475,"context_line":"#store_type_preference \u003d"},{"line_number":476,"context_line":""},{"line_number":477,"context_line":"# Whether excluding unpreferred store location from image location list."},{"line_number":478,"context_line":"#exclude_unpreferred_location \u003d False"}],"source_content_type":"text/plain","patch_set":8,"id":"AAAAUH%2F%2FloQ%3D","line":475,"in_reply_to":"AAAAUH%2F%2Fl2A%3D","updated":"2014-01-10 19:04:14.000000000","message":"I think Nova knowing about the schemes is one thing. But as we move forward with pushing location selection strategies towards clients, we will have the opportunity to expose location types by a mechanism that doesn\u0027t have the scheme problem (i.e.)\n\nThe idea of using scheme to separate out the \"where\" of an image surprises me. I don\u0027t think it makes sense to http+rack1://file1 and http+rack2://file1. I would expect to put that kind of information as part of the url domain or path, instead. Scheme just serves to indicate \"what does the rest of the url mean, and what do I use it for?\".\n\nSetting that example aside, I think there are some questions about what we\u0027re really trying to identify by scheme or by store module name. It makes sense to me to say that we\u0027re trying to identify \"location type\" which is clearly larger than scheme but maybe does not map cleanly onto store module name.\n\nIs there any way we can compromise without making this too complicated? How gross would it be to be able to switch off of both scheme and store module name?\n\nCould we use store module name for now (since I think it makes a lot of sense here in the glance server) and figure out a better solution sometime later?\n\nThanks for working with me on this issue!","commit_id":"e700fc18a8224949fb3776a217b98c0446563539"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"54f097bcbc1f04a05c4950cf61e46ee1f2d7d517","unresolved":false,"context_lines":[{"line_number":472,"context_line":"# registered by one of the stores defined by the \u0027known_stores\u0027 config option."},{"line_number":473,"context_line":"# This option will be applied when you using \u0027store_type\u0027 option as image"},{"line_number":474,"context_line":"# location strategy defined by the \u0027location_strategy\u0027 config option."},{"line_number":475,"context_line":"#store_type_preference \u003d"},{"line_number":476,"context_line":""},{"line_number":477,"context_line":"# Whether excluding unpreferred store location from image location list."},{"line_number":478,"context_line":"#exclude_unpreferred_location \u003d False"}],"source_content_type":"text/plain","patch_set":8,"id":"AAAAUH%2F%2FY5M%3D","line":475,"in_reply_to":"AAAAUH%2F%2FloQ%3D","updated":"2014-01-14 10:06:35.000000000","message":"Done","commit_id":"e700fc18a8224949fb3776a217b98c0446563539"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"e48935aac45399f1c50c677c331ebd89ab282fdc","unresolved":false,"context_lines":[{"line_number":472,"context_line":"# registered by one of the stores defined by the \u0027known_stores\u0027 config option."},{"line_number":473,"context_line":"# This option will be applied when you using \u0027store_type\u0027 option as image"},{"line_number":474,"context_line":"# location strategy defined by the \u0027location_strategy\u0027 config option."},{"line_number":475,"context_line":"#store_type_preference \u003d"},{"line_number":476,"context_line":""},{"line_number":477,"context_line":"# Whether excluding unpreferred store location from image location list."},{"line_number":478,"context_line":"#exclude_unpreferred_location \u003d False"}],"source_content_type":"text/plain","patch_set":8,"id":"AAAAUH%2F%2Fl2A%3D","line":475,"in_reply_to":"AAAAUH%2F%2FuJY%3D","updated":"2014-01-10 17:49:24.000000000","message":"Hi @markwash, may I get your feedback/reply on my about thoughts sharing? thanks!","commit_id":"e700fc18a8224949fb3776a217b98c0446563539"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"360f1150ce9bed644f8491ff39a6ab09378349fd","unresolved":false,"context_lines":[{"line_number":472,"context_line":"# registered by one of the stores defined by the \u0027known_stores\u0027 config option."},{"line_number":473,"context_line":"# This option will be applied when you using \u0027store_type\u0027 option as image"},{"line_number":474,"context_line":"# location strategy defined by the \u0027location_strategy\u0027 config option."},{"line_number":475,"context_line":"#store_type_preference \u003d"},{"line_number":476,"context_line":""},{"line_number":477,"context_line":"# Whether excluding unpreferred store location from image location list."},{"line_number":478,"context_line":"#exclude_unpreferred_location \u003d False"}],"source_content_type":"text/plain","patch_set":8,"id":"AAAAUH%2F%2FuJY%3D","line":475,"in_reply_to":"AAAAUH%2F%2FwwA%3D","updated":"2014-01-09 07:54:40.000000000","message":"From your above comments, I can see two points, I have some thoughts around them. btw, I\u0027m fine to go any way of them, but currently I still think scheme way is acceptable and better tbh :)\n\n\u003e\u003e expose scheme knowledge out\n\nCurrently I believe nova already accept this overhead https://github.com/openstack/nova/blob/master/nova/image/glance.py#L246 , and at now and in future (when store add more schemes) admin/operator should consistent know them since they need configure nova correctly.\n\n\u003e\u003e Maybe using the store library import paths is wrong because it shares the wrong information\n\nIMO if we think to expose scheme knowledge is needed, can we document this stuff (scheme info) down and educate cloud admin/operator know that?\n\nbtw, I think there is a scenario need scheme granularity, for example, rack1 near schemeA images and rack2 near schemeB images, if we only allow admin configure this strategy by store driver granularity then hosts in rack1 and rack2 will use those two storage equally, but if we allow admin configure this strategy by scheme granularity then those hosts requests will be separated as we deployment needed, it will be better IMO.\n\nthanks","commit_id":"e700fc18a8224949fb3776a217b98c0446563539"},{"author":{"_account_id":8759,"name":"Arnaud Legendre","email":"arnaudleg@gmail.com","username":"arnaud"},"change_message_id":"0d3e0e20b2a3b26ef35f54e87cadf9068a84b7b8","unresolved":false,"context_lines":[{"line_number":130,"context_line":"# The default value for task_time_to_live is 48 hours."},{"line_number":131,"context_line":"# task_time_to_live \u003d 48"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"# This value sets what strategy will be used to determine the image location"},{"line_number":134,"context_line":"# order. Currently two strategies are packaged with Glance \u0027location_order\u0027"},{"line_number":135,"context_line":"# and \u0027store_type\u0027."},{"line_number":136,"context_line":"#location_strategy \u003d location_order"}],"source_content_type":"text/plain","patch_set":9,"id":"AAAAUH%2F%2FPho%3D","line":133,"updated":"2014-01-16 00:24:29.000000000","message":"docImpact?\n\nAlso: I think that as an end-user it is not clearly explained what location_order will do.\nIs there anything to configure when using location_order?","commit_id":"9babd2942703654f56ba52ca96af99d549f25657"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"3678f55fd401715b5def03e7a26edfef8fa20894","unresolved":false,"context_lines":[{"line_number":130,"context_line":"# The default value for task_time_to_live is 48 hours."},{"line_number":131,"context_line":"# task_time_to_live \u003d 48"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"# This value sets what strategy will be used to determine the image location"},{"line_number":134,"context_line":"# order. Currently two strategies are packaged with Glance \u0027location_order\u0027"},{"line_number":135,"context_line":"# and \u0027store_type\u0027."},{"line_number":136,"context_line":"#location_strategy \u003d location_order"}],"source_content_type":"text/plain","patch_set":9,"id":"AAAAUH%2F%2FObI%3D","line":133,"in_reply_to":"AAAAUH%2F%2FPho%3D","updated":"2014-01-16 07:16:43.000000000","message":"Will add a docImpact flag.","commit_id":"9babd2942703654f56ba52ca96af99d549f25657"}],"glance/common/location_strategy/__init__.py":[{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"b165088eaf0feff60014f0811f525e24df44dd78","unresolved":false,"context_lines":[{"line_number":104,"context_line":"    \"\"\""},{"line_number":105,"context_line":"    locations \u003d get_ordered_locations(locations, **kwargs)"},{"line_number":106,"context_line":"    if locations:"},{"line_number":107,"context_line":"        return locations[0]"},{"line_number":108,"context_line":"    else:"},{"line_number":109,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2Be%2F4%3D","line":107,"updated":"2013-11-25 16:01:34.000000000","message":"I\u0027m wondering why the first is the best even there is an order.","commit_id":"39945b4712fad18c03082f01cab6d93ef10aef6d"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"832fac16d610c6a552492c5bf4daf4137948407c","unresolved":false,"context_lines":[{"line_number":104,"context_line":"    \"\"\""},{"line_number":105,"context_line":"    locations \u003d get_ordered_locations(locations, **kwargs)"},{"line_number":106,"context_line":"    if locations:"},{"line_number":107,"context_line":"        return locations[0]"},{"line_number":108,"context_line":"    else:"},{"line_number":109,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2Bbm0%3D","line":107,"in_reply_to":"AAAATn%2F%2Be%2F4%3D","updated":"2013-11-26 06:34:29.000000000","message":"Since under current design, the best location will always at the begin of the list returned by get_ordered_locations(). the worst one will always at the end.\n\nDo you mean you prefer under layer strategy module should take care this? (expose choose_best_location())","commit_id":"39945b4712fad18c03082f01cab6d93ef10aef6d"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"7e5fc30e3b19194c95d24eb203c1f8a58a59a48e","unresolved":false,"context_lines":[{"line_number":68,"context_line":"_available_strategies \u003d _load_strategies()"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"def verify_location_strategy():"},{"line_number":72,"context_line":"    \"\"\"Validate user configured \u0027location_strategy\u0027 option value is valid.\"\"\""},{"line_number":73,"context_line":"    if CONF.location_strategy not in _available_strategies:"},{"line_number":74,"context_line":"        msg \u003d (_(\u0027Invalid location_strategy option: %(name)s. \u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2Bbcw%3D","line":71,"updated":"2013-11-26 08:00:45.000000000","message":"Disclaimer: I openly admit that this issue is my own personal hang up and thus I will not block anything based on it.\n\nThe global CONF structure can be a bit of a PITA.  I think it is best to avoid it where we can.  For this function I think you could pass in the conf and then have a default parameter for the available_strategies, ex:\n\ndef verify_location_strategy(conf, strategies\u003d_available_strategies):\n\nThis way it would be easier to test and would not add another dep on the global CONF.\n\nJust my 2 cents here.","commit_id":"31652ca569d44ed514edf23be7e628c1ed240d0a"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"18e6ea8c0d5ffa215950d181511679772c500f0f","unresolved":false,"context_lines":[{"line_number":68,"context_line":"_available_strategies \u003d _load_strategies()"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"def verify_location_strategy():"},{"line_number":72,"context_line":"    \"\"\"Validate user configured \u0027location_strategy\u0027 option value is valid.\"\"\""},{"line_number":73,"context_line":"    if CONF.location_strategy not in _available_strategies:"},{"line_number":74,"context_line":"        msg \u003d (_(\u0027Invalid location_strategy option: %(name)s. \u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2BbOI%3D","line":71,"in_reply_to":"AAAATn%2F%2Bbcw%3D","updated":"2013-11-26 09:42:22.000000000","message":"OK, I will try to change this.","commit_id":"31652ca569d44ed514edf23be7e628c1ed240d0a"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"7e5fc30e3b19194c95d24eb203c1f8a58a59a48e","unresolved":false,"context_lines":[{"line_number":88,"context_line":"    :return: The image location list with strategy-specific order."},{"line_number":89,"context_line":"    \"\"\""},{"line_number":90,"context_line":"    if not locations:"},{"line_number":91,"context_line":"        return []"},{"line_number":92,"context_line":"    strategy_module \u003d _available_strategies[CONF.location_strategy]"},{"line_number":93,"context_line":"    return strategy_module.get_ordered_locations(copy.deepcopy(locations),"},{"line_number":94,"context_line":"                                                 **kwargs)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2Bbco%3D","line":91,"updated":"2013-11-26 08:00:45.000000000","message":"I am wondering if there is a difference between None and [] here.  Should we do \"return locations\" instead to assure that the same type is returned?","commit_id":"31652ca569d44ed514edf23be7e628c1ed240d0a"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"181ab0abba44cd194c686451b9c750dfb913521e","unresolved":false,"context_lines":[{"line_number":88,"context_line":"    :return: The image location list with strategy-specific order."},{"line_number":89,"context_line":"    \"\"\""},{"line_number":90,"context_line":"    if not locations:"},{"line_number":91,"context_line":"        return []"},{"line_number":92,"context_line":"    strategy_module \u003d _available_strategies[CONF.location_strategy]"},{"line_number":93,"context_line":"    return strategy_module.get_ordered_locations(copy.deepcopy(locations),"},{"line_number":94,"context_line":"                                                 **kwargs)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2Bayk%3D","line":91,"in_reply_to":"AAAATn%2F%2Ba7I%3D","updated":"2013-11-26 10:20:06.000000000","message":"Sorry TBH I\u0027m not sure your means clearly John, if you can give me a suggestion for that it will be great, thanks. Seems you prefer return a None value at here?","commit_id":"31652ca569d44ed514edf23be7e628c1ed240d0a"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"bd71bd52b1a95d691656e2da9d20fc87d6cc0f6d","unresolved":false,"context_lines":[{"line_number":88,"context_line":"    :return: The image location list with strategy-specific order."},{"line_number":89,"context_line":"    \"\"\""},{"line_number":90,"context_line":"    if not locations:"},{"line_number":91,"context_line":"        return []"},{"line_number":92,"context_line":"    strategy_module \u003d _available_strategies[CONF.location_strategy]"},{"line_number":93,"context_line":"    return strategy_module.get_ordered_locations(copy.deepcopy(locations),"},{"line_number":94,"context_line":"                                                 **kwargs)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2Ba7I%3D","line":91,"in_reply_to":"AAAATn%2F%2BbOk%3D","updated":"2013-11-26 09:55:41.000000000","message":"I agree that it should at least return a new list, thus my suggestion to return \"locations\" was wrong.  However my concern is that the calling code is making assumptions about the result it gets, specifically I am worried that None holds a special meaning somewhere in the code (I should really do the due diligence and look myself).","commit_id":"31652ca569d44ed514edf23be7e628c1ed240d0a"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"18e6ea8c0d5ffa215950d181511679772c500f0f","unresolved":false,"context_lines":[{"line_number":88,"context_line":"    :return: The image location list with strategy-specific order."},{"line_number":89,"context_line":"    \"\"\""},{"line_number":90,"context_line":"    if not locations:"},{"line_number":91,"context_line":"        return []"},{"line_number":92,"context_line":"    strategy_module \u003d _available_strategies[CONF.location_strategy]"},{"line_number":93,"context_line":"    return strategy_module.get_ordered_locations(copy.deepcopy(locations),"},{"line_number":94,"context_line":"                                                 **kwargs)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2BbOk%3D","line":91,"in_reply_to":"AAAATn%2F%2Bbco%3D","updated":"2013-11-26 09:42:22.000000000","message":"TBH, I also thought a lot around this. The reasons to me to return [] are following:\n\n1. This function always promises client: it return a new list object with new items inside, but refer any items from original locations list. \"get_ordered_locations()\" means to client-code is obtain a location list which ordered by a configured strategy, it\u0027s not \"order_locations()\" here, so I prefer return a _new_ location list but change location argument value.\n\n2. Base on above #1, this function be used to obtain a ordered location *list*, so if client-code passed argument has any problem, the returned result should always be a list IMO, and btw, I consider \"choose_best_location()\" function should always return a single value, but this function should always return a container.\n\nAny thoughts? Thanks for you raise this up.","commit_id":"31652ca569d44ed514edf23be7e628c1ed240d0a"},{"author":{"_account_id":8759,"name":"Arnaud Legendre","email":"arnaudleg@gmail.com","username":"arnaud"},"change_message_id":"0d3e0e20b2a3b26ef35f54e87cadf9068a84b7b8","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"def verify_location_strategy(conf\u003dNone, strategies\u003d_available_strategies):"},{"line_number":70,"context_line":"    \"\"\"Validate user configured \u0027location_strategy\u0027 option value is valid.\"\"\""},{"line_number":71,"context_line":"    if not conf:"},{"line_number":72,"context_line":"        conf \u003d CONF.location_strategy"},{"line_number":73,"context_line":"    if conf not in strategies:"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F%2FPf0%3D","line":70,"updated":"2014-01-16 00:24:29.000000000","message":"\"\"\"Validate user configured \u0027location_strategy\u0027 option value\"\"\"","commit_id":"9babd2942703654f56ba52ca96af99d549f25657"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"3678f55fd401715b5def03e7a26edfef8fa20894","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"def verify_location_strategy(conf\u003dNone, strategies\u003d_available_strategies):"},{"line_number":70,"context_line":"    \"\"\"Validate user configured \u0027location_strategy\u0027 option value is valid.\"\"\""},{"line_number":71,"context_line":"    if not conf:"},{"line_number":72,"context_line":"        conf \u003d CONF.location_strategy"},{"line_number":73,"context_line":"    if conf not in strategies:"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F%2FObU%3D","line":70,"in_reply_to":"AAAAUH%2F%2FPf0%3D","updated":"2014-01-16 07:16:43.000000000","message":"Done. Thanks for your English.","commit_id":"9babd2942703654f56ba52ca96af99d549f25657"}],"glance/common/location_strategy/store_type.py":[{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"b165088eaf0feff60014f0811f525e24df44dd78","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from oslo.config import cfg"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"store_type_opts \u003d ["},{"line_number":25,"context_line":"    cfg.ListOpt(\"store_type_preference\","},{"line_number":26,"context_line":"                default\u003d[],"},{"line_number":27,"context_line":"                help\u003d_(\"The scheme list to use to get store preference order. \""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BfMg%3D","line":24,"updated":"2013-11-25 16:01:34.000000000","message":"How about move this config into glance/common/config.py so that the others location strategies don\u0027t need to read these by themselves.","commit_id":"39945b4712fad18c03082f01cab6d93ef10aef6d"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"832fac16d610c6a552492c5bf4daf4137948407c","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from oslo.config import cfg"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"store_type_opts \u003d ["},{"line_number":25,"context_line":"    cfg.ListOpt(\"store_type_preference\","},{"line_number":26,"context_line":"                default\u003d[],"},{"line_number":27,"context_line":"                help\u003d_(\"The scheme list to use to get store preference order. \""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2Bbls%3D","line":24,"in_reply_to":"AAAATn%2F%2BfMg%3D","updated":"2013-11-26 06:34:29.000000000","message":"I think there are two reasons to me for keep options at here currently:\n\n1. actually I\u0027m try to ask all location strategy related options keep self-contains and stay in location_strategy package, as I mentioned in BP, we need share those strategy functions between glance server and client both sides (since they are all need do locations selection), and in near future probably we move these stuff to a common glance client lib to make sharing easy.\n\n2. Here two options are all for this \"store_type\" strategy module only,  other strategies will/should never use them.","commit_id":"39945b4712fad18c03082f01cab6d93ef10aef6d"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"b165088eaf0feff60014f0811f525e24df44dd78","unresolved":false,"context_lines":[{"line_number":31,"context_line":"                       \"\u0027store_type\u0027 option as image location strategy \""},{"line_number":32,"context_line":"                       \"defined by the \u0027location_strategy\u0027 config option.\")),"},{"line_number":33,"context_line":"    cfg.BoolOpt(\"exclude_unpreferred_location\", default\u003dFalse,"},{"line_number":34,"context_line":"                help\u003d_(\"Whether excluding unpreferred store  location from \""},{"line_number":35,"context_line":"                       \"image location list.\"))"},{"line_number":36,"context_line":"]"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BfLw%3D","line":34,"updated":"2013-11-25 16:01:34.000000000","message":"seems there are two whitespaces between store and location","commit_id":"39945b4712fad18c03082f01cab6d93ef10aef6d"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"832fac16d610c6a552492c5bf4daf4137948407c","unresolved":false,"context_lines":[{"line_number":31,"context_line":"                       \"\u0027store_type\u0027 option as image location strategy \""},{"line_number":32,"context_line":"                       \"defined by the \u0027location_strategy\u0027 config option.\")),"},{"line_number":33,"context_line":"    cfg.BoolOpt(\"exclude_unpreferred_location\", default\u003dFalse,"},{"line_number":34,"context_line":"                help\u003d_(\"Whether excluding unpreferred store  location from \""},{"line_number":35,"context_line":"                       \"image location list.\"))"},{"line_number":36,"context_line":"]"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2Bblo%3D","line":34,"in_reply_to":"AAAATn%2F%2BfLw%3D","updated":"2013-11-26 06:34:29.000000000","message":"Done","commit_id":"39945b4712fad18c03082f01cab6d93ef10aef6d"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"b165088eaf0feff60014f0811f525e24df44dd78","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    \"\"\""},{"line_number":49,"context_line":"    Initialize strategy module."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    We have a plan to do a reusable glance client library for all clients"},{"line_number":52,"context_line":"    like Nova and Cinder in near period, it be able to contains common code"},{"line_number":53,"context_line":"    to provide uniform image service interface for them, just like Brick in"},{"line_number":54,"context_line":"    Cinder, this code can be moved to there and shared between Glance and"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BfIc%3D","line":51,"updated":"2013-11-25 16:01:34.000000000","message":"I would say it\u0027s a comment instead of docstring. Right?","commit_id":"39945b4712fad18c03082f01cab6d93ef10aef6d"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"832fac16d610c6a552492c5bf4daf4137948407c","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    \"\"\""},{"line_number":49,"context_line":"    Initialize strategy module."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    We have a plan to do a reusable glance client library for all clients"},{"line_number":52,"context_line":"    like Nova and Cinder in near period, it be able to contains common code"},{"line_number":53,"context_line":"    to provide uniform image service interface for them, just like Brick in"},{"line_number":54,"context_line":"    Cinder, this code can be moved to there and shared between Glance and"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BblQ%3D","line":51,"in_reply_to":"AAAATn%2F%2BfIc%3D","updated":"2013-11-26 06:34:29.000000000","message":"Sure","commit_id":"39945b4712fad18c03082f01cab6d93ef10aef6d"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"b165088eaf0feff60014f0811f525e24df44dd78","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    Initialize strategy module."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    We have a plan to do a reusable glance client library for all clients"},{"line_number":52,"context_line":"    like Nova and Cinder in near period, it be able to contains common code"},{"line_number":53,"context_line":"    to provide uniform image service interface for them, just like Brick in"},{"line_number":54,"context_line":"    Cinder, this code can be moved to there and shared between Glance and"},{"line_number":55,"context_line":"    client both side. So this implementation as far as possible to prevent"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BfI4%3D","line":52,"updated":"2013-11-25 16:01:34.000000000","message":"it would be able to contain","commit_id":"39945b4712fad18c03082f01cab6d93ef10aef6d"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"832fac16d610c6a552492c5bf4daf4137948407c","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    Initialize strategy module."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    We have a plan to do a reusable glance client library for all clients"},{"line_number":52,"context_line":"    like Nova and Cinder in near period, it be able to contains common code"},{"line_number":53,"context_line":"    to provide uniform image service interface for them, just like Brick in"},{"line_number":54,"context_line":"    Cinder, this code can be moved to there and shared between Glance and"},{"line_number":55,"context_line":"    client both side. So this implementation as far as possible to prevent"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2Bbk4%3D","line":52,"in_reply_to":"AAAATn%2F%2BfI4%3D","updated":"2013-11-26 06:34:29.000000000","message":"Done","commit_id":"39945b4712fad18c03082f01cab6d93ef10aef6d"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"7e5fc30e3b19194c95d24eb203c1f8a58a59a48e","unresolved":false,"context_lines":[{"line_number":36,"context_line":"]"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"CONF \u003d cfg.CONF"},{"line_number":39,"context_line":"CONF.register_opts(store_type_opts)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"def get_strategy_name():"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2BbcU%3D","line":39,"updated":"2013-11-26 08:00:45.000000000","message":"As mentioned before I think this would be better if it were added as its own group.","commit_id":"31652ca569d44ed514edf23be7e628c1ed240d0a"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"18e6ea8c0d5ffa215950d181511679772c500f0f","unresolved":false,"context_lines":[{"line_number":36,"context_line":"]"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"CONF \u003d cfg.CONF"},{"line_number":39,"context_line":"CONF.register_opts(store_type_opts)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"def get_strategy_name():"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2BbUY%3D","line":39,"in_reply_to":"AAAATn%2F%2BbcU%3D","updated":"2013-11-26 09:42:22.000000000","message":"Done","commit_id":"31652ca569d44ed514edf23be7e628c1ed240d0a"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"7e5fc30e3b19194c95d24eb203c1f8a58a59a48e","unresolved":false,"context_lines":[{"line_number":69,"context_line":"    \"\"\""},{"line_number":70,"context_line":"    def _foreach_store_type_preference():"},{"line_number":71,"context_line":"        for prefered_store in CONF.store_type_preference:"},{"line_number":72,"context_line":"            if not prefered_store:"},{"line_number":73,"context_line":"                continue"},{"line_number":74,"context_line":"            prefered_store \u003d str(prefered_store).strip()"},{"line_number":75,"context_line":"            if not prefered_store:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2BbbM%3D","line":72,"updated":"2013-11-26 08:00:45.000000000","message":"I an not sure why this would ever not be true.  Can you explain?","commit_id":"31652ca569d44ed514edf23be7e628c1ed240d0a"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"bd71bd52b1a95d691656e2da9d20fc87d6cc0f6d","unresolved":false,"context_lines":[{"line_number":69,"context_line":"    \"\"\""},{"line_number":70,"context_line":"    def _foreach_store_type_preference():"},{"line_number":71,"context_line":"        for prefered_store in CONF.store_type_preference:"},{"line_number":72,"context_line":"            if not prefered_store:"},{"line_number":73,"context_line":"                continue"},{"line_number":74,"context_line":"            prefered_store \u003d str(prefered_store).strip()"},{"line_number":75,"context_line":"            if not prefered_store:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2Ba8I%3D","line":72,"in_reply_to":"AAAATn%2F%2BbDE%3D","updated":"2013-11-26 09:55:41.000000000","message":"Ok, no real objection but it might be better if this were an error or warning on start up.","commit_id":"31652ca569d44ed514edf23be7e628c1ed240d0a"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"18e6ea8c0d5ffa215950d181511679772c500f0f","unresolved":false,"context_lines":[{"line_number":69,"context_line":"    \"\"\""},{"line_number":70,"context_line":"    def _foreach_store_type_preference():"},{"line_number":71,"context_line":"        for prefered_store in CONF.store_type_preference:"},{"line_number":72,"context_line":"            if not prefered_store:"},{"line_number":73,"context_line":"                continue"},{"line_number":74,"context_line":"            prefered_store \u003d str(prefered_store).strip()"},{"line_number":75,"context_line":"            if not prefered_store:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2BbDE%3D","line":72,"in_reply_to":"AAAATn%2F%2BbTU%3D","updated":"2013-11-26 09:42:22.000000000","message":"if admin configure this: \"store_type_preference \u003d file, , swift\", then \"prefered_store\" value will be empty on second item.","commit_id":"31652ca569d44ed514edf23be7e628c1ed240d0a"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"166bde4629c658a9479bdbb95d55fe619e2f43ff","unresolved":false,"context_lines":[{"line_number":69,"context_line":"    \"\"\""},{"line_number":70,"context_line":"    def _foreach_store_type_preference():"},{"line_number":71,"context_line":"        for prefered_store in CONF.store_type_preference:"},{"line_number":72,"context_line":"            if not prefered_store:"},{"line_number":73,"context_line":"                continue"},{"line_number":74,"context_line":"            prefered_store \u003d str(prefered_store).strip()"},{"line_number":75,"context_line":"            if not prefered_store:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2BbTU%3D","line":72,"in_reply_to":"AAAATn%2F%2BbbM%3D","updated":"2013-11-26 08:36:15.000000000","message":"I had the same question, but forgot to add it in previous patch.","commit_id":"31652ca569d44ed514edf23be7e628c1ed240d0a"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"7aec91d19f3d1aa638d2245e8ab97bdc75b05b28","unresolved":false,"context_lines":[{"line_number":97,"context_line":"    for prefered_store in _foreach_store_type_preference():"},{"line_number":98,"context_line":"        ret.extend(preferences[prefered_store])"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    if not CONF.store_type_location_strategy.exclude_unpreferred_location:"},{"line_number":101,"context_line":"        ret.extend(others)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    return ret"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2F1LA%3D","line":100,"updated":"2014-01-07 23:38:33.000000000","message":"This is a neat feature but I\u0027m not sure I\u0027m comfortable with the location strategy actually omitting locations from the list.","commit_id":"e700fc18a8224949fb3776a217b98c0446563539"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"bf5191f26dfca8d42cf59cfae20607119e5590e6","unresolved":false,"context_lines":[{"line_number":97,"context_line":"    for prefered_store in _foreach_store_type_preference():"},{"line_number":98,"context_line":"        ret.extend(preferences[prefered_store])"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    if not CONF.store_type_location_strategy.exclude_unpreferred_location:"},{"line_number":101,"context_line":"        ret.extend(others)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    return ret"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2Fwvs%3D","line":100,"in_reply_to":"AAAAUH%2F%2F0GE%3D","updated":"2014-01-08 19:07:17.000000000","message":"It would be very surprising to me if changing the selection strategy changed what users saw in the metadata in the http api. So I\u0027m really not for this idea. If an admin wants fewer locations to be shown for an image, he should remove the ones he doesn\u0027t want.","commit_id":"e700fc18a8224949fb3776a217b98c0446563539"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"d2f1ec4b29b4ec61be75a2807a6bb95b50c8aa14","unresolved":false,"context_lines":[{"line_number":97,"context_line":"    for prefered_store in _foreach_store_type_preference():"},{"line_number":98,"context_line":"        ret.extend(preferences[prefered_store])"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    if not CONF.store_type_location_strategy.exclude_unpreferred_location:"},{"line_number":101,"context_line":"        ret.extend(others)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    return ret"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2F0GE%3D","line":100,"in_reply_to":"AAAAUH%2F%2F1LA%3D","updated":"2014-01-08 06:29:48.000000000","message":"IMO this option can be used by admin to make \"store_type_preference\" list turn to a limitation list, without this option admin have not an approach to require glance (or other service in future) _only_ use his preferred  backend storage. By default it\u0027s under disable status.","commit_id":"e700fc18a8224949fb3776a217b98c0446563539"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"54f097bcbc1f04a05c4950cf61e46ee1f2d7d517","unresolved":false,"context_lines":[{"line_number":97,"context_line":"    for prefered_store in _foreach_store_type_preference():"},{"line_number":98,"context_line":"        ret.extend(preferences[prefered_store])"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    if not CONF.store_type_location_strategy.exclude_unpreferred_location:"},{"line_number":101,"context_line":"        ret.extend(others)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    return ret"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2FY5I%3D","line":100,"in_reply_to":"AAAAUH%2F%2FuQY%3D","updated":"2014-01-14 10:06:35.000000000","message":"Done","commit_id":"e700fc18a8224949fb3776a217b98c0446563539"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"360f1150ce9bed644f8491ff39a6ab09378349fd","unresolved":false,"context_lines":[{"line_number":97,"context_line":"    for prefered_store in _foreach_store_type_preference():"},{"line_number":98,"context_line":"        ret.extend(preferences[prefered_store])"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    if not CONF.store_type_location_strategy.exclude_unpreferred_location:"},{"line_number":101,"context_line":"        ret.extend(others)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    return ret"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2FuQY%3D","line":100,"in_reply_to":"AAAAUH%2F%2Fwvs%3D","updated":"2014-01-09 07:54:40.000000000","message":"OK, I will remove this option/logic in next ps.","commit_id":"e700fc18a8224949fb3776a217b98c0446563539"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"6a48c04599178552e9d8406590f82f04263ffb1f","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    # possible to prevent make relationships with Glance(server)-specific code,"},{"line_number":53,"context_line":"    # for example: using functions within store module to validate"},{"line_number":54,"context_line":"    # \u0027store_type_preference\u0027 option."},{"line_number":55,"context_line":"    mapping \u003d {\u0027filesystem\u0027: [\u0027file\u0027, \u0027filesystem\u0027],"},{"line_number":56,"context_line":"               \u0027http\u0027: [\u0027http\u0027, \u0027https\u0027],"},{"line_number":57,"context_line":"               \u0027rbd\u0027: [\u0027rbd\u0027],"},{"line_number":58,"context_line":"               \u0027s3\u0027: [\u0027s3\u0027, \u0027s3+http\u0027, \u0027s3+https\u0027],"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F%2FP8o%3D","line":55,"updated":"2014-01-15 22:07:09.000000000","message":"This seems to be statically duplicating the logic in https://github.com/openstack/glance/blob/master/glance/store/__init__.py#L167\n\nI think we need to let the configured stores themselves register their schemes--otherwise we will have to update this mapping statically for every new store, and we don\u0027t even have the opportunity to if folks are privately using different store code.","commit_id":"9babd2942703654f56ba52ca96af99d549f25657"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"deb268796cde97146959c447d50c0ac09de0b74b","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    # possible to prevent make relationships with Glance(server)-specific code,"},{"line_number":53,"context_line":"    # for example: using functions within store module to validate"},{"line_number":54,"context_line":"    # \u0027store_type_preference\u0027 option."},{"line_number":55,"context_line":"    mapping \u003d {\u0027filesystem\u0027: [\u0027file\u0027, \u0027filesystem\u0027],"},{"line_number":56,"context_line":"               \u0027http\u0027: [\u0027http\u0027, \u0027https\u0027],"},{"line_number":57,"context_line":"               \u0027rbd\u0027: [\u0027rbd\u0027],"},{"line_number":58,"context_line":"               \u0027s3\u0027: [\u0027s3\u0027, \u0027s3+http\u0027, \u0027s3+https\u0027],"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F%2FIi4%3D","line":55,"in_reply_to":"AAAAUH%2F%2FKvs%3D","updated":"2014-01-17 05:00:13.000000000","message":"Actually I think we ship this stuff belongs to glance \"client lib\" is make more sense, since this stuff is acted as a client of glance.store, so IMO they (this and store) are separated.\n\nMyabe we need a definition about glance.store, what\u0027s the use case, and who use it.","commit_id":"9babd2942703654f56ba52ca96af99d549f25657"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"ab9d1b9134764aa566c86f2fe3c216ba38e9fb71","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    # possible to prevent make relationships with Glance(server)-specific code,"},{"line_number":53,"context_line":"    # for example: using functions within store module to validate"},{"line_number":54,"context_line":"    # \u0027store_type_preference\u0027 option."},{"line_number":55,"context_line":"    mapping \u003d {\u0027filesystem\u0027: [\u0027file\u0027, \u0027filesystem\u0027],"},{"line_number":56,"context_line":"               \u0027http\u0027: [\u0027http\u0027, \u0027https\u0027],"},{"line_number":57,"context_line":"               \u0027rbd\u0027: [\u0027rbd\u0027],"},{"line_number":58,"context_line":"               \u0027s3\u0027: [\u0027s3\u0027, \u0027s3+http\u0027, \u0027s3+https\u0027],"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F%2FKvs%3D","line":55,"in_reply_to":"AAAAUH%2F%2FObc%3D","updated":"2014-01-16 19:36:18.000000000","message":"I think I was missing out on the location of this library.\n\nI was supposing that we would ship this code along with the glance.store code in all cases, which would mean we can avoid the manual sync up.\n\nBut maybe there is a problem with shipping them together that I\u0027m not thinking of?","commit_id":"9babd2942703654f56ba52ca96af99d549f25657"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"3678f55fd401715b5def03e7a26edfef8fa20894","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    # possible to prevent make relationships with Glance(server)-specific code,"},{"line_number":53,"context_line":"    # for example: using functions within store module to validate"},{"line_number":54,"context_line":"    # \u0027store_type_preference\u0027 option."},{"line_number":55,"context_line":"    mapping \u003d {\u0027filesystem\u0027: [\u0027file\u0027, \u0027filesystem\u0027],"},{"line_number":56,"context_line":"               \u0027http\u0027: [\u0027http\u0027, \u0027https\u0027],"},{"line_number":57,"context_line":"               \u0027rbd\u0027: [\u0027rbd\u0027],"},{"line_number":58,"context_line":"               \u0027s3\u0027: [\u0027s3\u0027, \u0027s3+http\u0027, \u0027s3+https\u0027],"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F%2FObc%3D","line":55,"in_reply_to":"AAAAUH%2F%2FP8o%3D","updated":"2014-01-16 07:16:43.000000000","message":"Mark I think we\u0027d better don\u0027t make the dependencies between this stuff with glance.store, as I comment in above code comments. Yes I agree this way has limitation, such as manual sync-up, but I think the dependencies will be a bigger issue, which will block this stuff separate out to glance \"client lib\". What you think? thanks.","commit_id":"9babd2942703654f56ba52ca96af99d549f25657"}]}
