Cleanup using about the data_utils module and functions again

HACKING officially discourages symbol import directly because it makes
it harder to track down that a function was imported. Recently, we keep
this rule and almost files were already fixed in
  Ibda1a5e424280bad8535ee27f66dec99bf68f676 .
But some files are not fixed. This commit cleanups them.

Change-Id: I92bf9097860738fbb79fad274b3e4cce07481f39
diff --git a/tempest/api/compute/images/test_images_oneserver_negative.py b/tempest/api/compute/images/test_images_oneserver_negative.py
index db3acb5..b4e778c 100644
--- a/tempest/api/compute/images/test_images_oneserver_negative.py
+++ b/tempest/api/compute/images/test_images_oneserver_negative.py
@@ -19,8 +19,7 @@
 from tempest.api import compute
 from tempest.api.compute import base
 from tempest import clients
-from tempest.common.utils.data_utils import parse_image_id
-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
 from tempest.test import attr
@@ -86,7 +85,7 @@
     @attr(type=['negative', 'gate'])
     def test_create_image_specify_multibyte_character_image_name(self):
         # Return an error if the image name has multi-byte characters
-        snapshot_name = rand_name('\xef\xbb\xbf')
+        snapshot_name = data_utils.rand_name('\xef\xbb\xbf')
         self.assertRaises(exceptions.BadRequest,
                           self.client.create_image, self.server_id,
                           snapshot_name)
@@ -94,7 +93,7 @@
     @attr(type=['negative', 'gate'])
     def test_create_image_specify_invalid_metadata(self):
         # Return an error when creating image with invalid metadata
-        snapshot_name = rand_name('test-snap-')
+        snapshot_name = data_utils.rand_name('test-snap-')
         meta = {'': ''}
         self.assertRaises(exceptions.BadRequest, self.client.create_image,
                           self.server_id, snapshot_name, meta)
@@ -102,7 +101,7 @@
     @attr(type=['negative', 'gate'])
     def test_create_image_specify_metadata_over_limits(self):
         # Return an error when creating image with meta data over 256 chars
-        snapshot_name = rand_name('test-snap-')
+        snapshot_name = data_utils.rand_name('test-snap-')
         meta = {'a' * 260: 'b' * 260}
         self.assertRaises(exceptions.BadRequest, self.client.create_image,
                           self.server_id, snapshot_name, meta)
@@ -112,15 +111,15 @@
         # Disallow creating another image when first image is being saved
 
         # Create first snapshot
-        snapshot_name = rand_name('test-snap-')
+        snapshot_name = data_utils.rand_name('test-snap-')
         resp, body = self.client.create_image(self.server_id,
                                               snapshot_name)
         self.assertEqual(202, resp.status)
-        image_id = parse_image_id(resp['location'])
+        image_id = data_utils.parse_image_id(resp['location'])
         self.image_ids.append(image_id)
 
         # Create second snapshot
-        alt_snapshot_name = rand_name('test-snap-')
+        alt_snapshot_name = data_utils.rand_name('test-snap-')
         self.assertRaises(exceptions.Conflict, self.client.create_image,
                           self.server_id, alt_snapshot_name)
         self.client.wait_for_image_status(image_id, 'ACTIVE')
@@ -129,7 +128,7 @@
     def test_create_image_specify_name_over_256_chars(self):
         # Return an error if snapshot name over 256 characters is passed
 
-        snapshot_name = rand_name('a' * 260)
+        snapshot_name = data_utils.rand_name('a' * 260)
         self.assertRaises(exceptions.BadRequest, self.client.create_image,
                           self.server_id, snapshot_name)
 
@@ -137,10 +136,10 @@
     def test_delete_image_that_is_not_yet_active(self):
         # Return an error while trying to delete an image what is creating
 
-        snapshot_name = rand_name('test-snap-')
+        snapshot_name = data_utils.rand_name('test-snap-')
         resp, body = self.client.create_image(self.server_id, snapshot_name)
         self.assertEqual(202, resp.status)
-        image_id = parse_image_id(resp['location'])
+        image_id = data_utils.parse_image_id(resp['location'])
         self.image_ids.append(image_id)
 
         # Do not wait, attempt to delete the image, ensure it's successful
diff --git a/tempest/api/compute/v3/servers/test_list_server_filters.py b/tempest/api/compute/v3/servers/test_list_server_filters.py
index 5f14460..d333a1d 100644
--- a/tempest/api/compute/v3/servers/test_list_server_filters.py
+++ b/tempest/api/compute/v3/servers/test_list_server_filters.py
@@ -17,7 +17,7 @@
 
 from tempest.api.compute import base
 from tempest.api import utils
-from tempest.common.utils.data_utils import rand_name
+from tempest.common.utils import data_utils
 from tempest import config
 from tempest import exceptions
 from tempest.test import attr
@@ -57,16 +57,16 @@
             raise RuntimeError("Image %s (image_ref_alt) was not found!" %
                                cls.image_ref_alt)
 
-        cls.s1_name = rand_name(cls.__name__ + '-instance')
+        cls.s1_name = data_utils.rand_name(cls.__name__ + '-instance')
         resp, cls.s1 = cls.create_test_server(name=cls.s1_name,
                                               wait_until='ACTIVE')
 
-        cls.s2_name = rand_name(cls.__name__ + '-instance')
+        cls.s2_name = data_utils.rand_name(cls.__name__ + '-instance')
         resp, cls.s2 = cls.create_test_server(name=cls.s2_name,
                                               image_id=cls.image_ref_alt,
                                               wait_until='ACTIVE')
 
-        cls.s3_name = rand_name(cls.__name__ + '-instance')
+        cls.s3_name = data_utils.rand_name(cls.__name__ + '-instance')
         resp, cls.s3 = cls.create_test_server(name=cls.s3_name,
                                               flavor=cls.flavor_ref_alt,
                                               wait_until='ACTIVE')
diff --git a/tempest/api/network/admin/test_l3_agent_scheduler.py b/tempest/api/network/admin/test_l3_agent_scheduler.py
index 5b04cbb..9c187fd 100644
--- a/tempest/api/network/admin/test_l3_agent_scheduler.py
+++ b/tempest/api/network/admin/test_l3_agent_scheduler.py
@@ -15,7 +15,7 @@
 #    under the License.
 
 from tempest.api.network import base
-from tempest.common.utils.data_utils import rand_name
+from tempest.common.utils import data_utils
 from tempest.test import attr
 
 
@@ -50,7 +50,7 @@
 
     @attr(type='smoke')
     def test_list_l3_agents_hosting_router(self):
-        name = rand_name('router-')
+        name = data_utils.rand_name('router-')
         resp, router = self.client.create_router(name)
         self.assertEqual('201', resp['status'])
         resp, body = self.admin_client.list_l3_agents_hosting_router(