Replaces uuid.uuid4 with uuidutils.generate_uuid()
Change-Id: Idf397282e60a2d1a5e0b092d7d61d7e5532afa7b Closes-Bug: #1082248
This commit is contained in:
parent
421ce166f1
commit
0b311c8507
|
@ -11,7 +11,7 @@
|
|||
# under the License.
|
||||
import ddt
|
||||
import mock
|
||||
import uuid
|
||||
from oslo_utils import uuidutils
|
||||
|
||||
import pyroute2.ipdb.interface
|
||||
from pyroute2.netlink.rtnl import ifinfmsg
|
||||
|
@ -26,7 +26,7 @@ class BindingDriversUtilsTest(base.TestCase):
|
|||
"""Unit tests for binding drivers utils"""
|
||||
|
||||
def test_get_veth_pair_names(self):
|
||||
fake_neutron_port_id = str(uuid.uuid4())
|
||||
fake_neutron_port_id = uuidutils.generate_uuid()
|
||||
generated_ifname, generated_peer = utils.get_veth_pair_names(
|
||||
fake_neutron_port_id)
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
# under the License.
|
||||
import ddt
|
||||
import mock
|
||||
import uuid
|
||||
from oslo_utils import uuidutils
|
||||
|
||||
from kuryr.lib import binding
|
||||
from kuryr.lib import constants
|
||||
|
@ -39,9 +39,9 @@ class BindingTest(base.TestCase):
|
|||
fake_mtu = 1450
|
||||
fake_docker_network_id = utils.get_hash()
|
||||
fake_docker_endpoint_id = utils.get_hash()
|
||||
fake_port_id = str(uuid.uuid4())
|
||||
fake_neutron_v4_subnet_id = str(uuid.uuid4())
|
||||
fake_neutron_v6_subnet_id = str(uuid.uuid4())
|
||||
fake_port_id = uuidutils.generate_uuid()
|
||||
fake_neutron_v4_subnet_id = uuidutils.generate_uuid()
|
||||
fake_neutron_v6_subnet_id = uuidutils.generate_uuid()
|
||||
fake_port = self._get_fake_port(
|
||||
fake_docker_endpoint_id, fake_docker_network_id,
|
||||
fake_port_id, constants.PORT_STATUS_ACTIVE,
|
||||
|
@ -68,9 +68,9 @@ class BindingTest(base.TestCase):
|
|||
def test_port_unbind(self, mock_execute, mock_remove_device):
|
||||
fake_docker_network_id = utils.get_hash()
|
||||
fake_docker_endpoint_id = utils.get_hash()
|
||||
fake_port_id = str(uuid.uuid4())
|
||||
fake_neutron_v4_subnet_id = str(uuid.uuid4())
|
||||
fake_neutron_v6_subnet_id = str(uuid.uuid4())
|
||||
fake_port_id = uuidutils.generate_uuid()
|
||||
fake_neutron_v4_subnet_id = uuidutils.generate_uuid()
|
||||
fake_neutron_v6_subnet_id = uuidutils.generate_uuid()
|
||||
fake_port = self._get_fake_port(
|
||||
fake_docker_endpoint_id, fake_docker_network_id,
|
||||
fake_port_id, constants.PORT_STATUS_ACTIVE,
|
||||
|
|
Loading…
Reference in New Issue