Adding policy support for ceilometer
Adding default policy json file for ceilometer which is very sparse. Configuring access to metering panel to be RBAC gated. Using the appropriate policy checks to load the panel. Change-Id: Iad3ffe9d73fb994b146637e714c7d8c46102e104 Closes-Bug: #1419193 Partially-Closes: #1161144
This commit is contained in:
parent
a86b6c7320
commit
9d8079db0c
6
openstack_dashboard/conf/ceilometer_policy.json
Normal file
6
openstack_dashboard/conf/ceilometer_policy.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"context_is_admin": "role:admin",
|
||||
"context_is_project": "project_id:%(target.project_id)s",
|
||||
"context_is_owner": "user_id:%(target.user_id)s",
|
||||
"segregation": "rule:context_is_admin"
|
||||
}
|
@ -19,7 +19,9 @@ from openstack_dashboard.dashboards.admin import dashboard
|
||||
class Metering(horizon.Panel):
|
||||
name = _("Resource Usage")
|
||||
slug = 'metering'
|
||||
permissions = ('openstack.services.metering', 'openstack.roles.admin', )
|
||||
permissions = ('openstack.services.metering', )
|
||||
policy_rules = (('telemetry', 'telemetry:compute_statistics'),
|
||||
('telemetry', 'telemetry:get_meter'),)
|
||||
|
||||
|
||||
dashboard.Admin.register(Metering)
|
||||
|
@ -223,6 +223,7 @@ POLICY_FILES = {
|
||||
'image': 'glance_policy.json',
|
||||
'orchestration': 'heat_policy.json',
|
||||
'network': 'neutron_policy.json',
|
||||
'telemetry': 'ceilometer_policy.json',
|
||||
}
|
||||
|
||||
SECRET_KEY = None
|
||||
|
Loading…
Reference in New Issue
Block a user