Cleanup using about the data_utils module and functions
HACKING officially discourages symbol import directly because it makes
it harder to track down that a function was imported. Recently, we keep
this rule but there are many code that don't keep it.
This commit cleanups them.
Change-Id: Ibda1a5e424280bad8535ee27f66dec99bf68f676
diff --git a/tempest/api/network/base.py b/tempest/api/network/base.py
index ed915c1..b222ae3 100644
--- a/tempest/api/network/base.py
+++ b/tempest/api/network/base.py
@@ -18,7 +18,7 @@
import netaddr
from tempest import clients
-from tempest.common.utils.data_utils import rand_name
+from tempest.common.utils import data_utils
from tempest import exceptions
from tempest.openstack.common import log as logging
import tempest.test
@@ -105,7 +105,7 @@
@classmethod
def create_network(cls, network_name=None):
"""Wrapper utility that returns a test network."""
- network_name = network_name or rand_name('test-network-')
+ network_name = network_name or data_utils.rand_name('test-network-')
resp, body = cls.client.create_network(network_name)
network = body['network']
@@ -211,7 +211,7 @@
"""Wrapper utility that returns a test vpn service."""
resp, body = cls.client.create_vpn_service(
subnet_id, router_id, admin_state_up=True,
- name=rand_name("vpnservice-"))
+ name=data_utils.rand_name("vpnservice-"))
vpnservice = body['vpnservice']
cls.vpnservices.append(vpnservice)
return vpnservice