diff options
author | Sam Morrison <sorrison@gmail.com> | 2019-03-18 12:13:50 +1100 |
---|---|---|
committer | Oleh Huzei <oleh.huzei@ormuco.com> | 2020-01-14 20:49:45 +0000 |
commit | 2b5533c17bd1fdbfdb533244cf359b3d5becbed0 (patch) | |
tree | ef6b1083c2c4774289991c0238b78ed596608014 | |
parent | d5a45b4297541888e0078b4cab2190c55ed19b1c (diff) | |
download | ceilometer-2b5533c17bd1fdbfdb533244cf359b3d5becbed0.tar.gz |
Set instance_type_id in event traits to be a string.
In gnocchi the flavor_id attribute is a string so also make it a
string in the event for compatibility.
This is needed if you are creating gnocchi instances from events.
Change-Id: I1949e592431510b0cb6949e981f3efb72a1e7a1a
(cherry picked from commit db3fcc02eeec1a973629cf23219efe9ff744be09)
-rw-r--r-- | ceilometer/pipeline/data/event_definitions.yaml | 1 | ||||
-rw-r--r-- | ceilometer/tests/unit/publisher/test_gnocchi.py | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/ceilometer/pipeline/data/event_definitions.yaml b/ceilometer/pipeline/data/event_definitions.yaml index 07eb4471..945e8eab 100644 --- a/ceilometer/pipeline/data/event_definitions.yaml +++ b/ceilometer/pipeline/data/event_definitions.yaml @@ -33,7 +33,6 @@ type: int fields: payload.vcpus instance_type_id: - type: int fields: payload.instance_type_id instance_type: fields: payload.instance_type diff --git a/ceilometer/tests/unit/publisher/test_gnocchi.py b/ceilometer/tests/unit/publisher/test_gnocchi.py index 821e8705..95f7b34d 100644 --- a/ceilometer/tests/unit/publisher/test_gnocchi.py +++ b/ceilometer/tests/unit/publisher/test_gnocchi.py @@ -49,7 +49,7 @@ INSTANCE_DELETE_START = models.Event( models.Trait('tenant_id', 1, u'7c150a59fe714e6f9263774af9688f0e'), models.Trait('root_gb', 2, 0), models.Trait('ephemeral_gb', 2, 0), - models.Trait('instance_type_id', 2, 2), + models.Trait('instance_type_id', 2, u'2'), models.Trait('vcpus', 2, 1), models.Trait('memory_mb', 2, 512), models.Trait( |