)]}'
{"openstack/compute/v2/_proxy.py":[{"author":{"_account_id":8736,"name":"Terry Howe","email":"terrylhowe@gmail.com","username":"terrylhowe"},"change_message_id":"35ec9c9ae1e76f6cc6badcda4fb410fd354fa56b","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        :meth:`~openstack.compute.v2._proxy.Proxy.list_servers`."},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"        :param value: The value can be the ID of a server or a"},{"line_number":138,"context_line":"                      :class:`~openstack.compute.v2.server.Server` instance."},{"line_number":139,"context_line":"                      In conjunction with the ``by_name`` parameter,"},{"line_number":140,"context_line":"                      ``value`` can be the name of a server to get."},{"line_number":141,"context_line":"        :param str by_name: If ``True``, attempt to find ``value`` as the"}],"source_content_type":"text/x-python","patch_set":10,"id":"7aaa499b_24321d11","line":138,"updated":"2015-04-14 14:57:51.000000000","message":"I\u0027d be nice if we could just say server.Server here to reduce all the future cut and paste errors in these docs.","commit_id":"c096db36c19b3d4043509b8ab6a3728da8922e30"},{"author":{"_account_id":8257,"name":"Brian Curtin","email":"brian@python.org","username":"briancurtin"},"change_message_id":"e4573e0890e253c0b9f625bd3ee9efef9150152d","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        :meth:`~openstack.compute.v2._proxy.Proxy.list_servers`."},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"        :param value: The value can be the ID of a server or a"},{"line_number":138,"context_line":"                      :class:`~openstack.compute.v2.server.Server` instance."},{"line_number":139,"context_line":"                      In conjunction with the ``by_name`` parameter,"},{"line_number":140,"context_line":"                      ``value`` can be the name of a server to get."},{"line_number":141,"context_line":"        :param str by_name: If ``True``, attempt to find ``value`` as the"}],"source_content_type":"text/x-python","patch_set":10,"id":"dac4157f_c8060e20","line":138,"in_reply_to":"7aaa499b_24321d11","updated":"2015-04-20 19:46:32.000000000","message":"I don\u0027t love that these really long things are in there, but unless we have a way within Sphinx configuration to shorten this, I\u0027d prefer to keep it so the docs are clickable. I\u0027ll see if that\u0027s something we can do but would prefer to handle it outside of this change.","commit_id":"c096db36c19b3d4043509b8ab6a3728da8922e30"},{"author":{"_account_id":8736,"name":"Terry Howe","email":"terrylhowe@gmail.com","username":"terrylhowe"},"change_message_id":"35ec9c9ae1e76f6cc6badcda4fb410fd354fa56b","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        :param value: The value can be the ID of a server or a"},{"line_number":138,"context_line":"                      :class:`~openstack.compute.v2.server.Server` instance."},{"line_number":139,"context_line":"                      In conjunction with the ``by_name`` parameter,"},{"line_number":140,"context_line":"                      ``value`` can be the name of a server to get."},{"line_number":141,"context_line":"        :param str by_name: If ``True``, attempt to find ``value`` as the"},{"line_number":142,"context_line":"                            name of a server instead of an id."},{"line_number":143,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"7aaa499b_84c69147","line":140,"updated":"2015-04-14 14:57:51.000000000","message":"I don\u0027t like overloading the get operation with this search for by name.  find_server does the name_or_id thing.  if we do this, find, get and list kind of all do the same thing.","commit_id":"c096db36c19b3d4043509b8ab6a3728da8922e30"},{"author":{"_account_id":8257,"name":"Brian Curtin","email":"brian@python.org","username":"briancurtin"},"change_message_id":"e4573e0890e253c0b9f625bd3ee9efef9150152d","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        :param value: The value can be the ID of a server or a"},{"line_number":138,"context_line":"                      :class:`~openstack.compute.v2.server.Server` instance."},{"line_number":139,"context_line":"                      In conjunction with the ``by_name`` parameter,"},{"line_number":140,"context_line":"                      ``value`` can be the name of a server to get."},{"line_number":141,"context_line":"        :param str by_name: If ``True``, attempt to find ``value`` as the"},{"line_number":142,"context_line":"                            name of a server instead of an id."},{"line_number":143,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"dac4157f_a82cfaab","line":140,"in_reply_to":"7aaa499b_84c69147","updated":"2015-04-20 19:46:32.000000000","message":"The by_name thing came out of some of the discussions we had during a meeting on the guidelines, and by allowing a lookup by name gives us the ability to actually remove the find concept all together -- get_server is the one place to go to get a single server whether you know it exists or not.\n\nIf we had get_server and find_server, you\u0027d have to do something like this:\n\n    name \u003d \"maybe a server\"\n    try:\n        s \u003d get_server(name)\n    except it doesn\u0027t exist:\n        s \u003d find_server(name)\n    if s is None: raise exception(\u0027whoops, doesn\u0027t exist\u0027)\n\nBy combining them, the concept becomes that you either get teh server or you don\u0027t. It\u0027s a little bit like the delete idea but doesn\u0027t have the ability to hide the fact that it\u0027s not existing (which we don\u0027t want to do, since it\u0027s highly unlikely you can continue the application without the server you\u0027re looking for).","commit_id":"c096db36c19b3d4043509b8ab6a3728da8922e30"},{"author":{"_account_id":8257,"name":"Brian Curtin","email":"brian@python.org","username":"briancurtin"},"change_message_id":"4c4ea65450bfe599048aa3c64ea5ac713fe2fc1c","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        :param value: The value can be the ID of a server or a"},{"line_number":138,"context_line":"                      :class:`~openstack.compute.v2.server.Server` instance."},{"line_number":139,"context_line":"                      In conjunction with the ``by_name`` parameter,"},{"line_number":140,"context_line":"                      ``value`` can be the name of a server to get."},{"line_number":141,"context_line":"        :param str by_name: If ``True``, attempt to find ``value`` as the"},{"line_number":142,"context_line":"                            name of a server instead of an id."},{"line_number":143,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"bab921fb_3391f147","line":140,"in_reply_to":"bab921fb_138f0d2b","updated":"2015-04-26 21:53:29.000000000","message":"Ugh, now I\u0027m confusing myself with these names. Going to work on getting *list_* done so we\u0027ll have that, then build up get_, and then find_ should\u0027t be needed.","commit_id":"c096db36c19b3d4043509b8ab6a3728da8922e30"},{"author":{"_account_id":8257,"name":"Brian Curtin","email":"brian@python.org","username":"briancurtin"},"change_message_id":"80aca13d4bda028dbfba2d500f662975120c8338","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        :param value: The value can be the ID of a server or a"},{"line_number":138,"context_line":"                      :class:`~openstack.compute.v2.server.Server` instance."},{"line_number":139,"context_line":"                      In conjunction with the ``by_name`` parameter,"},{"line_number":140,"context_line":"                      ``value`` can be the name of a server to get."},{"line_number":141,"context_line":"        :param str by_name: If ``True``, attempt to find ``value`` as the"},{"line_number":142,"context_line":"                            name of a server instead of an id."},{"line_number":143,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"bab921fb_138f0d2b","line":140,"in_reply_to":"dac4157f_a82cfaab","updated":"2015-04-26 21:49:46.000000000","message":"One point I hadn\u0027t addressed in what you said is list. Currently this get and the existing find are similar, but I\u0027d prefer to converge on one of those and call it \"get\". List, however, is different and should remain as-is. It serves a purpose on its own to retrieve multiple items and can be used to build get/find.\n\nWhen list_* takes kwargs to do filtering per resource, I think it\u0027ll be more clear that each resource will only need list_resource and get_resource methods and not a find one. I think I\u0027m going to switch gears and get find done first and then come back to get since it builds on it.","commit_id":"c096db36c19b3d4043509b8ab6a3728da8922e30"},{"author":{"_account_id":8736,"name":"Terry Howe","email":"terrylhowe@gmail.com","username":"terrylhowe"},"change_message_id":"35ec9c9ae1e76f6cc6badcda4fb410fd354fa56b","unresolved":false,"context_lines":[{"line_number":154,"context_line":"            servers \u003d self.list_servers(details\u003dTrue, name\u003dvalue)"},{"line_number":155,"context_line":"            return self._get_unique_resource(servers, value)"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    def list_servers(self, details\u003dTrue, **kwargs):"},{"line_number":158,"context_line":"        # TODO(briancurtin): more explicit handling of query params."},{"line_number":159,"context_line":"        # kwargs here is added so get_server can send name\u003d to limit results."},{"line_number":160,"context_line":"        srv \u003d server.ServerDetail if details else server.Server"}],"source_content_type":"text/x-python","patch_set":10,"id":"7aaa499b_c4d499be","line":157,"updated":"2015-04-14 14:57:51.000000000","message":"Yeh, kwargs or something should be on these list commands, but that is a bit out of scope for this change.","commit_id":"c096db36c19b3d4043509b8ab6a3728da8922e30"},{"author":{"_account_id":8257,"name":"Brian Curtin","email":"brian@python.org","username":"briancurtin"},"change_message_id":"e4573e0890e253c0b9f625bd3ee9efef9150152d","unresolved":false,"context_lines":[{"line_number":154,"context_line":"            servers \u003d self.list_servers(details\u003dTrue, name\u003dvalue)"},{"line_number":155,"context_line":"            return self._get_unique_resource(servers, value)"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    def list_servers(self, details\u003dTrue, **kwargs):"},{"line_number":158,"context_line":"        # TODO(briancurtin): more explicit handling of query params."},{"line_number":159,"context_line":"        # kwargs here is added so get_server can send name\u003d to limit results."},{"line_number":160,"context_line":"        srv \u003d server.ServerDetail if details else server.Server"}],"source_content_type":"text/x-python","patch_set":10,"id":"dac4157f_e36575e1","line":157,"in_reply_to":"7aaa499b_c4d499be","updated":"2015-04-20 19:46:32.000000000","message":"I need it for how list_servers is called in order to pick up the find-like functionality. On line 154 where I call list_servers with name\u003dvalue, inside the list call we append that name\u003d as a query param and get that for free based on how the arguments are constructed within session or transport. I could break this piece out by itself if you\u0027d prefer, but it\u0027d basically just be accepting kwargs and nothing else since their application is specific to each usage of the list API.","commit_id":"c096db36c19b3d4043509b8ab6a3728da8922e30"}],"openstack/proxy.py":[{"author":{"_account_id":8736,"name":"Terry Howe","email":"terrylhowe@gmail.com","username":"terrylhowe"},"change_message_id":"35ec9c9ae1e76f6cc6badcda4fb410fd354fa56b","unresolved":false,"context_lines":[{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        return rv"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def _get_unique_resource(self, resources, name):"},{"line_number":87,"context_line":"        \"\"\"Return one resource, if and only if one exists"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        :returns: The one resource pertaining to this name"}],"source_content_type":"text/x-python","patch_set":10,"id":"7aaa499b_5f63b6dc","line":86,"updated":"2015-04-14 14:57:51.000000000","message":"This is another find, no need for this method really.  If find is broken, that is another matter.","commit_id":"c096db36c19b3d4043509b8ab6a3728da8922e30"},{"author":{"_account_id":8257,"name":"Brian Curtin","email":"brian@python.org","username":"briancurtin"},"change_message_id":"e4573e0890e253c0b9f625bd3ee9efef9150152d","unresolved":false,"context_lines":[{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        return rv"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def _get_unique_resource(self, resources, name):"},{"line_number":87,"context_line":"        \"\"\"Return one resource, if and only if one exists"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        :returns: The one resource pertaining to this name"}],"source_content_type":"text/x-python","patch_set":10,"id":"dac4157f_83d0f954","line":86,"in_reply_to":"7aaa499b_5f63b6dc","updated":"2015-04-20 19:46:32.000000000","message":"Find has always been broken, but this is a step toward integrating it into having one way to get resources instead of the combo of get and find. From the several conversations we\u0027ve had in the past few months, a generic find cannot be created because of how almost every API accepts different query params and filters -- the current implementation only works for a handful of things, but using this with a combination of the kwargs passed into a list call allow for it to work how a find should work.","commit_id":"c096db36c19b3d4043509b8ab6a3728da8922e30"},{"author":{"_account_id":8736,"name":"Terry Howe","email":"terrylhowe@gmail.com","username":"terrylhowe"},"change_message_id":"35ec9c9ae1e76f6cc6badcda4fb410fd354fa56b","unresolved":false,"context_lines":[{"line_number":92,"context_line":"                 :class:`~openstack.exceptions.ResourceNotFound`"},{"line_number":93,"context_line":"                 if no resource exists."},{"line_number":94,"context_line":"        \"\"\""},{"line_number":95,"context_line":"        resource \u003d next(resources, None)"},{"line_number":96,"context_line":"        if resource is not None:"},{"line_number":97,"context_line":"            if next(resources, None) is not None:"},{"line_number":98,"context_line":"                raise exceptions.DuplicateResource("}],"source_content_type":"text/x-python","patch_set":10,"id":"7aaa499b_5f4cd66f","line":95,"updated":"2015-04-14 14:57:51.000000000","message":"I\u0027m really not a huge docs fan, but this was confusing and docs or a different name might help here.   I was confused why you would be calling next on resources.","commit_id":"c096db36c19b3d4043509b8ab6a3728da8922e30"},{"author":{"_account_id":8257,"name":"Brian Curtin","email":"brian@python.org","username":"briancurtin"},"change_message_id":"e4573e0890e253c0b9f625bd3ee9efef9150152d","unresolved":false,"context_lines":[{"line_number":92,"context_line":"                 :class:`~openstack.exceptions.ResourceNotFound`"},{"line_number":93,"context_line":"                 if no resource exists."},{"line_number":94,"context_line":"        \"\"\""},{"line_number":95,"context_line":"        resource \u003d next(resources, None)"},{"line_number":96,"context_line":"        if resource is not None:"},{"line_number":97,"context_line":"            if next(resources, None) is not None:"},{"line_number":98,"context_line":"                raise exceptions.DuplicateResource("}],"source_content_type":"text/x-python","patch_set":10,"id":"dac4157f_63d84554","line":95,"in_reply_to":"7aaa499b_5f4cd66f","updated":"2015-04-20 19:46:32.000000000","message":"I\u0027m calling next here because this is fed in from the list call, so it\u0027s a generator of resources that we need to consume in order to see if we received one matching resource or if we got multiple.\n\nI\u0027m not sure what a better method name would be or how better to document this. The goal is to consume a generator of resources which is likely or ideally one single item, and then return it to be used as the return value of something like get_server, or to raise saying it didn\u0027t get a single or unique value.","commit_id":"c096db36c19b3d4043509b8ab6a3728da8922e30"}],"openstack/resource.py":[{"author":{"_account_id":8736,"name":"Terry Howe","email":"terrylhowe@gmail.com","username":"terrylhowe"},"change_message_id":"35ec9c9ae1e76f6cc6badcda4fb410fd354fa56b","unresolved":false,"context_lines":[{"line_number":903,"context_line":"        return resp"},{"line_number":904,"context_line":""},{"line_number":905,"context_line":"    # TODO(briancurtin): Once the get and list methods are completed on the"},{"line_number":906,"context_line":"    # proxies, this method becomes obsolte."},{"line_number":907,"context_line":"    @classmethod"},{"line_number":908,"context_line":"    def find(cls, session, name_or_id, path_args\u003dNone):"},{"line_number":909,"context_line":"        \"\"\"Find a resource by its name or id."}],"source_content_type":"text/x-python","patch_set":10,"id":"7aaa499b_5f77363a","line":906,"updated":"2015-04-14 14:57:51.000000000","message":"I\u0027m thinking one get method isn\u0027t going to cut it and more of a free form search capability is needed.","commit_id":"c096db36c19b3d4043509b8ab6a3728da8922e30"},{"author":{"_account_id":8257,"name":"Brian Curtin","email":"brian@python.org","username":"briancurtin"},"change_message_id":"e4573e0890e253c0b9f625bd3ee9efef9150152d","unresolved":false,"context_lines":[{"line_number":903,"context_line":"        return resp"},{"line_number":904,"context_line":""},{"line_number":905,"context_line":"    # TODO(briancurtin): Once the get and list methods are completed on the"},{"line_number":906,"context_line":"    # proxies, this method becomes obsolte."},{"line_number":907,"context_line":"    @classmethod"},{"line_number":908,"context_line":"    def find(cls, session, name_or_id, path_args\u003dNone):"},{"line_number":909,"context_line":"        \"\"\"Find a resource by its name or id."}],"source_content_type":"text/x-python","patch_set":10,"id":"dac4157f_23b5adcc","line":906,"in_reply_to":"7aaa499b_5f77363a","updated":"2015-04-20 19:46:32.000000000","message":"We actually get that for free out of adding kwargs to list calls, and then leveraging that ability gives us a way to tie it into specific APIs. The example of how get_server works with that name\u003d param negates the need for this find.","commit_id":"c096db36c19b3d4043509b8ab6a3728da8922e30"},{"author":{"_account_id":8736,"name":"Terry Howe","email":"terrylhowe@gmail.com","username":"terrylhowe"},"change_message_id":"118b2b8a58778d3511fbcf01e8f037247d6202fa","unresolved":false,"context_lines":[{"line_number":904,"context_line":""},{"line_number":905,"context_line":"        return resp"},{"line_number":906,"context_line":""},{"line_number":907,"context_line":"    # TODO(briancurtin): Once the get and list methods are completed on the"},{"line_number":908,"context_line":"    # proxies, this method becomes obsolte."},{"line_number":909,"context_line":"    @classmethod"},{"line_number":910,"context_line":"    def find(cls, session, name_or_id, path_args\u003dNone):"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a0c5dc1_fb73c94b","line":907,"updated":"2015-05-12 22:53:48.000000000","message":"Still? I think we are better off with logic in the resource than the proxy in general.","commit_id":"b2f281e3283d903517cdf880fa5d37fa3910aeed"},{"author":{"_account_id":8257,"name":"Brian Curtin","email":"brian@python.org","username":"briancurtin"},"change_message_id":"8aec4ad47ceaf259411e02906fb7bbcc57b4f250","unresolved":false,"context_lines":[{"line_number":904,"context_line":""},{"line_number":905,"context_line":"        return resp"},{"line_number":906,"context_line":""},{"line_number":907,"context_line":"    # TODO(briancurtin): Once the get and list methods are completed on the"},{"line_number":908,"context_line":"    # proxies, this method becomes obsolte."},{"line_number":909,"context_line":"    @classmethod"},{"line_number":910,"context_line":"    def find(cls, session, name_or_id, path_args\u003dNone):"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a0c5dc1_e97e63ad","line":907,"in_reply_to":"9a0c5dc1_de4d9373","updated":"2015-05-13 00:31:31.000000000","message":"Comment removed in the latest patch set. I agree that we should put as much logic into the resource instead of the proxy, but I think the differences in services are going to show that this is the one place we\u0027re going to have to specialize the most and put some amount of stuff into the proxy methods.","commit_id":"b2f281e3283d903517cdf880fa5d37fa3910aeed"},{"author":{"_account_id":8257,"name":"Brian Curtin","email":"brian@python.org","username":"briancurtin"},"change_message_id":"c1a1970f7632fcadfce7477c843d56bf08bf89fe","unresolved":false,"context_lines":[{"line_number":904,"context_line":""},{"line_number":905,"context_line":"        return resp"},{"line_number":906,"context_line":""},{"line_number":907,"context_line":"    # TODO(briancurtin): Once the get and list methods are completed on the"},{"line_number":908,"context_line":"    # proxies, this method becomes obsolte."},{"line_number":909,"context_line":"    @classmethod"},{"line_number":910,"context_line":"    def find(cls, session, name_or_id, path_args\u003dNone):"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a0c5dc1_de4d9373","line":907,"in_reply_to":"9a0c5dc1_fb73c94b","updated":"2015-05-12 23:13:26.000000000","message":"That\u0027s a leftover comment that I\u0027ll remove once I\u0027m back to a computer.","commit_id":"b2f281e3283d903517cdf880fa5d37fa3910aeed"}]}
