Clean imports in code

In some part in the code we import objects.
In the Openstack style guidelines they recommand
to import only modules.
We need to fix that.

Change-Id: I4bfee2b94d101940d615f78f9bebb83310ed90ba
Partial-Bug:1543101
This commit is contained in:
Jean-Emile DARTOIS
2016-02-08 13:51:20 +01:00
committed by Vincent Françoise
parent e3198d25a5
commit 5baff7dc3e
15 changed files with 75 additions and 75 deletions

View File

@@ -16,11 +16,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from concurrent.futures import ThreadPoolExecutor
from concurrent import futures
from oslo_log import log
from watcher.decision_engine.audit.default import DefaultAuditHandler
from watcher.decision_engine.audit import default
LOG = log.getLogger(__name__)
@@ -28,7 +28,7 @@ LOG = log.getLogger(__name__)
class AuditEndpoint(object):
def __init__(self, messaging, max_workers):
self._messaging = messaging
self._executor = ThreadPoolExecutor(max_workers=max_workers)
self._executor = futures.ThreadPoolExecutor(max_workers=max_workers)
@property
def executor(self):
@@ -39,7 +39,7 @@ class AuditEndpoint(object):
return self._messaging
def do_trigger_audit(self, context, audit_uuid):
audit = DefaultAuditHandler(self.messaging)
audit = default.DefaultAuditHandler(self.messaging)
audit.execute(audit_uuid, context)
def trigger_audit(self, context, audit_uuid):