)]}'
{"nova/api/openstack/compute/contrib/floating_ip_dns.py":[{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"6ce1df3bad27116ce159349ce15a6eff7cb6a7fc","unresolved":false,"context_lines":[{"line_number":207,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":208,"context_line":"        authorize(context)"},{"line_number":209,"context_line":"        domain \u003d _unquote_domain(domain_id)"},{"line_number":210,"context_line":"        match \u003d re.match(\u0027[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}\u0027, id)"},{"line_number":211,"context_line":"        floating_ip \u003d match.group() if match else None"},{"line_number":212,"context_line":"        if floating_ip:"},{"line_number":213,"context_line":"            entries \u003d self.network_api.get_dns_entries_by_address(context,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F2mM%3D","line":210,"updated":"2012-12-12 16:01:31.000000000","message":"are floating ips only ever ipv4?","commit_id":"86ae35771a191cfd7d8669481eb7040e0696b1c8"},{"author":{"_account_id":4601,"name":"Tiago Mello","email":"tmello@linux.vnet.ibm.com","username":"tmello"},"change_message_id":"087e19ffb044b6ee771f049a0a3fad8d264e088c","unresolved":false,"context_lines":[{"line_number":207,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":208,"context_line":"        authorize(context)"},{"line_number":209,"context_line":"        domain \u003d _unquote_domain(domain_id)"},{"line_number":210,"context_line":"        match \u003d re.match(\u0027[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}\u0027, id)"},{"line_number":211,"context_line":"        floating_ip \u003d match.group() if match else None"},{"line_number":212,"context_line":"        if floating_ip:"},{"line_number":213,"context_line":"            entries \u003d self.network_api.get_dns_entries_by_address(context,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2F%2B6w%3D","line":210,"in_reply_to":"AAAAMX%2F%2F2mM%3D","updated":"2012-12-17 21:42:39.000000000","message":"As far as I could see, ipv6 is not yet supported for floating IPs. But it is planned for Grizzly on Quantum.\n\nblueprints.launchpad.net/quantum/+spec/ipv6-feature-parity\n\nWe may want to add an regexp for matching both.","commit_id":"86ae35771a191cfd7d8669481eb7040e0696b1c8"},{"author":{"_account_id":5174,"name":"Mauro Sergio Martins Rodrigues","email":"maurosr@linux.vnet.ibm.com","username":"maurosr"},"change_message_id":"a518ba23448660eb4c5ba57665216219a3a1094f","unresolved":false,"context_lines":[{"line_number":217,"context_line":"            entries \u003d self.network_api.get_dns_entries_by_name(context,"},{"line_number":218,"context_line":"                                                               id, domain)"},{"line_number":219,"context_line":"        if not entries:"},{"line_number":220,"context_line":"            explanation \u003d _(\"DNS entries not found.\")"},{"line_number":221,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dexplanation)"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"        if floating_ip:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F2cY%3D","line":220,"updated":"2012-12-12 18:18:12.000000000","message":"Suggestions: \n- I would use try-except  instead of \u0027if not entries\u0027 thing and raise InstanceNotFound or maybe create a new exception to FloatingIpDNSNotFound (there are some similar exceptions in there) \n- maybe mention the search element something like \u0027No DNS entry found for %s\u0027 ip/name","commit_id":"86ae35771a191cfd7d8669481eb7040e0696b1c8"},{"author":{"_account_id":5174,"name":"Mauro Sergio Martins Rodrigues","email":"maurosr@linux.vnet.ibm.com","username":"maurosr"},"change_message_id":"5d520a4ae0abe42d389da0c75bc3548f501d5051","unresolved":false,"context_lines":[{"line_number":207,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":208,"context_line":"        authorize(context)"},{"line_number":209,"context_line":"        domain \u003d _unquote_domain(domain_id)"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"        floating_ip \u003d None"},{"line_number":212,"context_line":"        # Check whether id is a valid ipv4/ipv6 address."},{"line_number":213,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2F9Tw%3D","line":210,"updated":"2012-12-18 22:26:07.000000000","message":"ok, lets separate this in two methods: once you realize that id is a address call a method called (something like) _get_dns_entries_by_address(), which will be decorated by @wsgi.serializers(xml\u003dFloatingIPDNSsTemplate), or call by name a method like _get_dns_entry_by_name(), which can still be decorated by @wsgi.serializers(xml\u003dFloatingIPDNSTemplate) I think that will solve the problem with xml serializer to api samples test","commit_id":"cb64bcc6e6af3f7ef02795e68b4cf8a6bfb2cf0c"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"dff7eee823ed8377632be473a2c25fce8bbd5d24","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        super(FloatingIPDNSEntryController, self).__init__()"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    @wsgi.serializers(xml\u003dFloatingIPDNSsTemplate)"},{"line_number":205,"context_line":"    def _get_dns_entries_by_address(self, context, domain, address):"},{"line_number":206,"context_line":"        return self.network_api.get_dns_entries_by_address(context, address,"},{"line_number":207,"context_line":"                                                           domain)"},{"line_number":208,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2FdcQ%3D","line":205,"updated":"2013-01-21 19:33:07.000000000","message":"This is an incorrect use of @wsgi.serializers().  That decorator simply adds attributes to a method to indicate to the WSGI system what serializers should be used only when that method is called by WSGI.  _get_dns_entries_by_address() and _get_dns_entry_by_name() are NOT called by WSGI.  If they were actions, perhaps this would make sense, but that\u0027s not what you\u0027re trying to do.\n\nThe @wsgi.serializers() decorator MUST be on the show() method; its use elsewhere is meaningless.  And yes, this means the logic you added to show() to return different types of values cannot work the way you want it; you must come up with a different approach to solving your problem.","commit_id":"6cee2d945d79dd0cf146e4331c7f8cc5da896a77"},{"author":{"_account_id":5174,"name":"Mauro Sergio Martins Rodrigues","email":"maurosr@linux.vnet.ibm.com","username":"maurosr"},"change_message_id":"cb1a7334793723d3162cf9ed99c6a555d0c7600a","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        super(FloatingIPDNSEntryController, self).__init__()"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    @wsgi.serializers(xml\u003dFloatingIPDNSsTemplate)"},{"line_number":205,"context_line":"    def _get_dns_entries_by_address(self, context, domain, address):"},{"line_number":206,"context_line":"        return self.network_api.get_dns_entries_by_address(context, address,"},{"line_number":207,"context_line":"                                                           domain)"},{"line_number":208,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2Fc%2BI%3D","line":205,"in_reply_to":"AAAAM3%2F%2FdcQ%3D","updated":"2013-01-21 23:04:26.000000000","message":"it totally makes sense.. We\u0027ll figure out a way to fix this. Thanks Kevin!","commit_id":"6cee2d945d79dd0cf146e4331c7f8cc5da896a77"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"f86f3c5d16b446b385cffb8fac725df9495a1920","unresolved":false,"context_lines":[{"line_number":221,"context_line":"                pass"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"        if floating_ip:"},{"line_number":224,"context_line":"            return self.index(req, domain_id)"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"        entries \u003d self.network_api.get_dns_entries_by_name(context, domain, id)"},{"line_number":227,"context_line":"        if not entries:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2FPqQ%3D","line":224,"updated":"2013-01-31 17:21:40.000000000","message":"As written, this will attempt to serialize the return result of the index() method using the FloatingIPDNSTemplate, rather than the FloatingIPDNSsTemplate, which seems to be your intention.  Sorry, but I\u0027m afraid it won\u0027t work; each WSGI method must return exactly one type of result…","commit_id":"5ce0f016168b148f57f36bbfc2209537fce9cd98"},{"author":{"_account_id":4601,"name":"Tiago Mello","email":"tmello@linux.vnet.ibm.com","username":"tmello"},"change_message_id":"e23aa13c8d5970fc098899e86a6a493797199179","unresolved":false,"context_lines":[{"line_number":221,"context_line":"                pass"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"        if floating_ip:"},{"line_number":224,"context_line":"            return self.index(req, domain_id)"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"        entries \u003d self.network_api.get_dns_entries_by_name(context, domain, id)"},{"line_number":227,"context_line":"        if not entries:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2FPow%3D","line":224,"in_reply_to":"AAAAM3%2F%2FPqQ%3D","updated":"2013-01-31 17:40:24.000000000","message":"You are right. I\u0027ll look at what you suggested in the last comment. Thanks.","commit_id":"5ce0f016168b148f57f36bbfc2209537fce9cd98"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"ae41921f3dd5ff29ffc3f2eff1f170e24fe6e10b","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        super(FloatingIPDNSEntryController, self).__init__()"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    def _get_response_object(obj, **serializer):"},{"line_number":205,"context_line":"        return wsgi.ResponseObject(obj, serializer)"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"    @wsgi.serializers(xml\u003dFloatingIPDNSTemplate)"},{"line_number":208,"context_line":"    def show(self, req, domain_id, id):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2FPS8%3D","line":205,"updated":"2013-01-31 20:48:44.000000000","message":"OK, this won\u0027t work, and I don\u0027t see why you abstracted this out anyway (len(\"wsgi.ResponseObject\") \u003c len(\"self._get_response_object\")).  With this syntax, you would be making this call:\n\n    wsgi.ResponseObject(dns_entries, code\u003d{\u0027xml\u0027: FloatingIPDNSsTemplate})\n\nI\u0027m pretty sure that would be an invalid HTTP response code :)  Drop this method entirely, and just s/self._get_response_object/wsgi.ResponseObject/ in the show() method.\n\n(If the only reason you abstracted this out was for stubbing this out for testing, just stub out wsgi.ResponseObject instead.)","commit_id":"2065b1796e58990843a2358fd658b3be12b6c18c"}]}
