Use meter_name as id for statistics
Change-Id: I7b1706cfac8ed93274042606794ca1438762f03a
This commit is contained in:
@@ -15,6 +15,7 @@ from openstack.telemetry import telemetry_service
|
|||||||
|
|
||||||
|
|
||||||
class Statistics(resource.Resource):
|
class Statistics(resource.Resource):
|
||||||
|
id_attribute = 'meter_name'
|
||||||
resource_key = 'statistics'
|
resource_key = 'statistics'
|
||||||
base_path = '/v2/meters/%(meter_name)s/statistics'
|
base_path = '/v2/meters/%(meter_name)s/statistics'
|
||||||
service = telemetry_service.TelemetryService()
|
service = telemetry_service.TelemetryService()
|
||||||
@@ -41,10 +42,6 @@ class Statistics(resource.Resource):
|
|||||||
sum = resource.prop('sum')
|
sum = resource.prop('sum')
|
||||||
unit = resource.prop('unit')
|
unit = resource.prop('unit')
|
||||||
|
|
||||||
@property
|
|
||||||
def id(self):
|
|
||||||
return None
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def list(cls, session, path_args=None, **params):
|
def list(cls, session, path_args=None, **params):
|
||||||
url = cls.base_path % path_args
|
url = cls.base_path % path_args
|
||||||
|
Reference in New Issue
Block a user