)]}'
{"functionaltests/common/cleanup.py":[{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"f08d7a1d4d1a9bc89f63fe0fe6458119e9d0ae09","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    \"\"\"Helper method to delete all orders and secrets used for testing\"\"\""},{"line_number":36,"context_line":"    for order_ref in created_orders:"},{"line_number":37,"context_line":"        order \u003d self.barbicanclient.orders.get(order_ref)"},{"line_number":38,"context_line":"        if order.secret_ref:"},{"line_number":39,"context_line":"            self.barbicanclient.secrets.delete(order.secret_ref)"},{"line_number":40,"context_line":"        self.barbicanclient.orders.delete(order_ref)"}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_2fe0bdf9","line":38,"updated":"2015-08-28 17:37:43.000000000","message":"Orders can have a container and/or a secret ref. Make sure to delete the container as well.","commit_id":"4af2e88d57799c9f25fbbc4eeb8ee4faba200352"},{"author":{"_account_id":16046,"name":"Fernando Diaz","email":"diazjf@us.ibm.com","username":"diazjf"},"change_message_id":"c68d3ebd3081f90d82321505445785cf2206bd9f","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    \"\"\"Helper method to delete all orders and secrets used for testing\"\"\""},{"line_number":36,"context_line":"    for order_ref in created_orders:"},{"line_number":37,"context_line":"        order \u003d self.barbicanclient.orders.get(order_ref)"},{"line_number":38,"context_line":"        if order.secret_ref:"},{"line_number":39,"context_line":"            self.barbicanclient.secrets.delete(order.secret_ref)"},{"line_number":40,"context_line":"        self.barbicanclient.orders.delete(order_ref)"}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_b22f5687","line":38,"in_reply_to":"da20952f_2fe0bdf9","updated":"2015-08-28 17:58:57.000000000","message":"Thanks, just added it.\n\nAlso gonna make this a class and have a method that cleans everything up that way when new functests are added, only one function needs to be changed.","commit_id":"4af2e88d57799c9f25fbbc4eeb8ee4faba200352"},{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"01827ff3b5cdf98f4c9715712bcfa0cea72bdb22","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    for order_ref in created_orders:"},{"line_number":37,"context_line":"        order \u003d self.barbicanclient.orders.get(order_ref)"},{"line_number":38,"context_line":"        if order.secret_ref:"},{"line_number":39,"context_line":"            self.barbicanclient.secrets.delete(order.secret_ref)"},{"line_number":40,"context_line":"        if order.container_ref:"},{"line_number":41,"context_line":"            self.barbicanclient.containers.delete(order.container_ref)"},{"line_number":42,"context_line":"        self.barbicanclient.orders.delete(order_ref)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_d279aac9","line":39,"updated":"2015-08-28 18:13:55.000000000","message":"If you\u0027re going to delete a secret in the order deleter, be sure to remove the secret from the created_secrets list.\n\nIt will help when this is a class with local storage and access to the list(s) of created entities.","commit_id":"be5aa40dafd1557afe6e2d3d979119e889fab0b4"},{"author":{"_account_id":16046,"name":"Fernando Diaz","email":"diazjf@us.ibm.com","username":"diazjf"},"change_message_id":"8cc36ba0146784db1f6094b1d77f34254f2acf24","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    for order_ref in created_orders:"},{"line_number":37,"context_line":"        order \u003d self.barbicanclient.orders.get(order_ref)"},{"line_number":38,"context_line":"        if order.secret_ref:"},{"line_number":39,"context_line":"            self.barbicanclient.secrets.delete(order.secret_ref)"},{"line_number":40,"context_line":"        if order.container_ref:"},{"line_number":41,"context_line":"            self.barbicanclient.containers.delete(order.container_ref)"},{"line_number":42,"context_line":"        self.barbicanclient.orders.delete(order_ref)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_d8df8967","line":39,"in_reply_to":"da20952f_d279aac9","updated":"2015-08-28 18:55:27.000000000","message":"By the way a secret is created in an order,I wont be able to add it to the  created_secrets list, therefore it will be deleted by the using the secret_ref within an order.","commit_id":"be5aa40dafd1557afe6e2d3d979119e889fab0b4"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"7f4470bd6b851d09006111f385cc1faa816a72f8","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def _delete_all_containers(self):"},{"line_number":32,"context_line":"        \"\"\"Helper method to delete all containers and secrets used for"},{"line_number":33,"context_line":"        testing\"\"\""},{"line_number":34,"context_line":"        for container_ref in self.created_entities[\u0027containers\u0027]:"},{"line_number":35,"context_line":"            container \u003d self.barbicanclient.containers.get(container_ref)"},{"line_number":36,"context_line":"            for secret_ref in container.secret_refs:"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_e33c1eca","line":33,"updated":"2015-08-28 19:02:44.000000000","message":"Does this pass pep8?  I\u0027m too impatient to wait for jenkins job to finish :)","commit_id":"c65ace116122a7ca4992a5019b2078f9fc688abd"},{"author":{"_account_id":16046,"name":"Fernando Diaz","email":"diazjf@us.ibm.com","username":"diazjf"},"change_message_id":"762960cc92c0bec5de592c5266bc978d30f5428b","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def _delete_all_containers(self):"},{"line_number":32,"context_line":"        \"\"\"Helper method to delete all containers and secrets used for"},{"line_number":33,"context_line":"        testing\"\"\""},{"line_number":34,"context_line":"        for container_ref in self.created_entities[\u0027containers\u0027]:"},{"line_number":35,"context_line":"            container \u003d self.barbicanclient.containers.get(container_ref)"},{"line_number":36,"context_line":"            for secret_ref in container.secret_refs:"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_e3fbbebf","line":33,"in_reply_to":"da20952f_e33c1eca","updated":"2015-08-28 19:08:28.000000000","message":"Yup lol.\n\nstack@stack-VirtualBox:~/python-barbicanclient$ pep8 functionaltests/common/cleanup.py\n\nwas run.","commit_id":"c65ace116122a7ca4992a5019b2078f9fc688abd"},{"author":{"_account_id":17579,"name":"Elvin Tubillara","email":"edtubill@us.ibm.com","username":"edtubill"},"change_message_id":"d92689c76353f48c9d1189cef4622f644ec6a2f6","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def _delete_all_containers(self):"},{"line_number":32,"context_line":"        \"\"\"Helper method to delete all containers and secrets used for"},{"line_number":33,"context_line":"        testing\"\"\""},{"line_number":34,"context_line":"        for container_ref in self.created_entities[\u0027containers\u0027]:"},{"line_number":35,"context_line":"            container \u003d self.barbicanclient.containers.get(container_ref)"},{"line_number":36,"context_line":"            for secret_ref in container.secret_refs:"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_fec9155a","line":33,"in_reply_to":"da20952f_e3fbbebf","updated":"2015-08-28 19:34:52.000000000","message":"I ran tox -e pep8 and it also worked. I think just running pep8 without tox will miss some things that the gate will catch","commit_id":"c65ace116122a7ca4992a5019b2078f9fc688abd"},{"author":{"_account_id":16046,"name":"Fernando Diaz","email":"diazjf@us.ibm.com","username":"diazjf"},"change_message_id":"209a97701eeb1c5ca06c4dad1a2ebe8f8e1fe305","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        \"\"\"Stores an entity in Barbican to be used for testing"},{"line_number":38,"context_line":"        and keeps track of entity for removal after tests are"},{"line_number":39,"context_line":"        run\"\"\""},{"line_number":40,"context_line":"        if entity_type is \u0027order\u0027:"},{"line_number":41,"context_line":"            entity_ref \u003d entity.submit()"},{"line_number":42,"context_line":"        else:"},{"line_number":43,"context_line":"            entity_ref \u003d entity.store()"}],"source_content_type":"text/x-python","patch_set":9,"id":"da20952f_425d9f13","line":40,"updated":"2015-08-31 00:02:12.000000000","message":"Would have liked:\n\nif type(entity).__name__ is \u0027Order\u0027:\n            entity_ref \u003d entity.submit()\n            self.created_entities[\u0027order\u0027].append(entity_ref)\nelif type(entity).__name__ is \u0027Secret\u0027:\n            entity_ref \u003d entity.store()\n            self.created_entities[\u0027secret\u0027].append(entity_ref)\n....\n\nbut there are many class names. Maybe we can use check if the class or base class to lowercase contains the name secrets, orders, containers. and then apply the above logic.\n\nThis makes it easier because now the user can\u0027t messup when adding an entity:  add_entity(self, entity)","commit_id":"faf762470631dfe540d0489b36b960e661aefe21"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"4b44166f0a83f7afb82bf1ab66eb8296543c8599","unresolved":false,"context_lines":[{"line_number":33,"context_line":"        self._delete_all_orders()"},{"line_number":34,"context_line":"        self._delete_all_secrets()"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def add_entity(self, entity, entity_type):"},{"line_number":37,"context_line":"        \"\"\"Stores an entity in Barbican to be used for testing"},{"line_number":38,"context_line":"        and keeps track of entity for removal after tests are"},{"line_number":39,"context_line":"        run\"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"da20952f_5eee3c8c","line":36,"updated":"2015-09-02 19:40:05.000000000","message":"I don\u0027t like the idea of having to specify entity_type.  Couldn\u0027t we just use  \u0027is\u0027 operator on the entity itself ?","commit_id":"52322c1113ae5f352c0c648000a3e9b3e471eca0"},{"author":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"change_message_id":"e245b2fdeed6ca670d4afba4032689fe435d33c7","unresolved":false,"context_lines":[{"line_number":33,"context_line":"        self._delete_all_orders()"},{"line_number":34,"context_line":"        self._delete_all_secrets()"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def add_entity(self, entity, entity_type):"},{"line_number":37,"context_line":"        \"\"\"Stores an entity in Barbican to be used for testing"},{"line_number":38,"context_line":"        and keeps track of entity for removal after tests are"},{"line_number":39,"context_line":"        run\"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"da20952f_be598f37","line":36,"in_reply_to":"da20952f_5eee3c8c","updated":"2015-09-02 23:17:32.000000000","message":"+1 just type check the entity being passed in.  Or even beter just check to see if it has the submit attribute.","commit_id":"52322c1113ae5f352c0c648000a3e9b3e471eca0"},{"author":{"_account_id":16046,"name":"Fernando Diaz","email":"diazjf@us.ibm.com","username":"diazjf"},"change_message_id":"42007f55661c626b4215290c2593f750b89f9ab7","unresolved":false,"context_lines":[{"line_number":33,"context_line":"        self._delete_all_orders()"},{"line_number":34,"context_line":"        self._delete_all_secrets()"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def add_entity(self, entity, entity_type):"},{"line_number":37,"context_line":"        \"\"\"Stores an entity in Barbican to be used for testing"},{"line_number":38,"context_line":"        and keeps track of entity for removal after tests are"},{"line_number":39,"context_line":"        run\"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"da20952f_62bfd1aa","line":36,"in_reply_to":"da20952f_be598f37","updated":"2015-09-03 04:40:05.000000000","message":"Steve, Doug, thanks for the suggtestion, it does make it easier when adding new functional tests.\n\nI couldn\u0027t just do a check to see if it has the submit attribute since each entity_ref must be added to a particular list for removal.\n\nAny help on making this more pythonic is greatly appreciated. :)","commit_id":"52322c1113ae5f352c0c648000a3e9b3e471eca0"}]}
