diff --git a/ceilometer/dispatcher/data/gnocchi_resources.yaml b/ceilometer/dispatcher/data/gnocchi_resources.yaml index e1411dfaee..f18a4d7953 100644 --- a/ceilometer/dispatcher/data/gnocchi_resources.yaml +++ b/ceilometer/dispatcher/data/gnocchi_resources.yaml @@ -70,6 +70,7 @@ resources: image_ref: resource_metadata.image_ref display_name: resource_metadata.display_name flavor_id: resource_metadata.(instance_flavor_id|(flavor.id)) + flavor_name: resource_metadata.(instance_type|(flavor.name)) server_group: resource_metadata.user_metadata.server_group event_delete: compute.instance.delete.start event_attributes: diff --git a/ceilometer/gnocchi_client.py b/ceilometer/gnocchi_client.py index 1764e69636..bb59af44ea 100644 --- a/ceilometer/gnocchi_client.py +++ b/ceilometer/gnocchi_client.py @@ -102,6 +102,15 @@ resources_update_operations = [ "value": {"type": "string", "min_length": 0, "max_length": 255, "required": False} }]}, + {"desc": "add flavor_name to instance", + "type": "update_attribute_type", + "resource_type": "instance", + "data": [{ + "op": "add", + "path": "/attributes/flavor_name", + "value": {"type": "string", "min_length": 0, "max_length": 255, + "required": True, "options": {'fill': ''}} + }]}, ]