This exposes a Swift container's storage policy as a metadata
attribute in Ceilometer samples (via the storage.containers.objects
and storage.containers.objects.size meters) and the swift_account
Gnocchi resources, named storage_policy.
The storage policy determines the location and replication
parameters for a Swift container, making it a useful metric
for billing alongside the size of the container. The storage
policy for a container cannot be changed unless the container
is recreated, meaning that it does not change often (making it
suitable to be stored in Gnocchi as a metadata attribute).
The reason why this was not possible before was that Swift
did not return the storage policy for each container in the
GET account request, but a new proposed change to Swift [1]
adds it to the response as the storage_policy attribute.
This change for Ceilometer takes advantage of this and adds
it to Ceilometer samples and the Gnocchi resource type.
For this to work, the Swift change needs to be accepted
and merged.
[1]: https://review.opendev.org/c/openstack/swift/+/940601
Depends-On: I52b37cfa49cac8675f5087bcbcfe18db0b46d887
Change-Id: I25f74df61ef0a6a4b50f1357ddf86d5acc6d71e7