Fix pep8 violations in stress tests

This fixes pep8 failures that occur in the stress tests.
These included 3 types of failures: TEMPEST N301, N306, N201

Change-Id: I54211bea03430de4ad821096eaa5264afc4f22a3
This commit is contained in:
Matthew Treinish 2012-12-10 10:07:56 -05:00
parent 73649d27e7
commit 8d6836b399
7 changed files with 18 additions and 29 deletions

View File

@ -15,19 +15,18 @@
Users pass in a description of the workload and a nova manager object
to the bash_openstack function call"""
import random
import datetime
import random
import time
# local imports
from test_case import *
import utils.util
from config import StressConfig
from state import ClusterState, KeyPairState, FloatingIpState, VolumeState
from state import ClusterState
from state import FloatingIpState
from state import KeyPairState
from state import VolumeState
from test_case import *
from tempest.common.utils.data_utils import rand_name
import utils.util
# setup logging to file
logging.basicConfig(

View File

@ -14,9 +14,9 @@
"""Describe follow-up actions using `PendingAction` class to verify
that nova API calls such as create/delete are completed"""
import logging
import time
from tempest.exceptions import TimeoutException

View File

@ -12,16 +12,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# system imports
import random
import time
import telnetlib
import logging
import random
import telnetlib
import time
# local imports
import test_case
import pending_action
import test_case
class TestChangeFloatingIp(test_case.StressTestCase):
@ -85,7 +82,7 @@ class VerifyChangeFloatingIp(pending_action.PendingAction):
(self.floating_ip.address, self.elapsed()))
self.floating_ip.change_pending = False
return True
except:
except Exception:
if not self.add:
self._logger.info('%s removed [%.1f secs elapsed]' %
(self.floating_ip.address, self.elapsed()))

View File

@ -17,15 +17,12 @@ API calls on the Nova cluster having to do with Server Actions. Each
sub-class will have a corresponding PendingServerAction. These pending
actions veriy that the API call was successful or not."""
# system imports
import random
import time
# local imports
import test_case
import pending_action
from tempest.exceptions import Duplicate
import test_case
from utils.util import *

View File

@ -17,15 +17,11 @@ API calls on the Nova cluster having to do with creating and deleting VMs.
Each sub-class will have a corresponding PendingServerAction. These pending
actions veriy that the API call was successful or not."""
# system imports
import random
import time
# local imports
import test_case
import pending_action
import test_case
class TestCreateVM(test_case.StressTestCase):

View File

@ -13,12 +13,12 @@
# limitations under the License.
"""Stress test that associates/disasssociates floating ips"""
# local imports
from stress.test_floating_ips import TestChangeFloatingIp
from stress.basher import BasherAction
from stress.driver import *
from stress.test_floating_ips import TestChangeFloatingIp
from tempest import openstack
choice_spec = [
BasherAction(TestChangeFloatingIp(), 100)
]

View File

@ -14,8 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import subprocess
import shlex
import subprocess
SSH_OPTIONS = (" -q" +
" -o UserKnownHostsFile=/dev/null" +