diff --git a/ceilometer/data/meters.d/meters.yaml b/ceilometer/data/meters.d/meters.yaml index 69364916d8..f0bf8d4b1c 100644 --- a/ceilometer/data/meters.d/meters.yaml +++ b/ceilometer/data/meters.d/meters.yaml @@ -130,6 +130,7 @@ metric: metadata: display_name: $.payload.display_name volume_type: $.payload.volume_type + volume_type_id: $.payload.volume_type image_id: $.payload.glance_metadata[?key=image_id].value instance_id: $.payload.volume_attachment[0].server_id diff --git a/ceilometer/gnocchi_client.py b/ceilometer/gnocchi_client.py index c8789681f8..ea3dcbe5f2 100644 --- a/ceilometer/gnocchi_client.py +++ b/ceilometer/gnocchi_client.py @@ -200,6 +200,15 @@ resources_update_operations = [ "value": {"type": "string", "min_length": 0, "max_length": 255, "required": False} }]}, + {"desc": "add volume_type_id to volume", + "type": "update_attribute_type", + "resource_type": "volume", + "data": [{ + "op": "add", + "path": "/attributes/volume_type_id", + "value": {"type": "string", "min_length": 0, "max_length": 255, + "required": False} + }]}, ] diff --git a/ceilometer/publisher/data/gnocchi_resources.yaml b/ceilometer/publisher/data/gnocchi_resources.yaml index 72f3baa860..afbedc6a23 100644 --- a/ceilometer/publisher/data/gnocchi_resources.yaml +++ b/ceilometer/publisher/data/gnocchi_resources.yaml @@ -242,6 +242,7 @@ resources: attributes: display_name: resource_metadata.(display_name|name) volume_type: resource_metadata.volume_type + volume_type_id: resource_metadata.volume_type_id image_id: resource_metadata.image_id instance_id: resource_metadata.instance_id event_delete: diff --git a/releasenotes/notes/add-volume_type_id-attr-f29af86534907941.yaml b/releasenotes/notes/add-volume_type_id-attr-f29af86534907941.yaml new file mode 100644 index 0000000000..0b7b6a1b13 --- /dev/null +++ b/releasenotes/notes/add-volume_type_id-attr-f29af86534907941.yaml @@ -0,0 +1,17 @@ +--- +features: + - | + Added the ``volume_type_id`` attribute to ``volume.size`` notification + samples, which stores the ID for the volume type of the given volume. + - | + Added the ``volume_type_id`` attribute to ``volume`` resources in Gnocchi, + which stores the ID for the volume type of the given volume. +upgrade: + - | + ``meters.yaml`` has been updated with changes to the ``volume.size`` + notification meter. If you override this file in your deployment, + it needs to be updated. + - | + ``gnocchi_resources.yaml`` has been updated with changes to the + ``volume`` resource type. If you override this file in your deployment, + it needs to be updated.