)]}'
{"openstack/resource.py":[{"author":{"_account_id":8736,"name":"Terry Howe","email":"terrylhowe@gmail.com","username":"terrylhowe"},"change_message_id":"77baaee6455486679af0d958b8d359731a5873d2","unresolved":false,"context_lines":[{"line_number":788,"context_line":"                 or None if nothing matches."},{"line_number":789,"context_line":"        \"\"\""},{"line_number":790,"context_line":"        # Try to see if we were given an ID directly."},{"line_number":791,"context_line":"        try:"},{"line_number":792,"context_line":"            res \u003d cls({cls.id_attribute: name_or_id})"},{"line_number":793,"context_line":"            res.get(session)"},{"line_number":794,"context_line":"            return res"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_bc9afd11","line":791,"updated":"2015-02-17 19:21:01.000000000","message":"Might be nice to if cls.allow_retrieve: get else list(filtered)","commit_id":"8c29eefcbc2add99edc5eb28f3ad582123f22b23"},{"author":{"_account_id":8736,"name":"Terry Howe","email":"terrylhowe@gmail.com","username":"terrylhowe"},"change_message_id":"77baaee6455486679af0d958b8d359731a5873d2","unresolved":false,"context_lines":[{"line_number":790,"context_line":"        # Try to see if we were given an ID directly."},{"line_number":791,"context_line":"        try:"},{"line_number":792,"context_line":"            res \u003d cls({cls.id_attribute: name_or_id})"},{"line_number":793,"context_line":"            res.get(session)"},{"line_number":794,"context_line":"            return res"},{"line_number":795,"context_line":"        except exceptions.HttpException:"},{"line_number":796,"context_line":"            pass"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_5cf8214a","line":793,"updated":"2015-02-17 19:21:01.000000000","message":"You could probably save creating the cls by just calling get_by_id.","commit_id":"8c29eefcbc2add99edc5eb28f3ad582123f22b23"},{"author":{"_account_id":8736,"name":"Terry Howe","email":"terrylhowe@gmail.com","username":"terrylhowe"},"change_message_id":"fd94c6cb33d69aa9fe10dcb61bdc58cc8dcc63da","unresolved":false,"context_lines":[{"line_number":708,"context_line":""},{"line_number":709,"context_line":"    @classmethod"},{"line_number":710,"context_line":"    def list(cls, session, limit\u003dNone, marker\u003dNone, path_args\u003dNone,"},{"line_number":711,"context_line":"             filters\u003dNone, paginated\u003dFalse, **params):"},{"line_number":712,"context_line":"        \"\"\"Get a response that is a list of objects."},{"line_number":713,"context_line":""},{"line_number":714,"context_line":"        This method starts at ``limit`` and ``marker`` (both defaulting to"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_db0df7e9","line":711,"updated":"2015-02-24 12:32:30.000000000","message":"accepting limit, marker *and* filters can make things a bit confusing.","commit_id":"76980ec5e9920e2eccaf67745dcebf5274808e51"},{"author":{"_account_id":8736,"name":"Terry Howe","email":"terrylhowe@gmail.com","username":"terrylhowe"},"change_message_id":"fd94c6cb33d69aa9fe10dcb61bdc58cc8dcc63da","unresolved":false,"context_lines":[{"line_number":800,"context_line":"        if limit:"},{"line_number":801,"context_line":"            filters[\u0027limit\u0027] \u003d limit"},{"line_number":802,"context_line":"        if marker:"},{"line_number":803,"context_line":"            filters[\u0027marker\u0027] \u003d marker"},{"line_number":804,"context_line":""},{"line_number":805,"context_line":"        if path_args:"},{"line_number":806,"context_line":"            url \u003d cls.base_path % path_args"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_180eb53b","line":803,"updated":"2015-02-24 12:32:30.000000000","message":"What if this limit/marker code was pulled out into a little class method so it could be used by users to make a filter for find, so we don\u0027t have to explicitly handle limit and marker.  That method could take name and use cls.name_attribute for the key.  It could also take fields I suppose.","commit_id":"76980ec5e9920e2eccaf67745dcebf5274808e51"},{"author":{"_account_id":8736,"name":"Terry Howe","email":"terrylhowe@gmail.com","username":"terrylhowe"},"change_message_id":"44a840d3d832d0769f952401ed72fa08b4382e60","unresolved":false,"context_lines":[{"line_number":833,"context_line":"        :raises: :class:`~openstack.exceptions.DuplicateResource` if more"},{"line_number":834,"context_line":"                 than one resource with the given name are found."},{"line_number":835,"context_line":"        \"\"\""},{"line_number":836,"context_line":"        if cls.allow_retrieve:"},{"line_number":837,"context_line":"            # Try to see if we were given an ID directly."},{"line_number":838,"context_line":"            try:"},{"line_number":839,"context_line":"                return cls.get_by_id(session, name_or_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_0ca837da","line":836,"updated":"2015-03-02 21:03:55.000000000","message":"Just having this allow_retrieve change would be nice at least.","commit_id":"76980ec5e9920e2eccaf67745dcebf5274808e51"},{"author":{"_account_id":8736,"name":"Terry Howe","email":"terrylhowe@gmail.com","username":"terrylhowe"},"change_message_id":"fd94c6cb33d69aa9fe10dcb61bdc58cc8dcc63da","unresolved":false,"context_lines":[{"line_number":844,"context_line":"            def search(resource):"},{"line_number":845,"context_line":"                from_name \u003d getattr(resource, resource.name_attribute, None)"},{"line_number":846,"context_line":"                return resource if from_name \u003d\u003d name_or_id else None"},{"line_number":847,"context_line":""},{"line_number":848,"context_line":"            result \u003d list(filter(search, cls.list(session, limit\u003dlimit,"},{"line_number":849,"context_line":"                          marker\u003dmarker, path_args\u003dpath_args,"},{"line_number":850,"context_line":"                          filters\u003dfilters)))"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_dbc897aa","line":847,"updated":"2015-02-24 12:32:30.000000000","message":"If limit and marker were pulled as params from find, we could at least attempt a high perf server side filter:\n\n    If not filters:\n         filters \u003d {cls.name_attribute: name_or_id,\n                      \u0027fields\u0027: cls.id_attribute,\n                       \u0027limit\u0027: 2}\n\nor if you like the filter create method idea:\n\n    # create filter with limit, marker, name, fields\n    filters \u003d cls.filtration(2, None, name_or_id, cls.id_attribute)","commit_id":"76980ec5e9920e2eccaf67745dcebf5274808e51"}]}
