File virtinst-git-sata-support.diff of Package virt-manager.openSUSE_12.1_Update

Subject: VirtualDisk: Support sata bus
From: Jim Fehlig jfehlig@suse.com Thu Dec 22 13:16:04 2011 -0500
Date: Thu Dec 22 13:16:04 2011 -0500:
Git: 580457e92453a0668cce1a65943040a8e919a7f5

(crobinso: add a cli test)

Index: virtinst-0.600.0/man/en/virt-install.1
===================================================================
--- virtinst-0.600.0.orig/man/en/virt-install.1
+++ virtinst-0.600.0/man/en/virt-install.1
@@ -532,9 +532,9 @@ Disk device type. Value can be 'cdrom',
 cdrom is used as the install media.
 .IP "\fBbus\fR" 4
 .IX Item "bus"
-Disk bus type. Value can be 'ide', 'scsi', 'usb', 'virtio' or 'xen'.  The
-default is hypervisor dependent since not all hypervisors support all bus
-types.
+Disk bus type. Value can be 'ide', 'sata', 'scsi', 'usb', 'virtio' or 'xen'.
+The default is hypervisor dependent since not all hypervisors support all
+bus types.
 .IP "\fBperms\fR" 4
 .IX Item "perms"
 Disk permissions. Value can be 'rw' (Read/Write), 'ro' (Readonly),
Index: virtinst-0.600.0/man/en/virt-install.pod.in
===================================================================
--- virtinst-0.600.0.orig/man/en/virt-install.pod.in
+++ virtinst-0.600.0/man/en/virt-install.pod.in
@@ -420,9 +420,9 @@ cdrom is used as the install media.
 
 =item B<bus>
 
-Disk bus type. Value can be 'ide', 'scsi', 'usb', 'virtio' or 'xen'.  The
-default is hypervisor dependent since not all hypervisors support all bus
-types.
+Disk bus type. Value can be 'ide', 'sata', 'scsi', 'usb', 'virtio' or 'xen'.
+The default is hypervisor dependent since not all hypervisors support all
+bus types.
 
 =item B<perms>
 
Index: virtinst-0.600.0/tests/cli-test-xml/compare/many-devices.xml
===================================================================
--- virtinst-0.600.0.orig/tests/cli-test-xml/compare/many-devices.xml
+++ virtinst-0.600.0/tests/cli-test-xml/compare/many-devices.xml
@@ -35,7 +35,7 @@
       <readonly/>
     </disk>
     <disk type='block' device='cdrom'>
-      <target dev='hdc' bus='ide'/>
+      <target dev='sda' bus='sata'/>
       <readonly/>
     </disk>
     <controller type='usb' index='0' model='ich9-ehci1'>
@@ -116,7 +116,7 @@
       <readonly/>
     </disk>
     <disk type='block' device='cdrom'>
-      <target dev='hdc' bus='ide'/>
+      <target dev='sda' bus='sata'/>
       <readonly/>
     </disk>
     <controller type='usb' index='0' model='ich9-ehci1'>
Index: virtinst-0.600.0/tests/clitest.py
===================================================================
--- virtinst-0.600.0.orig/tests/clitest.py
+++ virtinst-0.600.0/tests/clitest.py
@@ -606,7 +606,7 @@ args_dict = {
          "--controller usb,model=ich9-uhci3,address=0:0:4.2,index=0,master=4 "
          "--disk %(EXISTIMG1)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 "
+         "--disk device=cdrom,bus=sata "
          "--serial tcp,host=:2222,mode=bind,protocol=telnet "
          "--filesystem /source,/target,mode=squash "
          "--network user,mac=12:34:56:78:11:22 "
Index: virtinst-0.600.0/virtinst/VirtualDisk.py
===================================================================
--- virtinst-0.600.0.orig/virtinst/VirtualDisk.py
+++ virtinst-0.600.0/virtinst/VirtualDisk.py
@@ -1682,7 +1682,7 @@ class VirtualDisk(VirtualDevice):
         # error as appropriate.
         if self.bus == "virtio":
             return ("vd", 1024)
-        elif self.bus == "scsi" or self.bus == "usb":
+        elif self.bus in ["sata", "scsi", "usb"]:
             return ("sd", 1024)
         elif self.bus == "xen":
             return ("xvd", 1024)
openSUSE Build Service is sponsored by