From b12f06b84b0db8a6dda3bbbf7040032bfbc5d16d Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Fri, 31 Jan 2014 15:38:39 -0500 Subject: [PATCH] cli: --disk: Add iotune paramters --- tests/cli-test-xml/compare/many-devices.xml | 16 ++++++++++++++++ tests/clitest.py | 2 +- virtinst/cli.py | 7 +++++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/tests/cli-test-xml/compare/many-devices.xml b/tests/cli-test-xml/compare/many-devices.xml index 40a49edd2..a527171a2 100644 --- a/tests/cli-test-xml/compare/many-devices.xml +++ b/tests/cli-test-xml/compare/many-devices.xml @@ -45,6 +45,14 @@ + + 1 + 5 + 10 + 2 + 6 + 20 + @@ -152,6 +160,14 @@ + + 1 + 5 + 10 + 2 + 6 + 20 + diff --git a/tests/clitest.py b/tests/clitest.py index 2698861ea..d1e2fd0fe 100644 --- a/tests/clitest.py +++ b/tests/clitest.py @@ -548,7 +548,7 @@ c.add_compare("""--hvm --pxe \ --controller usb,model=ich9-uhci3,address=0:0:4.2,index=0,master=4 \ --disk %(MANAGEDEXISTUPPER)s,cache=writeback,io=threads,perms=sh,serial=WD-WMAP9A966149 \ --disk %(NEWIMG1)s,sparse=false,size=.001,perms=ro,error_policy=enospace \ ---disk device=cdrom,bus=sata \ +--disk device=cdrom,bus=sata,read_bytes_sec=1,read_iops_sec=2,total_bytes_sec=10,total_iops_sec=20,write_bytes_sec=5,write_iops_sec=6 \ --serial tcp,host=:2222,mode=bind,protocol=telnet \ --filesystem /source,/target,mode=squash \ --network user,mac=12:34:56:78:11:22 \ diff --git a/virtinst/cli.py b/virtinst/cli.py index 56666a208..58ed48979 100644 --- a/virtinst/cli.py +++ b/virtinst/cli.py @@ -1704,6 +1704,13 @@ class ParserDisk(VirtCLIParser): self.set_param("read_only", "readonly", is_onoff=True) self.set_param("shareable", "shareable", is_onoff=True) + self.set_param("iotune_rbs", "read_bytes_sec") + self.set_param("iotune_wbs", "write_bytes_sec") + self.set_param("iotune_tbs", "total_bytes_sec") + self.set_param("iotune_ris", "read_iops_sec") + self.set_param("iotune_wis", "write_iops_sec") + self.set_param("iotune_tis", "total_iops_sec") + def _parse(self, opts, inst): def parse_size(val):