)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"3c88406e118ae17cd019c364b27b9fa017ac4068","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add PUT support for generic container types"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This adds the PUT command for modifying secret_refs in generic containers. Non-generic containers still do not support PUT. Also provide some test cases to validate the secret_refs being updated."},{"line_number":10,"context_line":"According to the origin BP, only secret_refs can be updated. So, a new JSON schema is written to meet it."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Co-Authored-By: Kevin Bishop \u003cktb2012@att.net\u003e"},{"line_number":13,"context_line":"Co-Authored-By: Chellygel \u003cchelsea.winfree@gmail.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":17,"id":"fa69d971_a8010907","line":10,"updated":"2016-01-05 07:51:36.000000000","message":"could you please follow this format? http://docs.openstack.org/infra/manual/developers.html#committing-a-change","commit_id":"bfdec90c8edc3b674645fbc04e6c43ab518f8be1"}],"barbican/api/controllers/containers.py":[{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"fb0475fcfd74cfb50b0cd2eb2b8e4214a4099b49","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        self.container_id \u003d container.id"},{"line_number":45,"context_line":"        self.consumer_repo \u003d repo.get_container_consumer_repository()"},{"line_number":46,"context_line":"        self.container_repo \u003d repo.get_container_repository()"},{"line_number":47,"context_line":"        self.container_secret_repo \u003d repo.get_container_secret_repository()"},{"line_number":48,"context_line":"        self.secret_repo \u003d repo.get_secret_repository()"},{"line_number":49,"context_line":"        self.validator \u003d validators.ContainerValidator()"},{"line_number":50,"context_line":"        self.consumers \u003d consumers.ContainerConsumersController("}],"source_content_type":"text/x-python","patch_set":1,"id":"3a50d1a3_7680294a","line":47,"updated":"2015-07-30 18:07:02.000000000","message":"why was this added here?","commit_id":"bb08775b3813a3e901a0ff430fb1b4e622cdab89"},{"author":{"_account_id":11661,"name":"Kevin Bishop","email":"ktb2012@att.net","username":"kbishop711"},"change_message_id":"9f23ca3239977f299e28e8fd92dfa8811dff493b","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        self.container_id \u003d container.id"},{"line_number":45,"context_line":"        self.consumer_repo \u003d repo.get_container_consumer_repository()"},{"line_number":46,"context_line":"        self.container_repo \u003d repo.get_container_repository()"},{"line_number":47,"context_line":"        self.container_secret_repo \u003d repo.get_container_secret_repository()"},{"line_number":48,"context_line":"        self.secret_repo \u003d repo.get_secret_repository()"},{"line_number":49,"context_line":"        self.validator \u003d validators.ContainerValidator()"},{"line_number":50,"context_line":"        self.consumers \u003d consumers.ContainerConsumersController("}],"source_content_type":"text/x-python","patch_set":1,"id":"3a50d1a3_5553a06c","line":47,"in_reply_to":"3a50d1a3_7680294a","updated":"2015-07-30 20:04:52.000000000","message":"I put it in when I was still unsure whether I needed it or \"self.secret_repo\". I\u0027ll take it out now.","commit_id":"bb08775b3813a3e901a0ff430fb1b4e622cdab89"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"fb0475fcfd74cfb50b0cd2eb2b8e4214a4099b49","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                    404,"},{"line_number":102,"context_line":"                    u._(\"Secret provided for \u0027{secret_name}\u0027 doesn\u0027t \""},{"line_number":103,"context_line":"                        \"exist.\").format(secret_name\u003dsecret_ref.get(\u0027name\u0027))"},{"line_number":104,"context_line":"                )"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        self.container.update(data)"},{"line_number":107,"context_line":"        url \u003d hrefs.convert_container_to_href(self.container.id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a50d1a3_f6499933","line":104,"updated":"2015-07-30 18:07:02.000000000","message":"if this block only validates that the secrets being modified exist, maybe it\u0027s worth while moving it to another function for readability.","commit_id":"bb08775b3813a3e901a0ff430fb1b4e622cdab89"},{"author":{"_account_id":11661,"name":"Kevin Bishop","email":"ktb2012@att.net","username":"kbishop711"},"change_message_id":"9f23ca3239977f299e28e8fd92dfa8811dff493b","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                    404,"},{"line_number":102,"context_line":"                    u._(\"Secret provided for \u0027{secret_name}\u0027 doesn\u0027t \""},{"line_number":103,"context_line":"                        \"exist.\").format(secret_name\u003dsecret_ref.get(\u0027name\u0027))"},{"line_number":104,"context_line":"                )"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        self.container.update(data)"},{"line_number":107,"context_line":"        url \u003d hrefs.convert_container_to_href(self.container.id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a50d1a3_d5c5700a","line":104,"in_reply_to":"3a50d1a3_f6499933","updated":"2015-07-30 20:04:52.000000000","message":"Yeah, I can do that.","commit_id":"bb08775b3813a3e901a0ff430fb1b4e622cdab89"},{"author":{"_account_id":11661,"name":"Kevin Bishop","email":"ktb2012@att.net","username":"kbishop711"},"change_message_id":"a15fbc9b707be8e18308706114750e78c689f8b1","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            pecan.abort(405)"},{"line_number":102,"context_line":"        data \u003d api.load_body(pecan.request, validator\u003dself.validator)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"        validate_secrets(models.Container(data).container_secrets,"},{"line_number":105,"context_line":"                         external_project_id, self.secret_repo)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        self.container.update(data)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_7be32d06","line":104,"updated":"2015-07-30 20:38:09.000000000","message":"Not so sure if I like creating a Container for this purpose, but I couldn\u0027t figure out a better way.","commit_id":"178e944b20220c07aa00cf698317f6ca73d17653"},{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"94122373b5876bac99d743798692c31df9473b12","unresolved":false,"context_lines":[{"line_number":103,"context_line":"    @controllers.enforce_rbac(\u0027container:put\u0027)"},{"line_number":104,"context_line":"    def on_put(self, external_project_id, **kwargs):"},{"line_number":105,"context_line":"        if self.container.type !\u003d \u0027generic\u0027:"},{"line_number":106,"context_line":"            pecan.abort(405)"},{"line_number":107,"context_line":"        data \u003d api.load_body(pecan.request, validator\u003dself.validator)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        validate_secrets(data, external_project_id, self.secret_repo)"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_9b3901a7","line":106,"updated":"2015-08-19 20:42:22.000000000","message":"If you provide a message here, then it will be passed back to the caller.  Also, since PUT is sometimes allowed, I think 409 is better than 405 in this case.  You could add a method _container_immutable() to handle this like _secret_already_has_data() does in the secret controller.","commit_id":"826cd24d9b6d5562828e9eef5f6248f351ff124c"},{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"94122373b5876bac99d743798692c31df9473b12","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        LOG.info(u._LI(\u0027Updated a container for project: %s\u0027),"},{"line_number":115,"context_line":"                 external_project_id)"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        return {\u0027container_ref\u0027: url}"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    @index.when(method\u003d\u0027DELETE\u0027)"},{"line_number":120,"context_line":"    @utils.allow_all_content_types"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_fbfefdac","line":117,"updated":"2015-08-19 20:42:22.000000000","message":"I think it is more appropriate for a PUT to return 204 No Content.","commit_id":"826cd24d9b6d5562828e9eef5f6248f351ff124c"},{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"94122373b5876bac99d743798692c31df9473b12","unresolved":false,"context_lines":[{"line_number":225,"context_line":"        new_container \u003d models.Container(data)"},{"line_number":226,"context_line":"        new_container.project_id \u003d project.id"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"        # import pdb; pdb.set_trace()"},{"line_number":229,"context_line":"        validate_secrets(data, external_project_id, self.secret_repo)"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"        self.container_repo.create_from(new_container)"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_9bd5811d","line":228,"updated":"2015-08-19 20:42:22.000000000","message":"Did you mean to remove this line?","commit_id":"826cd24d9b6d5562828e9eef5f6248f351ff124c"},{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"287e067dc108d8b04d70feb41d9cd98ddd508898","unresolved":false,"context_lines":[{"line_number":52,"context_line":"            # This only partially localizes the error message and"},{"line_number":53,"context_line":"            # doesn\u0027t localize secret_ref.name."},{"line_number":54,"context_line":"            pecan.response.status \u003d 404"},{"line_number":55,"context_line":"            pecan.abort("},{"line_number":56,"context_line":"                404,"},{"line_number":57,"context_line":"                u._(\"Secret provided for \u0027{secret_name}\u0027 doesn\u0027t \""},{"line_number":58,"context_line":"                    \"exist.\").format(secret_name\u003dsecret_ref.get(\u0027name\u0027))"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa1b9901_4667dae8","line":55,"updated":"2015-08-20 16:47:52.000000000","message":"It would be nice to separate this into a separate function, like container_not_found() above.","commit_id":"79f5aebb66019503c591c058e0fa58aaa18a9fb4"},{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"287e067dc108d8b04d70feb41d9cd98ddd508898","unresolved":false,"context_lines":[{"line_number":103,"context_line":"    @controllers.enforce_rbac(\u0027container:put\u0027)"},{"line_number":104,"context_line":"    def on_put(self, external_project_id, **kwargs):"},{"line_number":105,"context_line":"        if self.container.type !\u003d \u0027generic\u0027:"},{"line_number":106,"context_line":"            pecan.abort(409)"},{"line_number":107,"context_line":"        data \u003d api.load_body(pecan.request, validator\u003dself.validator)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        validate_secrets(data, external_project_id, self.secret_repo)"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa1b9901_26e1862d","line":106,"updated":"2015-08-20 16:47:52.000000000","message":"make this into a function call container_not_mutable() and add that function (with a useful comment and message at the top of this file).","commit_id":"79f5aebb66019503c591c058e0fa58aaa18a9fb4"},{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"0ee5cccfaa36fcb9e79eab5ea422d6f2fe237875","unresolved":false,"context_lines":[{"line_number":113,"context_line":"    def on_put(self, external_project_id, **kwargs):"},{"line_number":114,"context_line":"        if self.container.type !\u003d \u0027generic\u0027:"},{"line_number":115,"context_line":"            container_not_mutable()"},{"line_number":116,"context_line":"        data \u003d api.load_body(pecan.request, validator\u003dself.validator)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        validate_secrets(data, external_project_id, self.secret_repo)"},{"line_number":119,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"da20952f_ae3aa196","line":116,"updated":"2015-09-03 13:45:37.000000000","message":"There is some weirdness here.  The validator will require that name and type be valid values for a POST.  But, the code then ignores them when doing the update.\n\nFor example:\n  A request to change the container name: no error and no update.\n  A request to change the container type: no error and no update.","commit_id":"800d70f22ea6a52aecf8b29134ff67118d662dc0"},{"author":{"_account_id":16046,"name":"Fernando Diaz","email":"diazjf@us.ibm.com","username":"diazjf"},"change_message_id":"8d46d0242ae13cab953c76382649bb3c77cd2b5b","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    )"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"def validate_secrets(data, external_project_id, secret_repo):"},{"line_number":57,"context_line":"    # TODO(hgedikli): performance optimizations"},{"line_number":58,"context_line":"    if data.get(\u0027secret_refs\u0027):"},{"line_number":59,"context_line":"        for secret_ref in data.get(\u0027secret_refs\u0027):"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a740942_9886f363","line":56,"updated":"2015-12-07 05:13:59.000000000","message":"Maybe this should be an \"internal use\" method at the bottom of the file starting with \"_\"","commit_id":"3b8616079bc89ca4df0e4f9fa66f6baafeb37e47"},{"author":{"_account_id":16046,"name":"Fernando Diaz","email":"diazjf@us.ibm.com","username":"diazjf"},"change_message_id":"8d46d0242ae13cab953c76382649bb3c77cd2b5b","unresolved":false,"context_lines":[{"line_number":117,"context_line":"    def on_put(self, external_project_id, **kwargs):"},{"line_number":118,"context_line":"        if self.container.type !\u003d \u0027generic\u0027:"},{"line_number":119,"context_line":"            container_not_mutable()"},{"line_number":120,"context_line":"        data \u003d api.load_body(pecan.request, validator\u003dself.validator)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        validate_secrets(data, external_project_id, self.secret_repo)"},{"line_number":123,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"7a740942_988cb336","line":120,"updated":"2015-12-07 05:13:59.000000000","message":"I agree with Dave\u0027s comment in patch number 8. According to the docs, this function\u0027s intent is to only update the secret_refs on a container. \n\nThe documentation also shows that the Request should look like:\n\nPUT /v1/containers/{uuid}\n    Headers:\n        X-Project-Id: {project_id}\n\n    Content:\n    {\n        \"type\": \"generic\",\n        \"name\": \"container name\",\n        \"secret_refs\": [\n            {\n                \"name\": \"private_key\",\n                \"secret_ref\": \"https://{barbican_host}/v1/secrets/{secret_uuid}\"\n            }\n        ]\n    }\n\nSo we should either have a container name, and type as be able to update, or throw an error message.","commit_id":"3b8616079bc89ca4df0e4f9fa66f6baafeb37e47"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"bf855edcc1a33ad5ab23e7dbdebe30638e5d91cc","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    )"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"def _validate_secrets(data, external_project_id, secret_repo):"},{"line_number":57,"context_line":"    # TODO(hgedikli): performance optimizations"},{"line_number":58,"context_line":"    if data.get(\u0027secret_refs\u0027):"},{"line_number":59,"context_line":"        for secret_ref in data.get(\u0027secret_refs\u0027):"}],"source_content_type":"text/x-python","patch_set":26,"id":"7af24918_9b73994d","line":56,"updated":"2016-03-01 15:58:30.000000000","message":"Ugh, this really should be placed into the barbican.common.validators.py module, but since you are just following DRY in this CR, this is fine. We should refactor this via a future CR though.","commit_id":"7a62306d6b1929fff67a5d767e33ae09ab63fda7"}],"barbican/common/utils.py":[{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"94122373b5876bac99d743798692c31df9473b12","unresolved":false,"context_lines":[{"line_number":157,"context_line":""},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"def parse_secret_id(secret_id):"},{"line_number":160,"context_line":"    \"\"\"Parses out secret_id with regex"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    :param secret_id: String secret id taken from json request."},{"line_number":163,"context_line":"    :return: Parsed secret_id"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_5bcfe928","line":160,"updated":"2015-08-19 20:42:22.000000000","message":"Thanks for adding this.  Could you remove \"get_secret_id_from_ref()\" in hrefs.py?  Or move this there, or otherwise combine them.\n\nOne nit with comment: you\u0027re not using regex.","commit_id":"826cd24d9b6d5562828e9eef5f6248f351ff124c"}],"barbican/common/validators.py":[{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"3c88406e118ae17cd019c364b27b9fa017ac4068","unresolved":false,"context_lines":[{"line_number":840,"context_line":"            },"},{"line_number":841,"context_line":"            \"required\": [\"secret_refs\"],"},{"line_number":842,"context_line":"            \"additionalProperties\": False"},{"line_number":843,"context_line":"        }"},{"line_number":844,"context_line":""},{"line_number":845,"context_line":""},{"line_number":846,"context_line":"class NewTransportKeyValidator(ValidatorBase):"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa69d971_a8a349b1","line":843,"updated":"2016-01-05 07:51:36.000000000","message":"why are we not using the same validator (or at least the schema) as the ContainerValidator?","commit_id":"bfdec90c8edc3b674645fbc04e6c43ab518f8be1"},{"author":{"_account_id":19132,"name":"ting wang","email":"bx_wang@outlook.com","username":"binean"},"change_message_id":"a03b4831aefa45383e165efc9a12476ce78d5f46","unresolved":false,"context_lines":[{"line_number":840,"context_line":"            },"},{"line_number":841,"context_line":"            \"required\": [\"secret_refs\"],"},{"line_number":842,"context_line":"            \"additionalProperties\": False"},{"line_number":843,"context_line":"        }"},{"line_number":844,"context_line":""},{"line_number":845,"context_line":""},{"line_number":846,"context_line":"class NewTransportKeyValidator(ValidatorBase):"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa69d971_ae07d1c8","line":843,"in_reply_to":"fa69d971_a8a349b1","updated":"2016-01-05 09:02:33.000000000","message":"According to BP, container name cannot be changed. So I write a new scheme by setting additionalProperties\u003dFalse to prevent users from changing name. Doing here may be a little clearer than adding logical judgement in on_put()","commit_id":"bfdec90c8edc3b674645fbc04e6c43ab518f8be1"},{"author":{"_account_id":16046,"name":"Fernando Diaz","email":"diazjf@us.ibm.com","username":"diazjf"},"change_message_id":"3c3605ee9d166ebc8d5c574c812731c2296ba2d7","unresolved":false,"context_lines":[{"line_number":833,"context_line":"                            \"secret_ref\": {"},{"line_number":834,"context_line":"                                \"type\": \"string\","},{"line_number":835,"context_line":"                                \"minLength\": 1"},{"line_number":836,"context_line":"                            }"},{"line_number":837,"context_line":"                        }"},{"line_number":838,"context_line":"                    }"},{"line_number":839,"context_line":"                }"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa69d971_8bb2e992","line":836,"updated":"2016-01-05 16:37:57.000000000","message":"Since the expected input is:\n\nPUT /v1/containers/{uuid}\n    \n       Headers:\n        X-Auth-Token: \u003ctoken\u003e\n\n    Content:\n    {\n        \"secret_refs\": [\n            {\n                \"name\": \"private_key\",\n                \"secret_ref\": \"https://{barbican_host}/v1/secrets/{secret_uuid}\"\n            }\n        ]\n    }\n\nmake sure name is added to the properties.\n\"name\": {\"type\": [\"string\", \"null\"], \"maxLength\": 255}","commit_id":"5c56920725bc89781b2560f2cba01d9ed4ebe2fc"},{"author":{"_account_id":19132,"name":"ting wang","email":"bx_wang@outlook.com","username":"binean"},"change_message_id":"0dd71683b090bb21543aa4d9895f801a21367610","unresolved":false,"context_lines":[{"line_number":833,"context_line":"                            \"secret_ref\": {"},{"line_number":834,"context_line":"                                \"type\": \"string\","},{"line_number":835,"context_line":"                                \"minLength\": 1"},{"line_number":836,"context_line":"                            }"},{"line_number":837,"context_line":"                        }"},{"line_number":838,"context_line":"                    }"},{"line_number":839,"context_line":"                }"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa69d971_a877979e","line":836,"in_reply_to":"fa69d971_8bb2e992","updated":"2016-01-06 05:52:33.000000000","message":"oh, yes. It\u0027s necessary. I think we\u0027d better add it to POST validation function too.  Thank you :)","commit_id":"5c56920725bc89781b2560f2cba01d9ed4ebe2fc"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"bf855edcc1a33ad5ab23e7dbdebe30638e5d91cc","unresolved":false,"context_lines":[{"line_number":824,"context_line":"        self.schema \u003d {"},{"line_number":825,"context_line":"            \"type\": \"object\","},{"line_number":826,"context_line":"            \"properties\": {"},{"line_number":827,"context_line":"                \"secret_refs\": {"},{"line_number":828,"context_line":"                    \"type\": \"array\","},{"line_number":829,"context_line":"                    \"items\": {"},{"line_number":830,"context_line":"                        \"type\": \"object\","}],"source_content_type":"text/x-python","patch_set":26,"id":"7af24918_5b3c712f","line":827,"updated":"2016-03-01 15:58:30.000000000","message":"We do need to allow the container name to be modified.","commit_id":"7a62306d6b1929fff67a5d767e33ae09ab63fda7"}],"barbican/model/models.py":[{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"fb0475fcfd74cfb50b0cd2eb2b8e4214a4099b49","unresolved":false,"context_lines":[{"line_number":716,"context_line":""},{"line_number":717,"context_line":"    def _do_delete_children(self, session\u003dNone):"},{"line_number":718,"context_line":"        \"\"\"Sub-class hook: delete children relationships.\"\"\""},{"line_number":719,"context_line":"        import barbican.model.repositories"},{"line_number":720,"context_line":"        session \u003d session or barbican.model.repositories.get_session()"},{"line_number":721,"context_line":"        for container_secret in self.container_secrets:"},{"line_number":722,"context_line":"            session.delete(container_secret)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a50d1a3_166e8596","line":719,"updated":"2015-07-30 18:07:02.000000000","message":"imports such as this one are not allowed by our pep8 rules. Please move this to the beginning of the file with the rest of the imports.","commit_id":"bb08775b3813a3e901a0ff430fb1b4e622cdab89"},{"author":{"_account_id":11661,"name":"Kevin Bishop","email":"ktb2012@att.net","username":"kbishop711"},"change_message_id":"9f23ca3239977f299e28e8fd92dfa8811dff493b","unresolved":false,"context_lines":[{"line_number":716,"context_line":""},{"line_number":717,"context_line":"    def _do_delete_children(self, session\u003dNone):"},{"line_number":718,"context_line":"        \"\"\"Sub-class hook: delete children relationships.\"\"\""},{"line_number":719,"context_line":"        import barbican.model.repositories"},{"line_number":720,"context_line":"        session \u003d session or barbican.model.repositories.get_session()"},{"line_number":721,"context_line":"        for container_secret in self.container_secrets:"},{"line_number":722,"context_line":"            session.delete(container_secret)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a50d1a3_75ac9c35","line":719,"in_reply_to":"3a50d1a3_166e8596","updated":"2015-07-30 20:04:52.000000000","message":"This is actually to prevent a circular dependency. The first instance of this import in the file has a comment for it.","commit_id":"bb08775b3813a3e901a0ff430fb1b4e622cdab89"},{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"0ee5cccfaa36fcb9e79eab5ea422d6f2fe237875","unresolved":false,"context_lines":[{"line_number":702,"context_line":"    def update(self, parsed_request):"},{"line_number":703,"context_line":"        secret_refs \u003d parsed_request.get(\u0027secret_refs\u0027)"},{"line_number":704,"context_line":"        if secret_refs:"},{"line_number":705,"context_line":"            self._do_delete_children()"},{"line_number":706,"context_line":"            for secret_ref in secret_refs:"},{"line_number":707,"context_line":"                container_secret \u003d ContainerSecret()"},{"line_number":708,"context_line":"                container_secret.name \u003d secret_ref.get(\u0027name\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"da20952f_e2df6138","line":705,"updated":"2015-09-03 13:45:37.000000000","message":"This will delete the container acls and container secrets.  We should only delete container secrets in this case.","commit_id":"800d70f22ea6a52aecf8b29134ff67118d662dc0"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"3c88406e118ae17cd019c364b27b9fa017ac4068","unresolved":false,"context_lines":[{"line_number":708,"context_line":""},{"line_number":709,"context_line":"        if secret_refs:"},{"line_number":710,"context_line":""},{"line_number":711,"context_line":"            import barbican.model.repositories"},{"line_number":712,"context_line":"            session \u003d barbican.model.repositories.get_session()"},{"line_number":713,"context_line":""},{"line_number":714,"context_line":"            for container_secret in self.container_secrets:"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa69d971_48f88d7b","line":711,"updated":"2016-01-05 07:51:36.000000000","message":"Would prefer this import to be moved up with the rest of them, so it\u0027s easy to keep track of for the reader.","commit_id":"bfdec90c8edc3b674645fbc04e6c43ab518f8be1"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"32a17bdd83c919498413f60a199c618488d0980b","unresolved":false,"context_lines":[{"line_number":708,"context_line":""},{"line_number":709,"context_line":"        if secret_refs:"},{"line_number":710,"context_line":""},{"line_number":711,"context_line":"            import barbican.model.repositories"},{"line_number":712,"context_line":"            session \u003d barbican.model.repositories.get_session()"},{"line_number":713,"context_line":""},{"line_number":714,"context_line":"            for container_secret in self.container_secrets:"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa69d971_cef56557","line":711,"in_reply_to":"fa69d971_48f88d7b","updated":"2016-01-05 09:01:21.000000000","message":"Just noticed this is already being done in other parts of the code-base. So then nevermind, lets leave this as is.","commit_id":"bfdec90c8edc3b674645fbc04e6c43ab518f8be1"},{"author":{"_account_id":19132,"name":"ting wang","email":"bx_wang@outlook.com","username":"binean"},"change_message_id":"a03b4831aefa45383e165efc9a12476ce78d5f46","unresolved":false,"context_lines":[{"line_number":708,"context_line":""},{"line_number":709,"context_line":"        if secret_refs:"},{"line_number":710,"context_line":""},{"line_number":711,"context_line":"            import barbican.model.repositories"},{"line_number":712,"context_line":"            session \u003d barbican.model.repositories.get_session()"},{"line_number":713,"context_line":""},{"line_number":714,"context_line":"            for container_secret in self.container_secrets:"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa69d971_8e5d2d7b","line":711,"in_reply_to":"fa69d971_48f88d7b","updated":"2016-01-05 09:02:33.000000000","message":"The same import expression appears 4 times in models.py. And keep it here may be better?","commit_id":"bfdec90c8edc3b674645fbc04e6c43ab518f8be1"},{"author":{"_account_id":16046,"name":"Fernando Diaz","email":"diazjf@us.ibm.com","username":"diazjf"},"change_message_id":"0fed6d176b7b9fdd9cc4f1bf4be1db01949f03b6","unresolved":false,"context_lines":[{"line_number":715,"context_line":"                if container_secret.secret_id not in secret_refs:"},{"line_number":716,"context_line":"                    session.delete(container_secret)"},{"line_number":717,"context_line":"                else:"},{"line_number":718,"context_line":"                    del secret_refs[container_secret.secret_id]"},{"line_number":719,"context_line":""},{"line_number":720,"context_line":"            for secret_ref, secret_name in secret_refs.iteritems():"},{"line_number":721,"context_line":"                container_secret \u003d ContainerSecret()"}],"source_content_type":"text/x-python","patch_set":19,"id":"da6ed579_f05496ca","line":718,"updated":"2016-01-14 21:27:35.000000000","message":"No test case which covers this condition.","commit_id":"c723f57bf54383b604399b824d2cc2f05ed07d2f"}],"barbican/tests/api/controllers/test_containers.py":[{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"bf855edcc1a33ad5ab23e7dbdebe30638e5d91cc","unresolved":false,"context_lines":[{"line_number":292,"context_line":"            container_id\u003dcontainer_uuid"},{"line_number":293,"context_line":"        ))"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"        secret_refs \u003d resp.json.get(\u0027secret_refs\u0027)"},{"line_number":296,"context_line":"        self.assertEqual(secret_refs, new_secret_refs)"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"    def test_should_delete_container(self):"}],"source_content_type":"text/x-python","patch_set":26,"id":"7af24918_e19f8ab2","line":295,"updated":"2016-03-01 15:58:30.000000000","message":"It\u0027s a bit confusing that you are re-using the secret_refs var from up above here (I was confused why the original secret refs were the same as the revised ones). I\u0027d suggest a different name here, like resp_secret_refs or some such.","commit_id":"7a62306d6b1929fff67a5d767e33ae09ab63fda7"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"bf855edcc1a33ad5ab23e7dbdebe30638e5d91cc","unresolved":false,"context_lines":[{"line_number":293,"context_line":"        ))"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"        secret_refs \u003d resp.json.get(\u0027secret_refs\u0027)"},{"line_number":296,"context_line":"        self.assertEqual(secret_refs, new_secret_refs)"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"    def test_should_delete_container(self):"},{"line_number":299,"context_line":"        resp, container_uuid \u003d create_container("}],"source_content_type":"text/x-python","patch_set":26,"id":"7af24918_c1b9ae30","line":296,"updated":"2016-03-01 15:58:30.000000000","message":"Please swap the args here...the expected values should be on the left.","commit_id":"7a62306d6b1929fff67a5d767e33ae09ab63fda7"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"bf855edcc1a33ad5ab23e7dbdebe30638e5d91cc","unresolved":false,"context_lines":[{"line_number":361,"context_line":"            container_id\u003dcontainer_uuid"},{"line_number":362,"context_line":"        ))"},{"line_number":363,"context_line":"        refs \u003d resp.json.get(\u0027secret_refs\u0027)"},{"line_number":364,"context_line":"        self.assertEqual(refs, secret_refs)"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"    def test_should_throw_exception_for_delete_when_container_not_found(self):"},{"line_number":367,"context_line":"        resp \u003d self.app.delete(\u0027/containers/bad_id/\u0027, expect_errors\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":26,"id":"7af24918_a1e4623b","line":364,"updated":"2016-03-01 15:58:30.000000000","message":"Please swap args.","commit_id":"7a62306d6b1929fff67a5d767e33ae09ab63fda7"}],"doc/source/api/quickstart/containers.rst":[{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"fb0475fcfd74cfb50b0cd2eb2b8e4214a4099b49","unresolved":false,"context_lines":[{"line_number":312,"context_line":"How to Edit a Container"},{"line_number":313,"context_line":"#######################"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"This is only supported for generic type containers. The container\u0027s secret refs will be replaced with "},{"line_number":316,"context_line":"the newly provided secret refs."},{"line_number":317,"context_line":""},{"line_number":318,"context_line":".. code-block:: bash"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3a50d1a3_16e3e506","line":315,"updated":"2015-07-30 18:07:02.000000000","message":"watch out","commit_id":"bb08775b3813a3e901a0ff430fb1b4e622cdab89"},{"author":{"_account_id":11661,"name":"Kevin Bishop","email":"ktb2012@att.net","username":"kbishop711"},"change_message_id":"9f23ca3239977f299e28e8fd92dfa8811dff493b","unresolved":false,"context_lines":[{"line_number":312,"context_line":"How to Edit a Container"},{"line_number":313,"context_line":"#######################"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"This is only supported for generic type containers. The container\u0027s secret refs will be replaced with "},{"line_number":316,"context_line":"the newly provided secret refs."},{"line_number":317,"context_line":""},{"line_number":318,"context_line":".. code-block:: bash"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3a50d1a3_956b68f1","line":315,"in_reply_to":"3a50d1a3_16e3e506","updated":"2015-07-30 20:04:52.000000000","message":"Woops!","commit_id":"bb08775b3813a3e901a0ff430fb1b4e622cdab89"},{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"287e067dc108d8b04d70feb41d9cd98ddd508898","unresolved":false,"context_lines":[{"line_number":332,"context_line":""},{"line_number":333,"context_line":".. code-block:: bash"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"    {\"container_ref\": \"http://localhost:9311/v1/containers/0fecaec4-7cd7-4e70-a760-cc7eaf5c3afb\"}"},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"This reference should be the same as the one provided in the request."},{"line_number":338,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"fa1b9901_3be68315","line":335,"updated":"2015-08-20 16:47:52.000000000","message":"response should be 204 No Content","commit_id":"79f5aebb66019503c591c058e0fa58aaa18a9fb4"},{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"0ee5cccfaa36fcb9e79eab5ea422d6f2fe237875","unresolved":false,"context_lines":[{"line_number":334,"context_line":""},{"line_number":335,"context_line":"    204 No Content"},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"This reference should be the same as the one provided in the request."},{"line_number":338,"context_line":""},{"line_number":339,"context_line":""},{"line_number":340,"context_line":".. _delete_container:"}],"source_content_type":"text/x-rst","patch_set":8,"id":"da20952f_ab3a9396","line":337,"updated":"2015-09-03 13:45:37.000000000","message":"There is no reference returned now.","commit_id":"800d70f22ea6a52aecf8b29134ff67118d662dc0"}],"doc/source/api/reference/containers.rst":[{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"94122373b5876bac99d743798692c31df9473b12","unresolved":false,"context_lines":[{"line_number":301,"context_line":"+------+-----------------------------------------------------------------------------+"},{"line_number":302,"context_line":"| 404  | Invalid provided secret refs                                                |"},{"line_number":303,"context_line":"+------+-----------------------------------------------------------------------------+"},{"line_number":304,"context_line":"| 405  | Not a generic container or token doesn\u0027t have permissions to this resource  |"},{"line_number":305,"context_line":"+------+-----------------------------------------------------------------------------+"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"fa1b9901_7bb98d78","line":304,"updated":"2015-08-19 20:42:22.000000000","message":"Change to 409 when you update the code.","commit_id":"826cd24d9b6d5562828e9eef5f6248f351ff124c"},{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"287e067dc108d8b04d70feb41d9cd98ddd508898","unresolved":false,"context_lines":[{"line_number":283,"context_line":""},{"line_number":284,"context_line":"Response:"},{"line_number":285,"context_line":"*********"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":".. code-block:: json"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"    {"}],"source_content_type":"text/x-rst","patch_set":6,"id":"fa1b9901_5baa5786","line":286,"updated":"2015-08-20 16:47:52.000000000","message":"Response has no content.","commit_id":"79f5aebb66019503c591c058e0fa58aaa18a9fb4"},{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"287e067dc108d8b04d70feb41d9cd98ddd508898","unresolved":false,"context_lines":[{"line_number":297,"context_line":"+------+-----------------------------------------------------------------------------+"},{"line_number":298,"context_line":"| Code | Description                                                                 |"},{"line_number":299,"context_line":"+\u003d\u003d\u003d\u003d\u003d\u003d+\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d+"},{"line_number":300,"context_line":"| 201  | Successful editing of the container                                         |"},{"line_number":301,"context_line":"+------+-----------------------------------------------------------------------------+"},{"line_number":302,"context_line":"| 404  | Invalid provided secret refs                                                |"},{"line_number":303,"context_line":"+------+-----------------------------------------------------------------------------+"}],"source_content_type":"text/x-rst","patch_set":6,"id":"fa1b9901_3b944341","line":300,"updated":"2015-08-20 16:47:52.000000000","message":"204 is the successful response","commit_id":"79f5aebb66019503c591c058e0fa58aaa18a9fb4"},{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"287e067dc108d8b04d70feb41d9cd98ddd508898","unresolved":false,"context_lines":[{"line_number":301,"context_line":"+------+-----------------------------------------------------------------------------+"},{"line_number":302,"context_line":"| 404  | Invalid provided secret refs                                                |"},{"line_number":303,"context_line":"+------+-----------------------------------------------------------------------------+"},{"line_number":304,"context_line":"| 409  | Not a generic container or token doesn\u0027t have permissions to this resource  |"},{"line_number":305,"context_line":"+------+-----------------------------------------------------------------------------+"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"fa1b9901_9b154f9d","line":304,"updated":"2015-08-20 16:47:52.000000000","message":"No permissions is 403.","commit_id":"79f5aebb66019503c591c058e0fa58aaa18a9fb4"},{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"0ee5cccfaa36fcb9e79eab5ea422d6f2fe237875","unresolved":false,"context_lines":[{"line_number":295,"context_line":"| Code | Description                                                                 |"},{"line_number":296,"context_line":"+\u003d\u003d\u003d\u003d\u003d\u003d+\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d+"},{"line_number":297,"context_line":"| 204  | Successful editing of the container                                         |"},{"line_number":298,"context_line":"+------+-----------------------------------------------------------------------------+"},{"line_number":299,"context_line":"| 403  | No permission to edit the container"},{"line_number":300,"context_line":"+------+-----------------------------------------------------------------------------+"},{"line_number":301,"context_line":"| 404  | Invalid provided secret refs                                                |"}],"source_content_type":"text/x-rst","patch_set":8,"id":"da20952f_eb672bb5","line":298,"updated":"2015-09-03 13:45:37.000000000","message":"401 for authentication error too.","commit_id":"800d70f22ea6a52aecf8b29134ff67118d662dc0"},{"author":{"_account_id":16046,"name":"Fernando Diaz","email":"diazjf@us.ibm.com","username":"diazjf"},"change_message_id":"8d46d0242ae13cab953c76382649bb3c77cd2b5b","unresolved":false,"context_lines":[{"line_number":246,"context_line":"PUT /v1/containers/{uuid}"},{"line_number":247,"context_line":"#########################"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"Modify a container\u0027s secret refs."},{"line_number":250,"context_line":"This is only available for generic container types."},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"Request Attributes"}],"source_content_type":"text/x-rst","patch_set":11,"id":"7a740942_38e81fb4","line":249,"updated":"2015-12-07 05:13:59.000000000","message":"We should allow modification of names, and types. If not we should not the request below should be modified","commit_id":"3b8616079bc89ca4df0e4f9fa66f6baafeb37e47"},{"author":{"_account_id":14926,"name":"Jeff Feng","email":"jianhua@us.ibm.com","username":"jhfeng"},"change_message_id":"b16a8534a07eb10db57e8f1065174acf06c07fef","unresolved":false,"context_lines":[{"line_number":247,"context_line":"#########################"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"Modify a container\u0027s secret refs."},{"line_number":250,"context_line":"This is only available for generic container types."},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"Request Attributes"},{"line_number":253,"context_line":"******************"}],"source_content_type":"text/x-rst","patch_set":11,"id":"7a740942_b80700c9","line":250,"updated":"2015-12-07 21:39:22.000000000","message":"if this is for \u0027generic\u0027 container only, then type is not modifiable.","commit_id":"3b8616079bc89ca4df0e4f9fa66f6baafeb37e47"},{"author":{"_account_id":10281,"name":"Priti Desai","email":"pdesai@us.ibm.com","username":"priti_desai"},"change_message_id":"95ff8ab22bab90212ed7d9731a589cdd339c05d1","unresolved":false,"context_lines":[{"line_number":266,"context_line":""},{"line_number":267,"context_line":"    PUT /v1/containers/{uuid}"},{"line_number":268,"context_line":"    Headers:"},{"line_number":269,"context_line":"        X-Project-Id: {project_id}"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"    Content:"},{"line_number":272,"context_line":"    {"}],"source_content_type":"text/x-rst","patch_set":16,"id":"fa69d971_bbbe9ffd","line":269,"range":{"start_line":269,"start_character":0,"end_line":269,"end_character":34},"updated":"2015-12-30 18:41:29.000000000","message":"Please replace X-Project-Id with X-Auth-Token. Refer to http://docs.openstack.org/developer/barbican/api/reference/containers.html#request for sample API.","commit_id":"d0ea292f1c14341242d4d755b867932c64e1e137"},{"author":{"_account_id":15274,"name":"Christopher Solis","email":"cnsolis@us.ibm.com","username":"cplusone"},"change_message_id":"475f3abb2a34325f03d3a45bb8d8ebdb34c7e902","unresolved":false,"context_lines":[{"line_number":298,"context_line":"+------+-----------------------------------------------------------------------------+"},{"line_number":299,"context_line":"| 403  | No Permission to edit the container                                         |"},{"line_number":300,"context_line":"+------+-----------------------------------------------------------------------------+"},{"line_number":301,"context_line":"| 404  | Container not found or unavailable                                          |"},{"line_number":302,"context_line":"+------+-----------------------------------------------------------------------------+"},{"line_number":303,"context_line":"| 409  | Not a generic container                                                     |"},{"line_number":304,"context_line":"+------+-----------------------------------------------------------------------------+"}],"source_content_type":"text/x-rst","patch_set":19,"id":"da6ed579_554a3427","line":301,"updated":"2016-01-14 21:45:26.000000000","message":"404 also occurs when a secret_ref is not found or available. Could you add that also?","commit_id":"c723f57bf54383b604399b824d2cc2f05ed07d2f"},{"author":{"_account_id":19132,"name":"ting wang","email":"bx_wang@outlook.com","username":"binean"},"change_message_id":"e7536b20c28f4aebe0f701bc7da168b165ea2d54","unresolved":false,"context_lines":[{"line_number":298,"context_line":"+------+-----------------------------------------------------------------------------+"},{"line_number":299,"context_line":"| 403  | No Permission to edit the container                                         |"},{"line_number":300,"context_line":"+------+-----------------------------------------------------------------------------+"},{"line_number":301,"context_line":"| 404  | Container not found or unavailable                                          |"},{"line_number":302,"context_line":"+------+-----------------------------------------------------------------------------+"},{"line_number":303,"context_line":"| 409  | Not a generic container                                                     |"},{"line_number":304,"context_line":"+------+-----------------------------------------------------------------------------+"}],"source_content_type":"text/x-rst","patch_set":19,"id":"da6ed579_3543f26d","line":301,"in_reply_to":"da6ed579_554a3427","updated":"2016-01-15 04:46:43.000000000","message":"I\u0027ll fix it.","commit_id":"c723f57bf54383b604399b824d2cc2f05ed07d2f"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"bf855edcc1a33ad5ab23e7dbdebe30638e5d91cc","unresolved":false,"context_lines":[{"line_number":248,"context_line":""},{"line_number":249,"context_line":"Modify a container\u0027s secret refs."},{"line_number":250,"context_line":"This is only available for generic container types and only secret refs are allowed"},{"line_number":251,"context_line":"to be changed."},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"Request Attributes"},{"line_number":254,"context_line":"******************"}],"source_content_type":"text/x-rst","patch_set":26,"id":"7af24918_a152a2db","line":251,"updated":"2016-03-01 15:58:30.000000000","message":"The container name should be mutable as well.","commit_id":"7a62306d6b1929fff67a5d767e33ae09ab63fda7"}],"doc/source/api/userguide/containers.rst":[{"author":{"_account_id":16046,"name":"Fernando Diaz","email":"diazjf@us.ibm.com","username":"diazjf"},"change_message_id":"8d46d0242ae13cab953c76382649bb3c77cd2b5b","unresolved":false,"context_lines":[{"line_number":1,"context_line":"****************************"},{"line_number":2,"context_line":"Containers API - User Guide"},{"line_number":3,"context_line":"****************************"},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"The containers resource is the organizational center piece of Barbican. It"},{"line_number":6,"context_line":"creates a logical object that can be used to hold secret references. This is helpful"}],"source_content_type":"text/x-rst","patch_set":11,"id":"7a740942_9ecd945f","line":3,"updated":"2015-12-07 05:13:59.000000000","message":"Make these * align with text","commit_id":"3b8616079bc89ca4df0e4f9fa66f6baafeb37e47"},{"author":{"_account_id":16046,"name":"Fernando Diaz","email":"diazjf@us.ibm.com","username":"diazjf"},"change_message_id":"8d46d0242ae13cab953c76382649bb3c77cd2b5b","unresolved":false,"context_lines":[{"line_number":308,"context_line":"This is the metadata as well as the list of secret references that are stored within the container."},{"line_number":309,"context_line":""},{"line_number":310,"context_line":".. _edit_container:"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"How to Edit a Container"},{"line_number":313,"context_line":"#######################"},{"line_number":314,"context_line":""}],"source_content_type":"text/x-rst","patch_set":11,"id":"7a740942_982fd3f5","line":311,"updated":"2015-12-07 05:13:59.000000000","message":"Read my comments in doc/source/api/reference/containers.rst","commit_id":"3b8616079bc89ca4df0e4f9fa66f6baafeb37e47"},{"author":{"_account_id":14926,"name":"Jeff Feng","email":"jianhua@us.ibm.com","username":"jhfeng"},"change_message_id":"b16a8534a07eb10db57e8f1065174acf06c07fef","unresolved":false,"context_lines":[{"line_number":314,"context_line":""},{"line_number":315,"context_line":"This is only supported for generic type containers. The container\u0027s secret"},{"line_number":316,"context_line":"refs will be replaced with the newly provided secret refs. To delete a container"},{"line_number":317,"context_line":"we must have a container reference."},{"line_number":318,"context_line":""},{"line_number":319,"context_line":".. code-block:: bash"},{"line_number":320,"context_line":""}],"source_content_type":"text/x-rst","patch_set":11,"id":"7a740942_9838043f","line":317,"updated":"2015-12-07 21:39:22.000000000","message":"so there is no support to ADD or DELETE secret refs in an existing container ?","commit_id":"3b8616079bc89ca4df0e4f9fa66f6baafeb37e47"},{"author":{"_account_id":19132,"name":"ting wang","email":"bx_wang@outlook.com","username":"binean"},"change_message_id":"15c8bacb7865eef415ed469554f41f027cbfe732","unresolved":false,"context_lines":[{"line_number":314,"context_line":""},{"line_number":315,"context_line":"This is only supported for generic type containers. The container\u0027s secret"},{"line_number":316,"context_line":"refs will be replaced with the newly provided secret refs. To delete a container"},{"line_number":317,"context_line":"we must have a container reference."},{"line_number":318,"context_line":""},{"line_number":319,"context_line":".. code-block:: bash"},{"line_number":320,"context_line":""}],"source_content_type":"text/x-rst","patch_set":11,"id":"7a740942_249e5807","line":317,"in_reply_to":"7a740942_9838043f","updated":"2015-12-09 05:15:20.000000000","message":"No support. The all secrets refs will be replaced.","commit_id":"3b8616079bc89ca4df0e4f9fa66f6baafeb37e47"},{"author":{"_account_id":16046,"name":"Fernando Diaz","email":"diazjf@us.ibm.com","username":"diazjf"},"change_message_id":"8d46d0242ae13cab953c76382649bb3c77cd2b5b","unresolved":false,"context_lines":[{"line_number":318,"context_line":""},{"line_number":319,"context_line":".. code-block:: bash"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"    curl -X POST -H \u0027X-Project-Id:12345\u0027 -H \u0027Content-Type:application/json\u0027 -d \u0027{"},{"line_number":322,"context_line":"        \"type\": \"generic\","},{"line_number":323,"context_line":"        \"name\": \"generic name\","},{"line_number":324,"context_line":"        \"secret_refs\": ["}],"source_content_type":"text/x-rst","patch_set":11,"id":"7a740942_fe04d87e","line":321,"updated":"2015-12-07 05:13:59.000000000","message":"This should be PUT, not POST.","commit_id":"3b8616079bc89ca4df0e4f9fa66f6baafeb37e47"},{"author":{"_account_id":15274,"name":"Christopher Solis","email":"cnsolis@us.ibm.com","username":"cplusone"},"change_message_id":"475f3abb2a34325f03d3a45bb8d8ebdb34c7e902","unresolved":false,"context_lines":[{"line_number":333,"context_line":""},{"line_number":334,"context_line":"This provides the following response:"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":".. code-block::bash"},{"line_number":337,"context_line":""},{"line_number":338,"context_line":"    204 No Content"},{"line_number":339,"context_line":""}],"source_content_type":"text/x-rst","patch_set":19,"id":"da6ed579_f5bd6802","line":336,"updated":"2016-01-14 21:45:26.000000000","message":"Response code isn\u0027t showing in actual doc html page. \n\nNeed a space after two semicolons:\n\n  .. code-block:: bash","commit_id":"c723f57bf54383b604399b824d2cc2f05ed07d2f"},{"author":{"_account_id":19132,"name":"ting wang","email":"bx_wang@outlook.com","username":"binean"},"change_message_id":"e7536b20c28f4aebe0f701bc7da168b165ea2d54","unresolved":false,"context_lines":[{"line_number":333,"context_line":""},{"line_number":334,"context_line":"This provides the following response:"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":".. code-block::bash"},{"line_number":337,"context_line":""},{"line_number":338,"context_line":"    204 No Content"},{"line_number":339,"context_line":""}],"source_content_type":"text/x-rst","patch_set":19,"id":"da6ed579_1576eed6","line":336,"in_reply_to":"da6ed579_f5bd6802","updated":"2016-01-15 04:46:43.000000000","message":"good catch. Thanks.","commit_id":"c723f57bf54383b604399b824d2cc2f05ed07d2f"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"bf855edcc1a33ad5ab23e7dbdebe30638e5d91cc","unresolved":false,"context_lines":[{"line_number":314,"context_line":""},{"line_number":315,"context_line":"This is only supported for generic type containers. The container\u0027s secret"},{"line_number":316,"context_line":"refs will be replaced with the newly provided secret refs. Only secret refs are allowed"},{"line_number":317,"context_line":"to be changed."},{"line_number":318,"context_line":""},{"line_number":319,"context_line":".. code-block:: bash"},{"line_number":320,"context_line":""}],"source_content_type":"text/x-rst","patch_set":26,"id":"7af24918_61f6dad8","line":317,"updated":"2016-03-01 15:58:30.000000000","message":"The name can be changed as well.","commit_id":"7a62306d6b1929fff67a5d767e33ae09ab63fda7"}],"functionaltests/api/v1/behaviors/container_behaviors.py":[{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"94122373b5876bac99d743798692c31df9473b12","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        )"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        returned_data \u003d self.get_json(resp)"},{"line_number":137,"context_line":"        container_ref \u003d returned_data.get(\u0027container_ref\u0027)"},{"line_number":138,"context_line":"        return resp, container_ref"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_db7f79a9","line":137,"updated":"2015-08-19 20:42:22.000000000","message":"update if you change code so PUT returns 204.","commit_id":"826cd24d9b6d5562828e9eef5f6248f351ff124c"}],"functionaltests/api/v1/functional/test_containers.py":[{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"94122373b5876bac99d743798692c31df9473b12","unresolved":false,"context_lines":[{"line_number":227,"context_line":"                                                              new_secret_refs)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"        get_resp \u003d self.behaviors.get_container(container_ref)"},{"line_number":230,"context_line":"        self.assertEqual(get_resp.status_code, 200)"},{"line_number":231,"context_line":"        self.assertEqual(get_resp.model.secret_refs[0].secret_ref,"},{"line_number":232,"context_line":"                         secret_ref_4)"},{"line_number":233,"context_line":"        self.assertEqual(get_resp.model.secret_refs[1].secret_ref,"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_bb516538","line":230,"updated":"2015-08-19 20:42:22.000000000","message":"update if you change code to return 204.","commit_id":"826cd24d9b6d5562828e9eef5f6248f351ff124c"},{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"94122373b5876bac99d743798692c31df9473b12","unresolved":false,"context_lines":[{"line_number":362,"context_line":""},{"line_number":363,"context_line":"        resp, container_ref \u003d self.behaviors.create_container(test_model)"},{"line_number":364,"context_line":"        resp, container_ref \u003d self.behaviors.update_container(container_ref)"},{"line_number":365,"context_line":"        self.assertEqual(resp.status_code, 405)"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":""},{"line_number":368,"context_line":"class ContainersPagingTestCase(base.PagingTestCase):"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_7b474d77","line":365,"updated":"2015-08-19 20:42:22.000000000","message":"update if you change code to return 409.","commit_id":"826cd24d9b6d5562828e9eef5f6248f351ff124c"},{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"287e067dc108d8b04d70feb41d9cd98ddd508898","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        new_secret_refs.secret_refs[1][\u0027secret_ref\u0027] \u003d secret_ref_5"},{"line_number":224,"context_line":"        new_secret_refs.secret_refs[2][\u0027secret_ref\u0027] \u003d secret_ref_6"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"        self.behaviors.update_container(container_ref, new_secret_refs)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"        get_resp \u003d self.behaviors.get_container(container_ref)"},{"line_number":229,"context_line":"        self.assertEqual(get_resp.status_code, 200)"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa1b9901_26174649","line":226,"updated":"2015-08-20 16:47:52.000000000","message":"check response 204 here.","commit_id":"79f5aebb66019503c591c058e0fa58aaa18a9fb4"},{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"287e067dc108d8b04d70feb41d9cd98ddd508898","unresolved":false,"context_lines":[{"line_number":361,"context_line":""},{"line_number":362,"context_line":"        resp, container_ref \u003d self.behaviors.create_container(test_model)"},{"line_number":363,"context_line":"        resp, container_ref \u003d self.behaviors.update_container(container_ref)"},{"line_number":364,"context_line":"        self.assertEqual(resp.status_code, 405)"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"class ContainersPagingTestCase(base.PagingTestCase):"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa1b9901_fbdfabd3","line":364,"updated":"2015-08-20 16:47:52.000000000","message":"should be 409","commit_id":"79f5aebb66019503c591c058e0fa58aaa18a9fb4"},{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"0ee5cccfaa36fcb9e79eab5ea422d6f2fe237875","unresolved":false,"context_lines":[{"line_number":231,"context_line":"        self.assertEqual(get_resp.status_code, 200)"},{"line_number":232,"context_line":"        self.assertEqual(get_resp.model.secret_refs[0].secret_ref,"},{"line_number":233,"context_line":"                         secret_ref_4)"},{"line_number":234,"context_line":"        self.assertEqual(get_resp.model.secret_refs[1].secret_ref,"},{"line_number":235,"context_line":"                         secret_ref_5)"},{"line_number":236,"context_line":"        self.assertEqual(get_resp.model.secret_refs[2].secret_ref,"},{"line_number":237,"context_line":"                         secret_ref_6)"}],"source_content_type":"text/x-python","patch_set":8,"id":"da20952f_223479f9","line":234,"updated":"2015-09-03 13:45:37.000000000","message":"Python and SQL don\u0027t guarantee the list order.\nThese asserts need to be done without an index.","commit_id":"800d70f22ea6a52aecf8b29134ff67118d662dc0"},{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"0ee5cccfaa36fcb9e79eab5ea422d6f2fe237875","unresolved":false,"context_lines":[{"line_number":358,"context_line":""},{"line_number":359,"context_line":"    @testcase.attr(\u0027negative\u0027)"},{"line_number":360,"context_line":"    def test_put_non_generic_container(self):"},{"line_number":361,"context_line":"        \"\"\"A get on a non-generic container should return 405.\"\"\""},{"line_number":362,"context_line":"        test_model \u003d container_models.ContainerModel(**self.default_data)"},{"line_number":363,"context_line":""},{"line_number":364,"context_line":"        resp, container_ref \u003d self.behaviors.create_container(test_model)"}],"source_content_type":"text/x-python","patch_set":8,"id":"da20952f_e29be164","line":361,"updated":"2015-09-03 13:45:37.000000000","message":"409","commit_id":"800d70f22ea6a52aecf8b29134ff67118d662dc0"},{"author":{"_account_id":16046,"name":"Fernando Diaz","email":"diazjf@us.ibm.com","username":"diazjf"},"change_message_id":"8d46d0242ae13cab953c76382649bb3c77cd2b5b","unresolved":false,"context_lines":[{"line_number":353,"context_line":"        regex \u003d \u0027.*{0}.*\u0027.format(malicious_hostname)"},{"line_number":354,"context_line":"        self.assertNotRegexpMatches(resp.headers[\u0027location\u0027], regex)"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"    @testcase.attr(\u0027negtive\u0027)"},{"line_number":357,"context_line":"    def test_put_non_generic_container(self):"},{"line_number":358,"context_line":"        \"\"\"A get on a non-generic container should return 409.\"\"\""},{"line_number":359,"context_line":"        test_model \u003d container_models.ContainerModel(**self.default_data)"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a740942_feddb814","line":356,"updated":"2015-12-07 05:13:59.000000000","message":"miss-spelling, \"negtive\" should be \"negative\".","commit_id":"3b8616079bc89ca4df0e4f9fa66f6baafeb37e47"},{"author":{"_account_id":15274,"name":"Christopher Solis","email":"cnsolis@us.ibm.com","username":"cplusone"},"change_message_id":"475f3abb2a34325f03d3a45bb8d8ebdb34c7e902","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        new_secret_refs.secret_refs[2][\u0027secret_ref\u0027] \u003d secret_ref_6"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"        resp \u003d self.behaviors.update_container(container_ref, new_secret_refs)"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"        self.assertEqual(resp.status_code, 400)"},{"line_number":228,"context_line":"        new_secret_refs.name \u003d None"},{"line_number":229,"context_line":"        new_secret_refs.type \u003d None"}],"source_content_type":"text/x-python","patch_set":19,"id":"da6ed579_1bfe2bae","line":226,"updated":"2016-01-14 21:45:26.000000000","message":"It would be nice to have a little explanation here of what\u0027s happening. I don\u0027t really understand why changing the two new_secret_refs attributes allows the container to be updated but before it returns a 400. Maybe these are two separate tests?","commit_id":"c723f57bf54383b604399b824d2cc2f05ed07d2f"},{"author":{"_account_id":19132,"name":"ting wang","email":"bx_wang@outlook.com","username":"binean"},"change_message_id":"49fe55d86674ab0eb589eb6c4fa50c16a641ec19","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        new_secret_refs.secret_refs[2][\u0027secret_ref\u0027] \u003d secret_ref_6"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"        resp \u003d self.behaviors.update_container(container_ref, new_secret_refs)"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"        self.assertEqual(resp.status_code, 400)"},{"line_number":228,"context_line":"        new_secret_refs.name \u003d None"},{"line_number":229,"context_line":"        new_secret_refs.type \u003d None"}],"source_content_type":"text/x-python","patch_set":19,"id":"da6ed579_f87f8f12","line":226,"in_reply_to":"da6ed579_1bfe2bae","updated":"2016-01-15 05:08:09.000000000","message":"The reason I do this is that PUT don\u0027t allow user to change the name and the type of the container they designated. If user change them, 404 will be returned.","commit_id":"c723f57bf54383b604399b824d2cc2f05ed07d2f"},{"author":{"_account_id":19132,"name":"ting wang","email":"bx_wang@outlook.com","username":"binean"},"change_message_id":"e7536b20c28f4aebe0f701bc7da168b165ea2d54","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        new_secret_refs.secret_refs[2][\u0027secret_ref\u0027] \u003d secret_ref_6"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"        resp \u003d self.behaviors.update_container(container_ref, new_secret_refs)"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"        self.assertEqual(resp.status_code, 400)"},{"line_number":228,"context_line":"        new_secret_refs.name \u003d None"},{"line_number":229,"context_line":"        new_secret_refs.type \u003d None"}],"source_content_type":"text/x-python","patch_set":19,"id":"da6ed579_556f86fb","line":226,"in_reply_to":"da6ed579_1bfe2bae","updated":"2016-01-15 04:46:43.000000000","message":"yes. I can write another test case which not only meet this but also meet @Fernando Diaz \u0027s advise. Thanks you.","commit_id":"c723f57bf54383b604399b824d2cc2f05ed07d2f"},{"author":{"_account_id":15274,"name":"Christopher Solis","email":"cnsolis@us.ibm.com","username":"cplusone"},"change_message_id":"9003b23bc8534fed97168fdf7e7be74e99deb394","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        resp \u003d self.behaviors.get_container(\"not_a_ref\")"},{"line_number":203,"context_line":"        self.assertEqual(resp.status_code, 404)"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"    @testcase.attr(\u0027positive\u0027)"},{"line_number":206,"context_line":"    def test_put_generic_container(self):"},{"line_number":207,"context_line":"        \"\"\"Basic test for modifying a generic container\u0027s contents\"\"\""},{"line_number":208,"context_line":"        test_model \u003d container_models.ContainerModel(**self.default_data)"}],"source_content_type":"text/x-python","patch_set":23,"id":"da6ed579_65aff8e3","line":205,"updated":"2016-01-18 16:25:35.000000000","message":"Awesome! Thanks for splitting the tests.","commit_id":"9e569566f5e2cf6d70e63459bd07a596da17d62e"},{"author":{"_account_id":15274,"name":"Christopher Solis","email":"cnsolis@us.ibm.com","username":"cplusone"},"change_message_id":"9003b23bc8534fed97168fdf7e7be74e99deb394","unresolved":false,"context_lines":[{"line_number":252,"context_line":"        new_secret_refs.name \u003d None"},{"line_number":253,"context_line":"        resp \u003d self.behaviors.update_container(container_ref, new_secret_refs)"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"        self.assertEqual(resp.status_code, 400)"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"    @testcase.attr(\u0027negative\u0027)"},{"line_number":258,"context_line":"    def test_put_generic_type(self):"}],"source_content_type":"text/x-python","patch_set":23,"id":"da6ed579_c57024a7","line":255,"updated":"2016-01-18 16:25:35.000000000","message":"I don\u0027t really know if 400 is the correct error. Documentation states the 403 is no permission to edit the container: https://review.openstack.org/#/c/207249/23/doc/source/api/reference/containers.rst. \n\nSo I think it should be returning a 403. Unless 400 was agreed upon earlier in which case I might have missed it. But I think either the docs need to be updated to reflect the 400 error or the 400 needs to change to 403.","commit_id":"9e569566f5e2cf6d70e63459bd07a596da17d62e"},{"author":{"_account_id":19132,"name":"ting wang","email":"bx_wang@outlook.com","username":"binean"},"change_message_id":"1ef170b5113219c5cd8b99d6a7b51330ae2f806c","unresolved":false,"context_lines":[{"line_number":252,"context_line":"        new_secret_refs.name \u003d None"},{"line_number":253,"context_line":"        resp \u003d self.behaviors.update_container(container_ref, new_secret_refs)"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"        self.assertEqual(resp.status_code, 400)"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"    @testcase.attr(\u0027negative\u0027)"},{"line_number":258,"context_line":"    def test_put_generic_type(self):"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba63e191_706ccb9c","line":255,"in_reply_to":"da6ed579_c57024a7","updated":"2016-01-19 05:42:24.000000000","message":"My understanding about it is that 403 means you have no permission to edit container because of RBAC. But in this test case, the type attribution cannot be changed because of JSONschema check. The type cannot be changed no matter what role a user is. So It\u0027s a bad request(400) not 403.\n\nand I find new_secret_refs.name \u003d None should be new_secret_refs.type \u003d None. \nthe same error in def test_put_generic_type()\nI\u0027ll fix it.  Thank you!","commit_id":"9e569566f5e2cf6d70e63459bd07a596da17d62e"},{"author":{"_account_id":15274,"name":"Christopher Solis","email":"cnsolis@us.ibm.com","username":"cplusone"},"change_message_id":"9003b23bc8534fed97168fdf7e7be74e99deb394","unresolved":false,"context_lines":[{"line_number":389,"context_line":""},{"line_number":390,"context_line":"    @testcase.attr(\u0027negative\u0027)"},{"line_number":391,"context_line":"    def test_put_non_generic_container(self):"},{"line_number":392,"context_line":"        \"\"\"A get on a non-generic container should return 409.\"\"\""},{"line_number":393,"context_line":"        test_model \u003d container_models.ContainerModel(**self.default_data)"},{"line_number":394,"context_line":""},{"line_number":395,"context_line":"        resp, container_ref \u003d self.behaviors.create_container(test_model)"}],"source_content_type":"text/x-python","patch_set":23,"id":"da6ed579_3fb4b133","line":392,"updated":"2016-01-18 16:25:35.000000000","message":"s/get/put","commit_id":"9e569566f5e2cf6d70e63459bd07a596da17d62e"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"bf855edcc1a33ad5ab23e7dbdebe30638e5d91cc","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        secret_ref_4 \u003d self._create_a_secret()"},{"line_number":211,"context_line":"        secret_ref_5 \u003d self._create_a_secret()"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"        new_secret_refs.secret_refs[1][\u0027name\u0027] \u003d \u0027name5\u0027"},{"line_number":214,"context_line":"        new_secret_refs.secret_refs[0][\u0027name\u0027] \u003d \u0027name4\u0027"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"        new_secret_refs.secret_refs[0][\u0027secret_ref\u0027] \u003d secret_ref_4"}],"source_content_type":"text/x-python","patch_set":26,"id":"9aed3d3a_abed39f1","line":213,"updated":"2016-03-01 15:58:30.000000000","message":"A style nit: 213 and 214 should be swapped, so starting with index 0, and consistent with 216/217 below.","commit_id":"7a62306d6b1929fff67a5d767e33ae09ab63fda7"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"bf855edcc1a33ad5ab23e7dbdebe30638e5d91cc","unresolved":false,"context_lines":[{"line_number":216,"context_line":"        new_secret_refs.secret_refs[0][\u0027secret_ref\u0027] \u003d secret_ref_4"},{"line_number":217,"context_line":"        new_secret_refs.secret_refs[1][\u0027secret_ref\u0027] \u003d secret_ref_5"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"        new_secret_refs.secret_refs.pop()"},{"line_number":220,"context_line":"        new_secret_refs.name \u003d None"},{"line_number":221,"context_line":"        new_secret_refs.type \u003d None"},{"line_number":222,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"9aed3d3a_2b2ac92c","line":219,"updated":"2016-03-01 15:58:30.000000000","message":"I had to scratch my head on this a bit. Please add a comment above 219 such as:\n# By default 3 secrets are added to the container. Test removing the last one.","commit_id":"7a62306d6b1929fff67a5d767e33ae09ab63fda7"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"bf855edcc1a33ad5ab23e7dbdebe30638e5d91cc","unresolved":false,"context_lines":[{"line_number":218,"context_line":""},{"line_number":219,"context_line":"        new_secret_refs.secret_refs.pop()"},{"line_number":220,"context_line":"        new_secret_refs.name \u003d None"},{"line_number":221,"context_line":"        new_secret_refs.type \u003d None"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"        resp \u003d self.behaviors.update_container(container_ref, new_secret_refs)"},{"line_number":224,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"9aed3d3a_ab725947","line":221,"updated":"2016-03-01 15:58:30.000000000","message":"I recall that you should not be able to modify the type of a container, but we should be able to change the name. I think both of these are ignored in validation though. See comments on validators.py for more details.","commit_id":"7a62306d6b1929fff67a5d767e33ae09ab63fda7"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"bf855edcc1a33ad5ab23e7dbdebe30638e5d91cc","unresolved":false,"context_lines":[{"line_number":237,"context_line":""},{"line_number":238,"context_line":"        test_model \u003d container_models.ContainerModel(**self.default_data)"},{"line_number":239,"context_line":"        resp, container_ref \u003d self.behaviors.create_container(test_model)"},{"line_number":240,"context_line":"        new_secret_refs \u003d container_models.ContainerModel(**self.default_data)"},{"line_number":241,"context_line":"        secret_ref_4 \u003d self._create_a_secret()"},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"        new_secret_refs.secret_refs[1][\u0027name\u0027] \u003d \u0027name5\u0027"}],"source_content_type":"text/x-python","patch_set":26,"id":"9aed3d3a_7f7c2bb5","line":240,"updated":"2016-03-01 15:58:30.000000000","message":"In general, the variable name \u0027new_secret_refs\u0027 is confusing....this really should be \u0027container\u0027 or some such. Please consider changing this var name.","commit_id":"7a62306d6b1929fff67a5d767e33ae09ab63fda7"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"bf855edcc1a33ad5ab23e7dbdebe30638e5d91cc","unresolved":false,"context_lines":[{"line_number":247,"context_line":"        new_secret_refs.type \u003d None"},{"line_number":248,"context_line":"        resp \u003d self.behaviors.update_container(container_ref, new_secret_refs)"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"        self.assertEqual(resp.status_code, 400)"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"    @testcase.attr(\u0027negative\u0027)"},{"line_number":253,"context_line":"    def test_put_generic_type(self):"}],"source_content_type":"text/x-python","patch_set":26,"id":"9aed3d3a_bad9a159","line":250,"updated":"2016-03-01 15:58:30.000000000","message":"I\u0027m not sure why this is an error? Isn\u0027t this set of steps performed in a test above? In general, it might help to add a docstring to these tests to say what they are trying to test.","commit_id":"7a62306d6b1929fff67a5d767e33ae09ab63fda7"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"bf855edcc1a33ad5ab23e7dbdebe30638e5d91cc","unresolved":false,"context_lines":[{"line_number":251,"context_line":""},{"line_number":252,"context_line":"    @testcase.attr(\u0027negative\u0027)"},{"line_number":253,"context_line":"    def test_put_generic_type(self):"},{"line_number":254,"context_line":"        test_model \u003d container_models.ContainerModel(**self.default_data)"},{"line_number":255,"context_line":"        resp, container_ref \u003d self.behaviors.create_container(test_model)"},{"line_number":256,"context_line":"        new_secret_refs \u003d container_models.ContainerModel(**self.default_data)"},{"line_number":257,"context_line":"        secret_ref_4 \u003d self._create_a_secret()"}],"source_content_type":"text/x-python","patch_set":26,"id":"7af24918_95952842","line":254,"updated":"2016-03-01 15:58:30.000000000","message":"You actually should be able to change the name of a container, just not its type.","commit_id":"7a62306d6b1929fff67a5d767e33ae09ab63fda7"}],"functionaltests/api/v1/functional/test_containers_rbac.py":[{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"94122373b5876bac99d743798692c31df9473b12","unresolved":false,"context_lines":[{"line_number":49,"context_line":"                        \u0027expected_return\u0027: 403},"},{"line_number":50,"context_line":"    \u0027with_auditor_a\u0027: {\u0027user\u0027: auditor_a, \u0027admin\u0027: admin_a,"},{"line_number":51,"context_line":"                       \u0027expected_return\u0027: 403},"},{"line_number":52,"context_line":"}"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"test_data_rbac_delete_container \u003d {"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_7b3e6ddb","line":52,"updated":"2015-08-19 20:42:22.000000000","message":"Update if you change code to return 204 and 409.","commit_id":"826cd24d9b6d5562828e9eef5f6248f351ff124c"},{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"287e067dc108d8b04d70feb41d9cd98ddd508898","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"test_data_rbac_update_container \u003d {"},{"line_number":44,"context_line":"    \u0027with_admin_a\u0027: {\u0027user\u0027: admin_a, \u0027admin\u0027: admin_a,"},{"line_number":45,"context_line":"                     \u0027expected_return\u0027: 200},"},{"line_number":46,"context_line":"    \u0027with_creator_a\u0027: {\u0027user\u0027: creator_a, \u0027admin\u0027: admin_a,"},{"line_number":47,"context_line":"                       \u0027expected_return\u0027: 200},"},{"line_number":48,"context_line":"    \u0027with_observer_a\u0027: {\u0027user\u0027: observer_a, \u0027admin\u0027: admin_a,"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa1b9901_9bbf8f60","line":45,"updated":"2015-08-20 16:47:52.000000000","message":"204","commit_id":"79f5aebb66019503c591c058e0fa58aaa18a9fb4"},{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"287e067dc108d8b04d70feb41d9cd98ddd508898","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    \u0027with_admin_a\u0027: {\u0027user\u0027: admin_a, \u0027admin\u0027: admin_a,"},{"line_number":45,"context_line":"                     \u0027expected_return\u0027: 200},"},{"line_number":46,"context_line":"    \u0027with_creator_a\u0027: {\u0027user\u0027: creator_a, \u0027admin\u0027: admin_a,"},{"line_number":47,"context_line":"                       \u0027expected_return\u0027: 200},"},{"line_number":48,"context_line":"    \u0027with_observer_a\u0027: {\u0027user\u0027: observer_a, \u0027admin\u0027: admin_a,"},{"line_number":49,"context_line":"                        \u0027expected_return\u0027: 403},"},{"line_number":50,"context_line":"    \u0027with_auditor_a\u0027: {\u0027user\u0027: auditor_a, \u0027admin\u0027: admin_a,"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa1b9901_1bb4df7d","line":47,"updated":"2015-08-20 16:47:52.000000000","message":"204","commit_id":"79f5aebb66019503c591c058e0fa58aaa18a9fb4"}]}
