)]}'
{"id":"openstack%2Fpython-glanceclient~220969","triplet_id":"openstack%2Fpython-glanceclient~master~If48088297531c789b4af799bf021bac7d281061a","project":"openstack/python-glanceclient","branch":"master","topic":"bug/1493026","hashtags":[],"change_id":"If48088297531c789b4af799bf021bac7d281061a","subject":"Fix wrong check when add locations to image","status":"ABANDONED","created":"2015-09-07 12:11:42.000000000","updated":"2015-10-31 07:35:00.000000000","total_comment_count":0,"unresolved_comment_count":0,"has_review_started":true,"meta_rev_id":"720ff32ee64998324c4fda255b264e197cbeab07","_number":220969,"virtual_id_number":220969,"owner":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"actions":{},"labels":{"Verified":{"recommended":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"all":[{"date":"2015-10-31 07:35:00.000000000","_account_id":8289,"name":"huangtianhua","email":"tiantian223@163.com","username":"huangtianhua"},{"value":1,"date":"2015-09-07 13:40:28.000000000","_account_id":3,"name":"Jenkins","username":"jenkins"},{"_account_id":12363,"name":"Oleksii Chuprykov","email":"a.chuprikoff@gmail.com","username":"ochuprykov"},{"date":"2015-09-11 12:59:41.000000000","_account_id":17116,"name":"Niall Bunting","email":"niall.bunting@hpe.com","username":"NiallBunting"},{"date":"2015-09-14 12:35:06.000000000","_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"}],"values":{"-2":"Fails","-1":"Doesn\u0027t seem to work"," 0":"No score","+1":"Works for me","+2":"Verified"},"description":"","value":1,"default_value":0,"optional":true},"Code-Review":{"recommended":{"_account_id":12363,"name":"Oleksii Chuprykov","email":"a.chuprikoff@gmail.com","username":"ochuprykov"},"disliked":{"_account_id":17116,"name":"Niall Bunting","email":"niall.bunting@hpe.com","username":"NiallBunting"},"all":[{"value":0,"permitted_voting_range":{"min":-1,"max":1},"_account_id":8289,"name":"huangtianhua","email":"tiantian223@163.com","username":"huangtianhua"},{"value":0,"permitted_voting_range":{"min":-1,"max":1},"_account_id":3,"name":"Jenkins","username":"jenkins"},{"value":1,"date":"2015-09-11 13:27:20.000000000","permitted_voting_range":{"min":-1,"max":1},"_account_id":12363,"name":"Oleksii Chuprykov","email":"a.chuprikoff@gmail.com","username":"ochuprykov"},{"value":-1,"date":"2015-09-15 13:05:27.000000000","permitted_voting_range":{"min":-1,"max":1},"_account_id":17116,"name":"Niall Bunting","email":"niall.bunting@hpe.com","username":"NiallBunting"},{"value":0,"permitted_voting_range":{"min":-1,"max":1},"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"}],"values":{"-2":"Do not merge","-1":"This patch needs further work before it can be merged"," 0":"No score","+1":"Looks good to me, but someone else must approve","+2":"Looks good to me (core reviewer)"},"description":"","value":-1,"default_value":0,"optional":true},"Workflow":{"all":[{"_account_id":8289,"name":"huangtianhua","email":"tiantian223@163.com","username":"huangtianhua"},{"_account_id":3,"name":"Jenkins","username":"jenkins"},{"_account_id":12363,"name":"Oleksii Chuprykov","email":"a.chuprikoff@gmail.com","username":"ochuprykov"},{"_account_id":17116,"name":"Niall Bunting","email":"niall.bunting@hpe.com","username":"NiallBunting"},{"value":0,"permitted_voting_range":{"min":-1,"max":0},"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"}],"values":{"-1":"Work in progress"," 0":"Ready for reviews","+1":"Approved"},"description":"","default_value":0,"optional":true},"Review-Priority":{"all":[{"_account_id":8289,"name":"huangtianhua","email":"tiantian223@163.com","username":"huangtianhua"},{"_account_id":3,"name":"Jenkins","username":"jenkins"},{"_account_id":12363,"name":"Oleksii Chuprykov","email":"a.chuprikoff@gmail.com","username":"ochuprykov"},{"_account_id":17116,"name":"Niall Bunting","email":"niall.bunting@hpe.com","username":"NiallBunting"},{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"}],"values":{"-1":"Branch Freeze"," 0":"No Priority","+1":"Important Change","+2":"Top Priority / Holds Gate"},"description":"","default_value":0,"optional":true}},"removable_reviewers":[],"reviewers":{"REVIEWER":[{"_account_id":3,"name":"Jenkins","username":"jenkins"},{"_account_id":8289,"name":"huangtianhua","email":"tiantian223@163.com","username":"huangtianhua"},{"_account_id":12363,"name":"Oleksii Chuprykov","email":"a.chuprikoff@gmail.com","username":"ochuprykov"},{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},{"_account_id":17116,"name":"Niall Bunting","email":"niall.bunting@hpe.com","username":"NiallBunting"}]},"pending_reviewers":{},"reviewer_updates":[{"updated":"2015-09-07 13:40:28.000000000","updated_by":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"reviewer":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"state":"REVIEWER"},{"updated":"2015-09-11 12:59:41.000000000","updated_by":{"_account_id":17116,"name":"Niall Bunting","email":"niall.bunting@hpe.com","username":"NiallBunting"},"reviewer":{"_account_id":17116,"name":"Niall Bunting","email":"niall.bunting@hpe.com","username":"NiallBunting"},"state":"REVIEWER"},{"updated":"2015-09-11 13:27:20.000000000","updated_by":{"_account_id":12363,"name":"Oleksii Chuprykov","email":"a.chuprikoff@gmail.com","username":"ochuprykov"},"reviewer":{"_account_id":12363,"name":"Oleksii Chuprykov","email":"a.chuprikoff@gmail.com","username":"ochuprykov"},"state":"REVIEWER"},{"updated":"2015-10-31 07:35:00.000000000","updated_by":{"_account_id":8289,"name":"huangtianhua","email":"tiantian223@163.com","username":"huangtianhua"},"reviewer":{"_account_id":8289,"name":"huangtianhua","email":"tiantian223@163.com","username":"huangtianhua"},"state":"REVIEWER"}],"messages":[{"id":"e7097177d9068623371f8e11bdb3d60fb611e02f","author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"date":"2015-09-07 12:11:42.000000000","message":"Uploaded patch set 1.","accounts_in_message":[],"_revision_number":1},{"id":"5f903480c1ff57816ca5ce40d8d52b00287d69b1","author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"date":"2015-09-07 12:31:10.000000000","message":"Uploaded patch set 2.","accounts_in_message":[],"_revision_number":2},{"id":"396860aefc9c503c70e9760ea4e1fc86580fa6c5","author":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"date":"2015-09-07 13:40:28.000000000","message":"Patch Set 2: Verified+1\n\nBuild succeeded (check pipeline).\n\n- gate-python-glanceclient-python26 http://logs.openstack.org/69/220969/2/check/gate-python-glanceclient-python26/5f0b6ca/ : SUCCESS in 1m 08s\n- gate-python-glanceclient-pep8 http://logs.openstack.org/69/220969/2/check/gate-python-glanceclient-pep8/f0b811d/ : SUCCESS in 52s\n- gate-python-glanceclient-docs http://docs-draft.openstack.org/69/220969/2/check/gate-python-glanceclient-docs/8304026//doc/build/html/ : SUCCESS in 53s\n- gate-python-glanceclient-python27 http://logs.openstack.org/69/220969/2/check/gate-python-glanceclient-python27/46f5bf4/ : SUCCESS in 1m 15s\n- gate-python-glanceclient-python34 http://logs.openstack.org/69/220969/2/check/gate-python-glanceclient-python34/cb780e6/ : SUCCESS in 1m 44s\n- gate-python-glanceclient-pypy http://logs.openstack.org/69/220969/2/check/gate-python-glanceclient-pypy/9c27cea/ : FAILURE in 1m 57s (non-voting)\n- gate-tempest-dsvm-neutron-src-python-glanceclient http://logs.openstack.org/69/220969/2/check/gate-tempest-dsvm-neutron-src-python-glanceclient/2682ade/ : SUCCESS in 1h 07m 21s\n- gate-glanceclient-dsvm-functional http://logs.openstack.org/69/220969/2/check/gate-glanceclient-dsvm-functional/47ff0b9/ : SUCCESS in 20m 14s","accounts_in_message":[],"_revision_number":2},{"id":"73c005caa2775274d95784dcd00159ee7b87cf75","author":{"_account_id":17116,"name":"Niall Bunting","email":"niall.bunting@hpe.com","username":"NiallBunting"},"date":"2015-09-11 12:59:41.000000000","message":"Patch Set 2:\n\nShould the server not just send back an empty locations list, rather than just attempting to set an location anyway and potentially getting a 400 error?","accounts_in_message":[],"_revision_number":2},{"id":"85843b645a99066ba0a01a0cb4367269559e52a0","author":{"_account_id":12363,"name":"Oleksii Chuprykov","email":"a.chuprikoff@gmail.com","username":"ochuprykov"},"date":"2015-09-11 13:27:20.000000000","message":"Patch Set 2: Code-Review+1","accounts_in_message":[],"_revision_number":2},{"id":"734ac580cd69ff674f27256976774d84f37281b9","author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"date":"2015-09-14 12:35:06.000000000","message":"Patch Set 2:\n\n@Niall, Could you explain more? IMO, if images doesn\u0027t have locations, we may not check it.","accounts_in_message":[],"_revision_number":2},{"id":"058398a9db7a7efea91b7a112009c1cd98418f61","author":{"_account_id":17116,"name":"Niall Bunting","email":"niall.bunting@hpe.com","username":"NiallBunting"},"date":"2015-09-14 13:31:21.000000000","message":"Patch Set 2:\n\nI thought that if the server did not respond with locations it meant that it had not been enabled in the configuration files (from my understanding of the documentation).\nTherefore if there are no locations it will fail anyway.\n\nIf this is not the case, and the sever does not respond with a location has been enabled, maybe that is the change we should make server side. As this would save a second request just to make sure that it is not enabled as it would be covered in the first response.","accounts_in_message":[],"_revision_number":2},{"id":"eab1a99a2e6e43cc8b9c051296732b4acfb6d2c9","author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"date":"2015-09-15 01:47:03.000000000","message":"Patch Set 2:\n\n@Niall,do you mean \u0027show_image_direct_url\u0027 config? I tested it.\nSet show_image_direct_url \u003d True. \n1. The queued images still return without location.  \n2. The active images return \u0027direct_url\u0027 instead of locations.\n\nIn both situations, \u0027glance location-add\u0027  raise the same error.\n\nOr you mean any other config items? I didn\u0027t find one. Please point out it to me. Thanks.\n\nSo IMO, we should fix it either like this patch or let glance return imges with locations,not \u0027direct_url\u0027,if permitted in config item(Need your help to point out which one). Or let client check \u0027direct_url\u0027, not \u0027locations\u0027.","accounts_in_message":[],"_revision_number":2},{"id":"2f121e2d14fd238926cd8158559310fff29651e1","author":{"_account_id":17116,"name":"Niall Bunting","email":"niall.bunting@hpe.com","username":"NiallBunting"},"date":"2015-09-15 13:05:27.000000000","message":"Patch Set 2: Code-Review-1\n\nI couldn\u0027t find what i read before, however I found this:\n\nhttps://github.com/openstack/glance/blob/master/glance/api/v2/images.py#L735-L750 \n\nThe comment in that section mentions that an empty list should be returned even when no locations have been set.\n\nTherefore I think the expected behavior is for the sever to return an empty list.","accounts_in_message":[],"_revision_number":2},{"id":"832a3dc32a6424987ccff973dbc9f3831af05ad5","author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"date":"2015-09-15 15:02:44.000000000","message":"Patch Set 2:\n\nGot it. So we should forbid location add when the config is False,like client does. Am I right?","accounts_in_message":[],"_revision_number":2},{"id":"a6fe310e861f81b0c090d721d1b0ee2563b469e2","author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"date":"2015-09-15 15:12:03.000000000","message":"Abandoned\n\nThis should fix in glance, not client","accounts_in_message":[],"_revision_number":2},{"id":"1ff6ab8cd31e462e5c7f2319801a0d7e90d4773f","author":{"_account_id":17116,"name":"Niall Bunting","email":"niall.bunting@hpe.com","username":"NiallBunting"},"date":"2015-09-15 15:51:39.000000000","message":"Patch Set 2:\n\nYeah, I think this is a server problem.","accounts_in_message":[],"_revision_number":2},{"id":"0a75587fa2d0656babbdd287845d46f3e8220c11","author":{"_account_id":8289,"name":"huangtianhua","email":"tiantian223@163.com","username":"huangtianhua"},"date":"2015-10-31 07:35:00.000000000","message":"Patch Set 2:\n\nSee the comment in lauchpad, I prefer to remove the constraint \nfrom glanceclientv2, to make sure heat can migrate to glance v2 backward compatible.","accounts_in_message":[],"_revision_number":2}],"current_revision_number":2,"current_revision":"405b7bde95553265797788e4b27b2faf5adee9fe","revisions":{"758ad2291a5466e40c765fef6c3a067d2ba31eb7":{"kind":"REWORK","_number":1,"created":"2015-09-07 12:11:42.000000000","uploader":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"ref":"refs/changes/69/220969/1","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/python-glanceclient","ref":"refs/changes/69/220969/1","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/python-glanceclient refs/changes/69/220969/1 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/python-glanceclient refs/changes/69/220969/1 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/python-glanceclient refs/changes/69/220969/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/python-glanceclient refs/changes/69/220969/1"}}},"commit":{"parents":[{"commit":"f0b30f4ff2f9c95751f625947ec13eaa09646b67","subject":"Updated from global requirements","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-glanceclient/commit/f0b30f4ff2f9c95751f625947ec13eaa09646b67"}]}],"author":{"name":"wangxiyuan","email":"wangxiyuan@huawei.com","date":"2015-09-07 12:06:03.000000000","tz":480},"committer":{"name":"wangxiyuan","email":"wangxiyuan@huawei.com","date":"2015-09-07 12:06:03.000000000","tz":480},"subject":"Fix wrong check when add locations to image","message":"Fix wrong check when add locations to image\n\nNow,when add a new location to a image, it will return an error:\n\u0027The administrator has disabled API access to image locations\u0027\n\nBut the \u0027queued\u0027 image maybe doesn\u0027t have \u0027locations\u0027 property\nin some case. So we should not check the existent of \u0027locations\u0027\nwhen add a new one.\n\nChange-Id: If48088297531c789b4af799bf021bac7d281061a\nCloses-bug: #1493026\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-glanceclient/commit/758ad2291a5466e40c765fef6c3a067d2ba31eb7"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-glanceclient/commit/758ad2291a5466e40c765fef6c3a067d2ba31eb7"}]},"branch":"refs/heads/master"},"405b7bde95553265797788e4b27b2faf5adee9fe":{"kind":"REWORK","_number":2,"created":"2015-09-07 12:31:10.000000000","uploader":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"ref":"refs/changes/69/220969/2","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/python-glanceclient","ref":"refs/changes/69/220969/2","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/python-glanceclient refs/changes/69/220969/2 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/python-glanceclient refs/changes/69/220969/2 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/python-glanceclient refs/changes/69/220969/2 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/python-glanceclient refs/changes/69/220969/2"}}},"commit":{"parents":[{"commit":"f0b30f4ff2f9c95751f625947ec13eaa09646b67","subject":"Updated from global requirements","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-glanceclient/commit/f0b30f4ff2f9c95751f625947ec13eaa09646b67"}]}],"author":{"name":"wangxiyuan","email":"wangxiyuan@huawei.com","date":"2015-09-07 12:06:03.000000000","tz":480},"committer":{"name":"wangxiyuan","email":"wangxiyuan@huawei.com","date":"2015-09-07 12:30:34.000000000","tz":480},"subject":"Fix wrong check when add locations to image","message":"Fix wrong check when add locations to image\n\nNow,when add a new location to a image, it will return an error:\n\u0027The administrator has disabled API access to image locations\u0027\n\nBut the \u0027queued\u0027 image maybe doesn\u0027t have \u0027locations\u0027 property\nin some case. So we should not check the existent of \u0027locations\u0027\nwhen add a new one.\n\nChange-Id: If48088297531c789b4af799bf021bac7d281061a\nCloses-bug: #1493026\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-glanceclient/commit/405b7bde95553265797788e4b27b2faf5adee9fe"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-glanceclient/commit/405b7bde95553265797788e4b27b2faf5adee9fe"}]},"branch":"refs/heads/master"}},"requirements":[],"submit_records":[],"submit_requirements":[]}
