)]}'
{"nova/compute/manager.py":[{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"204df85989cefaf448423a8b059abc4c45b63377","unresolved":false,"context_lines":[{"line_number":479,"context_line":""},{"line_number":480,"context_line":"    @exception.wrap_exception(notifier\u003dnotifier, publisher_id\u003dpublisher_id())"},{"line_number":481,"context_line":"    def run_instance(self, context, instance_id, **kwargs):"},{"line_number":482,"context_line":"        self._run_instance(context, instance_id, **kwargs)"},{"line_number":483,"context_line":""},{"line_number":484,"context_line":"    @exception.wrap_exception(notifier\u003dnotifier, publisher_id\u003dpublisher_id())"},{"line_number":485,"context_line":"    @checks_instance_lock"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F8s8%3D","side":"PARENT","line":482,"updated":"2011-10-13 05:44:29.000000000","message":"Can this code not move into _run_instance() after the instance_get() in there?   That\u0027d save from having 2 instance_get()s right in a row.","commit_id":"f40d94e59f000a2937cea68663053739e721b80e"}],"nova/db/sqlalchemy/api.py":[{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"204df85989cefaf448423a8b059abc4c45b63377","unresolved":false,"context_lines":[{"line_number":3449,"context_line":"        raise exception.InstanceTypeNotFoundByName(instance_type_name\u003dname)"},{"line_number":3450,"context_line":"    else:"},{"line_number":3451,"context_line":"        return instance_type_ref"},{"line_number":3452,"context_line":""},{"line_number":3453,"context_line":""},{"line_number":3454,"context_line":"####################"},{"line_number":3455,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F8so%3D","side":"PARENT","line":3452,"updated":"2011-10-13 05:44:29.000000000","message":"Similar to above.","commit_id":"f40d94e59f000a2937cea68663053739e721b80e"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"204df85989cefaf448423a8b059abc4c45b63377","unresolved":false,"context_lines":[{"line_number":3441,"context_line":"                        \u0027updated_at\u0027: literal_column(\u0027updated_at\u0027)})"},{"line_number":3442,"context_line":""},{"line_number":3443,"context_line":"        records \u003d instance_type_ref.update(dict(deleted\u003dTrue))"},{"line_number":3444,"context_line":"        if records \u003d\u003d 0:"},{"line_number":3445,"context_line":"            raise exception.InstanceTypeNotFoundByName(instance_type_name\u003dname)"},{"line_number":3446,"context_line":"        else:"},{"line_number":3447,"context_line":"            return instance_type_ref"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F8ss%3D","line":3444,"updated":"2011-10-13 05:44:29.000000000","message":"If I understand things correctly, this results in 4 database queries when you can do this in 3.  Ie, you have 2 calls to first() and then 2 calls to update().\n\nSomething like:\n\nwith session.begin():\n    instance_type_ref \u003d session.query(...).first()\n    if instance_type_ref:\n        session.query(...).filter_by(...\u003dinstance_type_ref[\u0027id\u0027]).\\\n                    filter_by(...).\\\n                    update(...)\n    instance_type_ref.update(...)\n    instance_type_ref.save()\n\nWould make it only 3.. right?   1 first(), 1 update(), and 1 save().  Even though it only saves 1 DB query.. it\u0027s even more efficient than that because that very last query you have doesn\u0027t require mysql to find the record again.  I think that also cleans up the error checking below:","commit_id":"f440ec123e0b321b091001dac16d5a79c40e290c"},{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"2424f300858d8b697edb4d5f9de5591a7d48c591","unresolved":false,"context_lines":[{"line_number":3443,"context_line":"                filter_by(instance_type_id\u003dinstance_type_ref[\u0027id\u0027]).\\"},{"line_number":3444,"context_line":"                delete()"},{"line_number":3445,"context_line":""},{"line_number":3446,"context_line":"    records \u003d instance_type_ref.delete()"},{"line_number":3447,"context_line":"    if records \u003d\u003d 0:"},{"line_number":3448,"context_line":"        raise exception.InstanceTypeNotFoundByName(instance_type_name\u003dname)"},{"line_number":3449,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAACX%2F%2F470%3D","line":3446,"updated":"2011-11-02 23:11:40.000000000","message":"unfortunately this will no longer work. The only reason the (ugly) code on the left works is because you are calling delete on multiple rows.  If you call delete on an individual object like you are doing here, it won\u0027t actually be purged because delete in the model is overridden to just update deleted\u003d1.  You\u0027ll have to do this differently.  I think the \"right\" solution is to remove the unique constraint on name and flavorid in Instance Types and do checking in the create code to make sure you aren\u0027t creating a duplicate. This would allow deleted instance types to continue to exist.  This seems preferrable as you probably want the old types to continue to exist for calculating usage, etc.  This would allow us to get rid of purge entirely.","commit_id":"48c878d8ba8eb34cbe722fab39b9a72a272048c5"}],"nova/exception.py":[{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"2424f300858d8b697edb4d5f9de5591a7d48c591","unresolved":false,"context_lines":[{"line_number":843,"context_line":"        super(ZoneRequestError, self).__init__(message\u003dmessage)"},{"line_number":844,"context_line":""},{"line_number":845,"context_line":""},{"line_number":846,"context_line":"# AlexL-Zadara-PCI - added PCI device allocation exceptions"},{"line_number":847,"context_line":"class PciDeviceClassUnsupported(Invalid):"},{"line_number":848,"context_line":"    message \u003d _(\"Unsupported PCI device class: %(pci_class)s\")"},{"line_number":849,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAACX%2F%2F47w%3D","line":846,"updated":"2011-11-02 23:11:40.000000000","message":"These notes should be removed or changed to the standard form of # NOTE(alexl): blah blah\n\nIn this case I don\u0027t think they are really necessary so i would vote for removing them.  We have git blame to see who is responsible for adding the lines.","commit_id":"48c878d8ba8eb34cbe722fab39b9a72a272048c5"}],"nova/tests/test_instance_types.py":[{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"2424f300858d8b697edb4d5f9de5591a7d48c591","unresolved":false,"context_lines":[{"line_number":219,"context_line":"        self.assertEqual(default_instance_type, fetched)"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"# AlexL-Zadara-PCI"},{"line_number":223,"context_line":"class InstanceTypeWithExtraSpecsTestCase(test.TestCase):"},{"line_number":224,"context_line":"    \"\"\""},{"line_number":225,"context_line":"    Test cases for instance type code, using also the \u0027extra_specs\u0027 parameter"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAACX%2F%2F47s%3D","line":222,"updated":"2011-11-02 23:11:40.000000000","message":"again.","commit_id":"48c878d8ba8eb34cbe722fab39b9a72a272048c5"}],"nova/tests/test_libvirt.py":[{"author":{"_account_id":518,"name":"Soren Hansen","email":"soren@linux2go.dk","username":"soren"},"change_message_id":"d142997f7a9c9369e03f5bde753e6f16a2827120","unresolved":false,"context_lines":[{"line_number":276,"context_line":""},{"line_number":277,"context_line":"        # AlexL-Zadara-PCI"},{"line_number":278,"context_line":"        # A fake PCI driver"},{"line_number":279,"context_line":"        class FakePciDriver:"},{"line_number":280,"context_line":"            def init_host(self, host, **kwargs):"},{"line_number":281,"context_line":"                pass"},{"line_number":282,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAACn%2F%2F%2FZM%3D","line":279,"updated":"2011-11-10 15:04:11.000000000","message":"I would prefer a fake PCI defined right next to the real one so that it can be used from outside of this test.","commit_id":"48c878d8ba8eb34cbe722fab39b9a72a272048c5"}],"nova/tests/test_pci.py":[{"author":{"_account_id":518,"name":"Soren Hansen","email":"soren@linux2go.dk","username":"soren"},"change_message_id":"d142997f7a9c9369e03f5bde753e6f16a2827120","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        self.pci_driver \u003d None"},{"line_number":57,"context_line":"        super(PciInventoryTestCase, self).tearDown()"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def test_pci_inventory_static_config_simple_errors(self):"},{"line_number":60,"context_line":"        # Test malformed flags"},{"line_number":61,"context_line":"        FLAGS.pci_devices \u003d [\u0027{\"pci_addr\": \"0010:00:ab.d\", \"pci_class\" :\\"},{"line_number":62,"context_line":"        \"net_vf\", \"network_id\":\"br500\", parent_pf:\"eth2\"}\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAACn%2F%2F%2FYk%3D","line":59,"updated":"2011-11-10 15:04:11.000000000","message":"Would you mind making each of these a separate test?","commit_id":"48c878d8ba8eb34cbe722fab39b9a72a272048c5"},{"author":{"_account_id":518,"name":"Soren Hansen","email":"soren@linux2go.dk","username":"soren"},"change_message_id":"d142997f7a9c9369e03f5bde753e6f16a2827120","unresolved":false,"context_lines":[{"line_number":190,"context_line":"        self.pci_driver \u003d None"},{"line_number":191,"context_line":"        super(PciInstanceTypeTestCase, self).tearDown()"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    def test_pci_allocation_required(self):"},{"line_number":194,"context_line":"        alloc_requirement1 \u003d ["},{"line_number":195,"context_line":"            dict(pci_class\u003d\u0027net_vf\u0027, count\u003d2, network_id\u003d\u0027netXXX\u0027)]"},{"line_number":196,"context_line":"        alloc_requirement2 \u003d ["}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAACn%2F%2F%2FYQ%3D","line":193,"updated":"2011-11-10 15:04:11.000000000","message":"Same here. Please split them into separate tests.","commit_id":"48c878d8ba8eb34cbe722fab39b9a72a272048c5"},{"author":{"_account_id":518,"name":"Soren Hansen","email":"soren@linux2go.dk","username":"soren"},"change_message_id":"d142997f7a9c9369e03f5bde753e6f16a2827120","unresolved":false,"context_lines":[{"line_number":239,"context_line":"            it_pci_requir3)"},{"line_number":240,"context_line":"        self.assertDictListMatch(alloc_req, alloc_requirement3)"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    def test_pci_allocation_required_errors(self):"},{"line_number":243,"context_line":"        # Malformed"},{"line_number":244,"context_line":"        alloc_requirement_str1 \u003d \u0027[{\"pci_class: \"net_vf\", \"count\":1]\u0027"},{"line_number":245,"context_line":"        # Not a JSON array"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAACn%2F%2F%2FYM%3D","line":242,"updated":"2011-11-10 15:04:11.000000000","message":"Same here. You don\u0027t seem to benefit by having them all in the same method, so it\u0027s better to split them up.","commit_id":"48c878d8ba8eb34cbe722fab39b9a72a272048c5"},{"author":{"_account_id":518,"name":"Soren Hansen","email":"soren@linux2go.dk","username":"soren"},"change_message_id":"d142997f7a9c9369e03f5bde753e6f16a2827120","unresolved":false,"context_lines":[{"line_number":352,"context_line":"            \u0027pci_devices_test-host\u0027: \u0027[]\u0027})"},{"line_number":353,"context_line":"        self.i7bad_ref \u003d db.instance_create(ctx, values)"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"    def tearDown(self):"},{"line_number":356,"context_line":"        self.pci_driver \u003d None"},{"line_number":357,"context_line":"        super(PciInstanceMetadataErrorsTestCase, self).tearDown()"},{"line_number":358,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAACn%2F%2F%2FYE%3D","line":355,"updated":"2011-11-10 15:04:11.000000000","message":"You\u0027re leaving a bunch of instances in the database from the setUp method. Can you either clean them up here in the tearDown or use addCleanup in setUp to do so?","commit_id":"48c878d8ba8eb34cbe722fab39b9a72a272048c5"},{"author":{"_account_id":518,"name":"Soren Hansen","email":"soren@linux2go.dk","username":"soren"},"change_message_id":"d142997f7a9c9369e03f5bde753e6f16a2827120","unresolved":false,"context_lines":[{"line_number":528,"context_line":"                                     pci_dev2._class_specific_params)"},{"line_number":529,"context_line":""},{"line_number":530,"context_line":"    def tearDown(self):"},{"line_number":531,"context_line":"        self.pci_driver \u003d None"},{"line_number":532,"context_line":"        super(PciInstanceMetadataTestCase, self).tearDown()"},{"line_number":533,"context_line":""},{"line_number":534,"context_line":"    def test_get_allocated_devices_for_instance(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAACn%2F%2F%2FX8%3D","line":531,"updated":"2011-11-10 15:04:11.000000000","message":"Same as above.","commit_id":"48c878d8ba8eb34cbe722fab39b9a72a272048c5"},{"author":{"_account_id":518,"name":"Soren Hansen","email":"soren@linux2go.dk","username":"soren"},"change_message_id":"d142997f7a9c9369e03f5bde753e6f16a2827120","unresolved":false,"context_lines":[{"line_number":531,"context_line":"        self.pci_driver \u003d None"},{"line_number":532,"context_line":"        super(PciInstanceMetadataTestCase, self).tearDown()"},{"line_number":533,"context_line":""},{"line_number":534,"context_line":"    def test_get_allocated_devices_for_instance(self):"},{"line_number":535,"context_line":"        allocated \u003d self.pci_driver._find_allocated_pci_devices_for_instance("},{"line_number":536,"context_line":"            self.i1_ref)"},{"line_number":537,"context_line":"        correct_allocated \u003d self._construct_allocated_from_instance_values("}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAACn%2F%2F%2FX4%3D","line":534,"updated":"2011-11-10 15:04:11.000000000","message":"Can you split these as well, please?","commit_id":"48c878d8ba8eb34cbe722fab39b9a72a272048c5"},{"author":{"_account_id":518,"name":"Soren Hansen","email":"soren@linux2go.dk","username":"soren"},"change_message_id":"d142997f7a9c9369e03f5bde753e6f16a2827120","unresolved":false,"context_lines":[{"line_number":819,"context_line":"        self.pci_driver \u003d None"},{"line_number":820,"context_line":"        super(PciDeviceAllocationTestCase, self).tearDown()"},{"line_number":821,"context_line":""},{"line_number":822,"context_line":"    def test_allocate_pci_devices(self):"},{"line_number":823,"context_line":"        ctx \u003d context.get_admin_context()"},{"line_number":824,"context_line":""},{"line_number":825,"context_line":"        # class1: 0, class2: 0, netvf: 0"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAACn%2F%2F%2FX0%3D","line":822,"updated":"2011-11-10 15:04:11.000000000","message":"Also please split this up.","commit_id":"48c878d8ba8eb34cbe722fab39b9a72a272048c5"},{"author":{"_account_id":518,"name":"Soren Hansen","email":"soren@linux2go.dk","username":"soren"},"change_message_id":"d142997f7a9c9369e03f5bde753e6f16a2827120","unresolved":false,"context_lines":[{"line_number":1327,"context_line":"        self.pci_driver \u003d None"},{"line_number":1328,"context_line":"        super(NetVfPciDeviceAllocationTestCase, self).tearDown()"},{"line_number":1329,"context_line":""},{"line_number":1330,"context_line":"    def test_allocate_pci_devices(self):"},{"line_number":1331,"context_line":"        ctx \u003d context.get_admin_context()"},{"line_number":1332,"context_line":""},{"line_number":1333,"context_line":"        # br500: 0, br501: 0, br502: 0"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAACn%2F%2F%2FXw%3D","line":1330,"updated":"2011-11-10 15:04:11.000000000","message":"Please split these up as well.","commit_id":"48c878d8ba8eb34cbe722fab39b9a72a272048c5"}],"nova/virt/libvirt.xml.template":[{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"2424f300858d8b697edb4d5f9de5591a7d48c591","unresolved":false,"context_lines":[{"line_number":145,"context_line":""},{"line_number":146,"context_line":"#end for"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"\u003c!-- AlexL-Zadara-PCI --\u003e"},{"line_number":149,"context_line":"#for $pci_device in $pci_devices"},{"line_number":150,"context_line":"        \u003chostdev mode\u003d\u0027subsystem\u0027 type\u003d\u0027pci\u0027 managed\u003d\u0027yes\u0027\u003e"},{"line_number":151,"context_line":"          \u003csource\u003e"}],"source_content_type":"application/octet-stream","patch_set":3,"id":"AAAACX%2F%2F47o%3D","line":148,"updated":"2011-11-02 23:11:40.000000000","message":"this one too","commit_id":"48c878d8ba8eb34cbe722fab39b9a72a272048c5"}],"nova/virt/libvirt/pci.py":[{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"204df85989cefaf448423a8b059abc4c45b63377","unresolved":false,"context_lines":[{"line_number":27,"context_line":"LOG \u003d logging.getLogger(\u0027nova.virt.libvirt.pci\u0027)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"libvirt \u003d None"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class LibvirtPciDriver(pci.PciDriver):"},{"line_number":33,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F8sc%3D","line":30,"updated":"2011-10-13 05:44:29.000000000","message":"Not used (see below).","commit_id":"f440ec123e0b321b091001dac16d5a79c40e290c"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"204df85989cefaf448423a8b059abc4c45b63377","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        global libvirt"},{"line_number":55,"context_line":"        if libvirt is None:"},{"line_number":56,"context_line":"            libvirt \u003d __import__(\u0027libvirt\u0027)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        # The code below is not needed, because, as it turns out,"},{"line_number":59,"context_line":"        # libvirt/KVM does all the necessary preparations"},{"line_number":60,"context_line":"        # The code below is left only as reference"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F8sg%3D","line":57,"updated":"2011-10-13 05:44:29.000000000","message":"Might as well comment out this section as well? (move it to underneath your comment about this being left as a ref)","commit_id":"f440ec123e0b321b091001dac16d5a79c40e290c"},{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"2424f300858d8b697edb4d5f9de5591a7d48c591","unresolved":false,"context_lines":[{"line_number":32,"context_line":"class LibvirtPciDriver(pci.PciDriver):"},{"line_number":33,"context_line":"    \"\"\""},{"line_number":34,"context_line":"    Implements required methods of nova.virt.pci.PciDriver using libvirt"},{"line_number":35,"context_line":"    \"\"\""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def __init__(self):"},{"line_number":38,"context_line":"        super(LibvirtPciDriver, self).__init__()"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAACX%2F%2F47k%3D","line":35,"updated":"2011-11-02 23:11:40.000000000","message":"This can be one line with a . at the end.","commit_id":"48c878d8ba8eb34cbe722fab39b9a72a272048c5"},{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"2424f300858d8b697edb4d5f9de5591a7d48c591","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    #############################################################"},{"line_number":41,"context_line":"    # The following methods are abstract within nova.virt.pci.PciDriver"},{"line_number":42,"context_line":"    # and are implemented here"},{"line_number":43,"context_line":"    def init_host_subclass(self, **kwargs):"},{"line_number":44,"context_line":"        self._libvirt_conn \u003d kwargs.get(\u0027libvirt_connection\u0027)"},{"line_number":45,"context_line":"        if not self._libvirt_conn:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAACX%2F%2F47g%3D","line":42,"updated":"2011-11-02 23:11:40.000000000","message":"please switch to NOTE(name): form","commit_id":"48c878d8ba8eb34cbe722fab39b9a72a272048c5"},{"author":{"_account_id":518,"name":"Soren Hansen","email":"soren@linux2go.dk","username":"soren"},"change_message_id":"d142997f7a9c9369e03f5bde753e6f16a2827120","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        # The code below is not needed, in principle, because, as it turns out,"},{"line_number":59,"context_line":"        # libvirt/KVM does all the necessary preparations."},{"line_number":60,"context_line":"        # However, see issue #172: VM can be running, that has attached PCI"},{"line_number":61,"context_line":"        # devices, but this VM is already marked as \u0027deleted\u0027 in nova DB."},{"line_number":62,"context_line":"        # So his PCI devices can be assigned to a different VM, which will"},{"line_number":63,"context_line":"        # result in strange libvirt failure with error message:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAACn%2F%2F%2FZQ%3D","line":60,"updated":"2011-11-10 15:04:11.000000000","message":"\"Issue 172\" ?  We use Launchpad for bugs, and Launchpad bug number 172 is over 6 years old and about translation handling in Launchpad :)   What are you referring to?","commit_id":"48c878d8ba8eb34cbe722fab39b9a72a272048c5"},{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"2424f300858d8b697edb4d5f9de5591a7d48c591","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        # result in strange libvirt failure with error message:"},{"line_number":64,"context_line":"        # \"failed to retrieve chardev info in qemu with \u0027info chardev\u0027"},{"line_number":65,"context_line":"        # So we hope to catch this error earlier here, when we try to detach"},{"line_number":66,"context_line":"        # the PCI device."},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        # First create a PCI device name in libvirt format: pci_0000_00_04_0"},{"line_number":69,"context_line":"        pci_domain, pci_bus, pci_slot, pci_function \u003d \\"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAACX%2F%2F47c%3D","line":66,"updated":"2011-11-02 23:11:40.000000000","message":"Ditto.","commit_id":"48c878d8ba8eb34cbe722fab39b9a72a272048c5"}],"nova/virt/pci.py":[{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"204df85989cefaf448423a8b059abc4c45b63377","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Copyright (c) 2011 Zadara Storage Inc."},{"line_number":4,"context_line":"# Copyright (c) 2011 OpenStack LLC."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F8sU%3D","line":1,"updated":"2011-10-13 05:44:29.000000000","message":"This whole file seems to violate pep8 in a number of ways.  Blank lines with spaces on them... and lines that are too long.","commit_id":"f440ec123e0b321b091001dac16d5a79c40e290c"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"204df85989cefaf448423a8b059abc4c45b63377","unresolved":false,"context_lines":[{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def init_host(self, host, **kwargs):"},{"line_number":93,"context_line":"        self.host \u003d host"},{"line_number":94,"context_line":"        "},{"line_number":95,"context_line":"        self.init_host_subclass(**kwargs)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        if FLAGS.pci_devices:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F8sY%3D","line":94,"updated":"2011-10-13 05:44:29.000000000","message":"Looks like there\u0027s extra spaces on this line that would fail pep8.","commit_id":"f440ec123e0b321b091001dac16d5a79c40e290c"},{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"2424f300858d8b697edb4d5f9de5591a7d48c591","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Copyright (c) 2011 Zadara Storage Inc."},{"line_number":4,"context_line":"# Copyright (c) 2011 OpenStack LLC."}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAACX%2F%2F47Y%3D","line":1,"updated":"2011-11-02 23:11:40.000000000","message":"Comments could be cleaned up in this file.  Especially the longer comments it would be nice to have them in # NOTE(name): form.\nThe shorter ones are probably fine but the ######### lines should be removed","commit_id":"48c878d8ba8eb34cbe722fab39b9a72a272048c5"},{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"2424f300858d8b697edb4d5f9de5591a7d48c591","unresolved":false,"context_lines":[{"line_number":154,"context_line":"                    pci_dev_dict \u003d json.loads(pci_dev_string)"},{"line_number":155,"context_line":"                except (TypeError, ValueError) as exc:"},{"line_number":156,"context_line":"                    raise exception.InvalidInput(reason\u003d_(\"Failed parsing \\"},{"line_number":157,"context_line":"pci_devices flag: %(pci_dev_string)s\\n%(exc)s\") % locals())"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"                self._add_pci_device_to_inventory(pci_dev_dict)"},{"line_number":160,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAACX%2F%2F47U%3D","line":157,"updated":"2011-11-02 23:11:40.000000000","message":"you don\u0027t want a \\ here and you want two strings that will be concatenated\n_(\"Failed parsing \"\n\"pci_devices flag: ....\") % locals()","commit_id":"48c878d8ba8eb34cbe722fab39b9a72a272048c5"},{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"2424f300858d8b697edb4d5f9de5591a7d48c591","unresolved":false,"context_lines":[{"line_number":193,"context_line":"        instance_name \u003d instance[\u0027name\u0027]"},{"line_number":194,"context_line":"        it_name \u003d instance_type[\u0027name\u0027]"},{"line_number":195,"context_line":"        LOG.info(_(\"Attempting PCI device allocation for instance \\"},{"line_number":196,"context_line":"%(instance_name)s, instance_type %(it_name)s\") % locals())"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"        # Get PCI allocation requirements"},{"line_number":199,"context_line":"        alloc_requirement_list \u003d \\"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAACX%2F%2F47Q%3D","line":196,"updated":"2011-11-02 23:11:40.000000000","message":"see above","commit_id":"48c878d8ba8eb34cbe722fab39b9a72a272048c5"},{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"2424f300858d8b697edb4d5f9de5591a7d48c591","unresolved":false,"context_lines":[{"line_number":428,"context_line":"            for pci_class_dict in dict_list:"},{"line_number":429,"context_line":"                if not isinstance(pci_class_dict, dict):"},{"line_number":430,"context_line":"                    raise ValueError(_(\"Array entry %s is not \\"},{"line_number":431,"context_line":"a JSON object(key/value dict)\") % str(pci_class_dict))"},{"line_number":432,"context_line":""},{"line_number":433,"context_line":"                pci_class \u003d pci_class_dict.get(\u0027pci_class\u0027)"},{"line_number":434,"context_line":"                devs_count \u003d pci_class_dict.get(\u0027count\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAACX%2F%2F47M%3D","line":431,"updated":"2011-11-02 23:11:40.000000000","message":"above","commit_id":"48c878d8ba8eb34cbe722fab39b9a72a272048c5"},{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"2424f300858d8b697edb4d5f9de5591a7d48c591","unresolved":false,"context_lines":[{"line_number":442,"context_line":""},{"line_number":443,"context_line":"                it_name \u003d instance_type[\u0027name\u0027]"},{"line_number":444,"context_line":"                LOG.info(_(\"Instance type %(it_name)s requires %(devs_count)s \\"},{"line_number":445,"context_line":"%(pci_class)s devices: %(pci_class_dict)s\") % locals())"},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"            # Looks ok, return the allocation requirements dictionary"},{"line_number":448,"context_line":"            return dict_list"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAACX%2F%2F47I%3D","line":445,"updated":"2011-11-02 23:11:40.000000000","message":"above","commit_id":"48c878d8ba8eb34cbe722fab39b9a72a272048c5"},{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"2424f300858d8b697edb4d5f9de5591a7d48c591","unresolved":false,"context_lines":[{"line_number":452,"context_line":"            # return an empty allocation"},{"line_number":453,"context_line":"            it_name \u003d instance_type[\u0027name\u0027]"},{"line_number":454,"context_line":"            LOG.error(_(\"Instance type %(it_name)s has an illegal pci_devices \\"},{"line_number":455,"context_line":"string in extra_specs: %(pci_devices_str)s\\nError: %(exc)s\") % locals())"},{"line_number":456,"context_line":"            return None"},{"line_number":457,"context_line":""},{"line_number":458,"context_line":"    def _find_allocated_pci_devices(self, instance_id):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAACX%2F%2F47E%3D","line":455,"updated":"2011-11-02 23:11:40.000000000","message":"above","commit_id":"48c878d8ba8eb34cbe722fab39b9a72a272048c5"},{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"2424f300858d8b697edb4d5f9de5591a7d48c591","unresolved":false,"context_lines":[{"line_number":541,"context_line":"            instance_name \u003d instance[\u0027name\u0027]"},{"line_number":542,"context_line":"            LOG.error(_(\"Instance %(instance_name)s has a malformed \\"},{"line_number":543,"context_line":"pci_devices string in metadata:\\n%(pci_devices_str)s\\nError: %(exc)s\") %"},{"line_number":544,"context_line":"                locals())"},{"line_number":545,"context_line":"            return {}"},{"line_number":546,"context_line":""},{"line_number":547,"context_line":"        # Go over entries in pci_addr_list, check them, produce output"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAACX%2F%2F47A%3D","line":544,"updated":"2011-11-02 23:11:40.000000000","message":"again","commit_id":"48c878d8ba8eb34cbe722fab39b9a72a272048c5"},{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"2424f300858d8b697edb4d5f9de5591a7d48c591","unresolved":false,"context_lines":[{"line_number":551,"context_line":"            if not pci_dev:"},{"line_number":552,"context_line":"                instance_name \u003d instance[\u0027name\u0027]"},{"line_number":553,"context_line":"                LOG.error(_(\"Instance %(instance_name)s: no PciDevice found \\"},{"line_number":554,"context_line":"for PCI address: %(pci_addr)s\") % locals())"},{"line_number":555,"context_line":"                continue  # Move to next PCI address"},{"line_number":556,"context_line":""},{"line_number":557,"context_line":"            # Add pci_dev to output (if not already there)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAACX%2F%2F468%3D","line":554,"updated":"2011-11-02 23:11:40.000000000","message":"again","commit_id":"48c878d8ba8eb34cbe722fab39b9a72a272048c5"},{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"2424f300858d8b697edb4d5f9de5591a7d48c591","unresolved":false,"context_lines":[{"line_number":831,"context_line":"    def add_pci_device(self, pci_dev):"},{"line_number":832,"context_line":"        pci_class \u003d self.pci_class"},{"line_number":833,"context_line":"        LOG.info(_(\"DefaultPciInventoryManager %(pci_class)s: \\"},{"line_number":834,"context_line":"adding PCI device %(pci_dev)s\") % locals())"},{"line_number":835,"context_line":"        # No need for duplicate check here;"},{"line_number":836,"context_line":"        # this is done by the global inventory"},{"line_number":837,"context_line":"        self._my_devices.add(pci_dev)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAACX%2F%2F464%3D","line":834,"updated":"2011-11-02 23:11:40.000000000","message":"...","commit_id":"48c878d8ba8eb34cbe722fab39b9a72a272048c5"},{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"2424f300858d8b697edb4d5f9de5591a7d48c591","unresolved":false,"context_lines":[{"line_number":855,"context_line":"        if total_count \u003e 0:"},{"line_number":856,"context_line":"            pci_class \u003d self.pci_class"},{"line_number":857,"context_line":"            LOG.info(_(\"DefaultPciInventoryManager %(pci_class)s: \\"},{"line_number":858,"context_line":"normalized count: %(total_count)s\") % locals())"},{"line_number":859,"context_line":"            alloc_requirement_list.append(dict(pci_class\u003dself.pci_class,"},{"line_number":860,"context_line":"                                               count\u003dtotal_count))"},{"line_number":861,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAACX%2F%2F460%3D","line":858,"updated":"2011-11-02 23:11:40.000000000","message":"... and all the ones below...","commit_id":"48c878d8ba8eb34cbe722fab39b9a72a272048c5"}]}
