Merge "Do not alias stdlib uuid module as uuidutils, since nova has uuidutils."

This commit is contained in:
Jenkins 2012-11-15 22:53:27 +00:00 committed by Gerrit Code Review
commit 90dffc3a9c
3 changed files with 8 additions and 8 deletions

View File

@ -17,7 +17,7 @@
# under the License. # under the License.
import datetime import datetime
import uuid as uuidutils import uuid as stdlib_uuid
from lxml import etree from lxml import etree
import webob import webob
@ -58,7 +58,7 @@ class FakeInstanceDB(object):
if id is None: if id is None:
id = self.max_id + 1 id = self.max_id + 1
if uuid is None: if uuid is None:
uuid = str(uuidutils.uuid4()) uuid = str(stdlib_uuid.uuid4())
instance = stub_instance(id, uuid=uuid) instance = stub_instance(id, uuid=uuid)
self.instances_by_id[id] = instance self.instances_by_id[id] = instance
self.ids_by_uuid[uuid] = id self.ids_by_uuid[uuid] = id
@ -134,7 +134,7 @@ class ConsolesControllerTest(test.TestCase):
self.instance_db.return_server_by_id) self.instance_db.return_server_by_id)
self.stubs.Set(db, 'instance_get_by_uuid', self.stubs.Set(db, 'instance_get_by_uuid',
self.instance_db.return_server_by_uuid) self.instance_db.return_server_by_uuid)
self.uuid = str(uuidutils.uuid4()) self.uuid = str(stdlib_uuid.uuid4())
self.url = '/v2/fake/servers/%s/consoles' % self.uuid self.url = '/v2/fake/servers/%s/consoles' % self.uuid
self.controller = consoles.Controller() self.controller = consoles.Controller()

View File

@ -15,7 +15,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.
import uuid as uuidutils import uuid as stdlib_uuid
import feedparser import feedparser
from lxml import etree from lxml import etree
@ -386,7 +386,7 @@ class VersionsTest(test.TestCase):
self.assertEqual(res.content_type, "application/json") self.assertEqual(res.content_type, "application/json")
def test_multi_choice_server(self): def test_multi_choice_server(self):
uuid = str(uuidutils.uuid4()) uuid = str(stdlib_uuid.uuid4())
req = webob.Request.blank('/servers/' + uuid) req = webob.Request.blank('/servers/' + uuid)
req.accept = "application/json" req.accept = "application/json"
res = req.get_response(fakes.wsgi_app()) res = req.get_response(fakes.wsgi_app())

View File

@ -20,7 +20,7 @@
"""Unit tests for the DB API""" """Unit tests for the DB API"""
import datetime import datetime
import uuid as uuidutils import uuid as stdlib_uuid
from nova import config from nova import config
from nova import context from nova import context
@ -146,7 +146,7 @@ class DbApiTestCase(test.TestCase):
self.assertRaises(exception.MarkerNotFound, self.assertRaises(exception.MarkerNotFound,
db.instance_get_all_by_filters, db.instance_get_all_by_filters,
self.context, {'display_name': '%test%'}, self.context, {'display_name': '%test%'},
marker=str(uuidutils.uuid4())) marker=str(stdlib_uuid.uuid4()))
def test_migration_get_unconfirmed_by_dest_compute(self): def test_migration_get_unconfirmed_by_dest_compute(self):
ctxt = context.get_admin_context() ctxt = context.get_admin_context()
@ -307,7 +307,7 @@ class DbApiTestCase(test.TestCase):
def test_instance_fault_create(self): def test_instance_fault_create(self):
"""Ensure we can create an instance fault""" """Ensure we can create an instance fault"""
ctxt = context.get_admin_context() ctxt = context.get_admin_context()
uuid = str(uuidutils.uuid4()) uuid = str(stdlib_uuid.uuid4())
# Create a fault # Create a fault
fault_values = { fault_values = {