summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-11-21 03:01:35 +0000
committerGerrit Code Review <review@openstack.org>2012-11-21 03:01:35 +0000
commitd3afda8152680c08b1906af625fe4ac85ed2f0f8 (patch)
tree26c6681a3c25f7e9a64227d01a3ac89c1b302cc4
parentde0842209c9cf11c7322ad0923c4ffff055003d2 (diff)
parent47fe319f6ef54e7089341021e4cf077b3a489fb4 (diff)
Merge "Make ec2_instance_create db method consistant across db apis"
-rw-r--r--nova/db/api.py4
-rw-r--r--nova/db/sqlalchemy/api.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/nova/db/api.py b/nova/db/api.py
index be5ab3176..ba5402dbd 100644
--- a/nova/db/api.py
+++ b/nova/db/api.py
@@ -1528,9 +1528,9 @@ def get_instance_uuid_by_ec2_id(context, ec2_id):
return IMPL.get_instance_uuid_by_ec2_id(context, ec2_id)
-def ec2_instance_create(context, instance_ec2_id):
+def ec2_instance_create(context, instance_uuid, id=None):
"""Create the ec2 id to instance uuid mapping on demand"""
- return IMPL.ec2_instance_create(context, instance_ec2_id)
+ return IMPL.ec2_instance_create(context, instance_uuid, id)
####################
diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py
index abc51c0e9..acececd8d 100644
--- a/nova/db/sqlalchemy/api.py
+++ b/nova/db/sqlalchemy/api.py
@@ -1430,7 +1430,7 @@ def instance_create(context, values):
instance_ref.instance_type
# create the instance uuid to ec2_id mapping entry for instance
- ec2_instance_create(context, instance_ref['uuid'])
+ db.ec2_instance_create(context, instance_ref['uuid'])
return instance_ref