diff options
| author | Trey Morris <treyemorris@gmail.com> | 2012-01-09 11:52:53 -0600 |
|---|---|---|
| committer | Trey Morris <treyemorris@gmail.com> | 2012-02-01 13:29:14 -0600 |
| commit | 73fd7abacd3bc5492b0335b3bb71c16b4a9d30e2 (patch) | |
| tree | 571ee661373cfc18b1ca1135e2b8c36d6758c641 /nova/db | |
| parent | fced0f58bcbaef6fff76c6719e27e7d100aa721b (diff) | |
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
Diffstat (limited to 'nova/db')
| -rw-r--r-- | nova/db/sqlalchemy/api.py | 9 |
1 files changed, 7 insertions, 2 deletions
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 |
