)]}'
{"nova/tests/virt/libvirt/test_libvirt.py":[{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"9fdc79cfc1f4d188c86bda70568cec2fe496dd4e","unresolved":false,"context_lines":[{"line_number":693,"context_line":"        for f in caps.host.cpu.features:"},{"line_number":694,"context_line":"            if f.name \u003d\u003d \u0027aes\u0027:"},{"line_number":695,"context_line":"                c \u003d f.name"},{"line_number":696,"context_line":"        self.assertEquals(c, \u0027\u0027)"},{"line_number":697,"context_line":""},{"line_number":698,"context_line":"        # Test new verion of libvirt, should find the `aes\u0027 feature"},{"line_number":699,"context_line":"        setattr(libvirt, \u0027VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES\u0027, 1)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FPx0%3D","line":696,"updated":"2013-10-01 15:56:28.000000000","message":"Why not just self.assertNotIn(\u0027aes\u0027, caps.host.cpu.features) ?","commit_id":"7a504cadce7bd04d1496db6195c0813ea7046449"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"319b80b30c96f521134200576189750b868e61bf","unresolved":false,"context_lines":[{"line_number":693,"context_line":"        for f in caps.host.cpu.features:"},{"line_number":694,"context_line":"            if f.name \u003d\u003d \u0027aes\u0027:"},{"line_number":695,"context_line":"                c \u003d f.name"},{"line_number":696,"context_line":"        self.assertEquals(c, \u0027\u0027)"},{"line_number":697,"context_line":""},{"line_number":698,"context_line":"        # Test new verion of libvirt, should find the `aes\u0027 feature"},{"line_number":699,"context_line":"        setattr(libvirt, \u0027VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES\u0027, 1)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATH%2F%2F2%2BM%3D","line":696,"in_reply_to":"AAAAS3%2F%2FPx0%3D","updated":"2013-10-08 21:31:43.000000000","message":"I think it\u0027s because it\u0027s not caps.host.cpu.features, but be \u0027name\u0027. If we want to use assertNotIn, we need use a generator or list comprehension for it?","commit_id":"7a504cadce7bd04d1496db6195c0813ea7046449"},{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"7b31b1ac481b34c020ca4d5dc0ceb528539db8b3","unresolved":false,"context_lines":[{"line_number":693,"context_line":"        for f in caps.host.cpu.features:"},{"line_number":694,"context_line":"            if f.name \u003d\u003d \u0027aes\u0027:"},{"line_number":695,"context_line":"                c \u003d f.name"},{"line_number":696,"context_line":"        self.assertEquals(c, \u0027\u0027)"},{"line_number":697,"context_line":""},{"line_number":698,"context_line":"        # Test new verion of libvirt, should find the `aes\u0027 feature"},{"line_number":699,"context_line":"        setattr(libvirt, \u0027VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES\u0027, 1)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATH%2F%2F29c%3D","line":696,"in_reply_to":"AAAATH%2F%2F2%2BM%3D","updated":"2013-10-08 21:36:41.000000000","message":"Right.  Sorry.","commit_id":"7a504cadce7bd04d1496db6195c0813ea7046449"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"a05c3d8d1c041c2ba72f9bb0e81e4e7a517cb810","unresolved":false,"context_lines":[{"line_number":693,"context_line":"        for f in caps.host.cpu.features:"},{"line_number":694,"context_line":"            if f.name \u003d\u003d \u0027aes\u0027:"},{"line_number":695,"context_line":"                c \u003d f.name"},{"line_number":696,"context_line":"        self.assertEquals(c, \u0027\u0027)"},{"line_number":697,"context_line":""},{"line_number":698,"context_line":"        # Test new verion of libvirt, should find the `aes\u0027 feature"},{"line_number":699,"context_line":"        setattr(libvirt, \u0027VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES\u0027, 1)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATH%2F%2Fd2s%3D","line":696,"in_reply_to":"AAAATH%2F%2F268%3D","updated":"2013-10-15 20:08:10.000000000","message":"Done","commit_id":"7a504cadce7bd04d1496db6195c0813ea7046449"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"dbc4a34d1b07d2d9c2844b4d8da4ce6378eeb452","unresolved":false,"context_lines":[{"line_number":693,"context_line":"        for f in caps.host.cpu.features:"},{"line_number":694,"context_line":"            if f.name \u003d\u003d \u0027aes\u0027:"},{"line_number":695,"context_line":"                c \u003d f.name"},{"line_number":696,"context_line":"        self.assertEquals(c, \u0027\u0027)"},{"line_number":697,"context_line":""},{"line_number":698,"context_line":"        # Test new verion of libvirt, should find the `aes\u0027 feature"},{"line_number":699,"context_line":"        setattr(libvirt, \u0027VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES\u0027, 1)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATH%2F%2F268%3D","line":696,"in_reply_to":"AAAATH%2F%2F29c%3D","updated":"2013-10-08 21:42:00.000000000","message":"How about:\n\n  self.assertNotIn(\u0027aes\u0027, [x.name for x in caps.host.cpu.features])\n\n?\n\nThat would make it much cleaner, IMHO.","commit_id":"7a504cadce7bd04d1496db6195c0813ea7046449"},{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"9fdc79cfc1f4d188c86bda70568cec2fe496dd4e","unresolved":false,"context_lines":[{"line_number":704,"context_line":"        for f in caps.host.cpu.features:"},{"line_number":705,"context_line":"            if f.name \u003d\u003d \u0027aes\u0027:"},{"line_number":706,"context_line":"                c \u003d f.name"},{"line_number":707,"context_line":"        self.assertEquals(c, \u0027aes\u0027)"},{"line_number":708,"context_line":""},{"line_number":709,"context_line":"    def test_get_guest_config(self):"},{"line_number":710,"context_line":"        conn \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), True)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FPxs%3D","line":707,"updated":"2013-10-01 15:56:28.000000000","message":"Why not just self.assertIn(\u0027aes\u0027, caps.host.cpu.features) ?","commit_id":"7a504cadce7bd04d1496db6195c0813ea7046449"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"319b80b30c96f521134200576189750b868e61bf","unresolved":false,"context_lines":[{"line_number":704,"context_line":"        for f in caps.host.cpu.features:"},{"line_number":705,"context_line":"            if f.name \u003d\u003d \u0027aes\u0027:"},{"line_number":706,"context_line":"                c \u003d f.name"},{"line_number":707,"context_line":"        self.assertEquals(c, \u0027aes\u0027)"},{"line_number":708,"context_line":""},{"line_number":709,"context_line":"    def test_get_guest_config(self):"},{"line_number":710,"context_line":"        conn \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), True)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATH%2F%2F2%2BI%3D","line":707,"in_reply_to":"AAAAS3%2F%2FPxs%3D","updated":"2013-10-08 21:31:43.000000000","message":"The same as above .","commit_id":"7a504cadce7bd04d1496db6195c0813ea7046449"},{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"7b31b1ac481b34c020ca4d5dc0ceb528539db8b3","unresolved":false,"context_lines":[{"line_number":704,"context_line":"        for f in caps.host.cpu.features:"},{"line_number":705,"context_line":"            if f.name \u003d\u003d \u0027aes\u0027:"},{"line_number":706,"context_line":"                c \u003d f.name"},{"line_number":707,"context_line":"        self.assertEquals(c, \u0027aes\u0027)"},{"line_number":708,"context_line":""},{"line_number":709,"context_line":"    def test_get_guest_config(self):"},{"line_number":710,"context_line":"        conn \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), True)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATH%2F%2F29Y%3D","line":707,"in_reply_to":"AAAATH%2F%2F2%2BI%3D","updated":"2013-10-08 21:36:41.000000000","message":"Right, sorry.","commit_id":"7a504cadce7bd04d1496db6195c0813ea7046449"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"83df16f9742554526afad4758d6bb17821820277","unresolved":false,"context_lines":[{"line_number":2097,"context_line":"                        libvirt.VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES)"},{"line_number":2098,"context_line":"                xmlstr \u003d (xmlstr[0:xmlstr.index(\"\u003ccpu\u003e\") - 1] +"},{"line_number":2099,"context_line":"                          cpu +"},{"line_number":2100,"context_line":"                          xmlstr[xmlstr.index(\"\u003c/cpu\u003e\") + 7:-1])"},{"line_number":2101,"context_line":"            self._caps \u003d vconfig.LibvirtConfigCaps()"},{"line_number":2102,"context_line":"            self._caps.parse_str(xmlstr)"},{"line_number":2103,"context_line":"        return self._caps"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAASn%2F%2FHBQ%3D","line":2100,"updated":"2013-09-11 20:13:10.000000000","message":"This works but means you have twice as much error-prone slicing as needed.  How about xmlstr \u003d xmlstr.replace(cpu, \"\") ?","commit_id":"34e5f0c9064c7e33b75ecdf29deaf36b4667ca1e"},{"author":{"_account_id":1981,"name":"Don Dugger","email":"n0ano@n0ano.com","username":"n0ano"},"change_message_id":"db83033c92b36be55cc294f11275a3c2e2909078","unresolved":false,"context_lines":[{"line_number":2097,"context_line":"                        libvirt.VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES)"},{"line_number":2098,"context_line":"                xmlstr \u003d (xmlstr[0:xmlstr.index(\"\u003ccpu\u003e\") - 1] +"},{"line_number":2099,"context_line":"                          cpu +"},{"line_number":2100,"context_line":"                          xmlstr[xmlstr.index(\"\u003c/cpu\u003e\") + 7:-1])"},{"line_number":2101,"context_line":"            self._caps \u003d vconfig.LibvirtConfigCaps()"},{"line_number":2102,"context_line":"            self._caps.parse_str(xmlstr)"},{"line_number":2103,"context_line":"        return self._caps"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAASn%2F%2FGC8%3D","line":2100,"in_reply_to":"AAAASn%2F%2FHBQ%3D","updated":"2013-09-12 04:43:24.000000000","message":"Good suggestion, that does make things cleaner.  I\u0027m testing a patch to implement this right now, will push it soon.","commit_id":"34e5f0c9064c7e33b75ecdf29deaf36b4667ca1e"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"354806d36863c1a2e67770dbeb3b0eb916d0a5d7","unresolved":false,"context_lines":[{"line_number":2566,"context_line":"        if not self._caps:"},{"line_number":2567,"context_line":"            xmlstr \u003d self._conn.getCapabilities()"},{"line_number":2568,"context_line":"            if hasattr(libvirt, \u0027VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES\u0027):"},{"line_number":2569,"context_line":"                cpu \u003d xmlstr[xmlstr.index(\"\u003ccpu\u003e\"):xmlstr.index(\"\u003c/cpu\u003e\") + 6]"},{"line_number":2570,"context_line":"                features \u003d self._conn.baselineCPU([cpu],"},{"line_number":2571,"context_line":"                        libvirt.VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES)"},{"line_number":2572,"context_line":"                xmlstr \u003d xmlstr.replace(cpu, features)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATH%2F%2F0Oc%3D","line":2569,"updated":"2013-10-09 13:34:16.000000000","message":"Ewwww, no. Hacking around with XML like this is horrible. We have APIs for accessing libvirt XML documents\n\n caps \u003d self.get_host_capabilities()\n cpuxml \u003d caps.host.cpu.format_dom()","commit_id":"7a504cadce7bd04d1496db6195c0813ea7046449"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"a05c3d8d1c041c2ba72f9bb0e81e4e7a517cb810","unresolved":false,"context_lines":[{"line_number":2566,"context_line":"        if not self._caps:"},{"line_number":2567,"context_line":"            xmlstr \u003d self._conn.getCapabilities()"},{"line_number":2568,"context_line":"            if hasattr(libvirt, \u0027VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES\u0027):"},{"line_number":2569,"context_line":"                cpu \u003d xmlstr[xmlstr.index(\"\u003ccpu\u003e\"):xmlstr.index(\"\u003c/cpu\u003e\") + 6]"},{"line_number":2570,"context_line":"                features \u003d self._conn.baselineCPU([cpu],"},{"line_number":2571,"context_line":"                        libvirt.VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES)"},{"line_number":2572,"context_line":"                xmlstr \u003d xmlstr.replace(cpu, features)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATH%2F%2Fd2g%3D","line":2569,"in_reply_to":"AAAATH%2F%2F0Oc%3D","updated":"2013-10-15 20:08:10.000000000","message":"Done","commit_id":"7a504cadce7bd04d1496db6195c0813ea7046449"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"f84cfd5d28788576a7f805e26d833140d5513c5d","unresolved":false,"context_lines":[{"line_number":2575,"context_line":"            self._caps.parse_str(xmlstr)"},{"line_number":2576,"context_line":"            if hasattr(libvirt, \u0027VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES\u0027):"},{"line_number":2577,"context_line":"                features \u003d self._conn.baselineCPU("},{"line_number":2578,"context_line":"                    [self._caps.host.cpu.to_xml()],"},{"line_number":2579,"context_line":"                    libvirt.VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES)"},{"line_number":2580,"context_line":"                if features:"},{"line_number":2581,"context_line":"                    self._caps.host.cpu \u003d vconfig.LibvirtConfigCPU()"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATH%2F%2Fb08%3D","line":2578,"updated":"2013-10-16 08:17:55.000000000","message":"You can\u0027t assume that self._caps.host.cpu is not None - not all libvirt drivers will populate it, so this will likely raise an exception with LXC and Xen.","commit_id":"7bddba3a427ef5ee6c70f6d51aa3edddb9140dc9"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"3e0b1e23f80766896cb2b4054216515c7b173eab","unresolved":false,"context_lines":[{"line_number":2575,"context_line":"            self._caps.parse_str(xmlstr)"},{"line_number":2576,"context_line":"            if hasattr(libvirt, \u0027VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES\u0027):"},{"line_number":2577,"context_line":"                features \u003d self._conn.baselineCPU("},{"line_number":2578,"context_line":"                    [self._caps.host.cpu.to_xml()],"},{"line_number":2579,"context_line":"                    libvirt.VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES)"},{"line_number":2580,"context_line":"                if features:"},{"line_number":2581,"context_line":"                    self._caps.host.cpu \u003d vconfig.LibvirtConfigCPU()"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATX%2F%2F9DI%3D","line":2578,"in_reply_to":"AAAATH%2F%2FW9g%3D","updated":"2013-10-23 19:40:26.000000000","message":"Sorry for slow response. Thanks.","commit_id":"7bddba3a427ef5ee6c70f6d51aa3edddb9140dc9"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"07cf747089ebbeff7d2916c30f51087ea467459c","unresolved":false,"context_lines":[{"line_number":2575,"context_line":"            self._caps.parse_str(xmlstr)"},{"line_number":2576,"context_line":"            if hasattr(libvirt, \u0027VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES\u0027):"},{"line_number":2577,"context_line":"                features \u003d self._conn.baselineCPU("},{"line_number":2578,"context_line":"                    [self._caps.host.cpu.to_xml()],"},{"line_number":2579,"context_line":"                    libvirt.VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES)"},{"line_number":2580,"context_line":"                if features:"},{"line_number":2581,"context_line":"                    self._caps.host.cpu \u003d vconfig.LibvirtConfigCPU()"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATH%2F%2FW9g%3D","line":2578,"in_reply_to":"AAAATH%2F%2FYDE%3D","updated":"2013-10-17 09:06:52.000000000","message":"No need to check for None here.","commit_id":"7bddba3a427ef5ee6c70f6d51aa3edddb9140dc9"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"5aaac0a29c4f9e20d2bc59c48240523c8b388bae","unresolved":false,"context_lines":[{"line_number":2575,"context_line":"            self._caps.parse_str(xmlstr)"},{"line_number":2576,"context_line":"            if hasattr(libvirt, \u0027VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES\u0027):"},{"line_number":2577,"context_line":"                features \u003d self._conn.baselineCPU("},{"line_number":2578,"context_line":"                    [self._caps.host.cpu.to_xml()],"},{"line_number":2579,"context_line":"                    libvirt.VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES)"},{"line_number":2580,"context_line":"                if features:"},{"line_number":2581,"context_line":"                    self._caps.host.cpu \u003d vconfig.LibvirtConfigCPU()"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATH%2F%2FYDE%3D","line":2578,"in_reply_to":"AAAATH%2F%2FZyg%3D","updated":"2013-10-16 23:37:00.000000000","message":"So do you think we still need check if the self._caps.host.cpu is None? I\u0027d prefer to not, since other function not check either. Your idea?","commit_id":"7bddba3a427ef5ee6c70f6d51aa3edddb9140dc9"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"422b3d933b05206687ef8ace7ef02462609c1cf7","unresolved":false,"context_lines":[{"line_number":2575,"context_line":"            self._caps.parse_str(xmlstr)"},{"line_number":2576,"context_line":"            if hasattr(libvirt, \u0027VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES\u0027):"},{"line_number":2577,"context_line":"                features \u003d self._conn.baselineCPU("},{"line_number":2578,"context_line":"                    [self._caps.host.cpu.to_xml()],"},{"line_number":2579,"context_line":"                    libvirt.VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES)"},{"line_number":2580,"context_line":"                if features:"},{"line_number":2581,"context_line":"                    self._caps.host.cpu \u003d vconfig.LibvirtConfigCPU()"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATH%2F%2FZyg%3D","line":2578,"in_reply_to":"AAAATH%2F%2FaV4%3D","updated":"2013-10-16 16:32:12.000000000","message":"Hmm, actually it seems LXC will have a CPU in the capabilities - but it only specifies the architecture name - eg x86_64 no details about flags or mode. The baselineCPU method is definitely QEMU only though","commit_id":"7bddba3a427ef5ee6c70f6d51aa3edddb9140dc9"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"1c711b611b8b9271544aca2dcfa913aaf66a621e","unresolved":false,"context_lines":[{"line_number":2575,"context_line":"            self._caps.parse_str(xmlstr)"},{"line_number":2576,"context_line":"            if hasattr(libvirt, \u0027VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES\u0027):"},{"line_number":2577,"context_line":"                features \u003d self._conn.baselineCPU("},{"line_number":2578,"context_line":"                    [self._caps.host.cpu.to_xml()],"},{"line_number":2579,"context_line":"                    libvirt.VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES)"},{"line_number":2580,"context_line":"                if features:"},{"line_number":2581,"context_line":"                    self._caps.host.cpu \u003d vconfig.LibvirtConfigCPU()"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATH%2F%2FaV4%3D","line":2578,"in_reply_to":"AAAATH%2F%2Fb08%3D","updated":"2013-10-16 14:53:01.000000000","message":"I\u0027m a bit surprised about this.For example, in get_cpu_info(), it didn\u0027t check if the host.cpu is None or not. Is that a bug also?\n\nAnd can the self._caps.host.cpu be None also? At least from LibvirtConfigCaps() in \"nova/virt/libvirt/config.py\", it can be None since it depends on xml string has \u0027host\u0027 tag or not.","commit_id":"7bddba3a427ef5ee6c70f6d51aa3edddb9140dc9"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"1c711b611b8b9271544aca2dcfa913aaf66a621e","unresolved":false,"context_lines":[{"line_number":2577,"context_line":"                features \u003d self._conn.baselineCPU("},{"line_number":2578,"context_line":"                    [self._caps.host.cpu.to_xml()],"},{"line_number":2579,"context_line":"                    libvirt.VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES)"},{"line_number":2580,"context_line":"                if features:"},{"line_number":2581,"context_line":"                    self._caps.host.cpu \u003d vconfig.LibvirtConfigCPU()"},{"line_number":2582,"context_line":"                    self._caps.host.cpu.parse_str(features)"},{"line_number":2583,"context_line":"        return self._caps"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATH%2F%2FaUk%3D","line":2580,"updated":"2013-10-16 14:53:01.000000000","message":"A question to the check. If the target CPU has no support of VIRT_CONNECT_BASELINE_CPU_EXPAND_FEATURES, will the baselineCPU() return None or -1? I checked the implementation in libvirt and seems it will return -1? I\u0027m a bit surprise to that, but not quite sure. Is my understand correct? \n\nIMO, -1 is a C-language style return while None is a python style return.","commit_id":"7bddba3a427ef5ee6c70f6d51aa3edddb9140dc9"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"3e0b1e23f80766896cb2b4054216515c7b173eab","unresolved":false,"context_lines":[{"line_number":2577,"context_line":"                features \u003d self._conn.baselineCPU("},{"line_number":2578,"context_line":"                    [self._caps.host.cpu.to_xml()],"},{"line_number":2579,"context_line":"                    libvirt.VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES)"},{"line_number":2580,"context_line":"                if features:"},{"line_number":2581,"context_line":"                    self._caps.host.cpu \u003d vconfig.LibvirtConfigCPU()"},{"line_number":2582,"context_line":"                    self._caps.host.cpu.parse_str(features)"},{"line_number":2583,"context_line":"        return self._caps"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATX%2F%2F8t8%3D","line":2580,"in_reply_to":"AAAATH%2F%2FW9U%3D","updated":"2013-10-23 19:40:26.000000000","message":"Done","commit_id":"7bddba3a427ef5ee6c70f6d51aa3edddb9140dc9"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"07cf747089ebbeff7d2916c30f51087ea467459c","unresolved":false,"context_lines":[{"line_number":2577,"context_line":"                features \u003d self._conn.baselineCPU("},{"line_number":2578,"context_line":"                    [self._caps.host.cpu.to_xml()],"},{"line_number":2579,"context_line":"                    libvirt.VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES)"},{"line_number":2580,"context_line":"                if features:"},{"line_number":2581,"context_line":"                    self._caps.host.cpu \u003d vconfig.LibvirtConfigCPU()"},{"line_number":2582,"context_line":"                    self._caps.host.cpu.parse_str(features)"},{"line_number":2583,"context_line":"        return self._caps"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATH%2F%2FW9U%3D","line":2580,"in_reply_to":"AAAATH%2F%2FYCo%3D","updated":"2013-10-17 09:06:52.000000000","message":"Yes, catch the VIR_ERR_NO_SUPPORT error code from libvirt.","commit_id":"7bddba3a427ef5ee6c70f6d51aa3edddb9140dc9"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"5aaac0a29c4f9e20d2bc59c48240523c8b388bae","unresolved":false,"context_lines":[{"line_number":2577,"context_line":"                features \u003d self._conn.baselineCPU("},{"line_number":2578,"context_line":"                    [self._caps.host.cpu.to_xml()],"},{"line_number":2579,"context_line":"                    libvirt.VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES)"},{"line_number":2580,"context_line":"                if features:"},{"line_number":2581,"context_line":"                    self._caps.host.cpu \u003d vconfig.LibvirtConfigCPU()"},{"line_number":2582,"context_line":"                    self._caps.host.cpu.parse_str(features)"},{"line_number":2583,"context_line":"        return self._caps"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATH%2F%2FYCo%3D","line":2580,"in_reply_to":"AAAATH%2F%2FZzM%3D","updated":"2013-10-16 23:37:00.000000000","message":"So you mean I need not only check if features is none, but also catch the exception ?","commit_id":"7bddba3a427ef5ee6c70f6d51aa3edddb9140dc9"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"422b3d933b05206687ef8ace7ef02462609c1cf7","unresolved":false,"context_lines":[{"line_number":2577,"context_line":"                features \u003d self._conn.baselineCPU("},{"line_number":2578,"context_line":"                    [self._caps.host.cpu.to_xml()],"},{"line_number":2579,"context_line":"                    libvirt.VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES)"},{"line_number":2580,"context_line":"                if features:"},{"line_number":2581,"context_line":"                    self._caps.host.cpu \u003d vconfig.LibvirtConfigCPU()"},{"line_number":2582,"context_line":"                    self._caps.host.cpu.parse_str(features)"},{"line_number":2583,"context_line":"        return self._caps"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATH%2F%2FZzM%3D","line":2580,"in_reply_to":"AAAATH%2F%2FaUk%3D","updated":"2013-10-16 16:32:12.000000000","message":"baselineCPU returns a string, not a number. It will return a CPU string, or raise an exception","commit_id":"7bddba3a427ef5ee6c70f6d51aa3edddb9140dc9"},{"author":{"_account_id":2531,"name":"Xu Chen","email":"xchenum@gmail.com","username":"xchenum"},"change_message_id":"8d3d15f473e4dd0f901ae5a2c9056af976b41b38","unresolved":false,"context_lines":[{"line_number":2589,"context_line":"            self._caps.parse_str(xmlstr)"},{"line_number":2590,"context_line":"            if hasattr(libvirt, \u0027VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES\u0027):"},{"line_number":2591,"context_line":"                try:"},{"line_number":2592,"context_line":"                    features \u003d self._conn.baselineCPU("},{"line_number":2593,"context_line":"                        [self._caps.host.cpu.to_xml()],"},{"line_number":2594,"context_line":"                        libvirt.VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES)"},{"line_number":2595,"context_line":"                    if features:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2Fa9c%3D","line":2592,"updated":"2013-11-06 16:07:17.000000000","message":"The return value of features is for some reason -1 on my setup, and the following piece of code trying to parse \"-1\" into xml fails and halts nova-compute.","commit_id":"3b8c26321bce07b8ad588099c1fdcef858e748a8"},{"author":{"_account_id":2531,"name":"Xu Chen","email":"xchenum@gmail.com","username":"xchenum"},"change_message_id":"66a8e1e0fbd1593b59123489e49f07d624a906a7","unresolved":false,"context_lines":[{"line_number":2589,"context_line":"            self._caps.parse_str(xmlstr)"},{"line_number":2590,"context_line":"            if hasattr(libvirt, \u0027VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES\u0027):"},{"line_number":2591,"context_line":"                try:"},{"line_number":2592,"context_line":"                    features \u003d self._conn.baselineCPU("},{"line_number":2593,"context_line":"                        [self._caps.host.cpu.to_xml()],"},{"line_number":2594,"context_line":"                        libvirt.VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES)"},{"line_number":2595,"context_line":"                    if features:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2FWO4%3D","line":2592,"in_reply_to":"AAAATn%2F%2Fa5g%3D","updated":"2013-11-08 16:23:04.000000000","message":"libvirt 1.1.4\nqemu-kvm 1.6.0","commit_id":"3b8c26321bce07b8ad588099c1fdcef858e748a8"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"2aeb210626226d6511a63c739f7f7d4467f3ad14","unresolved":false,"context_lines":[{"line_number":2589,"context_line":"            self._caps.parse_str(xmlstr)"},{"line_number":2590,"context_line":"            if hasattr(libvirt, \u0027VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES\u0027):"},{"line_number":2591,"context_line":"                try:"},{"line_number":2592,"context_line":"                    features \u003d self._conn.baselineCPU("},{"line_number":2593,"context_line":"                        [self._caps.host.cpu.to_xml()],"},{"line_number":2594,"context_line":"                        libvirt.VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES)"},{"line_number":2595,"context_line":"                    if features:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2Fa5g%3D","line":2592,"in_reply_to":"AAAATn%2F%2Fa9c%3D","updated":"2013-11-06 16:51:00.000000000","message":"Can you share me your libvirt version and is the architect you are running is x86?","commit_id":"3b8c26321bce07b8ad588099c1fdcef858e748a8"}]}
