~ubuntu-branches/ubuntu/trusty/heat/trusty-security

« back to all changes in this revision

Viewing changes to heat/engine/watchrule.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2013-10-03 09:43:04 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20131003094304-k2c4qcsfn7cv6eos
Tags: 2013.2~rc1-0ubuntu1
* New upstream release.
* debian/control: Dropped python-d2to1 build dependency.

Show diffs side-by-side

added added

removed removed

Lines of Context:
268
268
        from heat.engine import clients
269
269
        clients = clients.Clients(self.context)
270
270
        sample = {}
271
 
        sample['counter_type'] = 'gauge'
 
271
        sample['meter_type'] = 'gauge'
272
272
 
273
273
        for k, d in iter(data.items()):
274
274
            if k == 'Namespace':
275
275
                continue
276
 
            sample['counter_name'] = k
277
 
            sample['counter_volume'] = d['Value']
278
 
            sample['counter_unit'] = d['Unit']
 
276
            sample['meter_name'] = k
 
277
            sample['sample_volume'] = d['Value']
 
278
            sample['meter_unit'] = d['Unit']
279
279
            dims = d.get('Dimensions', {})
280
280
            if isinstance(dims, list):
281
281
                dims = dims[0]
357
357
    if wr.state == WatchRule.SUSPENDED:
358
358
        return False
359
359
    if wr.state == WatchRule.CEILOMETER_CONTROLLED:
360
 
        metric = wr.rule['counter_name']
 
360
        metric = wr.rule['meter_name']
361
361
        rule_dims = {}
362
362
        for k, v in iter(wr.rule.get('matching_metadata', {}).items()):
363
363
            name = k.split('.')[-1]