diff options
| author | Yuriy Taraday <yorik.sar@gmail.com> | 2011-06-24 09:54:38 +0400 |
|---|---|---|
| committer | Yuriy Taraday <yorik.sar@gmail.com> | 2011-06-24 09:54:38 +0400 |
| commit | d4fc1d77a4b7c668453042b83e34da76ee3c3818 (patch) | |
| tree | ed38cabbd3815bc3e871c220f465708fa0731510 /nova | |
| parent | 0e2b3e932d3e5fe00fed1da95e55808391d4832e (diff) | |
| download | nova-d4fc1d77a4b7c668453042b83e34da76ee3c3818.tar.gz nova-d4fc1d77a4b7c668453042b83e34da76ee3c3818.tar.xz nova-d4fc1d77a4b7c668453042b83e34da76ee3c3818.zip | |
Unwind last commit, force anyjson to use our serialization methods.
Diffstat (limited to 'nova')
| -rw-r--r-- | nova/compute/api.py | 1 | ||||
| -rw-r--r-- | nova/db/sqlalchemy/api.py | 15 | ||||
| -rw-r--r-- | nova/utils.py | 9 |
3 files changed, 13 insertions, 12 deletions
diff --git a/nova/compute/api.py b/nova/compute/api.py index f1c31a092..9a77a2aa2 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -291,6 +291,7 @@ class API(base.Base): 'blob': zone_blob, 'num_instances': num_instances, } + LOG.debug(request_spec) rpc.cast(context, FLAGS.scheduler_topic, diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py index 5dc2b9e7a..7119f43eb 100644 --- a/nova/db/sqlalchemy/api.py +++ b/nova/db/sqlalchemy/api.py @@ -2510,10 +2510,7 @@ def instance_type_get_by_id(context, id): if not inst_type: raise exception.InstanceTypeNotFound(instance_type=id) else: - res = dict(inst_type) - for field in ['created_at', 'updated_at', 'deleted_at']: - res.pop(field, None) - return res + return dict(inst_type) @require_context @@ -2526,10 +2523,7 @@ def instance_type_get_by_name(context, name): if not inst_type: raise exception.InstanceTypeNotFoundByName(instance_type_name=name) else: - res = dict(inst_type) - for field in ['created_at', 'updated_at', 'deleted_at']: - res.pop(field, None) - return res + return dict(inst_type) @require_context @@ -2542,10 +2536,7 @@ def instance_type_get_by_flavor_id(context, id): if not inst_type: raise exception.FlavorNotFound(flavor_id=id) else: - res = dict(inst_type) - for field in ['created_at', 'updated_at', 'deleted_at']: - res.pop(field, None) - return res + return dict(inst_type) @require_admin_context diff --git a/nova/utils.py b/nova/utils.py index 691134ada..a77cf7993 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -525,6 +525,15 @@ def loads(s): return json.loads(s) +try: + import anyjson +except ImportError: + pass +else: + anyjson._modules.append(("nova.utils", "dumps", TypeError, "loads", ValueError)) + anyjson.force_implementation("nova.utils") + + _semaphores = {} |
