From 775256d6b1b9e45ba8e71b0a83f4ba2cb1e77c73 Mon Sep 17 00:00:00 2001 From: Monsyne Dragon Date: Wed, 8 Apr 2015 20:34:30 +0000 Subject: [PATCH] Fix default values for usage verified event. Fix the default values in the compute.instance.verified notification generated by the UsageHandler. Bandwidth values should be int (0), not empty string. Options value should also be '0', not empty string. Change-Id: I50dc660a46adcd8354e379821e0077cc475e647b --- winchester/pipeline_handler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/winchester/pipeline_handler.py b/winchester/pipeline_handler.py index fe1bb1a..094eccb 100644 --- a/winchester/pipeline_handler.py +++ b/winchester/pipeline_handler.py @@ -358,14 +358,14 @@ class UsageHandler(PipelineHandlerBase): 'state': exists.get('state', ''), 'state_description': exists.get('state_description', ''), 'bandwidth': {'public': { - 'bw_in': exists.get('bandwidth_in', ''), - 'bw_out': exists.get('bandwidth_out', '')}}, + 'bw_in': exists.get('bandwidth_in', 0), + 'bw_out': exists.get('bandwidth_out', 0)}}, 'image_meta': { 'org.openstack__1__architecture': exists.get('os_architecture', ''), 'org.openstack__1__os_version': exists.get('os_version', ''), 'org.openstack__1__os_distro': exists.get('os_distro', ''), - 'org.rackspace__1__options': exists.get('rax_options', '') + 'org.rackspace__1__options': exists.get('rax_options', '0') }}, 'original_message_id': exists.get('message_id', '')}