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

« back to all changes in this revision

Viewing changes to ceilometer/publisher/udp.py

  • Committer: Package Import Robot
  • Author(s): James Page, Corey Bryant, James Page
  • Date: 2015-02-19 14:59:07 UTC
  • mfrom: (1.2.3)
  • Revision ID: package-import@ubuntu.com-20150219145907-9jojybdsl64zcn14
Tags: 2015.1~b2-0ubuntu1
[ Corey Bryant ]
* New upstream release.
  - d/control: Align requirements with upstream.
  - d/p/skip-test.patch: Rebased.

[ James Page ]
* d/rules,d/p/skip-gabbi.patch: Skip tests that rely on python-gabbi until
  packaging and MIR is complete.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#
2
2
# Copyright 2013 eNovance
3
3
#
4
 
# Author: Julien Danjou <julien@danjou.info>,
5
 
#         Tyaptin Ilya <ityaptin@mirantis.com>
6
 
#
7
4
# Licensed under the Apache License, Version 2.0 (the "License"); you may
8
5
# not use this file except in compliance with the License. You may obtain
9
6
# a copy of the License at
21
18
import socket
22
19
 
23
20
import msgpack
24
 
from oslo.config import cfg
25
 
from oslo.utils import netutils
 
21
from oslo_config import cfg
 
22
from oslo_utils import netutils
26
23
 
 
24
import ceilometer
27
25
from ceilometer.i18n import _
28
26
from ceilometer.openstack.common import log
29
27
from ceilometer import publisher
52
50
 
53
51
        for sample in samples:
54
52
            msg = utils.meter_message_from_counter(
55
 
                sample,
56
 
                cfg.CONF.publisher.metering_secret)
 
53
                sample, cfg.CONF.publisher.telemetry_secret)
57
54
            host = self.host
58
55
            port = self.port
59
56
            LOG.debug(_("Publishing sample %(msg)s over UDP to "
65
62
            except Exception as e:
66
63
                LOG.warn(_("Unable to send sample over UDP"))
67
64
                LOG.exception(e)
 
65
 
 
66
    def publish_events(self, context, events):
 
67
        """Send an event message for publishing
 
68
 
 
69
        :param context: Execution context from the service or RPC call
 
70
        :param events: events from pipeline after transformation
 
71
        """
 
72
        raise ceilometer.NotImplementedError