From 73fd7abacd3bc5492b0335b3bb71c16b4a9d30e2 Mon Sep 17 00:00:00 2001 From: Trey Morris Date: Mon, 9 Jan 2012 11:52:53 -0600 Subject: Ties quantum, melange, and nova network model get_instance_nw_info() now returns network model, and keeps the network info cache up to date. virt shim and translation in place for virts to get at the old stuff Change-Id: I070ea7d8564af6c644059d1c209542d250d19ddb --- nova/db/sqlalchemy/api.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'nova/db') diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py index 495fcebfd..c61f3ce69 100644 --- a/nova/db/sqlalchemy/api.py +++ b/nova/db/sqlalchemy/api.py @@ -1822,11 +1822,16 @@ def instance_info_cache_update(context, instance_uuid, values, info_cache = instance_info_cache_get(context, instance_uuid, session=session) - values['updated_at'] = literal_column('updated_at') - if info_cache: info_cache.update(values) info_cache.save(session=session) + else: + # NOTE(tr3buchet): just in case someone blows away an instance's + # cache entry + values['instance_id'] = instance_uuid + info_cache = \ + instance_info_cache_create(context, values) + return info_cache -- cgit