Skip to content
Snippets Groups Projects
Commit 6e6894fc authored by Jenkins's avatar Jenkins Committed by Gerrit Code Review
Browse files

Merge "Clean imports in code"

parents bb3ed4ef 25369263
No related branches found
No related tags found
No related merge requests found
...@@ -14,15 +14,15 @@ ...@@ -14,15 +14,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from ConfigParser import ConfigParser import ConfigParser
import inspect import inspect
import os import os
from six import StringIO from six import StringIO
from ansible.plugins.action import ActionBase from ansible.plugins import action
class ActionModule(ActionBase): class ActionModule(action.ActionBase):
TRANSFERS_FILES = True TRANSFERS_FILES = True
...@@ -62,7 +62,7 @@ class ActionModule(ActionBase): ...@@ -62,7 +62,7 @@ class ActionModule(ActionBase):
temp_vars = task_vars.copy() temp_vars = task_vars.copy()
temp_vars.update(extra_vars) temp_vars.update(extra_vars)
config = ConfigParser() config = ConfigParser.ConfigParser()
old_vars = self._templar._available_variables old_vars = self._templar._available_variables
self._templar.set_available_variables(temp_vars) self._templar.set_available_variables(temp_vars)
......
...@@ -28,10 +28,10 @@ except ImportError: ...@@ -28,10 +28,10 @@ except ImportError:
from yaml import Loader # noqa: F401 from yaml import Loader # noqa: F401
from ansible.plugins.action import ActionBase from ansible.plugins import action
class ActionModule(ActionBase): class ActionModule(action.ActionBase):
TRANSFERS_FILES = True TRANSFERS_FILES = True
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from tests.clients import OpenStackClients from tests import clients
import testtools import testtools
...@@ -19,7 +19,7 @@ import testtools ...@@ -19,7 +19,7 @@ import testtools
class KeystoneTest(testtools.TestCase): class KeystoneTest(testtools.TestCase):
def setUp(self): def setUp(self):
super(KeystoneTest, self).setUp() super(KeystoneTest, self).setUp()
self.kc = OpenStackClients().get_client('KeystoneClient') self.kc = clients.OpenStackClients().get_client('KeystoneClient')
def test_tenants(self): def test_tenants(self):
result = self.kc.tenants.list() result = self.kc.tenants.list()
......
...@@ -18,10 +18,10 @@ import os ...@@ -18,10 +18,10 @@ import os
import re import re
import sys import sys
from bs4 import BeautifulSoup as bs import bs4
from oslo_config import cfg from oslo_config import cfg
import pkg_resources import pkg_resources
from prettytable import PrettyTable import prettytable
import requests import requests
PROJECT_ROOT = os.path.abspath(os.path.join( PROJECT_ROOT = os.path.abspath(os.path.join(
...@@ -58,7 +58,7 @@ def retrieve_upstream_versions(): ...@@ -58,7 +58,7 @@ def retrieve_upstream_versions():
LOG.debug("Getting latest version for project %s from %s", LOG.debug("Getting latest version for project %s from %s",
project, base) project, base)
r = requests.get(base) r = requests.get(base)
s = bs(r.text, 'html.parser') s = bs4.BeautifulSoup(r.text, 'html.parser')
for link in s.find_all('a'): for link in s.find_all('a'):
version = link.get('href') version = link.get('href')
...@@ -119,8 +119,8 @@ def diff_link(project, old_ref, new_ref): ...@@ -119,8 +119,8 @@ def diff_link(project, old_ref, new_ref):
def compare_versions(): def compare_versions():
up_to_date = True up_to_date = True
result = PrettyTable(["Project", "Current version", result = prettytable.PrettyTable(["Project", "Current version",
"Latest version", "Comparing changes"]) "Latest version", "Comparing changes"])
result.align = "l" result.align = "l"
for project in VERSIONS['upstream']: for project in VERSIONS['upstream']:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment