~ubuntu-branches/ubuntu/vivid/ceilometer/vivid-proposed

« back to all changes in this revision

Viewing changes to ceilometer/compute/notifications/instance.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2014-06-13 13:20:35 UTC
  • mfrom: (1.1.17)
  • Revision ID: package-import@ubuntu.com-20140613132035-42ibzh8j7ww2q31i
Tags: 2014.2~b1-0ubuntu1
* New upstream release.
* debian/control: Open up juno release
* debian/patches/fix-requirements.patch: Refreshed.
* debian/rules: Patch the ceilometer.conf.sample directly since
  the configuration files are generated by a tool.
* debian/ceilometer-common.install: Drop sources.json.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# -*- encoding: utf-8 -*-
2
1
#
3
 
# Copyright © 2012 New Dream Network, LLC (DreamHost)
4
 
# Copyright © 2013 eNovance
 
2
# Copyright 2012 New Dream Network, LLC (DreamHost)
 
3
# Copyright 2013 eNovance
5
4
#
6
5
# Author: Doug Hellmann <doug.hellmann@dreamhost.com>
7
6
#         Julien Danjou <julien@danjou.info>
36
35
 
37
36
    def process_notification(self, message):
38
37
        instance_properties = self.get_instance_properties(message)
39
 
        if 'metadata' in instance_properties:
 
38
        if isinstance(instance_properties.get('metadata'), dict):
40
39
            src_metadata = instance_properties['metadata']
41
40
            del instance_properties['metadata']
42
41
            util.add_reserved_user_metadata(src_metadata, instance_properties)