diff options
author | Rick Harris <rconradharris@gmail.com> | 2013-02-13 23:33:20 +0000 |
---|---|---|
committer | Rick Harris <rconradharris@gmail.com> | 2013-02-15 00:39:58 +0000 |
commit | 0a93b563e975e1815922852c2eacb32caa8faaf2 (patch) | |
tree | fed241e98b072f270bf79d4b8fb19695f1e31ea8 /plugins | |
parent | 4ffddcfa6385703ce9a02f624999f05b388778e6 (diff) | |
download | nova-0a93b563e975e1815922852c2eacb32caa8faaf2.tar.gz |
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')
-rwxr-xr-x | plugins/xenserver/xenapi/etc/xapi.d/plugins/kernel | 2 | ||||
-rwxr-xr-x | plugins/xenserver/xenapi/etc/xapi.d/plugins/migration | 4 | ||||
-rwxr-xr-x | plugins/xenserver/xenapi/etc/xapi.d/plugins/xenhost | 2 |
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 9ce6902d7d..32e253cde8 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 b9e9da2e27..4b6bf8811b 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 4d21939086..0319af4d29 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") |