From 49b0b0c78d07e8bc880e353657e233cb12e635fc Mon Sep 17 00:00:00 2001 From: Robert Collins Date: Fri, 30 Aug 2013 16:08:41 +1200 Subject: [PATCH] Make third-party imports clearer in launch/. This is a minor step towards PEP-8 as well, but mainly makes it easier to document what third party modules are needed. Change-Id: Id901ef437fcdeb11c8dd555e8db7c13daa86c4b2 --- launch/launch-node.py | 5 +++-- launch/sshclient.py | 3 ++- launch/utils.py | 11 ++++++----- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/launch/launch-node.py b/launch/launch-node.py index a892b50880..5d9ce2e8b6 100755 --- a/launch/launch-node.py +++ b/launch/launch-node.py @@ -26,10 +26,11 @@ import subprocess import traceback import socket import argparse -import utils -import dns import shutil +import dns +import utils + NOVA_USERNAME=os.environ['OS_USERNAME'] NOVA_PASSWORD=os.environ['OS_PASSWORD'] NOVA_URL=os.environ['OS_AUTH_URL'] diff --git a/launch/sshclient.py b/launch/sshclient.py index a4c552049c..6736ec81a5 100644 --- a/launch/sshclient.py +++ b/launch/sshclient.py @@ -18,9 +18,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -import paramiko import sys +import paramiko + class SSHClient(object): def __init__(self, ip, username, password=None, pkey=None): client = paramiko.SSHClient() diff --git a/launch/utils.py b/launch/utils.py index 17f16cab15..5247071696 100644 --- a/launch/utils.py +++ b/launch/utils.py @@ -18,20 +18,21 @@ # See the License for the specific language governing permissions and # limitations under the License. +import time +import os +import traceback +import socket + import novaclient from novaclient.v1_1 import client as Client11 try: from v1_0 import client as Client10 except: pass -import time -import os -import traceback import paramiko -import socket import salt.crypt -from sshclient import SSHClient +from sshclient import SSHClient def iterate_timeout(max_seconds, purpose): start = time.time()