)]}'
{"nova/tests/virt/xenapi/test_xenapi.py":[{"author":{"_account_id":6904,"name":"Guillaume Thouvenin","email":"gthouvenin@mirantis.com","username":"guillaume-thouvenin"},"change_message_id":"832f336b9e7c1024e9471e9522da0f766c2e1bce","unresolved":false,"context_lines":[{"line_number":2019,"context_line":"        self.assertEqual(stats[\u0027host_memory_free\u0027], 30)"},{"line_number":2020,"context_line":"        self.assertEqual(stats[\u0027host_memory_free_computed\u0027], 40)"},{"line_number":2021,"context_line":"        self.assertEqual(stats[\u0027hypervisor_hostname\u0027], \u0027fake-xenhost\u0027)"},{"line_number":2022,"context_line":""},{"line_number":2023,"context_line":"    def test_host_state_missing_sr(self):"},{"line_number":2024,"context_line":"        def fake_safe_find_sr(session):"},{"line_number":2025,"context_line":"            raise exception.StorageRepositoryNotFound(\u0027not there\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAUX%2F%2FZB8%3D","line":2022,"updated":"2014-02-13 14:55:25.000000000","message":"Error when removing test_pci_passthrough_devices*\nI will add them again...","commit_id":"6fb0bb4fe161dda265fac9696f9c29aef26cbe22"}],"nova/virt/xenapi/fake.py":[{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"f564aafae08817a47767afc321b83dbf8458e446","unresolved":false,"context_lines":[{"line_number":698,"context_line":""},{"line_number":699,"context_line":"        \"\"\""},{"line_number":700,"context_line":"        # Driver is not pciback"},{"line_number":701,"context_line":"        dev_bad1 \u003d [\"Slot:\\t86:10.0\", \"Class:\\t0604\", \"Vendor:\\t10b5\","},{"line_number":702,"context_line":"                    \"Device:\\t8747\", \"Rev:\\tba\", \"Driver:\\tpcieport\", \"\\n\"]"},{"line_number":703,"context_line":"        # Driver is pciback but vendor and device are bad"},{"line_number":704,"context_line":"        dev_bad2 \u003d [\"Slot:\\t88:00.0\", \"Class:\\t0300\", \"Vendor:\\t0bad\","}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUX%2F%2FZoE%3D","line":701,"updated":"2014-02-13 13:41:23.000000000","message":"I don\u0027t think it\u0027s worth me picking hairs really - but I think this would be better suited in the parent changeset; the changes to fake here do not seem to be required by this changeset, so they seem to be a tidy-up of the introduction of them in the parent?","commit_id":"1f30f10484802aa438223c73f14cbb438a6c94b7"},{"author":{"_account_id":6904,"name":"Guillaume Thouvenin","email":"gthouvenin@mirantis.com","username":"guillaume-thouvenin"},"change_message_id":"78ac9d66c6f3b4f824ad3925ab5e7dd3921b5d5f","unresolved":false,"context_lines":[{"line_number":698,"context_line":""},{"line_number":699,"context_line":"        \"\"\""},{"line_number":700,"context_line":"        # Driver is not pciback"},{"line_number":701,"context_line":"        dev_bad1 \u003d [\"Slot:\\t86:10.0\", \"Class:\\t0604\", \"Vendor:\\t10b5\","},{"line_number":702,"context_line":"                    \"Device:\\t8747\", \"Rev:\\tba\", \"Driver:\\tpcieport\", \"\\n\"]"},{"line_number":703,"context_line":"        # Driver is pciback but vendor and device are bad"},{"line_number":704,"context_line":"        dev_bad2 \u003d [\"Slot:\\t88:00.0\", \"Class:\\t0300\", \"Vendor:\\t0bad\","}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUX%2F%2FZcw%3D","line":701,"in_reply_to":"AAAAUX%2F%2FZoE%3D","updated":"2014-02-13 14:10:11.000000000","message":"You\u0027re right is should be in the parent. My mistake.\nDone","commit_id":"1f30f10484802aa438223c73f14cbb438a6c94b7"}],"nova/virt/xenapi/vm_utils.py":[{"author":{"_account_id":6904,"name":"Guillaume Thouvenin","email":"gthouvenin@mirantis.com","username":"guillaume-thouvenin"},"change_message_id":"2b138de1cb4086f62c6d096910ee50451c48993a","unresolved":false,"context_lines":[{"line_number":2703,"context_line":"def set_other_config_pci(session, vm_ref, params):"},{"line_number":2704,"context_line":"    \"\"\"Set the pci key of other-config parameter to params.\"\"\""},{"line_number":2705,"context_line":"    other_config \u003d session.call_xenapi(\"VM.get_other_config\", vm_ref)"},{"line_number":2706,"context_line":"    other_config[\u0027pci\u0027] \u003d params"},{"line_number":2707,"context_line":"    session.call_xenapi(\"VM.set_other_config\", vm_ref, other_config)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2Bqq4%3D","line":2706,"updated":"2014-01-23 11:53:02.000000000","message":"As it is only used by attach_pci_devices I just update the value of the pci key. Should I check if the key already exists and if it is the case just append params?","commit_id":"d37aa8bd00d0bd97258e527efe2da6be9de9dca2"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"c02c05b1dced71ca89bc07f50f24cf4faf95bb31","unresolved":false,"context_lines":[{"line_number":2703,"context_line":"def set_other_config_pci(session, vm_ref, params):"},{"line_number":2704,"context_line":"    \"\"\"Set the pci key of other-config parameter to params.\"\"\""},{"line_number":2705,"context_line":"    other_config \u003d session.call_xenapi(\"VM.get_other_config\", vm_ref)"},{"line_number":2706,"context_line":"    other_config[\u0027pci\u0027] \u003d params"},{"line_number":2707,"context_line":"    session.call_xenapi(\"VM.set_other_config\", vm_ref, other_config)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BL5M%3D","line":2706,"in_reply_to":"AAAAUH%2F%2BRyY%3D","updated":"2014-01-29 10:09:52.000000000","message":"Yes, that\u0027s what I meant.","commit_id":"d37aa8bd00d0bd97258e527efe2da6be9de9dca2"},{"author":{"_account_id":6904,"name":"Guillaume Thouvenin","email":"gthouvenin@mirantis.com","username":"guillaume-thouvenin"},"change_message_id":"f4b519e5df1d8ca6373b7ea6c109f64442512885","unresolved":false,"context_lines":[{"line_number":2703,"context_line":"def set_other_config_pci(session, vm_ref, params):"},{"line_number":2704,"context_line":"    \"\"\"Set the pci key of other-config parameter to params.\"\"\""},{"line_number":2705,"context_line":"    other_config \u003d session.call_xenapi(\"VM.get_other_config\", vm_ref)"},{"line_number":2706,"context_line":"    other_config[\u0027pci\u0027] \u003d params"},{"line_number":2707,"context_line":"    session.call_xenapi(\"VM.set_other_config\", vm_ref, other_config)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BRyY%3D","line":2706,"in_reply_to":"AAAAUH%2F%2BS4E%3D","updated":"2014-01-28 19:52:13.000000000","message":"You mean that currently this function is called with global VM mutex holds and it is fine right?","commit_id":"d37aa8bd00d0bd97258e527efe2da6be9de9dca2"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"1db6f735e5f7015d08aef75d797c0531e085701c","unresolved":false,"context_lines":[{"line_number":2703,"context_line":"def set_other_config_pci(session, vm_ref, params):"},{"line_number":2704,"context_line":"    \"\"\"Set the pci key of other-config parameter to params.\"\"\""},{"line_number":2705,"context_line":"    other_config \u003d session.call_xenapi(\"VM.get_other_config\", vm_ref)"},{"line_number":2706,"context_line":"    other_config[\u0027pci\u0027] \u003d params"},{"line_number":2707,"context_line":"    session.call_xenapi(\"VM.set_other_config\", vm_ref, other_config)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BS4E%3D","line":2706,"in_reply_to":"AAAAUH%2F%2Bqq4%3D","updated":"2014-01-28 10:07:33.000000000","message":"I think this is fine.\n\nSince this is only used during VM boot I think we can depend on the global VM mutex to protect this too.","commit_id":"d37aa8bd00d0bd97258e527efe2da6be9de9dca2"}],"nova/virt/xenapi/vmops.py":[{"author":{"_account_id":6904,"name":"Guillaume Thouvenin","email":"gthouvenin@mirantis.com","username":"guillaume-thouvenin"},"change_message_id":"f1cb3208e988ea0082138f662855bc60b7152972","unresolved":false,"context_lines":[{"line_number":468,"context_line":"                other_config[\u0027pci\u0027] \u003d \"0/\" + pci_address"},{"line_number":469,"context_line":"                self._session.call_xenapi(\"VM.set_other_config\","},{"line_number":470,"context_line":"                                          vm_ref, other_config)"},{"line_number":471,"context_line":""},{"line_number":472,"context_line":"        @step"},{"line_number":473,"context_line":"        def boot_instance_step(undo_mgr, vm_ref):"},{"line_number":474,"context_line":"            if power_on:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FNBg%3D","line":471,"updated":"2014-01-16 12:52:55.000000000","message":"Of course It needs more work but this minimal code allows to test the attachement of a PCI device.","commit_id":"65cc422c835a15b1e1fc84d0eeb090eb9e9022ec"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"9705720e2e30914183845d142f0cfdd5c496922d","unresolved":false,"context_lines":[{"line_number":466,"context_line":"                if pci_address.count(\":\") \u003d\u003d 1:"},{"line_number":467,"context_line":"                    pci_address \u003d \"0000:\" + pci_address"},{"line_number":468,"context_line":"                other_config[\u0027pci\u0027] \u003d \"0/\" + pci_address"},{"line_number":469,"context_line":"                self._session.call_xenapi(\"VM.set_other_config\","},{"line_number":470,"context_line":"                                          vm_ref, other_config)"},{"line_number":471,"context_line":""},{"line_number":472,"context_line":"        @step"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2B0EU%3D","line":469,"updated":"2014-01-21 20:34:23.000000000","message":"set_other_config doesn\u0027t look as though it\u0027s additive - i.e. it\u0027ll only attach the last device in the list of devices you want to attach.\n\nIt\u0027d be good to have a test for this too.","commit_id":"6342b1fdae4c9eaa25c3ed2a4ed0de1c0cc00616"},{"author":{"_account_id":6904,"name":"Guillaume Thouvenin","email":"gthouvenin@mirantis.com","username":"guillaume-thouvenin"},"change_message_id":"79b2c3a941ee238019f76c298dec2cb7be597b20","unresolved":false,"context_lines":[{"line_number":466,"context_line":"                if pci_address.count(\":\") \u003d\u003d 1:"},{"line_number":467,"context_line":"                    pci_address \u003d \"0000:\" + pci_address"},{"line_number":468,"context_line":"                other_config[\u0027pci\u0027] \u003d \"0/\" + pci_address"},{"line_number":469,"context_line":"                self._session.call_xenapi(\"VM.set_other_config\","},{"line_number":470,"context_line":"                                          vm_ref, other_config)"},{"line_number":471,"context_line":""},{"line_number":472,"context_line":"        @step"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2BwyQ%3D","line":469,"in_reply_to":"AAAAUH%2F%2B0EU%3D","updated":"2014-01-22 14:13:32.000000000","message":"Oh yes and the call to set_other_config is in the loop. I fix that.","commit_id":"6342b1fdae4c9eaa25c3ed2a4ed0de1c0cc00616"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"80b7ffd92afb778073480cdbae67ee31697c65a0","unresolved":false,"context_lines":[{"line_number":457,"context_line":"            self._prepare_instance_filter(instance, network_info)"},{"line_number":458,"context_line":""},{"line_number":459,"context_line":"        @step"},{"line_number":460,"context_line":"        def attach_pci_devices(undo_mgr, vm_ref):"},{"line_number":461,"context_line":"            dev_to_passthrough \u003d \"\""},{"line_number":462,"context_line":"            devices \u003d pci_manager.get_instance_pci_devs(instance)"},{"line_number":463,"context_line":"            for d in devices:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2Bv1E%3D","line":460,"updated":"2014-01-22 15:12:31.000000000","message":"An extra step messes up the progress a little, at the moment, maybe add it into attach_disks, and rename to attach_devices.","commit_id":"30353a42ebf3e5ecd2c8f0e87c602e9d03da3204"},{"author":{"_account_id":6904,"name":"Guillaume Thouvenin","email":"gthouvenin@mirantis.com","username":"guillaume-thouvenin"},"change_message_id":"1b5bdb0d807c9a46ac5be8c343d150a06e2a500a","unresolved":false,"context_lines":[{"line_number":457,"context_line":"            self._prepare_instance_filter(instance, network_info)"},{"line_number":458,"context_line":""},{"line_number":459,"context_line":"        @step"},{"line_number":460,"context_line":"        def attach_pci_devices(undo_mgr, vm_ref):"},{"line_number":461,"context_line":"            dev_to_passthrough \u003d \"\""},{"line_number":462,"context_line":"            devices \u003d pci_manager.get_instance_pci_devs(instance)"},{"line_number":463,"context_line":"            for d in devices:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2BrQY%3D","line":460,"in_reply_to":"AAAAUH%2F%2Bv1E%3D","updated":"2014-01-23 10:06:03.000000000","message":"So I added one new step attach_devices() that calls attach_disks and attach_pci_devices.","commit_id":"30353a42ebf3e5ecd2c8f0e87c602e9d03da3204"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"ac7ae447612f6151af3944b953ad00fa9fc9dc3b","unresolved":false,"context_lines":[{"line_number":467,"context_line":"                dev_to_passthrough +\u003d \",0/\" + pci_address"},{"line_number":468,"context_line":""},{"line_number":469,"context_line":"            # Remove the first comma if string is not empty."},{"line_number":470,"context_line":"            # Note: If dev_to_passthrough is empty, we don\u0027t need to update"},{"line_number":471,"context_line":"            #       other_config."},{"line_number":472,"context_line":"            if dev_to_passthrough:"},{"line_number":473,"context_line":"                other_config \u003d self._session.call_xenapi(\"VM.get_other_config\","}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2Bv0A%3D","line":470,"updated":"2014-01-22 15:13:06.000000000","message":"oh, this should be NOTE(your-name):","commit_id":"30353a42ebf3e5ecd2c8f0e87c602e9d03da3204"},{"author":{"_account_id":6904,"name":"Guillaume Thouvenin","email":"gthouvenin@mirantis.com","username":"guillaume-thouvenin"},"change_message_id":"1b5bdb0d807c9a46ac5be8c343d150a06e2a500a","unresolved":false,"context_lines":[{"line_number":467,"context_line":"                dev_to_passthrough +\u003d \",0/\" + pci_address"},{"line_number":468,"context_line":""},{"line_number":469,"context_line":"            # Remove the first comma if string is not empty."},{"line_number":470,"context_line":"            # Note: If dev_to_passthrough is empty, we don\u0027t need to update"},{"line_number":471,"context_line":"            #       other_config."},{"line_number":472,"context_line":"            if dev_to_passthrough:"},{"line_number":473,"context_line":"                other_config \u003d self._session.call_xenapi(\"VM.get_other_config\","}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2BrQM%3D","line":470,"in_reply_to":"AAAAUH%2F%2Bv0A%3D","updated":"2014-01-23 10:06:03.000000000","message":"Done","commit_id":"30353a42ebf3e5ecd2c8f0e87c602e9d03da3204"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"80b7ffd92afb778073480cdbae67ee31697c65a0","unresolved":false,"context_lines":[{"line_number":473,"context_line":"                other_config \u003d self._session.call_xenapi(\"VM.get_other_config\","},{"line_number":474,"context_line":"                                                         vm_ref)"},{"line_number":475,"context_line":"                other_config[\u0027pci\u0027] \u003d dev_to_passthrough[1:]"},{"line_number":476,"context_line":"                self._session.call_xenapi(\"VM.set_other_config\","},{"line_number":477,"context_line":"                                          vm_ref, other_config)"},{"line_number":478,"context_line":""},{"line_number":479,"context_line":"        @step"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2Bv0w%3D","line":476,"updated":"2014-01-22 15:12:31.000000000","message":"Can we put all this code into a vm_utils method, it will be way easer to test","commit_id":"30353a42ebf3e5ecd2c8f0e87c602e9d03da3204"},{"author":{"_account_id":6904,"name":"Guillaume Thouvenin","email":"gthouvenin@mirantis.com","username":"guillaume-thouvenin"},"change_message_id":"1b5bdb0d807c9a46ac5be8c343d150a06e2a500a","unresolved":false,"context_lines":[{"line_number":473,"context_line":"                other_config \u003d self._session.call_xenapi(\"VM.get_other_config\","},{"line_number":474,"context_line":"                                                         vm_ref)"},{"line_number":475,"context_line":"                other_config[\u0027pci\u0027] \u003d dev_to_passthrough[1:]"},{"line_number":476,"context_line":"                self._session.call_xenapi(\"VM.set_other_config\","},{"line_number":477,"context_line":"                                          vm_ref, other_config)"},{"line_number":478,"context_line":""},{"line_number":479,"context_line":"        @step"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2BrQE%3D","line":476,"in_reply_to":"AAAAUH%2F%2Bv0w%3D","updated":"2014-01-23 10:06:03.000000000","message":"OK. I created a method set_other_config_pci() in vm_utils.","commit_id":"30353a42ebf3e5ecd2c8f0e87c602e9d03da3204"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"1db6f735e5f7015d08aef75d797c0531e085701c","unresolved":false,"context_lines":[{"line_number":395,"context_line":"                self._attach_mapped_block_devices(instance,"},{"line_number":396,"context_line":"                                                  block_device_info)"},{"line_number":397,"context_line":""},{"line_number":398,"context_line":"        def attach_pci_devices(undo_mgr, vm_ref):"},{"line_number":399,"context_line":"            dev_to_passthrough \u003d \"\""},{"line_number":400,"context_line":"            devices \u003d pci_manager.get_instance_pci_devs(instance)"},{"line_number":401,"context_line":"            for d in devices:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BS1g%3D","line":398,"updated":"2014-01-28 10:07:33.000000000","message":"Could this be tested through _test_spawn in test_xenapi.py?\n\nUpdate it to say whether we need to have PCI devices attached.  Will probably have to mock out pci_manager.get_instance_pci_devs, but then just verify that the device ID has been set on other-config.","commit_id":"d37aa8bd00d0bd97258e527efe2da6be9de9dca2"},{"author":{"_account_id":6904,"name":"Guillaume Thouvenin","email":"gthouvenin@mirantis.com","username":"guillaume-thouvenin"},"change_message_id":"2b138de1cb4086f62c6d096910ee50451c48993a","unresolved":false,"context_lines":[{"line_number":402,"context_line":"                pci_address \u003d d[\"address\"]"},{"line_number":403,"context_line":"                if pci_address.count(\":\") \u003d\u003d 1:"},{"line_number":404,"context_line":"                    pci_address \u003d \"0000:\" + pci_address"},{"line_number":405,"context_line":"                dev_to_passthrough +\u003d \",0/\" + pci_address"},{"line_number":406,"context_line":""},{"line_number":407,"context_line":"            # Remove the first comma if string is not empty."},{"line_number":408,"context_line":"            # Note(guillaume-thouvenin): If dev_to_passthrough is empty, we"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2Bqqc%3D","line":405,"updated":"2014-01-23 11:53:02.000000000","message":"not sure if we always use \"0/\" before the address of the pci device?","commit_id":"d37aa8bd00d0bd97258e527efe2da6be9de9dca2"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"1db6f735e5f7015d08aef75d797c0531e085701c","unresolved":false,"context_lines":[{"line_number":402,"context_line":"                pci_address \u003d d[\"address\"]"},{"line_number":403,"context_line":"                if pci_address.count(\":\") \u003d\u003d 1:"},{"line_number":404,"context_line":"                    pci_address \u003d \"0000:\" + pci_address"},{"line_number":405,"context_line":"                dev_to_passthrough +\u003d \",0/\" + pci_address"},{"line_number":406,"context_line":""},{"line_number":407,"context_line":"            # Remove the first comma if string is not empty."},{"line_number":408,"context_line":"            # Note(guillaume-thouvenin): If dev_to_passthrough is empty, we"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BS2s%3D","line":405,"in_reply_to":"AAAAUH%2F%2Bqqc%3D","updated":"2014-01-28 10:07:33.000000000","message":"Think so, yes.","commit_id":"d37aa8bd00d0bd97258e527efe2da6be9de9dca2"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"c9ff7b84b2c93b4a33b54fa5b3d5eb125fc5a9cc","unresolved":false,"context_lines":[{"line_number":403,"context_line":"                    pci_address \u003d \"0000:\" + pci_address"},{"line_number":404,"context_line":"                dev_to_passthrough +\u003d \",0/\" + pci_address"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"            # Remove the first comma if string is not empty."},{"line_number":407,"context_line":"            # Note(guillaume-thouvenin): If dev_to_passthrough is empty, we"},{"line_number":408,"context_line":"            #                            don\u0027t need to update other_config."},{"line_number":409,"context_line":"            if dev_to_passthrough:"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAUX%2F%2BtIw%3D","line":406,"updated":"2014-02-19 17:23:11.000000000","message":"not sure we need the comment here","commit_id":"f0871310b4b836ac69aadab1cb2dc653c8f6525d"}]}
