E125 continuation line does not distinguish itself from next logical
line.
E125 makes code more readable, and fixing all the existing issues allows
us to gate on this, making this one less thing reviewers have to check
for.
Fix was made using https://github.com/hhatto/autopep8
Change-Id: Ie569fd74fb84d220ceb87e37b1b1f39143bba80f
Kill some of the variables marked as unused by flakes8. This should
allow to enable F841 check in the future.
Only trivial cases with no function calls and obviously pure functions
(like datetime.now(), or len()) are cleaned up here.
Part 1, split to reduce conflicts.
Change-Id: I82854349574ec4bcb9336aba626eefdaed81a8c8
Mechanical translation of the deprecated
except x,y: construct with except x as y:
The latter works with any Python >= 2.6.
Add Hacking check.
Change-Id: I845829d97d379c1cd9b3a77e7e5786586f263b64
The smoketests currently have a dependency on gFlags. Long term, this should
be converted to use openstack.common.cfg; but in the near term, we should
record this existing dependency.
Fixes bug 1174953
Change-Id: I465abc6a4a2e8f7ebd1fe70ad239c760960a82ed
* Includes some general tools/hacking cleanup
* Fix several N302 cases
* Disable N302 until all cases are fixed
Change-Id: Iddba07ff13e10dc41a6930749044bb8c0572d279
fix the N402 errors that have slipped in in the last 48 hrs since
starting this patch series.
fix an N401 error that our scanner current can't find because it
only looks for doc strings on classes and defs.
this is the xeno's paradox of patch series, but we're getting close.
Change-Id: I4a763bb4c812335d853eae05c72464f18ab93297
Fixes the wait_for_not_running function in smoketests/base.py so
that it short circuits when an instance ID is deleted rather than
waits 60 seconds (the timeout). Previously this function had
two problems:
1) It used Boto's instance.update() instead of instance.update(validate=True).
Since update() returns returns quietly if no data about the instance was
returned (aka the instance has been deleted) it effectively made this
function almost always wait for the timeout (60 seconds). This makes the
tests take about a minute longer than they need to unless #2 below
occurs...
2) It also introduced a race condition in that... if hit just right
the instance.state would get set to 'terminated'. Which would cause
the loop to short circuit. This might seem correct at first glance but
in fact causes intermittent failures in some of the netadmin tests
because security groups can't be deleted if a running (or exiting)
instance is still assigned to them. In fact wait_for_not_running
was added to guard against just this in the first place!
Also, renames the base.wait_for_not_running function to be
called wait_for_deleted (that is what we are really doing here)
Change-Id: I4486995a7d9028d876366e8d7a2c845520319b86
Updates the test_003_can_mount_volume smoke test so that it
waits for the volume to show up in /proc/partitions for up
to 60 seconds before proceeding. This eliminates the need for
a hard coded sleep value which can cause intermittent test failures.
Change-Id: Ibdc56a00e141211e40068c22fc268efeba6affff
Updates the Nova smoketests so that we use Paramiko's auto
add ssh key policy. This should help quiet down warnings like
this which we previously got when running the EC2 smoketests
with Nova:
/usr/lib/python2.7/site-packages/paramiko/client.py:95: UserWarning:
Unknown ssh-rsa host key for 172.20.0.3:
adb1c2f1fe461a35cd01283eac03d6fb
Fixes LP Bug #1064550.
Change-Id: I1611a3f6b54563b6a1d64c4f8e193a636ccb1c69
The moduelauthor tags are used by the docs to see who wrote what.
But many of them are outdated and wrong.
fixes bug 1044578
Change-Id: I9cc27430c906d1418faf28e1b53f6306c62e8f98
Updates test_007_me_can_detach_volume so that it waits for
the volume status to become active for up to 10 seconds
after initiating the command to detach the volume.
Previously it just waited for 5 seconds without checking the
status which can be problematic in that it causes the
subsequent test to delete the volume to fail intermittently
(because only active or error volumes can be deleted).
I noticed this in SmokeStack because 2 days ago this commit landed:
b46f224f7555e3065b0daacd101b65d86117f0c1
and it is now causing a fair amount of intermittent volume
tests to fail for Nova and Cinder. Apparently now that we
have ordered the commands to remove an iscsi target properly
it takes a bit longer...
Change-Id: Ibfd25af93f9cb063a76a04138b8d23d28a01b89a
Nova has additional pep8 "plugins" that they expect to run as part of the
gate. This patch will run tools/hacking.py instead of pep8 directly. Also,
it fixes the hacking violaions in contrib, plugins and smoketests.
Fixes bug 1010136
Change-Id: I86d8789218c197d5d4a43d1201465d340646a395
Fix bug 817872.
This patch modifies the behavior of removing security groups via the EC2
API to better match the EC2 API spec. The EC2 documentation says that a
group that is still in use can not be removed.
A new function has been added to the db API to find out whether a
particular security group is still in use. "In use" is defined as
applied to an active instance, or applied to another group that has not
been deleted.
Unit tests have been updated to ensure that an error is raised when
these conditions are hit.
Change-Id: I5b3fdf1da213b04084fe266c1a6ed92e01cf1e19
Fixes bug #912650.
Fixes the following test cases in
smoketests/test_netadmin.py:SecurityGroupTests:
'test_004_can_access_metadata_over_public_ip'
'test_005_validate_metadata'
'test_999_tearDown'
Change-Id: Iefa8034a364e13243d06200e8af1840df896baf3
* change boto=1.9b to boto
* fix the tests
* remove nova-adminclient dependency
* remove the useless smoketests for nova-adminclient
Change-Id: Ie191453941e64774496a912cb64d1417f3f1bea3
of test_netadmin to return an error code which we can then check for
and handle properly. This should allow calling functions to properly
retry and timout if an actual test failure happens.