This blueprint aims to extend the current metering API in order to help administrators to manage the metering labels/rules.
Currently the administrator has to associate metering label for each tenant by the hand, there is no way to add a default metering label/rules which will be automaticaly associated with all current tenants and also with the tenants that will be created.
The goal is to extend the current API to add an extra parameter for the labels creation which specifies whether the label will be shared by all tenants or not. A such label will be shared by all current tenants and also by the tenants which will be created.
An alternative could be to add an extra configuration file which set some metering labels/rules at the metering agent startup.
An extra field will be added to the MeteringLabel data model to specify whether a label is shared or not. By default a metering label will be not shared. The current labels will be unchanged.
A new shared attribute will be introduced to the current MeteringLabel model:
|Attribute Name||Type||Access||Default Value||Validation/ Conversion||Description|
No change, only admin users are allowed to create/delete labels/rules.
The shared parameter will be exposed to the end user through the neutron client, ex:
neutron meter-label-create testlabel –shared
Sylvain Afchain <sylvain-afchain>
The work is split up into two parts:
For tempest test coverage, new API tests for the shared parameter will be provided.
Documentation and examples for the shared parameter will be provided.