summaryrefslogtreecommitdiffstats
path: root/plugins/xenserver
diff options
context:
space:
mode:
authorRick Harris <rconradharris@gmail.com>2013-02-13 23:33:20 +0000
committerRick Harris <rconradharris@gmail.com>2013-02-15 00:39:58 +0000
commit0a93b563e975e1815922852c2eacb32caa8faaf2 (patch)
treefed241e98b072f270bf79d4b8fb19695f1e31ea8 /plugins/xenserver
parent4ffddcfa6385703ce9a02f624999f05b388778e6 (diff)
downloadnova-0a93b563e975e1815922852c2eacb32caa8faaf2.tar.gz
nova-0a93b563e975e1815922852c2eacb32caa8faaf2.tar.xz
nova-0a93b563e975e1815922852c2eacb32caa8faaf2.zip
Harmonize PEP8 checking between tox and run_tests.sh
Tox and run_tests.sh were running PEP8 checks against different file-sets. This patch refactors the logic to determine which files to run PEP8 checks on into `tools/run_pep8.sh` where it can be called by both tox and `run_tests.sh`. Additional fixes: Some of our Python XenAPI Dom0 plugins don't end in *.py but should still be checked by PEP8. This patches fixes the hacking.py violations in the files and adds them back to the srcfiles list. Merged tools/unused_imports.sh into tools/run_pep8.sh Change-Id: Id5edd1acb644ab938beffc3473494a179d9d8cda
Diffstat (limited to 'plugins/xenserver')
-rwxr-xr-xplugins/xenserver/xenapi/etc/xapi.d/plugins/kernel2
-rwxr-xr-xplugins/xenserver/xenapi/etc/xapi.d/plugins/migration4
-rwxr-xr-xplugins/xenserver/xenapi/etc/xapi.d/plugins/xenhost2
3 files changed, 4 insertions, 4 deletions
diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/kernel b/plugins/xenserver/xenapi/etc/xapi.d/plugins/kernel
index 9ce6902d7..32e253cde 100755
--- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/kernel
+++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/kernel
@@ -116,7 +116,7 @@ def _remove_file(filepath):
def remove_kernel_ramdisk(session, args):
- """Removes kernel and/or ramdisk from dom0's file system"""
+ """Removes kernel and/or ramdisk from dom0's file system."""
kernel_file = optional(args, 'kernel-file')
ramdisk_file = optional(args, 'ramdisk-file')
if kernel_file:
diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/migration b/plugins/xenserver/xenapi/etc/xapi.d/plugins/migration
index b9e9da2e2..4b6bf8811 100755
--- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/migration
+++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/migration
@@ -25,7 +25,7 @@ configure_logging('migration')
def move_vhds_into_sr(session, instance_uuid, sr_path, uuid_stack):
- """Moves the VHDs from their copied location to the SR"""
+ """Moves the VHDs from their copied location to the SR."""
staging_path = "/images/instance%s" % instance_uuid
imported_vhds = utils.import_vhds(sr_path, staging_path, uuid_stack)
utils.cleanup_staging_area(staging_path)
@@ -47,7 +47,7 @@ def _rsync_vhds(instance_uuid, host, staging_path, user="root"):
def transfer_vhd(session, instance_uuid, host, vdi_uuid, sr_path, seq_num):
- """Rsyncs a VHD to an adjacent host"""
+ """Rsyncs a VHD to an adjacent host."""
staging_path = utils.make_staging_area(sr_path)
try:
utils.prepare_staging_area(
diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenhost b/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenhost
index 4d2193908..0319af4d2 100755
--- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenhost
+++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenhost
@@ -33,9 +33,9 @@ import subprocess
import tempfile
import time
+import pluginlib_nova as pluginlib
import XenAPI
import XenAPIPlugin
-import pluginlib_nova as pluginlib
pluginlib.configure_logging("xenhost")