summaryrefslogtreecommitdiffstats
path: root/nova/compute
diff options
context:
space:
mode:
authorJesse Andrews <jesse@gigantor.local>2010-07-15 18:13:48 -0500
committerJesse Andrews <jesse@gigantor.local>2010-07-15 18:13:48 -0500
commit3ce6ec1a83731da868c5a77c4684808a54ffd8fd (patch)
tree9d92e81ec74926526841583737169d034c70de3a /nova/compute
parentc8fdce011092f23efd55385b45db8e6f3886beb1 (diff)
reorder imports spacing
Diffstat (limited to 'nova/compute')
-rw-r--r--nova/compute/disk.py3
-rw-r--r--nova/compute/exception.py1
-rw-r--r--nova/compute/linux_net.py3
-rw-r--r--nova/compute/model.py2
-rw-r--r--nova/compute/monitor.py14
-rw-r--r--nova/compute/network.py11
-rw-r--r--nova/compute/node.py6
7 files changed, 18 insertions, 22 deletions
diff --git a/nova/compute/disk.py b/nova/compute/disk.py
index b476987bb..08a22556e 100644
--- a/nova/compute/disk.py
+++ b/nova/compute/disk.py
@@ -24,12 +24,11 @@ Includes injection of SSH PGP keys into authorized_keys file.
import logging
import os
import tempfile
-
-
from twisted.internet import defer
from nova import exception
+
@defer.inlineCallbacks
def partition(infile, outfile, local_bytes=0, local_type='ext2', execute=None):
"""Takes a single partition represented by infile and writes a bootable
diff --git a/nova/compute/exception.py b/nova/compute/exception.py
index fefa7451d..13e4f0a51 100644
--- a/nova/compute/exception.py
+++ b/nova/compute/exception.py
@@ -22,6 +22,7 @@ Exceptions for Compute Node errors, mostly network addressing.
from nova.exception import Error
+
class NoMoreAddresses(Error):
pass
diff --git a/nova/compute/linux_net.py b/nova/compute/linux_net.py
index 358f184af..7b6ae693a 100644
--- a/nova/compute/linux_net.py
+++ b/nova/compute/linux_net.py
@@ -19,11 +19,12 @@
import logging
import signal
import os
-import nova.utils
import subprocess
# todo(ja): does the definition of network_path belong here?
+from nova import utils
+
from nova import flags
FLAGS=flags.FLAGS
diff --git a/nova/compute/model.py b/nova/compute/model.py
index 2d8a036a5..cda188183 100644
--- a/nova/compute/model.py
+++ b/nova/compute/model.py
@@ -42,8 +42,6 @@ True
import logging
import time
-
-
import redis
from nova import datastore
diff --git a/nova/compute/monitor.py b/nova/compute/monitor.py
index 64852838d..fdc86b031 100644
--- a/nova/compute/monitor.py
+++ b/nova/compute/monitor.py
@@ -24,11 +24,18 @@ Instance Monitoring:
in the object store.
"""
+import boto
+import boto.s3
import datetime
+import libxml2
import logging
import os
+import rrdtool
import sys
import time
+from twisted.internet import defer
+from twisted.internet import task
+from twisted.application import service
try:
import libvirt
@@ -37,13 +44,6 @@ except Exception, err:
from nova import flags
-import boto
-import boto.s3
-import libxml2
-import rrdtool
-from twisted.internet import defer
-from twisted.internet import task
-from twisted.application import service
FLAGS = flags.FLAGS
flags.DEFINE_integer(
diff --git a/nova/compute/network.py b/nova/compute/network.py
index faac74e54..1a8bc4ca1 100644
--- a/nova/compute/network.py
+++ b/nova/compute/network.py
@@ -20,22 +20,19 @@
Classes for network control, including VLANs, DHCP, and IP allocation.
"""
+import IPy
import logging
import os
import time
-# TODO(termie): clean up these imports
-
-import IPy
-
from nova import datastore
+from nova import exception
from nova import flags
from nova import utils
-from nova import exception
-from nova.compute import exception as compute_exception
from nova.auth import users
+from nova.compute import exception as compute_exception
+from nova.compute import linux_net
-import linux_net
FLAGS = flags.FLAGS
flags.DEFINE_string('networks_path', utils.abspath('../networks'),
diff --git a/nova/compute/node.py b/nova/compute/node.py
index 488e8870f..d681ec661 100644
--- a/nova/compute/node.py
+++ b/nova/compute/node.py
@@ -30,12 +30,11 @@ import logging
import os
import shutil
import sys
-
-
from twisted.internet import defer
from twisted.internet import task
from twisted.application import service
+
try:
import libvirt
except Exception, err:
@@ -49,8 +48,9 @@ from nova import utils
from nova.compute import disk
from nova.compute import model
from nova.compute import network
-from nova.volume import storage
from nova.objectstore import image # for image_path flag
+from nova.volume import storage
+
FLAGS = flags.FLAGS
flags.DEFINE_string('libvirt_xml_template',