"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "cloudkitty/collector/gnocchi.py" between
cloudkitty-16.0.0.tar.gz and cloudkitty-17.0.0.tar.gz

About: OpenStack CloudKitty provides Rating-as-a-Service for OpenStack.
The "Zed" series (latest release).

gnocchi.py  (cloudkitty-16.0.0):gnocchi.py  (cloudkitty-17.0.0)
skipping to change at line 435 skipping to change at line 435
resource_id = groupby[resource_key] resource_id = groupby[resource_key]
try: try:
resource = resources_info[resource_id] resource = resources_info[resource_id]
except KeyError: except KeyError:
raise AssociatedResourceNotFound(resource_key, resource_id) raise AssociatedResourceNotFound(resource_key, resource_id)
for i in metconf['metadata']: for i in metconf['metadata']:
metadata[i] = resource.get(i, '') metadata[i] = resource.get(i, '')
qty = data['measures']['measures']['aggregated'][0][2] qty = data['measures']['measures']['aggregated'][0][2]
converted_qty = ck_utils.convert_unit( converted_qty = ck_utils.convert_unit(
qty, metconf['factor'], metconf['offset']) qty, metconf['factor'], metconf['offset'])
mutated_qty = ck_utils.mutate(converted_qty, metconf['mutate']) mutate_map = metconf.get('mutate_map')
mutated_qty = ck_utils.mutate(converted_qty, metconf['mutate'],
return metadata, groupby, mutated_qty return metadata, groupby, mutated_qty
def fetch_all(self, metric_name, start, end, def fetch_all(self, metric_name, start, end,
project_id=None, q_filter=None): project_id=None, q_filter=None):
met = self.conf[metric_name] met = self.conf[metric_name]
data = self._fetch_metric( data = self._fetch_metric(
metric_name, metric_name,
start, start,
 End of changes. 1 change blocks. 
1 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)