Merge "Replaces uuid.uuid4 with uuidutils.generate_uuid()"
diff --git a/neutron/tests/tempest/api/admin/test_shared_network_extension.py b/neutron/tests/tempest/api/admin/test_shared_network_extension.py
index bc10745..97b4a0c 100644
--- a/neutron/tests/tempest/api/admin/test_shared_network_extension.py
+++ b/neutron/tests/tempest/api/admin/test_shared_network_extension.py
@@ -14,8 +14,7 @@
# License for the specific language governing permissions and limitations
# under the License.
-import uuid
-
+from oslo_utils import uuidutils
from tempest.lib.common.utils import data_utils
from tempest.lib import exceptions as lib_exc
from tempest import test
@@ -382,7 +381,7 @@
self.admin_client.create_rbac_policy(
object_type='network', object_id=net['id'],
action='access_as_shared',
- target_tenant=str(uuid.uuid4()).replace('-', ''))
+ target_tenant=uuidutils.generate_uuid().replace('-', ''))
@test.idempotent_id('86c3529b-1231-40de-803c-afffffff7fff')
def test_regular_client_blocked_from_sharing_with_wildcard(self):
diff --git a/neutron/tests/tempest/api/test_subnetpools_negative.py b/neutron/tests/tempest/api/test_subnetpools_negative.py
index 052c3cd..638d965 100644
--- a/neutron/tests/tempest/api/test_subnetpools_negative.py
+++ b/neutron/tests/tempest/api/test_subnetpools_negative.py
@@ -13,9 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-import uuid
-
import netaddr
+from oslo_utils import uuidutils
from tempest.lib.common.utils import data_utils
from tempest.lib import exceptions as lib_exc
from tempest import test
@@ -115,7 +114,7 @@
@test.requires_ext(extension='address-scope', service='network')
def test_create_subnetpool_associate_non_exist_address_scope(self):
self.assertRaises(lib_exc.NotFound, self._create_subnetpool,
- address_scope_id=str(uuid.uuid4()))
+ address_scope_id=uuidutils.generate_uuid())
@test.attr(type='negative')
@test.idempotent_id('2dfb4269-8657-485a-a053-b022e911456e')