The ceilometer.publisher.utils Module

The ceilometer.publisher.utils Module

Utils for publishers

ceilometer.publisher.utils.compute_signature(message, secret)[source]

Return the signature for a message dictionary.

ceilometer.publisher.utils.decode_unicode(input)[source]

Decode the unicode of the message, and encode it into utf-8.

ceilometer.publisher.utils.message_from_event(event, secret)[source]

Make an event message ready to be published or stored.

Returns a serialized model of Event containing an event message

ceilometer.publisher.utils.meter_message_from_counter(sample, secret)[source]

Make a metering message ready to be published or stored.

Returns a dictionary containing a metering message for a notification message and a Sample instance.

ceilometer.publisher.utils.recursive_keypairs(d, separator=':')[source]

Generator that produces sequence of keypairs for nested dictionaries.

ceilometer.publisher.utils.verify_signature(message, secret)[source]

Check the signature in the message.

Message is verified against the value computed from the rest of the contents.

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.