)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":13177,"name":"Emma Foley","email":"efoley@redhat.com","username":"emma-l-foley"},"change_message_id":"041a2e17bdb0ea2c09d87ec297f3b11083211612","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"213f0e79_4942e7f9","updated":"2026-05-01 21:29:04.000000000","message":"I\u0027m spotted a few needed change now that I\u0027m looking at this in a different context","commit_id":"fb5d8e21ca91d6a101a1f662be38280948551790"}],"ceilometer/volume/cinder.py":[{"author":{"_account_id":13177,"name":"Emma Foley","email":"efoley@redhat.com","username":"emma-l-foley"},"change_message_id":"041a2e17bdb0ea2c09d87ec297f3b11083211612","unresolved":true,"context_lines":[{"line_number":133,"context_line":"class _VolumeProviderPoolBase(_Base):"},{"line_number":134,"context_line":"    def extract_metadata(self, obj):"},{"line_number":135,"context_line":"        metadata \u003d super().extract_metadata(obj)"},{"line_number":136,"context_line":"        caps \u003d obj.capabilities or {}"},{"line_number":137,"context_line":"        metadata[\u0027pool_name\u0027] \u003d caps.get(\"pool_name\")"},{"line_number":138,"context_line":"        return metadata"},{"line_number":139,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"f5e9e0e3_517802bb","line":136,"range":{"start_line":136,"start_character":8,"end_line":136,"end_character":37},"updated":"2026-05-01 21:29:04.000000000","message":"If obj.capabilities is a required attribute for the obj, then this check is not necessary, and this can be simplified to just get the value from obj.capabilities","commit_id":"fb5d8e21ca91d6a101a1f662be38280948551790"},{"author":{"_account_id":13177,"name":"Emma Foley","email":"efoley@redhat.com","username":"emma-l-foley"},"change_message_id":"041a2e17bdb0ea2c09d87ec297f3b11083211612","unresolved":true,"context_lines":[{"line_number":134,"context_line":"    def extract_metadata(self, obj):"},{"line_number":135,"context_line":"        metadata \u003d super().extract_metadata(obj)"},{"line_number":136,"context_line":"        caps \u003d obj.capabilities or {}"},{"line_number":137,"context_line":"        metadata[\u0027pool_name\u0027] \u003d caps.get(\"pool_name\")"},{"line_number":138,"context_line":"        return metadata"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"c2e53f02_58a6c47b","line":137,"range":{"start_line":137,"start_character":42,"end_line":137,"end_character":53},"updated":"2026-05-01 21:29:04.000000000","message":"this needs to default to None","commit_id":"fb5d8e21ca91d6a101a1f662be38280948551790"},{"author":{"_account_id":13177,"name":"Emma Foley","email":"efoley@redhat.com","username":"emma-l-foley"},"change_message_id":"041a2e17bdb0ea2c09d87ec297f3b11083211612","unresolved":true,"context_lines":[{"line_number":146,"context_line":"    def get_samples(self, manager, cache, resources):"},{"line_number":147,"context_line":"        for pool in resources:"},{"line_number":148,"context_line":"            caps \u003d pool.capabilities or {}"},{"line_number":149,"context_line":"            if caps.get(\u0027total_capacity_gb\u0027) is not None:"},{"line_number":150,"context_line":"                yield sample.Sample("},{"line_number":151,"context_line":"                    name\u003d\u0027volume.provider.pool.capacity.total\u0027,"},{"line_number":152,"context_line":"                    type\u003dsample.TYPE_GAUGE,"}],"source_content_type":"text/x-python","patch_set":1,"id":"da5dd96c_9c14911a","line":149,"range":{"start_line":149,"start_character":12,"end_line":149,"end_character":57},"updated":"2026-05-01 21:29:04.000000000","message":"I\u0027m not sure if this is the right way to go.\nI think that previously, there would have been an error if \"total_capacity_gb\" didn\u0027t exist, rather than silent skipping.\n\nPerhaps raising a ceilometerInvalidSampleData error might be the answer here? However, this is another change in behaviour, and if that is the way we go, then I suggest reverting this change, and leaving the Attribute or Type Error get raised for now, instead of this change to silently drop the sample.\n\nLater, we can follow up to enhance the error and make it more useful.","commit_id":"fb5d8e21ca91d6a101a1f662be38280948551790"},{"author":{"_account_id":13177,"name":"Emma Foley","email":"efoley@redhat.com","username":"emma-l-foley"},"change_message_id":"041a2e17bdb0ea2c09d87ec297f3b11083211612","unresolved":true,"context_lines":[{"line_number":209,"context_line":"    def get_samples(self, manager, cache, resources):"},{"line_number":210,"context_line":"        for pool in resources:"},{"line_number":211,"context_line":"            caps \u003d pool.capabilities or {}"},{"line_number":212,"context_line":"            if caps.get(\u0027provisioned_capacity_gb\u0027):"},{"line_number":213,"context_line":"                reserved_size \u003d math.floor("},{"line_number":214,"context_line":"                    (caps[\u0027reserved_percentage\u0027] / 100) *"},{"line_number":215,"context_line":"                    caps[\u0027total_capacity_gb\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"6db4d5a8_73b10ecc","line":212,"range":{"start_line":212,"start_character":48,"end_line":212,"end_character":51},"updated":"2026-05-01 21:29:04.000000000","message":"oops, this should have a default of None","commit_id":"fb5d8e21ca91d6a101a1f662be38280948551790"},{"author":{"_account_id":13177,"name":"Emma Foley","email":"efoley@redhat.com","username":"emma-l-foley"},"change_message_id":"041a2e17bdb0ea2c09d87ec297f3b11083211612","unresolved":true,"context_lines":[{"line_number":222,"context_line":"                value \u003d ("},{"line_number":223,"context_line":"                    max_over_subscription_ratio *"},{"line_number":224,"context_line":"                    (caps[\u0027total_capacity_gb\u0027] - reserved_size) -"},{"line_number":225,"context_line":"                    caps[\u0027provisioned_capacity_gb\u0027]"},{"line_number":226,"context_line":"                )"},{"line_number":227,"context_line":"                yield sample.Sample("},{"line_number":228,"context_line":"                    name\u003d\u0027volume.provider.pool.capacity.virtual_free\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"e8268e96_c7b0e57b","line":225,"range":{"start_line":225,"start_character":20,"end_line":225,"end_character":51},"updated":"2026-05-01 21:29:04.000000000","message":"These need some more work. I think .get() should be used, and have some default set.\n\n\nPreviously, an Attribute error would have been raised, if the pool object didn\u0027t have the expected attributes. So the behaviour is going to change regardless, unless I catch the exception and manually raise an Attribute error to maintain the previous behaviour.","commit_id":"fb5d8e21ca91d6a101a1f662be38280948551790"},{"author":{"_account_id":13177,"name":"Emma Foley","email":"efoley@redhat.com","username":"emma-l-foley"},"change_message_id":"041a2e17bdb0ea2c09d87ec297f3b11083211612","unresolved":true,"context_lines":[{"line_number":264,"context_line":"    def default_discovery(self):"},{"line_number":265,"context_line":"        return \u0027volume_services\u0027"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"    FIELDS \u003d [\u0027binary\u0027, \u0027host\u0027, \u0027availability_zone\u0027, \u0027status\u0027]"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"    def get_samples(self, manager, cache, resources):"},{"line_number":270,"context_line":"        for svc in resources:"}],"source_content_type":"text/x-python","patch_set":1,"id":"996dcfc4_f9b76e80","line":267,"range":{"start_line":267,"start_character":33,"end_line":267,"end_character":50},"updated":"2026-05-01 21:29:04.000000000","message":"Either we should have both \"zone\" and \"availability_zone\" included in the metadata, or only have zone, which is an alias for the \"availability_zone\" member in the service resource \n\nWDYT?\nWe need to at least keep \"zone\", so that the publisher plugins are not impacted. There might be additional impact on users if they are filtering on  this metadata.","commit_id":"fb5d8e21ca91d6a101a1f662be38280948551790"}]}
