[PATCH 0/2] pep8 cleanup for featuretests.py and simplify domain xml

From: Aline Manera <alinefm@br.ibm.com> Aline Manera (2): pep8 cleanup for featuretests.py Simplify domain xml in featuretests.py Makefile.am | 1 + src/kimchi/featuretests.py | 24 +++++------------------- 2 files changed, 6 insertions(+), 19 deletions(-) -- 1.7.10.4

From: Aline Manera <alinefm@br.ibm.com> This patch cleans up pep8 style issue in featuretests.py Signed-off-by: Aline Manera <alinefm@br.ibm.com> --- Makefile.am | 1 + src/kimchi/featuretests.py | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile.am b/Makefile.am index 0fd92c8..a9b2b9c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -43,6 +43,7 @@ PEP8_WHITELIST = \ src/kimchi/cachebust.py \ src/kimchi/config.py.in \ src/kimchi/disks.py \ + src/kimchi/featuretests.py \ src/kimchi/root.py \ src/kimchi/server.py \ plugins/__init__.py \ diff --git a/src/kimchi/featuretests.py b/src/kimchi/featuretests.py index 4cabdc9..6843a26 100644 --- a/src/kimchi/featuretests.py +++ b/src/kimchi/featuretests.py @@ -18,7 +18,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA import libvirt import os @@ -67,6 +67,7 @@ ISO_STREAM_XML = """ </devices> </domain>""" + class FeatureTests(object): @staticmethod @@ -85,7 +86,8 @@ class FeatureTests(object): @staticmethod def qemu_supports_iso_stream(): - cmd = "qemu-io http://127.0.0.1:8000/images/icon-fedora.png -c 'read -v 0 512'" + cmd = "qemu-io http://127.0.0.1:8000/images/icon-fedora.png \ + -c 'read -v 0 512'" proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) stdout, stderr = proc.communicate() @@ -98,7 +100,7 @@ class FeatureTests(object): "'read -v 0 512'"] proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - thread = threading.Thread(target = proc.communicate) + thread = threading.Thread(target=proc.communicate) thread.start() thread.join(5) -- 1.7.10.4

Reviewed-by: Rodrigo Trujillo <rodrigo.trujillo@linux.vnet.ibm.com> On 12/30/2013 10:53 AM, Aline Manera wrote:
From: Aline Manera <alinefm@br.ibm.com>
This patch cleans up pep8 style issue in featuretests.py
Signed-off-by: Aline Manera <alinefm@br.ibm.com> --- Makefile.am | 1 + src/kimchi/featuretests.py | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/Makefile.am b/Makefile.am index 0fd92c8..a9b2b9c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -43,6 +43,7 @@ PEP8_WHITELIST = \ src/kimchi/cachebust.py \ src/kimchi/config.py.in \ src/kimchi/disks.py \ + src/kimchi/featuretests.py \ src/kimchi/root.py \ src/kimchi/server.py \ plugins/__init__.py \ diff --git a/src/kimchi/featuretests.py b/src/kimchi/featuretests.py index 4cabdc9..6843a26 100644 --- a/src/kimchi/featuretests.py +++ b/src/kimchi/featuretests.py @@ -18,7 +18,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
import libvirt import os @@ -67,6 +67,7 @@ ISO_STREAM_XML = """ </devices> </domain>"""
+ class FeatureTests(object):
@staticmethod @@ -85,7 +86,8 @@ class FeatureTests(object):
@staticmethod def qemu_supports_iso_stream(): - cmd = "qemu-io http://127.0.0.1:8000/images/icon-fedora.png -c 'read -v 0 512'" + cmd = "qemu-io http://127.0.0.1:8000/images/icon-fedora.png \ + -c 'read -v 0 512'" proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) stdout, stderr = proc.communicate() @@ -98,7 +100,7 @@ class FeatureTests(object): "'read -v 0 512'"] proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - thread = threading.Thread(target = proc.communicate) + thread = threading.Thread(target=proc.communicate) thread.start() thread.join(5)

Reviewed-by: Daniel Barboza <danielhb@linux.vnet.ibm.com> On 12/30/2013 10:53 AM, Aline Manera wrote:
From: Aline Manera <alinefm@br.ibm.com>
This patch cleans up pep8 style issue in featuretests.py
Signed-off-by: Aline Manera <alinefm@br.ibm.com> --- Makefile.am | 1 + src/kimchi/featuretests.py | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/Makefile.am b/Makefile.am index 0fd92c8..a9b2b9c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -43,6 +43,7 @@ PEP8_WHITELIST = \ src/kimchi/cachebust.py \ src/kimchi/config.py.in \ src/kimchi/disks.py \ + src/kimchi/featuretests.py \ src/kimchi/root.py \ src/kimchi/server.py \ plugins/__init__.py \ diff --git a/src/kimchi/featuretests.py b/src/kimchi/featuretests.py index 4cabdc9..6843a26 100644 --- a/src/kimchi/featuretests.py +++ b/src/kimchi/featuretests.py @@ -18,7 +18,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
import libvirt import os @@ -67,6 +67,7 @@ ISO_STREAM_XML = """ </devices> </domain>"""
+ class FeatureTests(object):
@staticmethod @@ -85,7 +86,8 @@ class FeatureTests(object):
@staticmethod def qemu_supports_iso_stream(): - cmd = "qemu-io http://127.0.0.1:8000/images/icon-fedora.png -c 'read -v 0 512'" + cmd = "qemu-io http://127.0.0.1:8000/images/icon-fedora.png \ + -c 'read -v 0 512'" proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) stdout, stderr = proc.communicate() @@ -98,7 +100,7 @@ class FeatureTests(object): "'read -v 0 512'"] proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - thread = threading.Thread(target = proc.communicate) + thread = threading.Thread(target=proc.communicate) thread.start() thread.join(5)

