mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
python/qemu: rename command() to cmd()
Use a shorter name. We are going to move in iotests from qmp() to command() where possible. But command() is longer than qmp() and don't look better. Let's rename. You can simply grep for '\.command(' and for 'def command(' to check that everything is updated (command() in tests/docker/docker.py is unrelated). Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: Juan Quintela <quintela@redhat.com> Message-id: 20231006154125.1068348-6-vsementsov@yandex-team.ru [vsementsov: also update three occurrences in tests/avocado/machine_aspeed.py and keep r-b] Signed-off-by: John Snow <jsnow@redhat.com>
This commit is contained in:
parent
37274707f6
commit
684750ab4f
29 changed files with 200 additions and 195 deletions
|
@ -48,7 +48,8 @@ def pci_modern_device_id(virtio_devid):
|
|||
return virtio_devid + 0x1040
|
||||
|
||||
def devtype_implements(vm, devtype, implements):
|
||||
return devtype in [d['name'] for d in vm.command('qom-list-types', implements=implements)]
|
||||
return devtype in [d['name'] for d in
|
||||
vm.cmd('qom-list-types', implements=implements)]
|
||||
|
||||
def get_pci_interfaces(vm, devtype):
|
||||
interfaces = ('pci-express-device', 'conventional-pci-device')
|
||||
|
@ -78,7 +79,7 @@ class VirtioVersionCheck(QemuSystemTest):
|
|||
vm.add_args('-S')
|
||||
vm.launch()
|
||||
|
||||
pcibuses = vm.command('query-pci')
|
||||
pcibuses = vm.cmd('query-pci')
|
||||
alldevs = [dev for bus in pcibuses for dev in bus['devices']]
|
||||
devfortest = [dev for dev in alldevs
|
||||
if dev['qdev_id'] == 'devfortest']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue