)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"d7c319ddfb0755f6f096f687a0db0e00128b7b0e","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Julien Danjou \u003cjulien@danjou.info\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-03-09 15:34:57 +0100"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"resource: add put_create flag"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This allows to have resources created via a POST even if their id is"},{"line_number":10,"context_line":"being provided."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"9a80dd14_775bf3f5","line":7,"updated":"2015-03-09 14:57:02.000000000","message":"You added a \"post_create\" flag, not a \"put_create\" flag.","commit_id":"a8f2872615622b61d54d157cd71d1f208a9ebd6c"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"8cfc9ed3d1a314b1fe3bcbbdd66b973b8299f383","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Julien Danjou \u003cjulien@danjou.info\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-03-09 15:34:57 +0100"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"resource: add put_create flag"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This allows to have resources created via a POST even if their id is"},{"line_number":10,"context_line":"being provided."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"9a80dd14_ed8d54d4","line":7,"in_reply_to":"9a80dd14_775bf3f5","updated":"2015-03-09 15:53:21.000000000","message":"Done","commit_id":"a8f2872615622b61d54d157cd71d1f208a9ebd6c"}],"openstack/resource.py":[{"author":{"_account_id":8257,"name":"Brian Curtin","email":"brian@python.org","username":"briancurtin"},"change_message_id":"c08dc2c54581add1ff78cbcd1b660b643435a67f","unresolved":false,"context_lines":[{"line_number":232,"context_line":"    allow_head \u003d False"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    put_update \u003d False"},{"line_number":235,"context_line":"    put_create \u003d True"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"    def __init__(self, attrs\u003dNone, loaded\u003dFalse):"},{"line_number":238,"context_line":"        \"\"\"Construct a Resource to interact with a service\u0027s REST API."}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_a1f60d8d","line":235,"updated":"2015-03-09 14:16:22.000000000","message":"If we want put_create to be the default then we should make it so in the code and have the opposite case be here and set to False so we\u0027re explicit about requesting the less common behavior.\n\nSeparate but related: we\u0027re changing put_update to patch_update because PATCH is not commonly used, but the way we added this requires that we specify the override in subclasses more often than not.","commit_id":"f5892235e94e2348910ad55bc4e8e0bdcb972e24"},{"author":{"_account_id":8257,"name":"Brian Curtin","email":"brian@python.org","username":"briancurtin"},"change_message_id":"a0c98364a005e32a3bffbc4145f638e38d25f5fc","unresolved":false,"context_lines":[{"line_number":232,"context_line":"    allow_head \u003d False"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    put_update \u003d False"},{"line_number":235,"context_line":"    post_create \u003d False"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"    def __init__(self, attrs\u003dNone, loaded\u003dFalse):"},{"line_number":238,"context_line":"        \"\"\"Construct a Resource to interact with a service\u0027s REST API."}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_f22e118b","line":235,"updated":"2015-03-09 15:15:35.000000000","message":"After looking at this more, I\u0027m a bit confused. If your goal is to be able to POST with an ID, this won\u0027t get you there. Setting this flag and passing an ID will still do a PUT.\n\nI think we need to figure out what is the most common operation for creation and make that the default, then get the ID join part out of being specific to put or post - if you pass one in, it\u0027ll be set, if not it won\u0027t.","commit_id":"a8f2872615622b61d54d157cd71d1f208a9ebd6c"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"8cfc9ed3d1a314b1fe3bcbbdd66b973b8299f383","unresolved":false,"context_lines":[{"line_number":232,"context_line":"    allow_head \u003d False"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    put_update \u003d False"},{"line_number":235,"context_line":"    post_create \u003d False"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"    def __init__(self, attrs\u003dNone, loaded\u003dFalse):"},{"line_number":238,"context_line":"        \"\"\"Construct a Resource to interact with a service\u0027s REST API."}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_4d6d8003","line":235,"in_reply_to":"9a80dd14_922955e8","updated":"2015-03-09 15:53:21.000000000","message":"@Brian: Setting this flag and passing an ID does a post because it evaluates to \"if False and True\" at line 509.\n\nThe Gnocchi API does not yet support PUT (we\u0027ll likely add it), but we support POST because this POST does not mandate all the fields to be present (contrary to PUT).\n\nHaving PUT if the resource_is really RESTful so I think the current default is good.","commit_id":"a8f2872615622b61d54d157cd71d1f208a9ebd6c"},{"author":{"_account_id":8736,"name":"Terry Howe","email":"terrylhowe@gmail.com","username":"terrylhowe"},"change_message_id":"89ed22eecc6c5907d4f69ccdce2055f8a947f0c1","unresolved":false,"context_lines":[{"line_number":232,"context_line":"    allow_head \u003d False"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    put_update \u003d False"},{"line_number":235,"context_line":"    post_create \u003d False"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"    def __init__(self, attrs\u003dNone, loaded\u003dFalse):"},{"line_number":238,"context_line":"        \"\"\"Construct a Resource to interact with a service\u0027s REST API."}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_922955e8","line":235,"in_reply_to":"9a80dd14_f22e118b","updated":"2015-03-09 15:29:05.000000000","message":"POST is definitely the most common operation.\n\nI\u0027m not sure why Jamie added this put to call put if someone calls create with a resource_id.  I\u0027m not sure what resources that is supposed to support.  Maybe it would be easier to override this method for this metric resource.  The only things I can think that are like this would be things like keypairs and Swift.","commit_id":"a8f2872615622b61d54d157cd71d1f208a9ebd6c"},{"author":{"_account_id":8736,"name":"Terry Howe","email":"terrylhowe@gmail.com","username":"terrylhowe"},"change_message_id":"c65ac94942890c802a97c0bb2626e34410c5e581","unresolved":false,"context_lines":[{"line_number":509,"context_line":"            url \u003d cls.base_path"},{"line_number":510,"context_line":"        if not cls.post_create and resource_id:"},{"line_number":511,"context_line":"            url \u003d utils.urljoin(url, resource_id)"},{"line_number":512,"context_line":"            resp \u003d session.put(url, service\u003dcls.service, json\u003dbody).body"},{"line_number":513,"context_line":"        else:"},{"line_number":514,"context_line":"            resp \u003d session.post(url, service\u003dcls.service,"},{"line_number":515,"context_line":"                                json\u003dbody).body"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_11a802da","line":512,"updated":"2015-03-09 15:59:16.000000000","message":"Maybe the solution is to remove this call to PUT here if we can identify who needed this.  I don\u0027t like this code anyway because it pretty much looks like we are supporting update in create.\n\nLet\u0027s figure this all out before we get another patch though.","commit_id":"c566cd6ae41d2bb6012c3a14e4c3c482fbff75e8"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"5f1cb1c336c0322e9f0f129036b42a54f2c70432","unresolved":false,"context_lines":[{"line_number":509,"context_line":"            url \u003d cls.base_path"},{"line_number":510,"context_line":"        if not cls.post_create and resource_id:"},{"line_number":511,"context_line":"            url \u003d utils.urljoin(url, resource_id)"},{"line_number":512,"context_line":"            resp \u003d session.put(url, service\u003dcls.service, json\u003dbody).body"},{"line_number":513,"context_line":"        else:"},{"line_number":514,"context_line":"            resp \u003d session.post(url, service\u003dcls.service,"},{"line_number":515,"context_line":"                                json\u003dbody).body"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_f1dc4e48","line":512,"in_reply_to":"9a80dd14_11a802da","updated":"2015-03-09 16:06:38.000000000","message":"+1","commit_id":"c566cd6ae41d2bb6012c3a14e4c3c482fbff75e8"},{"author":{"_account_id":8736,"name":"Terry Howe","email":"terrylhowe@gmail.com","username":"terrylhowe"},"change_message_id":"6d281e8efb129d672af5ac9ea0b2a4db526dba73","unresolved":false,"context_lines":[{"line_number":509,"context_line":"            url \u003d cls.base_path"},{"line_number":510,"context_line":"        if not cls.post_create and resource_id:"},{"line_number":511,"context_line":"            url \u003d utils.urljoin(url, resource_id)"},{"line_number":512,"context_line":"            resp \u003d session.put(url, service\u003dcls.service, json\u003dbody).body"},{"line_number":513,"context_line":"        else:"},{"line_number":514,"context_line":"            resp \u003d session.post(url, service\u003dcls.service,"},{"line_number":515,"context_line":"                                json\u003dbody).body"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_59c278e9","line":512,"in_reply_to":"9a80dd14_f1dc4e48","updated":"2015-03-10 11:59:41.000000000","message":"I just opened 5 tickets documenting places where PUT might be required for create. I think we should investigate those areas and override create for those attributes.  It isn\u0027t clear to me that we actually support all the cases anyway and some may be overridden already\n\nThere were a couple other places in the docs that I saw where PUT may be required for extensions that we do not currently support anyway.","commit_id":"c566cd6ae41d2bb6012c3a14e4c3c482fbff75e8"}]}
