)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"5574b89db88730954d6d0c2e4e37a0d0e0887b1d","unresolved":false,"context_lines":[{"line_number":11,"context_line":"spec proposes the addition of operations to Glance supporting"},{"line_number":12,"context_line":"the concept of a \u0027deactivated\u0027 image."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Addresses: bp deactivate-image"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I2ec467e33d5d376ede6e3f63245e0e0a82f04bdb"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1a930d6b_d61d24bf","line":14,"updated":"2015-01-22 06:12:36.000000000","message":"Please add:\nDocImpact\nAPIImpact","commit_id":"b6c9d7b331643b15d94215e02a6d9bcf1234edb5"}],"specs/kilo/deactivate-image.rst":[{"author":{"_account_id":11864,"name":"Ben Roble","email":"ben.roble@rackspace.com","username":"broble"},"change_message_id":"fa2cc0903063805c0336ab9df876ee16c636c8ee","unresolved":false,"context_lines":[{"line_number":17,"context_line":"a malicious or otherwise problematic image (e.g. an image containing a"},{"line_number":18,"context_line":"trojan horse). By deactivating the image, the image properties will still"},{"line_number":19,"context_line":"be accessible, however the image may not be downloaded. This will provide"},{"line_number":20,"context_line":"an opportunity for the image to be examined without deleting it but "},{"line_number":21,"context_line":"preventing new instances from being created from it. After the provider has"},{"line_number":22,"context_line":"verified the safety of the image, it may then be reactivated (if found to"},{"line_number":23,"context_line":"be safe) or deleted."}],"source_content_type":"text/x-rst","patch_set":1,"id":"5a890539_4e8526ac","line":20,"updated":"2014-11-19 17:29:33.000000000","message":"trailing whitespace","commit_id":"654a17a082cb5494bf4425b2fcc3baf212a441ad"},{"author":{"_account_id":11864,"name":"Ben Roble","email":"ben.roble@rackspace.com","username":"broble"},"change_message_id":"fa2cc0903063805c0336ab9df876ee16c636c8ee","unresolved":false,"context_lines":[{"line_number":18,"context_line":"trojan horse). By deactivating the image, the image properties will still"},{"line_number":19,"context_line":"be accessible, however the image may not be downloaded. This will provide"},{"line_number":20,"context_line":"an opportunity for the image to be examined without deleting it but "},{"line_number":21,"context_line":"preventing new instances from being created from it. After the provider has"},{"line_number":22,"context_line":"verified the safety of the image, it may then be reactivated (if found to"},{"line_number":23,"context_line":"be safe) or deleted."},{"line_number":24,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"5a890539_8930e8e9","line":21,"updated":"2014-11-19 17:29:33.000000000","message":"reword and possibly clarify admin vs non-admin persmissions, such as \"Deactivation will provide an opportunity for admins to examine the image without deleting it and prevent non-admin users from creating instances with the deactivated image\".","commit_id":"654a17a082cb5494bf4425b2fcc3baf212a441ad"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"abf4a12cf112712b709dfe17d78e2191faad962f","unresolved":false,"context_lines":[{"line_number":26,"context_line":"Proposed change"},{"line_number":27,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"To expose this ability, a new image state \u0027deactivated\u0027 will be introduced."},{"line_number":30,"context_line":"In order to transition into and out of this state, two new functional API"},{"line_number":31,"context_line":"calls will be added to the REST interface (detailed below)."},{"line_number":32,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"5a890539_b1a5f305","line":29,"updated":"2014-11-20 12:25:51.000000000","message":"how about \u0027suspended\u0027, like accounts, eg http://pages.ebay.com/help/account/suspended-accounts.html or https://support.twitter.com/articles/15790-my-account-is-suspended\n\nit seems that often users can choose to deactivate their own account (rather than an admin), eg https://www.facebook.com/help/214376678584711 or https://support.twitter.com/articles/15358-deactivating-your-account\n\nimages aren\u0027t accounts so it\u0027s up for debate how valid the analogy is. But I think it would be good to make it as clear as possible to the user that an admin has manually turned the image off.","commit_id":"654a17a082cb5494bf4425b2fcc3baf212a441ad"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"a36b85d12b2efd33ece001def4d8703174261d46","unresolved":false,"context_lines":[{"line_number":26,"context_line":"Proposed change"},{"line_number":27,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"To expose this ability, a new image state \u0027deactivated\u0027 will be introduced."},{"line_number":30,"context_line":"In order to transition into and out of this state, two new functional API"},{"line_number":31,"context_line":"calls will be added to the REST interface (detailed below)."},{"line_number":32,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"5a890539_00eb6fdc","line":29,"in_reply_to":"5a890539_5d902bed","updated":"2014-11-24 14:05:49.000000000","message":"Ok. The account analogy may not have been something that was considered at the IRC meeting. I\u0027d be interested in Hemanth\u0027s latest thoughts.\n\n\u003e other operations could still be performed.\n\nJust listing and image-show, right? Or can the image\u0027s metadata be updated? I wonder if metadata update should be forbidden?","commit_id":"654a17a082cb5494bf4425b2fcc3baf212a441ad"},{"author":{"_account_id":5347,"name":"Eddie Sheffield","email":"eddie.sheffield@rackspace.com","username":"eddie-sheffield"},"change_message_id":"e4bca8aa4b803d4ef1f5b743706596089fcd394b","unresolved":false,"context_lines":[{"line_number":26,"context_line":"Proposed change"},{"line_number":27,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"To expose this ability, a new image state \u0027deactivated\u0027 will be introduced."},{"line_number":30,"context_line":"In order to transition into and out of this state, two new functional API"},{"line_number":31,"context_line":"calls will be added to the REST interface (detailed below)."},{"line_number":32,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"5a890539_5d902bed","line":29,"in_reply_to":"5a890539_ac4bbf57","updated":"2014-11-21 16:47:51.000000000","message":"A followup on this. I spoke some with hemanth-makkapati who wrote up the original spec on the wiki and he said that \u0027suspended\u0027 was originally considered but after discussion in one of the irc meetingts it was decided \u0027deactivated\u0027 was preferred. Hopefully he\u0027ll chime in here, but a quick summary is that it was felt that \u0027suspended\u0027 implied nothing could be done with the image vs. \u0027deactivated\u0027 which seemed to make it more clear that other operations could still be performed.","commit_id":"654a17a082cb5494bf4425b2fcc3baf212a441ad"},{"author":{"_account_id":5347,"name":"Eddie Sheffield","email":"eddie.sheffield@rackspace.com","username":"eddie-sheffield"},"change_message_id":"0156bd7c8cb09ba22628d7685e70950c21b5395c","unresolved":false,"context_lines":[{"line_number":26,"context_line":"Proposed change"},{"line_number":27,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"To expose this ability, a new image state \u0027deactivated\u0027 will be introduced."},{"line_number":30,"context_line":"In order to transition into and out of this state, two new functional API"},{"line_number":31,"context_line":"calls will be added to the REST interface (detailed below)."},{"line_number":32,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"5a890539_ac4bbf57","line":29,"in_reply_to":"5a890539_b1a5f305","updated":"2014-11-20 21:20:36.000000000","message":"Hmmm - yeah I kinda like the idea of \u0027suspended\u0027 rather than \u0027deactivated\u0027. It\u0027s subtle but I think the implications of what it means are closer to the use case. If we go with this should probably change the REST calls to be more in-line as well.","commit_id":"654a17a082cb5494bf4425b2fcc3baf212a441ad"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"be99c2d8bace793c5554febe96d955b7225713f0","unresolved":false,"context_lines":[{"line_number":36,"context_line":"to download the data to facilitate testing and examination of the image."},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"Only \u0027active\u0027 images may be deactivated. Images in the \u0027deactivated\u0027 state"},{"line_number":39,"context_line":"may only transition to \u0027active\u0027 or \u0027deleted\u0027. Deactivating a \u0027deactivated\u0027"},{"line_number":40,"context_line":"image or reactivating an \u0027active\u0027 image succeed as no-ops."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"While it is anticipated that only admins will have access to the operations"}],"source_content_type":"text/x-rst","patch_set":1,"id":"5a890539_64bca76d","line":39,"updated":"2014-11-20 12:29:58.000000000","message":"Can the user delete it or just an admin?","commit_id":"654a17a082cb5494bf4425b2fcc3baf212a441ad"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"cec0b3db0a42aa7b73ee5a4f2e6e9c457b2027ca","unresolved":false,"context_lines":[{"line_number":36,"context_line":"to download the data to facilitate testing and examination of the image."},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"Only \u0027active\u0027 images may be deactivated. Images in the \u0027deactivated\u0027 state"},{"line_number":39,"context_line":"may only transition to \u0027active\u0027 or \u0027deleted\u0027. Deactivating a \u0027deactivated\u0027"},{"line_number":40,"context_line":"image or reactivating an \u0027active\u0027 image succeed as no-ops."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"While it is anticipated that only admins will have access to the operations"}],"source_content_type":"text/x-rst","patch_set":1,"id":"5a890539_54f2cb9a","line":39,"in_reply_to":"5a890539_2cf42ff1","updated":"2014-11-21 15:07:43.000000000","message":"I wonder if a user should be able to delete it or not?\n\nMaybe the admin wants to set it to \u0027suspended\u0027 and then download it to look at it (and not have it deleted during the process).","commit_id":"654a17a082cb5494bf4425b2fcc3baf212a441ad"},{"author":{"_account_id":5347,"name":"Eddie Sheffield","email":"eddie.sheffield@rackspace.com","username":"eddie-sheffield"},"change_message_id":"e4bca8aa4b803d4ef1f5b743706596089fcd394b","unresolved":false,"context_lines":[{"line_number":36,"context_line":"to download the data to facilitate testing and examination of the image."},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"Only \u0027active\u0027 images may be deactivated. Images in the \u0027deactivated\u0027 state"},{"line_number":39,"context_line":"may only transition to \u0027active\u0027 or \u0027deleted\u0027. Deactivating a \u0027deactivated\u0027"},{"line_number":40,"context_line":"image or reactivating an \u0027active\u0027 image succeed as no-ops."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"While it is anticipated that only admins will have access to the operations"}],"source_content_type":"text/x-rst","patch_set":1,"id":"5a890539_206974be","line":39,"in_reply_to":"5a890539_54f2cb9a","updated":"2014-11-21 16:47:51.000000000","message":"Good point. The pessimist in me thinks that if someone were trying to intentionally inject a bad image this might allow them to destroy evidence before it can be investigated completely if they realize an admin suspects their image.","commit_id":"654a17a082cb5494bf4425b2fcc3baf212a441ad"},{"author":{"_account_id":5347,"name":"Eddie Sheffield","email":"eddie.sheffield@rackspace.com","username":"eddie-sheffield"},"change_message_id":"0156bd7c8cb09ba22628d7685e70950c21b5395c","unresolved":false,"context_lines":[{"line_number":36,"context_line":"to download the data to facilitate testing and examination of the image."},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"Only \u0027active\u0027 images may be deactivated. Images in the \u0027deactivated\u0027 state"},{"line_number":39,"context_line":"may only transition to \u0027active\u0027 or \u0027deleted\u0027. Deactivating a \u0027deactivated\u0027"},{"line_number":40,"context_line":"image or reactivating an \u0027active\u0027 image succeed as no-ops."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"While it is anticipated that only admins will have access to the operations"}],"source_content_type":"text/x-rst","patch_set":1,"id":"5a890539_2cf42ff1","line":39,"in_reply_to":"5a890539_64bca76d","updated":"2014-11-20 21:20:36.000000000","message":"A user could delete it as well assuming they could do so when it was active. Overall all operations except download are still valid.","commit_id":"654a17a082cb5494bf4425b2fcc3baf212a441ad"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"bdda039c69f09623e7612172b5fe6bd17d6717eb","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"Only \u0027active\u0027 images may be deactivated. Images in the \u0027deactivated\u0027 state"},{"line_number":39,"context_line":"may only transition to \u0027active\u0027 or \u0027deleted\u0027. Deactivating a \u0027deactivated\u0027"},{"line_number":40,"context_line":"image or reactivating an \u0027active\u0027 image succeed as no-ops."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"While it is anticipated that only admins will have access to the operations"},{"line_number":43,"context_line":"to deactivate and reactivate an image, restrictions to these functions can"}],"source_content_type":"text/x-rst","patch_set":1,"id":"5a890539_7f51aed7","line":40,"updated":"2014-11-19 18:28:03.000000000","message":"Since we\u0027re at the design stage here, I\u0027ve got a question.  Would it make sense to return a 409 instead of allowing the request to succeed as a no-op?  It\u0027s true that the end state of the request is satisfied, i.e., now I\u0027ve got an image in status \u0027deactivated\u0027, but I could be under the impression that I\u0027ve changed the image\u0027s status (which would be false).  I really don\u0027t know if this matters, if this situation is documented as returning a 204, then it\u0027s my fault for making a bad inference about the status of the image having changed.  I\u0027m just wondering if it could be useful to return a 409 (or whether that would just be a pain for API users)?\n\nA similar situation is adding a tenant_id as an image member.  It looks like in v2 we return a conflict if that tenant_id is already a member of the image: https://github.com/openstack/glance/blob/42b227cf6709a8af35740116a6f3a14b76f59153/glance/api/v2/image_members.py#L90\n\nSo maybe a 409 to be consistent?  Or it could be that the two uses are different enough that different responses are in order.  In any case, it\u0027s something to think about.","commit_id":"654a17a082cb5494bf4425b2fcc3baf212a441ad"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"abf4a12cf112712b709dfe17d78e2191faad962f","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"Only \u0027active\u0027 images may be deactivated. Images in the \u0027deactivated\u0027 state"},{"line_number":39,"context_line":"may only transition to \u0027active\u0027 or \u0027deleted\u0027. Deactivating a \u0027deactivated\u0027"},{"line_number":40,"context_line":"image or reactivating an \u0027active\u0027 image succeed as no-ops."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"While it is anticipated that only admins will have access to the operations"},{"line_number":43,"context_line":"to deactivate and reactivate an image, restrictions to these functions can"}],"source_content_type":"text/x-rst","patch_set":1,"id":"5a890539_e4dc1777","line":40,"in_reply_to":"5a890539_25e2b4d5","updated":"2014-11-20 12:25:51.000000000","message":"I don\u0027t think I have a strong opinion on this (there\u0027s examples both ways in OpenStack I think) other than to be as consistent as possible with similar operations. For example setting is-protected/is-public twice returns 200 both times. I think a slight difference with adding a member is it\u0027s (arguably) not an idempotent operation.\n\nIt\u0027s an admin only operation so should have limited scope to confuse regular users either way.","commit_id":"654a17a082cb5494bf4425b2fcc3baf212a441ad"},{"author":{"_account_id":5347,"name":"Eddie Sheffield","email":"eddie.sheffield@rackspace.com","username":"eddie-sheffield"},"change_message_id":"108128dbd26e1b4b0c48059c18cd5729512d4951","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"Only \u0027active\u0027 images may be deactivated. Images in the \u0027deactivated\u0027 state"},{"line_number":39,"context_line":"may only transition to \u0027active\u0027 or \u0027deleted\u0027. Deactivating a \u0027deactivated\u0027"},{"line_number":40,"context_line":"image or reactivating an \u0027active\u0027 image succeed as no-ops."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"While it is anticipated that only admins will have access to the operations"},{"line_number":43,"context_line":"to deactivate and reactivate an image, restrictions to these functions can"}],"source_content_type":"text/x-rst","patch_set":1,"id":"5a890539_25e2b4d5","line":40,"in_reply_to":"5a890539_7f51aed7","updated":"2014-11-19 19:56:52.000000000","message":"My personal preference when I\u0027m using an API is if it gets me where I was trying to go I don\u0027t want to deal with an error just because I was already there.\n\nOn the other hand I can understand the consistency argument (tho I would have argued strongly against doing it in image members as well).\n\nI think my personal preference in this case, if we really want to let someone know the image was already active / deactivated, would be to return 200 and a short response body with something like \"{\u0027previous_state\u0027: \u0027active\u0027}\". Then if you care you can look at the response. If not then all you care is that it succeeded (200) and can ignore the response body.\n\nHopefully we\u0027ll get some more feedback soon from the rest of the community and see where the majority wants to go with this.","commit_id":"654a17a082cb5494bf4425b2fcc3baf212a441ad"},{"author":{"_account_id":11864,"name":"Ben Roble","email":"ben.roble@rackspace.com","username":"broble"},"change_message_id":"fa2cc0903063805c0336ab9df876ee16c636c8ee","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"While it is anticipated that only admins will have access to the operations"},{"line_number":43,"context_line":"to deactivate and reactivate an image, restrictions to these functions can"},{"line_number":44,"context_line":"be handled thru the current policy mechanisms and thus the responsibility"},{"line_number":45,"context_line":"falls to the deployer to implement such policies."},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"5a890539_ce2f56f5","line":44,"updated":"2014-11-19 17:29:33.000000000","message":"through","commit_id":"654a17a082cb5494bf4425b2fcc3baf212a441ad"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"abf4a12cf112712b709dfe17d78e2191faad962f","unresolved":false,"context_lines":[{"line_number":42,"context_line":"While it is anticipated that only admins will have access to the operations"},{"line_number":43,"context_line":"to deactivate and reactivate an image, restrictions to these functions can"},{"line_number":44,"context_line":"be handled thru the current policy mechanisms and thus the responsibility"},{"line_number":45,"context_line":"falls to the deployer to implement such policies."},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":1,"id":"5a890539_843a7396","line":45,"updated":"2014-11-20 12:25:51.000000000","message":"I think it\u0027s implied, but perhaps say the default will be admin only.","commit_id":"654a17a082cb5494bf4425b2fcc3baf212a441ad"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"abf4a12cf112712b709dfe17d78e2191faad962f","unresolved":false,"context_lines":[{"line_number":63,"context_line":"REST API impact"},{"line_number":64,"context_line":"---------------"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"* POST:/v2/images/{image_id}/actions/deactivate"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"      * Description: Deactivate an image"},{"line_number":69,"context_line":"      * Method: POST"}],"source_content_type":"text/x-rst","patch_set":1,"id":"5a890539_a483efca","line":66,"updated":"2014-11-20 12:25:51.000000000","message":"Is \u0027actions\u0027 a new resource?\n\nThere\u0027s a (slightly convoluted) patch mechanism that\u0027s typically used, eg when setting is-public, is-protected, name or other metadata:\n\n PATCH /v2/images/1911a72c-6a64-4a1c-b9ad-5d13e24351b7 HTTP/1.1.\n Host: 10.0.0.18:9292.\n Content-Length: 61.\n Accept-Encoding: gzip, deflate.\n Accept: */*.\n Content-Type: application/openstack-images-v2.1-json-patch.\n .\n [{\"path\": \"/visibility\", \"value\": \"public\", \"op\": \"replace\"}]\n\ncould that be used for status too?","commit_id":"654a17a082cb5494bf4425b2fcc3baf212a441ad"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"a36b85d12b2efd33ece001def4d8703174261d46","unresolved":false,"context_lines":[{"line_number":63,"context_line":"REST API impact"},{"line_number":64,"context_line":"---------------"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"* POST:/v2/images/{image_id}/actions/deactivate"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"      * Description: Deactivate an image"},{"line_number":69,"context_line":"      * Method: POST"}],"source_content_type":"text/x-rst","patch_set":1,"id":"5a890539_a0c45b92","line":66,"in_reply_to":"5a890539_00d478bb","updated":"2014-11-24 14:05:49.000000000","message":"I took a quick look and don\u0027t see other OpenStack APIs using POST and returning 204 (they all seem to create something):  http://developer.openstack.org/api-ref.html\n\nI\u0027m (hopefully) not a purist, but I wonder if a mail to the working group (openstack-dev/[api],  https://wiki.openstack.org/wiki/API_Working_Group) would be an idea -- just to make sure we don\u0027t get our knuckles wrapped later for being inconsistent?","commit_id":"654a17a082cb5494bf4425b2fcc3baf212a441ad"},{"author":{"_account_id":5347,"name":"Eddie Sheffield","email":"eddie.sheffield@rackspace.com","username":"eddie-sheffield"},"change_message_id":"e4bca8aa4b803d4ef1f5b743706596089fcd394b","unresolved":false,"context_lines":[{"line_number":63,"context_line":"REST API impact"},{"line_number":64,"context_line":"---------------"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"* POST:/v2/images/{image_id}/actions/deactivate"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"      * Description: Deactivate an image"},{"line_number":69,"context_line":"      * Method: POST"}],"source_content_type":"text/x-rst","patch_set":1,"id":"5a890539_00d478bb","line":66,"in_reply_to":"5a890539_0f266a16","updated":"2014-11-21 16:47:51.000000000","message":"I\u0027m not very familiar with the OpenStack API outside of Glance and parts of Nova, but I can\u0027t think of any similar situation offhand.\n\nBut I\u0027m not much of a REST purist, mainly because of situations like this. There isn\u0027t really an obvious mapping to this kind of thing in my mind and I prefer simplicity to being dogmatically RESTful.","commit_id":"654a17a082cb5494bf4425b2fcc3baf212a441ad"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"cec0b3db0a42aa7b73ee5a4f2e6e9c457b2027ca","unresolved":false,"context_lines":[{"line_number":63,"context_line":"REST API impact"},{"line_number":64,"context_line":"---------------"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"* POST:/v2/images/{image_id}/actions/deactivate"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"      * Description: Deactivate an image"},{"line_number":69,"context_line":"      * Method: POST"}],"source_content_type":"text/x-rst","patch_set":1,"id":"5a890539_0f266a16","line":66,"in_reply_to":"5a890539_6c20f749","updated":"2014-11-21 15:07:43.000000000","message":"Ok, I see what you\u0027re saying. Like we don\u0027t set \u0027status \u003d deleted\u0027 we send a DELETE (there\u0027s just no http verb for deactivate). So +1 for not directly updating status.\n\nTypically I\u0027d expect a POST to create something new (eg an image/task/token/volume) (but I\u0027m no API guru). Is there an existing OpenStack API that does a POST without creating something?","commit_id":"654a17a082cb5494bf4425b2fcc3baf212a441ad"},{"author":{"_account_id":5347,"name":"Eddie Sheffield","email":"eddie.sheffield@rackspace.com","username":"eddie-sheffield"},"change_message_id":"0156bd7c8cb09ba22628d7685e70950c21b5395c","unresolved":false,"context_lines":[{"line_number":63,"context_line":"REST API impact"},{"line_number":64,"context_line":"---------------"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"* POST:/v2/images/{image_id}/actions/deactivate"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"      * Description: Deactivate an image"},{"line_number":69,"context_line":"      * Method: POST"}],"source_content_type":"text/x-rst","patch_set":1,"id":"5a890539_6c20f749","line":66,"in_reply_to":"5a890539_a483efca","updated":"2014-11-20 21:20:36.000000000","message":"This was discussed a bit at the Atlanta conference (at least using \u0027actions\u0027 as a pseudo-resource for functional calls). The reason for using it here rather than patch is we don\u0027t want to expose directly changing status. Status changes are in response to actions taken on an image (creating it, uploading, deleting, etc.) Using patch for changing status, even if we limit scope of how it can change, seems a bit inconsistent and confusing.\n\nThere is more discussion on this in the older version of this spec in the wiki:\n\nhttps://wiki.openstack.org/wiki/Glance-deactivate-image","commit_id":"654a17a082cb5494bf4425b2fcc3baf212a441ad"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"bdda039c69f09623e7612172b5fe6bd17d6717eb","unresolved":false,"context_lines":[{"line_number":116,"context_line":"      * URL for the resource: /v1/images/{image_id}"},{"line_number":117,"context_line":"      * Parameters which can be passed via the url"},{"line_number":118,"context_line":"        {image_id}, String, The ID for the image."},{"line_number":119,"context_line":""},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"Security impact"},{"line_number":122,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"5a890539_ffb4bed2","line":119,"updated":"2014-11-19 18:28:03.000000000","message":"It may be worth mentioning that a HEAD:/v1/images/image_id should succeed on a deactivated image (otherwise you wouldn\u0027t be able to see the image metadata through v1)","commit_id":"654a17a082cb5494bf4425b2fcc3baf212a441ad"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"abf4a12cf112712b709dfe17d78e2191faad962f","unresolved":false,"context_lines":[{"line_number":116,"context_line":"      * URL for the resource: /v1/images/{image_id}"},{"line_number":117,"context_line":"      * Parameters which can be passed via the url"},{"line_number":118,"context_line":"        {image_id}, String, The ID for the image."},{"line_number":119,"context_line":""},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"Security impact"},{"line_number":122,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"5a890539_2477ff03","line":119,"in_reply_to":"5a890539_ffb4bed2","updated":"2014-11-20 12:25:51.000000000","message":"+1","commit_id":"654a17a082cb5494bf4425b2fcc3baf212a441ad"},{"author":{"_account_id":5347,"name":"Eddie Sheffield","email":"eddie.sheffield@rackspace.com","username":"eddie-sheffield"},"change_message_id":"108128dbd26e1b4b0c48059c18cd5729512d4951","unresolved":false,"context_lines":[{"line_number":116,"context_line":"      * URL for the resource: /v1/images/{image_id}"},{"line_number":117,"context_line":"      * Parameters which can be passed via the url"},{"line_number":118,"context_line":"        {image_id}, String, The ID for the image."},{"line_number":119,"context_line":""},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"Security impact"},{"line_number":122,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"5a890539_e5d7cceb","line":119,"in_reply_to":"5a890539_ffb4bed2","updated":"2014-11-19 19:56:52.000000000","message":"Good point. For completeness should probably do the same and spell it out for v2 as well.","commit_id":"654a17a082cb5494bf4425b2fcc3baf212a441ad"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"710e3ab4ea57cb3c12642dd86818706ab3ca7c81","unresolved":false,"context_lines":[{"line_number":30,"context_line":"calls will be added to the REST interface (detailed below)."},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"When an image is placed in the deactivated state, image data may not be"},{"line_number":33,"context_line":"download by a non-admin user. This will include all other operations (such as"},{"line_number":34,"context_line":"export and cloning) which may need access to image data. Admins may continue"},{"line_number":35,"context_line":"to download the data to facilitate testing and examination of the image."},{"line_number":36,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"1a930d6b_185fbfe6","line":33,"updated":"2015-01-22 18:14:37.000000000","message":"nit: \"may not be downloaded\"","commit_id":"b6c9d7b331643b15d94215e02a6d9bcf1234edb5"},{"author":{"_account_id":14485,"name":"Igor Bolotin","email":"igor_bolotin@symantec.com","username":"ibolotin"},"change_message_id":"f09e8140cd94655ce6d826e83d660217a43255e7","unresolved":false,"context_lines":[{"line_number":32,"context_line":"When an image is placed in the deactivated state, image data may not be"},{"line_number":33,"context_line":"download by a non-admin user. This will include all other operations (such as"},{"line_number":34,"context_line":"export and cloning) which may need access to image data. Admins may continue"},{"line_number":35,"context_line":"to download the data to facilitate testing and examination of the image."},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"Only \u0027active\u0027 images may be deactivated. Images in the \u0027deactivated\u0027 state"},{"line_number":38,"context_line":"may only transition to \u0027active\u0027 or \u0027deleted\u0027. Deactivating a \u0027deactivated\u0027"}],"source_content_type":"text/x-rst","patch_set":2,"id":"da86d52c_b1cca9bc","line":35,"updated":"2015-02-12 01:19:37.000000000","message":"what about image list - should deactivated images disappear from list?","commit_id":"b6c9d7b331643b15d94215e02a6d9bcf1234edb5"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"710e3ab4ea57cb3c12642dd86818706ab3ca7c81","unresolved":false,"context_lines":[{"line_number":36,"context_line":""},{"line_number":37,"context_line":"Only \u0027active\u0027 images may be deactivated. Images in the \u0027deactivated\u0027 state"},{"line_number":38,"context_line":"may only transition to \u0027active\u0027 or \u0027deleted\u0027. Deactivating a \u0027deactivated\u0027"},{"line_number":39,"context_line":"image or reactivating an \u0027active\u0027 image succeed as no-ops."},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"While it is anticipated that only admins will have access to the operations"},{"line_number":42,"context_line":"to deactivate and reactivate an image (and will be configured as such by"}],"source_content_type":"text/x-rst","patch_set":2,"id":"1a930d6b_182dff46","line":39,"updated":"2015-01-22 18:14:37.000000000","message":"nit: \"will succeed\"","commit_id":"b6c9d7b331643b15d94215e02a6d9bcf1234edb5"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"710e3ab4ea57cb3c12642dd86818706ab3ca7c81","unresolved":false,"context_lines":[{"line_number":39,"context_line":"image or reactivating an \u0027active\u0027 image succeed as no-ops."},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"While it is anticipated that only admins will have access to the operations"},{"line_number":42,"context_line":"to deactivate and reactivate an image (and will be configured as such by"},{"line_number":43,"context_line":"default), restrictions to these functions can be handled through the current"},{"line_number":44,"context_line":"policy mechanisms and thus the responsibility falls to the deployer to"},{"line_number":45,"context_line":"implement / update the applicable policies."}],"source_content_type":"text/x-rst","patch_set":2,"id":"1a930d6b_d8c8d776","line":42,"updated":"2015-01-22 18:14:37.000000000","message":"This parenthetical should be it\u0027s own sentence. It should be a plain assertion like \"By default, only administrators will have permissions sufficient to deactivate and reactivate images.\"","commit_id":"b6c9d7b331643b15d94215e02a6d9bcf1234edb5"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"52960ad22ae146557a46e43bff3e5b7894e9417e","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"REST API impact"},{"line_number":64,"context_line":"---------------"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"* POST:/v2/images/{image_id}/actions/deactivate"},{"line_number":67,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"da86d52c_c44ea295","line":64,"updated":"2015-02-19 14:40:10.000000000","message":"Add:\n\nThe design for the deactivate and reactivate calls specified below follows the controller pattern from Subbu Allamaraju, RESTful Web Services Cookbook (O\u0027Reilly, 2010), section 2.6.  It was discussed by the OpenStack API Working Group on the mailing list and at a series of meetings in February 2015.  The consensus was that this design is an appropriate pragmatic RESTful interface.\n\nUsing Glance tasks for deactivate/reactivate was discussed by the API WG, but the consensus was that since Glance tasks are specifically designed for asynchronous operations, their use was not appropriate here.  The recommendation is that any new asynchronous operations should be implemented in the tasks API, but the controller pattern is appropriate for synchronous actions like deactivate and reactivate.\n\nThe API WG endorsed this API design proposal at its meeting on 19 February 2015.","commit_id":"b6c9d7b331643b15d94215e02a6d9bcf1234edb5"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"f4033ba8baf34bcd38a9e62cac943bf12c09bba9","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"REST API impact"},{"line_number":64,"context_line":"---------------"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"* POST:/v2/images/{image_id}/actions/deactivate"},{"line_number":67,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"da86d52c_e22f11f4","line":64,"in_reply_to":"da86d52c_c44ea295","updated":"2015-02-19 16:54:33.000000000","message":"I wouldn\u0027t call it an endorsement because that implies that the result of last night\u0027s meeting wasn\u0027t more of a \"we give up trying to improve the design of the API\". The decision was less positive about the design than it was accepting that Glance\u0027s decision to do this was not entirely aberrant.\n\nBut yes, the fact that the API WG discussed this in depth should be added.","commit_id":"b6c9d7b331643b15d94215e02a6d9bcf1234edb5"},{"author":{"_account_id":1112,"name":"Everett Toews","email":"everett.toews@rackspace.com","username":"everett-toews"},"change_message_id":"929beff72a0eadc034ad7b2d8592246a99c9f247","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"REST API impact"},{"line_number":64,"context_line":"---------------"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"* POST:/v2/images/{image_id}/actions/deactivate"},{"line_number":67,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"da86d52c_512c28ac","line":64,"in_reply_to":"da86d52c_e22f11f4","updated":"2015-02-19 18:43:56.000000000","message":"Agreed with Ian here. Endorsement goes a bit too far. In my view it was more of a compromise. I think it was generally agreed that the tasks API wasn\u0027t a good fit because of its async nature but we didn\u0027t achieve some of the more RESTful solutions suggested in this review and on the mailing list.\n\nI know I was the one to bring up the RESTful Web Services Cookbook but I was just trying to suss out where the design may have originated. I don\u0027t want to give the impression that I think it\u0027s right just because it\u0027s in a book. ;) I personally voted yes because at least this design is less RPC-like than what Nova currently does and development on Glance will move forward.\n\nIt\u0027s certainly accurate to say that the API WG discussed this in depth. Thanks again to the Glance team for bringing this up.","commit_id":"b6c9d7b331643b15d94215e02a6d9bcf1234edb5"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"710e3ab4ea57cb3c12642dd86818706ab3ca7c81","unresolved":false,"context_lines":[{"line_number":63,"context_line":"REST API impact"},{"line_number":64,"context_line":"---------------"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"* POST:/v2/images/{image_id}/actions/deactivate"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"      * Description: Deactivate an image"},{"line_number":69,"context_line":"      * Method: POST"}],"source_content_type":"text/x-rst","patch_set":2,"id":"1a930d6b_78b443d1","line":66,"updated":"2015-01-22 18:14:37.000000000","message":"My instinct for this endpoint and the next one is that they should use PUT verbs. I\u0027ve seen PUT used with endpoints where you\u0027re essentially toggling a switch (like here), but I haven\u0027t examined other OpenStack APIs to see what the convention is. I\u0027ll discuss it with API WG members via a guideline proposal.","commit_id":"b6c9d7b331643b15d94215e02a6d9bcf1234edb5"},{"author":{"_account_id":12606,"name":"Miguel Grinberg","email":"miguel.grinberg@gmail.com","username":"miguelgrinberg"},"change_message_id":"404375f07d531995c3e46a70a91e20499f64179f","unresolved":false,"context_lines":[{"line_number":63,"context_line":"REST API impact"},{"line_number":64,"context_line":"---------------"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"* POST:/v2/images/{image_id}/actions/deactivate"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"      * Description: Deactivate an image"},{"line_number":69,"context_line":"      * Method: POST"}],"source_content_type":"text/x-rst","patch_set":2,"id":"1a930d6b_49ac1ba1","line":66,"in_reply_to":"1a930d6b_29098fdd","updated":"2015-01-22 19:21:57.000000000","message":"The first option. Presumably you will be able to do:\n\n    GET /v2/images/{image_id}\n    ...\n    {\n        ...\n        \"active\": true\n        ...\n    }\n\nSo then you can send back this same body in a PUT request with a new value for the \"active\" property.","commit_id":"b6c9d7b331643b15d94215e02a6d9bcf1234edb5"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"19f11cb07f9096d0efb8c052d1683c2c012b958e","unresolved":false,"context_lines":[{"line_number":63,"context_line":"REST API impact"},{"line_number":64,"context_line":"---------------"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"* POST:/v2/images/{image_id}/actions/deactivate"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"      * Description: Deactivate an image"},{"line_number":69,"context_line":"      * Method: POST"}],"source_content_type":"text/x-rst","patch_set":2,"id":"1a930d6b_29098fdd","line":66,"in_reply_to":"1a930d6b_29518f0e","updated":"2015-01-22 19:18:21.000000000","message":"Miguel, so something like\n\n    PUT /v2/images/{image_id}\n    Content-Length: 16\n    Content-Type: application/json\n    ...\n\n    {\"active\": false}\n    \nIs what you\u0027re proposing? Or more along the lines of\n\n    PUT /v2/images/{image_id}?active\u003dtrue","commit_id":"b6c9d7b331643b15d94215e02a6d9bcf1234edb5"},{"author":{"_account_id":10670,"name":"Michael McCune","email":"elmiko@redhat.com","username":"mimccune"},"change_message_id":"6a1b437a1ed89ea16f1ceaad6dd8c95db07aae88","unresolved":false,"context_lines":[{"line_number":63,"context_line":"REST API impact"},{"line_number":64,"context_line":"---------------"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"* POST:/v2/images/{image_id}/actions/deactivate"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"      * Description: Deactivate an image"},{"line_number":69,"context_line":"      * Method: POST"}],"source_content_type":"text/x-rst","patch_set":2,"id":"1a930d6b_ad756b99","line":66,"in_reply_to":"1a930d6b_49ac1ba1","updated":"2015-01-23 14:31:58.000000000","message":"+1 to sending a PUT to the resource URL with the updated information in the body.","commit_id":"b6c9d7b331643b15d94215e02a6d9bcf1234edb5"},{"author":{"_account_id":12606,"name":"Miguel Grinberg","email":"miguel.grinberg@gmail.com","username":"miguelgrinberg"},"change_message_id":"b2cce777685dceecc3ed83f61ffa6710a33dc6b4","unresolved":false,"context_lines":[{"line_number":63,"context_line":"REST API impact"},{"line_number":64,"context_line":"---------------"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"* POST:/v2/images/{image_id}/actions/deactivate"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"      * Description: Deactivate an image"},{"line_number":69,"context_line":"      * Method: POST"}],"source_content_type":"text/x-rst","patch_set":2,"id":"1a930d6b_29518f0e","line":66,"in_reply_to":"1a930d6b_78b443d1","updated":"2015-01-22 19:10:46.000000000","message":"My opinion is that the /actions/something style of write APIs is bad. Unfortunately it is widespread in OpenStack APIs, but I believe it goes against the principle of using URLs that are resources, since this is clearly indicating an action instead of a resource.\n\nIf I understand this correctly you plan to return the active/inactive state in the GET /v2/images/{image_id} request, so the RESTful way to change the state is to let clients issue a PUT request to this same URL where the indicate the new state by changing the value of the \"active\" boolean.","commit_id":"b6c9d7b331643b15d94215e02a6d9bcf1234edb5"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"1f12fc89bc1f215e61e498258d98ecb3385b9c13","unresolved":false,"context_lines":[{"line_number":63,"context_line":"REST API impact"},{"line_number":64,"context_line":"---------------"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"* POST:/v2/images/{image_id}/actions/deactivate"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"      * Description: Deactivate an image"},{"line_number":69,"context_line":"      * Method: POST"}],"source_content_type":"text/x-rst","patch_set":2,"id":"1a930d6b_de5228dd","line":66,"in_reply_to":"1a930d6b_a538f63d","updated":"2015-01-26 13:41:04.000000000","message":"I agree with Flavio, let me approach this from another angle.\n\n* The image property we\u0027re talking about here is \u0027status\u0027.\n* Glance guarantees that \u0027status\u0027 will always contain one of a defined enumeration of values (active, deleted, etc.).  There\u0027s no \"active\": true field on an image.\n* Glance manages the state machine for image status, it is not possible for a user to set the status directly.\n* The image status property is not an URL-accessible subresource of the image.\n* Glance uses PATCH to modify image properties.  The use of PATCH acknowledges that a user can modify some but not necessarily all properties on an image.  The image status is is not one of the properties a user can modify.\n\nSo we\u0027re in this situation where we want to ask Glance to change the image status, but we (as API designers) do *not* want to give the user (or, future developers) the idea that a user can change the image status.  The image status is managed internally by Glance, not via the API.  We want the API design to reflect that this is a different kind of operation from the normal CRUD-centric REST stuff.  Most of the Images API is document-centric, we need the ability to have some functional operations.\n\nThus, I am still in favor of the strategy originally proposed by Eddie.\n\nNext, PUT vs. POST: My recollection of Atlanta is a bit hazy, and I can\u0027t find this point exactly on the etherpad, but I believe that the reason we decided on POST is that PUT is traditionally used to update a resource completely, and that\u0027s not the case here since there is no \u0027action\u0027 resource to be updated.  I think someone had looked at some other functional APIs and said that they mostly use POST with an empty request body for this.  It also fits in with the POST semantics of a user trying to create a resource and not knowing the URL of that resource.","commit_id":"b6c9d7b331643b15d94215e02a6d9bcf1234edb5"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"da958806f27b28944e0caab1e6eddd927c554248","unresolved":false,"context_lines":[{"line_number":63,"context_line":"REST API impact"},{"line_number":64,"context_line":"---------------"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"* POST:/v2/images/{image_id}/actions/deactivate"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"      * Description: Deactivate an image"},{"line_number":69,"context_line":"      * Method: POST"}],"source_content_type":"text/x-rst","patch_set":2,"id":"1a930d6b_a538f63d","line":66,"in_reply_to":"1a930d6b_ad756b99","updated":"2015-01-26 10:18:17.000000000","message":"While I also prefer how the `PUT` on an image resource reads, I\u0027d like us to dig a bit more on the benefits of using actions. If we read the proposed action in this spec, we\u0027ll soon find out that it doesn\u0027t read any different than the `PUT` on an image resource. If anything, it\u0027s actually easier to read.\n\nOne extra benefit that I can think of is that our image status flow is getting more and more complex. Having more granular actions (as in, a way to isolate code and implementations) may be of some help here. For example, to update from a status `A` to a status `B` we currently have a quite mixed set of `if`s and other checks here and there. If we instead isolate these status update steps in a per-action basis, we may be able to have a better code structure and isolated implementation.\n\nI know the above is quite vague but think about how you\u0027d implement this in a RESTFul fashion on the image resource. You need to wire this logic in the update view and make sure  all the underlying steps don\u0027t interfere with it.\n\nAlso, lets please not add a new boolean field to the image. We changed `is_public` to `visibility` for a reason and we have a status field that can easily store this information as proposed in this spec.","commit_id":"b6c9d7b331643b15d94215e02a6d9bcf1234edb5"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"ad8a50e2d5c7349935444225606c6e2a13604f01","unresolved":false,"context_lines":[{"line_number":63,"context_line":"REST API impact"},{"line_number":64,"context_line":"---------------"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"* POST:/v2/images/{image_id}/actions/deactivate"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"      * Description: Deactivate an image"},{"line_number":69,"context_line":"      * Method: POST"}],"source_content_type":"text/x-rst","patch_set":2,"id":"1a930d6b_eb0f1b86","line":66,"in_reply_to":"1a930d6b_de5228dd","updated":"2015-01-26 17:30:44.000000000","message":"\u003e  It also fits in with the POST semantics of a user trying to create a resource and not knowing the URL of that resource.\n\nExcept that nothing is being created here. It\u0027s being updated. I would have to look for the specific examples elsewhere, but the first few that come to mind come from GitHub\u0027s API:\n\n- To follow a user, you do:\n\n    PUT /user/following/flaper87\n\n- To star a repository, you do:\n\n    PUT /user/starred/openstack/glance\n\nTo undo them, you DELETE the same URI. Semantically you\u0027re updating something, not creating it and PUT matches the action better. I\u0027m sure I could easily find more examples to support this example. I personally have no issue with /actions/deactivate since that\u0027s the OpenStack tradition.","commit_id":"b6c9d7b331643b15d94215e02a6d9bcf1234edb5"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"2e0435479494c1f0cb675cbaadf5fedc105db424","unresolved":false,"context_lines":[{"line_number":63,"context_line":"REST API impact"},{"line_number":64,"context_line":"---------------"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"* POST:/v2/images/{image_id}/actions/deactivate"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"      * Description: Deactivate an image"},{"line_number":69,"context_line":"      * Method: POST"}],"source_content_type":"text/x-rst","patch_set":2,"id":"da86d52c_52ec58f3","line":66,"in_reply_to":"1a930d6b_eb0f1b86","updated":"2015-02-05 00:21:47.000000000","message":"I really have to disagree with this:\n\u003e Except that nothing is being created here. It\u0027s being updated. \n\nThe key issue is that this call does NOT update the field.  You make the call to deactivate the image and one of the things that glance does is change the status to reflect your functional request.  I want to be really clear that we are not allowing someone to monkey directly with the image status, not just by documenting it, but by the way the API is designed.","commit_id":"b6c9d7b331643b15d94215e02a6d9bcf1234edb5"},{"author":{"_account_id":12606,"name":"Miguel Grinberg","email":"miguel.grinberg@gmail.com","username":"miguelgrinberg"},"change_message_id":"2f0f20571ffb20a8eb1c98992b25ffab184b934b","unresolved":false,"context_lines":[{"line_number":63,"context_line":"REST API impact"},{"line_number":64,"context_line":"---------------"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"* POST:/v2/images/{image_id}/actions/deactivate"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"      * Description: Deactivate an image"},{"line_number":69,"context_line":"      * Method: POST"}],"source_content_type":"text/x-rst","patch_set":2,"id":"1a930d6b_c6241662","line":66,"in_reply_to":"1a930d6b_eb0f1b86","updated":"2015-01-26 17:52:43.000000000","message":"To follow up on Ian examples from Github API, to deactivate an image you could do something like this:\n\n    PUT /v2/images/{image_id}/inactive\n\nAnd then to reactivate it you would do:\n\n    DELETE /v2/images/{image_id}/inactive\n\nThis is, IMHO, much better than the current proposal. In my personal opinion it is still not the REST ideal, but at least it isn\u0027t bringing an RPC design style to the API.","commit_id":"b6c9d7b331643b15d94215e02a6d9bcf1234edb5"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"710e3ab4ea57cb3c12642dd86818706ab3ca7c81","unresolved":false,"context_lines":[{"line_number":149,"context_line":"Security impact"},{"line_number":150,"context_line":"---------------"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"None"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"Notifications impact"}],"source_content_type":"text/x-rst","patch_set":2,"id":"1a930d6b_f8ed93b8","line":152,"updated":"2015-01-22 18:14:37.000000000","message":"This is actually a security improvement, no? You can mention that this will give administrators the ability to prevent use of a potentially malicious image while an audit takes place. It doesn\u0027t have any negative implications at least.","commit_id":"b6c9d7b331643b15d94215e02a6d9bcf1234edb5"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"1819ff896c0aa88066c84714527b044327793568","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"REST API impact"},{"line_number":66,"context_line":"---------------"},{"line_number":67,"context_line":"The design for the deactivate and reactivate calls specified below follows the"},{"line_number":68,"context_line":"controller pattern from Subbu Allamaraju, RESTful Web Services Cookbook"},{"line_number":69,"context_line":"(O\u0027Reilly, 2010), section 2.6. It was discussed by the OpenStack API Working"}],"source_content_type":"text/x-rst","patch_set":3,"id":"da86d52c_80de4c0f","line":66,"updated":"2015-02-19 18:10:50.000000000","message":"For consistency\u0027s sake, add a new line between the title and the content?","commit_id":"6ff82d9e3dfa257e9e11b98760c784e4d36c7be7"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"1819ff896c0aa88066c84714527b044327793568","unresolved":false,"context_lines":[{"line_number":81,"context_line":""},{"line_number":82,"context_line":"* POST:/v2/images/{image_id}/actions/deactivate"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"      * Description: Deactivate an image"},{"line_number":85,"context_line":"      * Method: POST"},{"line_number":86,"context_line":"      * Normal response code(s): 204"},{"line_number":87,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"da86d52c_865f44e4","line":84,"updated":"2015-02-19 18:10:50.000000000","message":"This displays poorly when rendered via sphinx. Please follow this indentation style:\n\n    * POST:/\n      * Description: \n      * Method:\n      ...\n      * Expected\n        * When Calling deactivate\n\nEtc.","commit_id":"6ff82d9e3dfa257e9e11b98760c784e4d36c7be7"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"98a2e1c9e8ee6c2dca002e0f169280ac3f45b167","unresolved":false,"context_lines":[{"line_number":181,"context_line":"Other end user impact"},{"line_number":182,"context_line":"---------------------"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"Support for the new API operations should be added to python-glanceclient."},{"line_number":185,"context_line":""},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"Performance Impact"}],"source_content_type":"text/x-rst","patch_set":3,"id":"da86d52c_7dd10356","line":184,"updated":"2015-02-19 17:32:17.000000000","message":"Though its already mentioned above, should we mention here that end users will not be able to boot/export deactivated images?","commit_id":"6ff82d9e3dfa257e9e11b98760c784e4d36c7be7"},{"author":{"_account_id":5347,"name":"Eddie Sheffield","email":"eddie.sheffield@rackspace.com","username":"eddie-sheffield"},"change_message_id":"d85956ea046dcc75bac0b7d7ab5d18231c1aee3e","unresolved":false,"context_lines":[{"line_number":181,"context_line":"Other end user impact"},{"line_number":182,"context_line":"---------------------"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"Support for the new API operations should be added to python-glanceclient."},{"line_number":185,"context_line":""},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"Performance Impact"}],"source_content_type":"text/x-rst","patch_set":3,"id":"da86d52c_601238fe","line":184,"in_reply_to":"da86d52c_7dd10356","updated":"2015-02-19 17:44:16.000000000","message":"Since this is headed as \"Other end user impact\" I took that to mean impacts other than what was mentioned elsewhere. Though I did reiterate information below under \"Other deployer impact.\" So not sure.","commit_id":"6ff82d9e3dfa257e9e11b98760c784e4d36c7be7"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"af1dec1217b2aa6efad76d85ace05939f6695e97","unresolved":false,"context_lines":[{"line_number":78,"context_line":"but the controller pattern is appropriate for synchronous actions like"},{"line_number":79,"context_line":"deactivate and reactivate."},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"The API WG endorsed this API design proposal at its meeting on 19 February 2015."},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"* POST:/v2/images/{image_id}/actions/deactivate"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"da86d52c_ac08a791","line":81,"updated":"2015-02-19 18:58:13.000000000","message":"In light of Everett\u0027s comments on PS2, I think this needs to be revised to phrase it not as an endorsement but as a compromise.","commit_id":"739bf2b05f8f1b3859d207d1c6bd9b16875105cc"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"16b5ca6c7e260f53d0ddfa264093bc7ec0181748","unresolved":false,"context_lines":[{"line_number":78,"context_line":"but the controller pattern is appropriate for synchronous actions like"},{"line_number":79,"context_line":"deactivate and reactivate."},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"The API WG endorsed this API design proposal at its meeting on 19 February 2015."},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"* POST:/v2/images/{image_id}/actions/deactivate"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba7be1f8_5d6df703","line":81,"in_reply_to":"da86d52c_ac08a791","updated":"2015-02-20 02:24:06.000000000","message":"Well, the phrasing of the motion was that the API WG recommended that Glance should go ahead with this design, which sounds like an endorsement to me.  But I\u0027m not going to insist on it.  How about:\n\nThe API WG concluded that this API design proposal was acceptable at its meeting on 19 February 2015.","commit_id":"739bf2b05f8f1b3859d207d1c6bd9b16875105cc"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"4cf32b952cef7c3557f53a6abb52b2341d51357d","unresolved":false,"context_lines":[{"line_number":79,"context_line":"deactivate and reactivate."},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"The API WG concluded that this API design proposal was acceptable at its"},{"line_number":82,"context_line":"meeting on 19 February 2015."},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"* POST:/v2/images/{image_id}/actions/deactivate"},{"line_number":85,"context_line":"  * Description: Deactivate an image"}],"source_content_type":"text/x-rst","patch_set":6,"id":"ba7be1f8_06ff9935","line":82,"updated":"2015-02-20 15:55:00.000000000","message":"Eddie, do you mind linking the following two here?\n- http://eavesdrop.openstack.org/meetings/api_wg/2015/api_wg.2015-02-19-00.00.log.html#l-146\n- http://osdir.com/ml/openstack-dev/2015-02/msg01563.html\n\nJust for future reference, thank you!","commit_id":"1d4dd54878d63d94267f7a96fba11b0de996aba8"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"38450c3285563a220e7736ab84427ff8a8f1e262","unresolved":false,"context_lines":[{"line_number":79,"context_line":"deactivate and reactivate."},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"The API WG concluded that this API design proposal was acceptable at its"},{"line_number":82,"context_line":"meeting on 19 February 2015."},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"* POST:/v2/images/{image_id}/actions/deactivate"},{"line_number":85,"context_line":"  * Description: Deactivate an image"}],"source_content_type":"text/x-rst","patch_set":7,"id":"ba7be1f8_a6440d75","line":82,"updated":"2015-02-20 15:57:11.000000000","message":"Can you cite this here, http://eavesdrop.openstack.org/meetings/api_wg/2015/api_wg.2015-02-19-00.00.log.html#l-146\n\nThank you!","commit_id":"c5e6c0e19d15ee4061299903dbbf568da6c94dfb"}]}
