)]}'
{"functionaltests/cli/v1/behaviors/acl_behaviors.py":[{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"886b017a99483a526aa216322512e0751bf7dca2","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        :param entity_ref Reference to secret or container entity"},{"line_number":99,"context_line":"        :param users List of users for ACL"},{"line_number":100,"context_line":"        :param prject_access: Flag to pass for project access behavior"},{"line_number":101,"context_line":"        :param use_short_arg: Flag to indicate if use short arguments in cli."},{"line_number":102,"context_line":"            Default is False"},{"line_number":103,"context_line":"        :param operation_type: ACL operation type. Default is \u0027read\u0027 as"}],"source_content_type":"text/x-python","patch_set":15,"id":"7a2fa921_55308d56","line":100,"updated":"2015-10-06 05:31:02.000000000","message":"project_access","commit_id":"e93a8f51145dcbbfdad7a5c6c9f59d71b890fec6"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"b1e367f41f20f30513069d5ee5f849be1215f786","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        :param entity_ref Reference to secret or container entity"},{"line_number":99,"context_line":"        :param users List of users for ACL"},{"line_number":100,"context_line":"        :param prject_access: Flag to pass for project access behavior"},{"line_number":101,"context_line":"        :param use_short_arg: Flag to indicate if use short arguments in cli."},{"line_number":102,"context_line":"            Default is False"},{"line_number":103,"context_line":"        :param operation_type: ACL operation type. Default is \u0027read\u0027 as"}],"source_content_type":"text/x-python","patch_set":15,"id":"7a2fa921_8fcfd8af","line":100,"in_reply_to":"7a2fa921_55308d56","updated":"2015-10-06 15:43:52.000000000","message":"Will fix it in all method signatures.","commit_id":"e93a8f51145dcbbfdad7a5c6c9f59d71b890fec6"},{"author":{"_account_id":15274,"name":"Christopher Solis","email":"cnsolis@us.ibm.com","username":"cplusone"},"change_message_id":"abe6b57b00220115bd4dfc06faf7064467bda43c","unresolved":false,"context_lines":[{"line_number":106,"context_line":"            dict in case of error."},{"line_number":107,"context_line":"        \"\"\""},{"line_number":108,"context_line":"        argv \u003d [\u0027acl\u0027, \u0027submit\u0027]"},{"line_number":109,"context_line":"        self.add_auth_and_endpoint(argv)"},{"line_number":110,"context_line":"        self._add_per_acl_args(argv, users\u003dusers,"},{"line_number":111,"context_line":"                               project_access\u003dproject_access,"},{"line_number":112,"context_line":"                               use_short_arg\u003duse_short_arg,"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a1a9d01_d4429167","line":109,"updated":"2015-09-30 22:02:21.000000000","message":"Lines 109-119 are identical for the methods acl_submit, acl_add, and acl_remove. You could move all of it, or just some depending on what seems clearer, to an internal function and just call that method.","commit_id":"e93a8f51145dcbbfdad7a5c6c9f59d71b890fec6"},{"author":{"_account_id":15274,"name":"Christopher Solis","email":"cnsolis@us.ibm.com","username":"cplusone"},"change_message_id":"becdbe3b99911ca7c1ddc012bceb0b1bc09f9fae","unresolved":false,"context_lines":[{"line_number":106,"context_line":"            dict in case of error."},{"line_number":107,"context_line":"        \"\"\""},{"line_number":108,"context_line":"        argv \u003d [\u0027acl\u0027, \u0027submit\u0027]"},{"line_number":109,"context_line":"        self.add_auth_and_endpoint(argv)"},{"line_number":110,"context_line":"        self._add_per_acl_args(argv, users\u003dusers,"},{"line_number":111,"context_line":"                               project_access\u003dproject_access,"},{"line_number":112,"context_line":"                               use_short_arg\u003duse_short_arg,"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a1a9d01_7472814b","line":109,"in_reply_to":"9a1a9d01_83c29d51","updated":"2015-10-01 15:36:00.000000000","message":"I can see why it increases the conditional checks returned from the new method. Since it\u0027s more of a preference I think it\u0027s fine to leave it the way it is now. Thanks for doing the example!","commit_id":"e93a8f51145dcbbfdad7a5c6c9f59d71b890fec6"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"a3686d921571b498e018282fb4b2a770c1487365","unresolved":false,"context_lines":[{"line_number":106,"context_line":"            dict in case of error."},{"line_number":107,"context_line":"        \"\"\""},{"line_number":108,"context_line":"        argv \u003d [\u0027acl\u0027, \u0027submit\u0027]"},{"line_number":109,"context_line":"        self.add_auth_and_endpoint(argv)"},{"line_number":110,"context_line":"        self._add_per_acl_args(argv, users\u003dusers,"},{"line_number":111,"context_line":"                               project_access\u003dproject_access,"},{"line_number":112,"context_line":"                               use_short_arg\u003duse_short_arg,"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a1a9d01_83c29d51","line":109,"in_reply_to":"9a1a9d01_d4429167","updated":"2015-09-30 23:54:22.000000000","message":"I can do this optimization but then it will make code unnecessarily conditional and don\u0027t see any noticeable code footprint change (196 vs 193 lines). I will rather keep this as is as its consistent with other acl operation sequence steps and secret/container behaviors also has similar pattern.\n\nWhat do you think ?\n\n\n\nHere is the sample of code change I tried.\n\n# new function\n\n    def _issue_acl_command(self, argv, entity_ref, users\u003dNone,\n                           project_access\u003dNone, use_short_arg\u003dFalse,\n                           operation_type\u003dNone):\n        self.add_auth_and_endpoint(argv)\n        self._add_per_acl_args(argv, users\u003dusers,\n                               project_access\u003dproject_access,\n                               use_short_arg\u003duse_short_arg,\n                               operation_type\u003doperation_type)\n        self._add_ref_arg(argv, entity_ref)\n\n        stdout, stderr \u003d self.issue_barbican_command(argv)\n\n        if \u00274xx Client error: Not Found\u0027 in stderr:\n            return {}\n\n        acl_list \u003d self._prettytable_to_list(stdout)\n        return acl_list\n\n\n\n# changes in existing functions\n\n\n    def acl_submit(self, entity_ref, users\u003dNone,\n                   project_access\u003dNone, use_short_arg\u003dFalse,\n                   operation_type\u003d\u0027read\u0027):\n        \"\"\"Submits a secret or container ACL\n\n        :param entity_ref Reference to secret or container entity\n        :param users List of users for ACL\n        :param prject_access: Flag to pass for project access behavior\n        :param use_short_arg: Flag to indicate if use short arguments in cli.\n            Default is False\n        :param operation_type: ACL operation type. Default is \u0027read\u0027 as\n            Barbican currently supports only that type of operation.\n        :return dict of \u0027read\u0027 operation ACL settings if found otherwise empty\n            dict in case of error.\n        \"\"\"\n        argv \u003d [\u0027acl\u0027, \u0027submit\u0027]\n        acl_list \u003d self._issue_acl_command(argv, entity_ref, users\u003dusers,\n                                           project_access\u003dproject_access,\n                                           use_short_arg\u003duse_short_arg,\n                                           operation_type\u003doperation_type)\n        if acl_list \u003d\u003d {}:\n            return {}\n\n        self.acl_entity_set.add(entity_ref)\n\n        return acl_list[0]  # return first ACL which is for \u0027read\u0027 op type\n\n\n    def acl_add(self, entity_ref, users\u003dNone,\n                project_access\u003dNone, use_short_arg\u003dFalse,\n                operation_type\u003d\u0027read\u0027):\n        \"\"\"Add to a secret or container ACL\n\n        :param entity_ref Reference to secret or container entity\n        :param users List of users to be added in ACL\n        :param prject_access: Flag to pass for project access behavior\n        :param use_short_arg: Flag to indicate if use short arguments in cli.\n            Default is False\n        :param operation_type: ACL operation type. Default is \u0027read\u0027 as\n            Barbican currently supports only that type of operation.\n        :return dict of \u0027read\u0027 operation ACL settings if found otherwise empty\n            dict in case of error.\n        \"\"\"\n        argv \u003d [\u0027acl\u0027, \u0027user\u0027, \u0027add\u0027]\n        acl_list \u003d self._issue_acl_command(argv, entity_ref, users\u003dusers,\n                                           project_access\u003dproject_access,\n                                           use_short_arg\u003duse_short_arg,\n                                           operation_type\u003doperation_type)\n        if acl_list \u003d\u003d {}:\n            return {}\n\n        self.acl_entity_set.add(entity_ref)\n        return acl_list\n\n\n     def acl_remove(self, entity_ref, users\u003dNone,\n                   project_access\u003dNone, use_short_arg\u003dFalse,\n                   operation_type\u003d\u0027read\u0027):\n        \"\"\"Remove users from a secret or container ACL\n\n        :param entity_ref Reference to secret or container entity\n        :param users List of users to be removed from ACL\n        :param prject_access: Flag to pass for project access behavior\n        :param use_short_arg: Flag to indicate if use short arguments in cli.\n            Default is False\n        :param operation_type: ACL operation type. Default is \u0027read\u0027 as\n            Barbican currently supports only that type of operation.\n        :return dict of \u0027read\u0027 operation ACL settings if found otherwise empty\n            dict in case of error.\n        \"\"\"\n        argv \u003d [\u0027acl\u0027, \u0027user\u0027, \u0027remove\u0027]\n        acl_list \u003d self._issue_acl_command(argv, entity_ref, users\u003dusers,\n                                           project_access\u003dproject_access,\n                                           use_short_arg\u003duse_short_arg,\n                                           operation_type\u003doperation_type)\n\n        return acl_list","commit_id":"e93a8f51145dcbbfdad7a5c6c9f59d71b890fec6"}],"functionaltests/cli/v1/smoke/test_acl.py":[{"author":{"_account_id":15274,"name":"Christopher Solis","email":"cnsolis@us.ibm.com","username":"cplusone"},"change_message_id":"61ee86cee71d53477a010b0bdd13dc4439b5366d","unresolved":false,"context_lines":[{"line_number":50,"context_line":"                                             users\u003d[\u0027u1\u0027, \u0027u2\u0027],"},{"line_number":51,"context_line":"                                             use_short_arg\u003duse_short_arg)"},{"line_number":52,"context_line":"        self.assertIsNotNone(data)"},{"line_number":53,"context_line":"        self.assertIn(\u0027u2\u0027, data[\u0027Users\u0027])"},{"line_number":54,"context_line":"        self.assertEqual(\u0027True\u0027, data[\u0027Project Access\u0027])"},{"line_number":55,"context_line":"        self.assertIn(secret_ref, data[\u0027Secret ACL Ref\u0027])"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"da20952f_8fef89b0","line":53,"updated":"2015-09-03 20:36:20.000000000","message":"Why is \u0027u1\u0027 also not checked for in data [\u0027Users\u0027]? More for clarification.","commit_id":"780968a6224afb3ff63fa53d1482d6dba9e74a43"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"f056303f5476f837d63862aaae52f12ca9b40d5d","unresolved":false,"context_lines":[{"line_number":50,"context_line":"                                             users\u003d[\u0027u1\u0027, \u0027u2\u0027],"},{"line_number":51,"context_line":"                                             use_short_arg\u003duse_short_arg)"},{"line_number":52,"context_line":"        self.assertIsNotNone(data)"},{"line_number":53,"context_line":"        self.assertIn(\u0027u2\u0027, data[\u0027Users\u0027])"},{"line_number":54,"context_line":"        self.assertEqual(\u0027True\u0027, data[\u0027Project Access\u0027])"},{"line_number":55,"context_line":"        self.assertIn(secret_ref, data[\u0027Secret ACL Ref\u0027])"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"da20952f_80e8c617","line":53,"in_reply_to":"da20952f_8fef89b0","updated":"2015-09-10 17:37:21.000000000","message":"Just picking one of user to make sure submit has successfully stored users in server. Did not necessarily have to check all of users are in list or do list equality check.","commit_id":"780968a6224afb3ff63fa53d1482d6dba9e74a43"},{"author":{"_account_id":15274,"name":"Christopher Solis","email":"cnsolis@us.ibm.com","username":"cplusone"},"change_message_id":"61ee86cee71d53477a010b0bdd13dc4439b5366d","unresolved":false,"context_lines":[{"line_number":190,"context_line":"        self.acl_behaviors.acl_delete(entity_ref\u003dsecret_ref + \u0027////\u0027)"},{"line_number":191,"context_line":"        data \u003d self.acl_behaviors.acl_get(entity_ref\u003dsecret_ref)"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"        self.assertEqual(\u0027[]\u0027, data[\u0027Users\u0027])"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"    @testcase.attr(\u0027negative\u0027)"},{"line_number":196,"context_line":"    def test_acl_entity_ref_input_with_acl_uri(self):"}],"source_content_type":"text/x-python","patch_set":12,"id":"da20952f_9248125e","line":193,"updated":"2015-09-03 20:36:20.000000000","message":"After the second ACL delete I think there also be a check to make sure data[\u0027Project Access\u0027] was unchanged as well.","commit_id":"780968a6224afb3ff63fa53d1482d6dba9e74a43"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"f056303f5476f837d63862aaae52f12ca9b40d5d","unresolved":false,"context_lines":[{"line_number":190,"context_line":"        self.acl_behaviors.acl_delete(entity_ref\u003dsecret_ref + \u0027////\u0027)"},{"line_number":191,"context_line":"        data \u003d self.acl_behaviors.acl_get(entity_ref\u003dsecret_ref)"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"        self.assertEqual(\u0027[]\u0027, data[\u0027Users\u0027])"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"    @testcase.attr(\u0027negative\u0027)"},{"line_number":196,"context_line":"    def test_acl_entity_ref_input_with_acl_uri(self):"}],"source_content_type":"text/x-python","patch_set":12,"id":"da20952f_40b38e0a","line":193,"in_reply_to":"da20952f_9248125e","updated":"2015-09-10 17:37:21.000000000","message":"Intention was to check that second delete works without any error. Added assert data is still same though second delete vs first delete should not impact data differently.","commit_id":"780968a6224afb3ff63fa53d1482d6dba9e74a43"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"886b017a99483a526aa216322512e0751bf7dca2","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":15,"id":"7a2fa921_d53c9d31","updated":"2015-10-06 05:31:02.000000000","message":"Just a quick question to see if I got it right. So then the users don\u0027t need to exist in keystone in order to be added to the ACL lists?","commit_id":"e93a8f51145dcbbfdad7a5c6c9f59d71b890fec6"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"b1e367f41f20f30513069d5ee5f849be1215f786","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":15,"id":"7a2fa921_1d046515","in_reply_to":"7a2fa921_d53c9d31","updated":"2015-10-06 15:43:52.000000000","message":"Yes. The user validation happens only when ACL based authorization is done where user id is available as part of keystone token validation response.","commit_id":"e93a8f51145dcbbfdad7a5c6c9f59d71b890fec6"},{"author":{"_account_id":15274,"name":"Christopher Solis","email":"cnsolis@us.ibm.com","username":"cplusone"},"change_message_id":"abe6b57b00220115bd4dfc06faf7064467bda43c","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        self.secret_behaviors.delete_all_created_secrets()"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    @utils.parameterized_dataset(ARGS_TYPE)"},{"line_number":43,"context_line":"    @testcase.attr(\u0027positive\u0027)"},{"line_number":44,"context_line":"    def test_acl_submit(self, use_short_arg):"},{"line_number":45,"context_line":"        secret_ref \u003d self.secret_behaviors.store_secret()"},{"line_number":46,"context_line":"        container_ref \u003d self.container_behaviors.create_container("}],"source_content_type":"text/x-python","patch_set":15,"id":"9a1a9d01_9723bb55","line":43,"updated":"2015-09-30 22:02:21.000000000","message":"I might be missing something. Should this test be running in the gate? i don\u0027t see it.","commit_id":"e93a8f51145dcbbfdad7a5c6c9f59d71b890fec6"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"a3686d921571b498e018282fb4b2a770c1487365","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        self.secret_behaviors.delete_all_created_secrets()"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    @utils.parameterized_dataset(ARGS_TYPE)"},{"line_number":43,"context_line":"    @testcase.attr(\u0027positive\u0027)"},{"line_number":44,"context_line":"    def test_acl_submit(self, use_short_arg):"},{"line_number":45,"context_line":"        secret_ref \u003d self.secret_behaviors.store_secret()"},{"line_number":46,"context_line":"        container_ref \u003d self.container_behaviors.create_container("}],"source_content_type":"text/x-python","patch_set":15,"id":"9a1a9d01_a870de0b","line":43,"in_reply_to":"9a1a9d01_9723bb55","updated":"2015-09-30 23:54:22.000000000","message":"I can see these tests being executed in http://logs.openstack.org/44/208344/15/check/gate-python-barbicanclient-devstack-dsvm/53cffaf/console.html\n\nYou can search for following text \"cli.v1.smoke.test_acl.ACLTestCase.test_acl_add_short_arg_false\"","commit_id":"e93a8f51145dcbbfdad7a5c6c9f59d71b890fec6"},{"author":{"_account_id":15274,"name":"Christopher Solis","email":"cnsolis@us.ibm.com","username":"cplusone"},"change_message_id":"becdbe3b99911ca7c1ddc012bceb0b1bc09f9fae","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        self.secret_behaviors.delete_all_created_secrets()"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    @utils.parameterized_dataset(ARGS_TYPE)"},{"line_number":43,"context_line":"    @testcase.attr(\u0027positive\u0027)"},{"line_number":44,"context_line":"    def test_acl_submit(self, use_short_arg):"},{"line_number":45,"context_line":"        secret_ref \u003d self.secret_behaviors.store_secret()"},{"line_number":46,"context_line":"        container_ref \u003d self.container_behaviors.create_container("}],"source_content_type":"text/x-python","patch_set":15,"id":"9a1a9d01_74c0412b","line":43,"in_reply_to":"9a1a9d01_a870de0b","updated":"2015-10-01 15:36:00.000000000","message":"Ah I see. My eyes weren\u0027t looking for the right name.","commit_id":"e93a8f51145dcbbfdad7a5c6c9f59d71b890fec6"},{"author":{"_account_id":15274,"name":"Christopher Solis","email":"cnsolis@us.ibm.com","username":"cplusone"},"change_message_id":"abe6b57b00220115bd4dfc06faf7064467bda43c","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        self.assertIn(container_ref, data[\u0027Container ACL Ref\u0027])"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    @utils.parameterized_dataset(ARGS_TYPE)"},{"line_number":95,"context_line":"    @testcase.attr(\u0027positive\u0027)"},{"line_number":96,"context_line":"    def test_acl_add(self, use_short_arg):"},{"line_number":97,"context_line":"        secret_ref \u003d self.secret_behaviors.store_secret()"},{"line_number":98,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"9a1a9d01_d7b29305","line":95,"updated":"2015-09-30 22:02:21.000000000","message":"ditto","commit_id":"e93a8f51145dcbbfdad7a5c6c9f59d71b890fec6"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"a3686d921571b498e018282fb4b2a770c1487365","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        self.assertIn(container_ref, data[\u0027Container ACL Ref\u0027])"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    @utils.parameterized_dataset(ARGS_TYPE)"},{"line_number":95,"context_line":"    @testcase.attr(\u0027positive\u0027)"},{"line_number":96,"context_line":"    def test_acl_add(self, use_short_arg):"},{"line_number":97,"context_line":"        secret_ref \u003d self.secret_behaviors.store_secret()"},{"line_number":98,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"9a1a9d01_68764607","line":95,"in_reply_to":"9a1a9d01_d7b29305","updated":"2015-09-30 23:54:22.000000000","message":"Same reply as above","commit_id":"e93a8f51145dcbbfdad7a5c6c9f59d71b890fec6"}]}