From: Aline Manera <alinefm@br.ibm.com> The domain xml is used in order to check libvirt ISO streaming support. It can only contain the elements needed to test ISO streaming. Signed-off-by: Aline Manera <alinefm@br.ibm.com> --- src/kimchi/featuretests.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/kimchi/featuretests.py b/src/kimchi/featuretests.py index 6843a26..1ca3567 100644 --- a/src/kimchi/featuretests.py +++ b/src/kimchi/featuretests.py @@ -32,23 +32,11 @@ from kimchi import config ISO_STREAM_XML = """ <domain type='kvm'> <name>ISO_STREAMING</name> - <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> <memory unit='KiB'>1048576</memory> - <currentMemory unit='KiB'>1048576</currentMemory> - <vcpu placement='static'>1</vcpu> <os> <type arch='x86_64' machine='pc-1.2'>hvm</type> <boot dev='cdrom'/> </os> - <features> - <acpi/> - <apic/> - <pae/> - </features> - <clock offset='utc'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>restart</on_crash> <devices> <disk type='network' device='cdrom'> <driver name='qemu' type='raw'/> @@ -60,10 +48,6 @@ ISO_STREAM_XML = """ <alias name='ide0-1-0'/> <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> - <controller type='usb' index='0'/> - <controller type='pci' index='0' model='pci-root'/> - <controller type='ide' index='0'/> - <memballoon model='virtio'/> </devices> </domain>""" -- 1.7.10.4

Reviewed-by: Rodrigo Trujillo <rodrigo.trujillo@linux.vnet.ibm.com> On 12/30/2013 10:53 AM, Aline Manera wrote:
From: Aline Manera <alinefm@br.ibm.com>
The domain xml is used in order to check libvirt ISO streaming support. It can only contain the elements needed to test ISO streaming.
Signed-off-by: Aline Manera <alinefm@br.ibm.com> --- src/kimchi/featuretests.py | 16 ---------------- 1 file changed, 16 deletions(-)
diff --git a/src/kimchi/featuretests.py b/src/kimchi/featuretests.py index 6843a26..1ca3567 100644 --- a/src/kimchi/featuretests.py +++ b/src/kimchi/featuretests.py @@ -32,23 +32,11 @@ from kimchi import config ISO_STREAM_XML = """ <domain type='kvm'> <name>ISO_STREAMING</name> - <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> <memory unit='KiB'>1048576</memory> - <currentMemory unit='KiB'>1048576</currentMemory> - <vcpu placement='static'>1</vcpu> <os> <type arch='x86_64' machine='pc-1.2'>hvm</type> <boot dev='cdrom'/> </os> - <features> - <acpi/> - <apic/> - <pae/> - </features> - <clock offset='utc'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>restart</on_crash> <devices> <disk type='network' device='cdrom'> <driver name='qemu' type='raw'/> @@ -60,10 +48,6 @@ ISO_STREAM_XML = """ <alias name='ide0-1-0'/> <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> - <controller type='usb' index='0'/> - <controller type='pci' index='0' model='pci-root'/> - <controller type='ide' index='0'/> - <memballoon model='virtio'/> </devices> </domain>"""

Reviewed-by: Daniel Barboza <danielhb@linux.vnet.ibm.com> On 12/30/2013 10:53 AM, Aline Manera wrote:
From: Aline Manera <alinefm@br.ibm.com>
The domain xml is used in order to check libvirt ISO streaming support. It can only contain the elements needed to test ISO streaming.
Signed-off-by: Aline Manera <alinefm@br.ibm.com> --- src/kimchi/featuretests.py | 16 ---------------- 1 file changed, 16 deletions(-)
diff --git a/src/kimchi/featuretests.py b/src/kimchi/featuretests.py index 6843a26..1ca3567 100644 --- a/src/kimchi/featuretests.py +++ b/src/kimchi/featuretests.py @@ -32,23 +32,11 @@ from kimchi import config ISO_STREAM_XML = """ <domain type='kvm'> <name>ISO_STREAMING</name> - <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> <memory unit='KiB'>1048576</memory> - <currentMemory unit='KiB'>1048576</currentMemory> - <vcpu placement='static'>1</vcpu> <os> <type arch='x86_64' machine='pc-1.2'>hvm</type> <boot dev='cdrom'/> </os> - <features> - <acpi/> - <apic/> - <pae/> - </features> - <clock offset='utc'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>restart</on_crash> <devices> <disk type='network' device='cdrom'> <driver name='qemu' type='raw'/> @@ -60,10 +48,6 @@ ISO_STREAM_XML = """ <alias name='ide0-1-0'/> <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> - <controller type='usb' index='0'/> - <controller type='pci' index='0' model='pci-root'/> - <controller type='ide' index='0'/> - <memballoon model='virtio'/> </devices> </domain>"""
participants (3)
-
Aline Manera
-
Daniel H Barboza
-
Rodrigo Trujillo