<s> from openstack import format <EOL> from openstack import resource <EOL> from openstack . telemetry import telemetry_service <EOL> class Statistics ( resource . Resource ) : <EOL> """<STR_LIT>""" <EOL> id_attribute = '<STR_LIT>' <EOL> resource_key = '<STR_LIT>' <EOL> base_path = '<STR_LIT>' <EOL> service = telemetry_service . TelemetryService ( ) <EOL> allow_list = True <EOL> meter_name = resource . prop ( '<STR_LIT>' ) <EOL> aggregate = resource . prop ( '<STR_LIT>' ) <EOL> avg = resource . prop ( '<STR_LIT>' ) <EOL> count = resource . prop ( '<STR_LIT:count>' ) <EOL> duration = resource . prop ( '<STR_LIT>' ) <EOL> duration_end_at = resource . prop ( '<STR_LIT>' , type = format . ISO8601 ) <EOL> duration_start_at = resource . prop ( '<STR_LIT>' , type = format . ISO8601 ) <EOL> group_by = resource . prop ( '<STR_LIT>' ) <EOL> max = resource . prop ( '<STR_LIT>' ) <EOL> min = resource . prop ( '<STR_LIT>' ) <EOL> period = resource . prop ( '<STR_LIT>' ) <EOL> period_end_at = resource . prop ( '<STR_LIT>' , type = format . ISO8601 ) <EOL> period_start_at = resource . prop ( '<STR_LIT>' , type = format . ISO8601 ) <EOL> sum = resource . prop ( '<STR_LIT>' ) <EOL> unit = resource . prop ( '<STR_LIT>' ) <EOL> @ classmethod <EOL> def list ( cls , session , limit = None , marker = None , path_args = None , <EOL> paginated = False , ** params ) : <EOL> url = cls . _get_url ( path_args ) <EOL> resp = session . get ( url , endpoint_filter = cls . service , params = params ) <EOL> for stat in resp . json ( ) : <EOL> yield cls . existing ( ** stat ) </s>
