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

« back to all changes in this revision

Viewing changes to ceilometer/image/notifications.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 Red Hat, Inc
 
2
# Copyright 2012 Red Hat, Inc
4
3
#
5
4
# Author: Eoghan Glynn <eglynn@redhat.com>
6
5
#
20
19
"""
21
20
 
22
21
from oslo.config import cfg
 
22
import oslo.messaging
23
23
 
24
24
from ceilometer import plugin
25
25
from ceilometer import sample
38
38
    """Base class for image counting."""
39
39
 
40
40
    @staticmethod
41
 
    def get_exchange_topics(conf):
42
 
        """Return a sequence of ExchangeTopics defining the exchange and
 
41
    def get_targets(conf):
 
42
        """Return a sequence of oslo.messaging.Target defining the exchange and
43
43
        topics to be connected for this plugin.
44
44
        """
45
 
        return [
46
 
            plugin.ExchangeTopics(
47
 
                exchange=conf.glance_control_exchange,
48
 
                topics=set(topic + ".info"
49
 
                           for topic in conf.notification_topics)),
50
 
        ]
 
45
        return [oslo.messaging.Target(topic=topic,
 
46
                                      exchange=conf.glance_control_exchange)
 
47
                for topic in conf.notification_topics]
51
48
 
52
49
 
53
50
class ImageCRUDBase(ImageBase):