)]}'
{"doc/source/userguides/object_store.rst":[{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"3d6b4dbead428c59c33750f599f7f304b492299e","unresolved":false,"context_lines":[{"line_number":107,"context_line":"Listing Objects"},{"line_number":108,"context_line":"***************"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"To list the objects that exist in a continer, use the"},{"line_number":111,"context_line":":meth:`~openstack.object_store.v1._proxy.Proxy.objects` method."},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"If you have a :class:`~openstack.object_store.v1.container.Container`"}],"source_content_type":"text/x-rst","patch_set":8,"id":"3a961159_0e1a0b7c","line":110,"updated":"2015-01-13 19:33:12.000000000","message":"continer \u003d\u003e container","commit_id":"6ce32821e66f24542e1a91116c7a19d9cd31179e"}],"openstack/object_store/v1/_proxy.py":[{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"6a72938d458f1aa9068a723cbd7f207a2237e3e9","unresolved":false,"context_lines":[{"line_number":24,"context_line":"        \"\"\"Get metatdata for this account."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"        :param container:"},{"line_number":27,"context_line":"\t:type Container: :class:`~openstack.object_store.v1.container`"},{"line_number":28,"context_line":"        \"\"\""},{"line_number":29,"context_line":"        if container is None:"},{"line_number":30,"context_line":"            container \u003d _container.Container()"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a8c0949_77ee498d","line":27,"updated":"2014-10-30 19:48:54.000000000","message":"I thought we had been using\n\n  :type container: :class:`~openstack.object_store.v1.container.Container`\n\nfor this before. I think the format for sphinx is :type \u003cparam_name\u003e: ...","commit_id":"4f718f6cc9faee83e80b03a75e19b4b02d213260"},{"author":{"_account_id":8257,"name":"Brian Curtin","email":"brian@python.org","username":"briancurtin"},"change_message_id":"c98b059ae84c2a6d91a2eb792ccf13765216d1e6","unresolved":false,"context_lines":[{"line_number":24,"context_line":"        \"\"\"Get metatdata for this account."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"        :param container:"},{"line_number":27,"context_line":"\t:type Container: :class:`~openstack.object_store.v1.container`"},{"line_number":28,"context_line":"        \"\"\""},{"line_number":29,"context_line":"        if container is None:"},{"line_number":30,"context_line":"            container \u003d _container.Container()"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a8c0949_32adaf89","line":27,"in_reply_to":"7a8c0949_77ee498d","updated":"2014-10-30 20:38:30.000000000","message":"haven\u0027t run doc stuff yet","commit_id":"4f718f6cc9faee83e80b03a75e19b4b02d213260"},{"author":{"_account_id":8736,"name":"Terry Howe","email":"terrylhowe@gmail.com","username":"terrylhowe"},"change_message_id":"ed9cad3a2eef8eb6af0cc18a48f6e32814ff9f78","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        container.update(self.session)"},{"line_number":42,"context_line":"        return container"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def list_containers(self):"},{"line_number":45,"context_line":"        \"\"\"List containers for this account.\"\"\""},{"line_number":46,"context_line":"        container \u003d _container.Container()"},{"line_number":47,"context_line":"        return container.list(self.session)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a890539_0ca693c1","line":44,"updated":"2014-11-13 01:04:55.000000000","message":"**params would be nice argument here so the user can pass limit and marker","commit_id":"5dd1a5562f6eade8a834f9924c07bf5341a94a7c"},{"author":{"_account_id":8736,"name":"Terry Howe","email":"terrylhowe@gmail.com","username":"terrylhowe"},"change_message_id":"ed9cad3a2eef8eb6af0cc18a48f6e32814ff9f78","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def list_containers(self):"},{"line_number":45,"context_line":"        \"\"\"List containers for this account.\"\"\""},{"line_number":46,"context_line":"        container \u003d _container.Container()"},{"line_number":47,"context_line":"        return container.list(self.session)"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def get_container_metadata(self, container):"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a890539_2cad0f9d","line":46,"updated":"2014-11-13 01:04:55.000000000","message":"I don\u0027t think you need to make an instance of container here.\n\n    container.Container.list(self.session,....)","commit_id":"5dd1a5562f6eade8a834f9924c07bf5341a94a7c"},{"author":{"_account_id":8736,"name":"Terry Howe","email":"terrylhowe@gmail.com","username":"terrylhowe"},"change_message_id":"ed9cad3a2eef8eb6af0cc18a48f6e32814ff9f78","unresolved":false,"context_lines":[{"line_number":165,"context_line":"    def copy_object(self):"},{"line_number":166,"context_line":"        \"\"\"Copy an object.\"\"\""},{"line_number":167,"context_line":"        raise NotImplementedError"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def delete_object(self, obj):"},{"line_number":170,"context_line":"        \"\"\"Delete an object."},{"line_number":171,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5a890539_cced6bf1","line":168,"updated":"2014-11-13 01:04:55.000000000","message":"Since we have conn.delete(object) now, we don\u0027t need this method.","commit_id":"5dd1a5562f6eade8a834f9924c07bf5341a94a7c"},{"author":{"_account_id":8736,"name":"Terry Howe","email":"terrylhowe@gmail.com","username":"terrylhowe"},"change_message_id":"ed9cad3a2eef8eb6af0cc18a48f6e32814ff9f78","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        :param obj:"},{"line_number":181,"context_line":"        :type Object: :class:`~openstack.object_store.v1.obj`"},{"line_number":182,"context_line":"        \"\"\""},{"line_number":183,"context_line":"        obj.head(self.session)"},{"line_number":184,"context_line":"        return obj"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"    def set_object_metadata(self, obj):"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a890539_2c842f0b","line":183,"updated":"2014-11-13 01:04:55.000000000","message":"Head returns self now so you could one line this.","commit_id":"5dd1a5562f6eade8a834f9924c07bf5341a94a7c"},{"author":{"_account_id":8736,"name":"Terry Howe","email":"terrylhowe@gmail.com","username":"terrylhowe"},"change_message_id":"ed9cad3a2eef8eb6af0cc18a48f6e32814ff9f78","unresolved":false,"context_lines":[{"line_number":188,"context_line":""},{"line_number":189,"context_line":"        :param obj:"},{"line_number":190,"context_line":"        :type Object: :class:`~openstack.object_store.v1.obj`"},{"line_number":191,"context_line":"        \"\"\""},{"line_number":192,"context_line":"        obj.create(self.session)"},{"line_number":193,"context_line":"        return obj"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a890539_aca01fa0","line":191,"updated":"2014-11-13 01:04:55.000000000","message":"Why is this create?  Does swift support PATCH?","commit_id":"5dd1a5562f6eade8a834f9924c07bf5341a94a7c"},{"author":{"_account_id":8736,"name":"Terry Howe","email":"terrylhowe@gmail.com","username":"terrylhowe"},"change_message_id":"50aa451aad706dd245f4aeb34b682511ad0121cc","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    def _to_container(self, container):"},{"line_number":25,"context_line":"        if isinstance(container, _container.Container):"},{"line_number":26,"context_line":"            return container"},{"line_number":27,"context_line":"        elif isinstance(container, six.text_type):"},{"line_number":28,"context_line":"            return _container.Container.new(name\u003dcontainer)"},{"line_number":29,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_d1898270","line":26,"updated":"2015-01-13 19:57:59.000000000","message":"I thought we were going to avoid doing this kind of thing since people can use conn.update(container) for a resource","commit_id":"6ce32821e66f24542e1a91116c7a19d9cd31179e"},{"author":{"_account_id":8257,"name":"Brian Curtin","email":"brian@python.org","username":"briancurtin"},"change_message_id":"206c83e2ca2e2781d70eeab58e88e65f1ce04d0d","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    def _to_container(self, container):"},{"line_number":25,"context_line":"        if isinstance(container, _container.Container):"},{"line_number":26,"context_line":"            return container"},{"line_number":27,"context_line":"        elif isinstance(container, six.text_type):"},{"line_number":28,"context_line":"            return _container.Container.new(name\u003dcontainer)"},{"line_number":29,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_49b054fd","line":26,"in_reply_to":"3a961159_750de58e","updated":"2015-01-15 03:48:44.000000000","message":"I had a review that did that directly on the Resource class, which makes this all super easy, but I haven\u0027t pushed it anywhere yet because I was still stewing on the whole idea. I\u0027ll resurrect it and see what you think.","commit_id":"6ce32821e66f24542e1a91116c7a19d9cd31179e"},{"author":{"_account_id":8257,"name":"Brian Curtin","email":"brian@python.org","username":"briancurtin"},"change_message_id":"5f929e970a1f2b26bc9cfe448455e6aad6efee41","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    def _to_container(self, container):"},{"line_number":25,"context_line":"        if isinstance(container, _container.Container):"},{"line_number":26,"context_line":"            return container"},{"line_number":27,"context_line":"        elif isinstance(container, six.text_type):"},{"line_number":28,"context_line":"            return _container.Container.new(name\u003dcontainer)"},{"line_number":29,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_fd4baf5c","line":26,"in_reply_to":"3a961159_d1898270","updated":"2015-01-13 21:50:08.000000000","message":"While I don\u0027t totally like these _to_\u003ctype\u003e methods and haven\u0027t found a better way to abstract or represent them yet, I\u0027ve been thinking about this higher-level as not involving the CRUD concepts but having method names that match their actions. I\u0027m not opposed to leaving them in there while we figure things out, but I don\u0027t think they\u0027re likely to be the most common interface.\n\nIf I had planned this review better it may have been more clear what I was going for, but I hope the following examples show it.\n\nRight now a lot of work is still done on the resource object itself, but I want to make these high-level methods enable you to complete an interaction in one call as opposed to several statements on an object and then a CRUD call. Although the latter example wouldn\u0027t actually work yet because I haven\u0027t added kwarg-to-header-value piece, I\u0027m looking at it like this:\n\nThese two are both ok. I\u0027d generally prefer to work with the latter most of the time, but there\u0027s a time and place for both.\n\n    cxn \u003d Connection(...)\n    # ----\n    cont \u003d Container.new(name\u003d\"my_container\")\n    cont.read_ACL \u003d \"foo\"\n    cxn.create(cont)\n    # ----\n    cxn.create_container(\"my_container\", read_ACL\u003d\"foo\")\n\nWhen I want to get metadata on a container, I know that I want to get metadata, but I don\u0027t think I should have to know that I need to call \"head\" for that. I think that is pushing the HTTP verbs a little too far along.\n\n    cont \u003d Container.existing(name\u003d\"my_container\")\n    cxn.head(cont)\n    # ----\n    cxn.get_container_metadata(\"my_container\") # would also work to pass `cont` instead of the string name\n\nThe case of cxn.update covering for something like cxn.set_container_metadata is stronger, but I think there\u0027s a case to be made for not always working directly on the object like that. I think it becomes a little harder to work with, e.g., user-generated metadata, in the update case. Note that this is somewhat hypothetical because we currently don\u0027t have good support for user-generated metadata keys, but we\u0027ll definitely need it.\n\nSay we\u0027re given ``some_meta_flag \u003d 100`` as input from an app to set on a container, e.g., read out of a config file.\n\n    key, value \u003d \"some_meta_flag\", 100\n    # ----\n    setattr(cont, key, value)\n    cxn.update(cont)\n    # ----\n    cxn.set_container_metadata(key\u003dvalue)\n\nI don\u0027t really want to have to explain to people that the best-practice way to work with your metadata is to put it through ``setattr``","commit_id":"6ce32821e66f24542e1a91116c7a19d9cd31179e"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"27cdc0d8a1f3cd940413ca2a5f88cb41fb399651","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    def _to_container(self, container):"},{"line_number":25,"context_line":"        if isinstance(container, _container.Container):"},{"line_number":26,"context_line":"            return container"},{"line_number":27,"context_line":"        elif isinstance(container, six.text_type):"},{"line_number":28,"context_line":"            return _container.Container.new(name\u003dcontainer)"},{"line_number":29,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_750de58e","line":26,"in_reply_to":"3a961159_fd4baf5c","updated":"2015-01-15 01:18:34.000000000","message":"So in urllib3 for some things we have from_\u003cfoo\u003e classmethods defined. If our main concern here is to handle text-types then we can do\n\n   _container.Container.from_text(container)  # or from_str\n\nAn example of this is urllib3.Retry.from_int\n\nIf it\u0027s already a Retry instance then we just return that. If it\u0027s an int we do the needful. If it\u0027s anything else you get a ValueError. That\u0027s vaguely the pattern we want here.\n\nThoughts?","commit_id":"6ce32821e66f24542e1a91116c7a19d9cd31179e"}]}
