Flake8 fixes for OpenCafe
* Removed unused imports * Fixed invalid class name in linux_instance_client * Fixed various pep8 issues Change-Id: If269b7590f331a0d5cb11d4813bdf9b03dbbb417
This commit is contained in:
parent
eb42ed58a7
commit
75b3b7a341
|
@ -19,7 +19,6 @@ limitations under the License.
|
|||
'''
|
||||
import os
|
||||
from datetime import datetime
|
||||
from unittest2.result import TestResult
|
||||
|
||||
|
||||
class TestRunMetrics(object):
|
||||
|
|
|
@ -20,7 +20,6 @@ limitations under the License.
|
|||
@see: http://docs.python.org/library/unittest.html#unittest.TestCase
|
||||
'''
|
||||
import unittest2 as unittest
|
||||
from datetime import datetime
|
||||
|
||||
from cafe.engine.config import EngineConfig
|
||||
from cafe.common.reporting import cclogging
|
||||
|
|
|
@ -14,7 +14,6 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
"""
|
||||
|
||||
import unittest2 as unittest
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
|
||||
|
|
|
@ -14,8 +14,6 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
"""
|
||||
|
||||
import decorator
|
||||
|
||||
from cafe.common.reporting import cclogging
|
||||
|
||||
|
||||
|
|
|
@ -14,8 +14,8 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
"""
|
||||
|
||||
|
||||
class InstanceClientConstants:
|
||||
LAST_REBOOT_TIME_FORMAT = '%Y-%m-%d %H:%M'
|
||||
LAST_REBOOT_TIME_FORMAT_GENTOO = '%b %d %H:%M %Y'
|
||||
LINUX_OS_FAMILY = 'linux'
|
||||
|
||||
|
|
|
@ -15,10 +15,6 @@ limitations under the License.
|
|||
"""
|
||||
|
||||
from cafe.common.reporting import cclogging
|
||||
from cafe.engine.clients.remote_instance.linux.linux_instance_client \
|
||||
import LinuxClient
|
||||
from cafe.engine.clients.remote_instance.windows.windows_instance_client \
|
||||
import WindowsClient
|
||||
|
||||
|
||||
class InstanceClientFactory(object):
|
||||
|
|
|
@ -14,7 +14,6 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
"""
|
||||
|
||||
from paramiko import PKey
|
||||
import time
|
||||
import re
|
||||
|
||||
|
@ -38,7 +37,6 @@ class LinuxClient(BasePersistentLinuxClient):
|
|||
self.client_log = cclogging.getLogger(
|
||||
cclogging.get_object_namespace(self.__class__))
|
||||
|
||||
|
||||
ssh_timeout = config.connection_timeout
|
||||
if ip_address is None:
|
||||
raise ServerUnreachable("None")
|
||||
|
@ -107,8 +105,8 @@ class LinuxClient(BasePersistentLinuxClient):
|
|||
'''
|
||||
@timeout: max timeout for the machine to reboot
|
||||
'''
|
||||
ssh_connector = SSHConnector(self.ip_address, self.username,
|
||||
self.password)
|
||||
ssh_connector = SSHBaseClient(self.ip_address, self.username,
|
||||
self.password)
|
||||
response, prompt = ssh_connector.exec_shell_command("sudo reboot")
|
||||
response, prompt = ssh_connector.exec_shell_command(self.password)
|
||||
self.client_log.info("Reboot response for %s: %s" % (self.ip_address,
|
||||
|
|
Loading…
Reference in New Issue