Fix Simulator Value to 0 that is converted to null

When the value in the simulator is set to zero it is converted to
a null in the publisher. Recently Monasca API has added a check
for the null values and it is rejecting the measurement.
This fixes the issue.

Note: Srinivas already submtted this patch but it does not show
up in github nor can be fetched (public key error)

Change-Id: Ic8e8d73f15c8f3790f7cf127c0bc14dfb816903b
This commit is contained in:
Fabio Giannetti 2015-10-16 16:29:01 -07:00
parent e5f77305f7
commit e2d679400d
1 changed files with 3 additions and 3 deletions

View File

@ -223,7 +223,7 @@ def _volume_payload(project_id, resource_id, load_date):
def _instance_payload(project_id, resource_id, load_date):
return {'created_at': load_date + str(timeutils.utcnow())[-15:-7],
'deleted_at': u'',
'disk_gb': 100,
'disk_gb': 50,
'display_name': u'testme',
'fixed_ips': [{'address': u'10.0.0.2',
'floating_ips': [],
@ -242,8 +242,8 @@ def _instance_payload(project_id, resource_id, load_date):
'user_id': u'abcd_01234_dcba',
'reservation_id': u'1e3ce043029547f1a61c1996d1a531a3',
'vcpus': 10,
'root_gb': 1,
'ephemeral_gb': 1,
'root_gb': 10,
'ephemeral_gb': 10,
'host': u'compute-host-name',
'availability_zone': u'1e3ce043029547f1a61c1996d1a531a4',
'os_type': u'linux?',