Clean imports in code
In some part in the code we import objects. Openstack style guideline recommends to import only modules. Change-Id: I72a25f76c7fe3c9d592a310580181e72734d374c
This commit is contained in:
parent
cb593cf5b7
commit
5529692c6c
@ -19,7 +19,7 @@ import json
|
|||||||
|
|
||||||
import pecan
|
import pecan
|
||||||
import six
|
import six
|
||||||
from webob import Response
|
import webob
|
||||||
from wsme import exc
|
from wsme import exc
|
||||||
|
|
||||||
from lbaas import exceptions as ex
|
from lbaas import exceptions as ex
|
||||||
@ -53,7 +53,7 @@ def wrap_pecan_controller_exception(func):
|
|||||||
try:
|
try:
|
||||||
return func(*args, **kwargs)
|
return func(*args, **kwargs)
|
||||||
except ex.LBaaSException as excp:
|
except ex.LBaaSException as excp:
|
||||||
return Response(
|
return webob.Response(
|
||||||
status=excp.http_code,
|
status=excp.http_code,
|
||||||
content_type='application/json',
|
content_type='application/json',
|
||||||
body=json.dumps(dict(
|
body=json.dumps(dict(
|
||||||
|
@ -20,7 +20,7 @@ import socket
|
|||||||
import shutil
|
import shutil
|
||||||
import time
|
import time
|
||||||
import uuid
|
import uuid
|
||||||
from xml.etree import ElementTree as et
|
from xml import etree
|
||||||
|
|
||||||
import jenkins
|
import jenkins
|
||||||
import paramiko
|
import paramiko
|
||||||
@ -548,8 +548,8 @@ class MuranoTestsBase(testtools.TestCase, clients.ClientsBase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def set_tomcat_ip(self, pom_file, ip):
|
def set_tomcat_ip(self, pom_file, ip):
|
||||||
et.register_namespace('', 'http://maven.apache.org/POM/4.0.0')
|
etree.ElementTree.register_namespace('', 'http://maven.apache.org/POM/4.0.0')
|
||||||
tree = et.parse(pom_file)
|
tree = etree.ElementTree.parse(pom_file)
|
||||||
new_url = 'http://{ip}:8080/manager/text'.format(ip=ip)
|
new_url = 'http://{ip}:8080/manager/text'.format(ip=ip)
|
||||||
ns = {'ns': 'http://maven.apache.org/POM/4.0.0'}
|
ns = {'ns': 'http://maven.apache.org/POM/4.0.0'}
|
||||||
for plugin in tree.findall('ns:build/ns:plugins/', ns):
|
for plugin in tree.findall('ns:build/ns:plugins/', ns):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user