'Test for nova.virt.libvirt.driver.LibvirtDriver._get_guest_config.'

def _test_get_guest_config_ppc64(self, device_index):

    self.flags(virt_type='kvm', group='libvirt')
    drvr = libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), True)
    instance_ref = objects.Instance(**self.test_instance)
    image_meta = objects.ImageMeta.from_dict(self.test_image_meta)
    disk_info = blockinfo.get_disk_info(CONF.libvirt.virt_type, instance_ref, image_meta)
    image_meta = objects.ImageMeta.from_dict(self.test_image_meta)
    expected = (fields.Architecture.PPC64, fields.Architecture.PPC)
    for guestarch in expected:
        with mock.patch.object(libvirt_driver.libvirt_utils, 'get_arch', return_value=guestarch):
            cfg = drvr._get_guest_config(instance_ref, [], image_meta, disk_info)
            self.assertIsInstance(cfg.devices[device_index], vconfig.LibvirtConfigGuestVideo)
            self.assertEqual(cfg.devices[device_index].type, 'vga')
