Add JSON content format to AtomPub pipeline handler.
Also add optional args to specify title and categories
of atom post.
Change-Id: I67c133fb61b2a5248090ff562aad07a436285a8f
Adds AtomPub handler to send events to an atom server as a feed.
Also, fixed Usage driver to save new events directly from pipeline.
Fixed minor (but annoyingly hard to diagnose) bug in db layer
where it didn't recognize 'long' values.
Change-Id: I792e9f77accfea4583fd75805a9ff0d946827df8
Alows you to trim events older than a configurable time from
the events database.
(Remerging to fix timex parse error)
Change-Id: Iaa290705815d1c3ac23c2ca7370a5d705f1f834c
- Add PEP8 section to tox.ini
- Add hacking to requirements to enforce OpenStack style requirements
- Fix large number of formatting issues flagged by flake8 check
- Add copyright notices to all remaining files
- Fix bug in trigger_manager related to logging calls
- Add .gitignore file
Change-Id: I755ab9c8bcc436836f9006fcd671408cc77214c4
Was previously looking at the last .start event when
comparing important traits against the .exists event.
Now it will look at the last important .end event it found (if any).
For delete operations, it will be the last event in the chain.
This may need to change to a specific event as well, like
compute.instance.delete.end or something.
Change-Id: Ie85e69716cd730c3546d06bae28e52e0c301940f
Similar to the existing streams functionality, this patch adds
the ability to get just a count of filtered events rather than
the full list of events.
There are corresponding changes in quince, quincy, and klugman.
Change-Id: Ic14845db48170a8481c764f5f2468f137758bd19
For use with API. You can find events based on traits, event_type or dates.
Doesn't support wildcarding or anything just yet.
Change-Id: Ide6e13086d50bacf356d8e36b9de257db9d543ca
Now it matches the notification format expected by the yagi
CUF handler. Requires expanded event_definition.yaml file
to include extra traits from .exists
Change-Id: I83ba05d73890a578699566648b37697d46b58040
Adds Mark/limit to find_streams for api usage.
The 'mark' is an opaque parameter (called '_mark') added into
each item in the list of returned items (currently a mildly obscured
ID for streams, that could be changed.)
Returned items are sorted in descending order (by ID for streams),
allowing paging from the 'top' to the bottom.
By prefacing the 'mark' param with a '+', you can page in ascending
order as well.
This same paging scheme can be used for a future events api, as well.
Change-Id: Ie358c0d1d8644dac24cad3992188ec22d66c5328
For publishing new events into an exchange.
PipelineHandlers can return new Events for subsequent processing.
However, sometimes we need to publish Notifications. Remember that
Notifications are less restrictive than Events. They can be larger.
They can be nested. They can contain lists.
We store these pending notifications in the handler env variable
so downstream handlers can access them.
The NotabeneHandler takes a configuration variable 'env_keys' which
specifies the env keys to look for. Lists of notifications in these
variables are published to the queue using the connection parameters
supplied.
Errors in transmission are logged and ignored since exceptions during
the commit() phase do not flag the steam as in error.
A sample pipeline definition might look like this:
test_expire_pipeline:
- logger
- usage
- name: notabene
params:⋅
host: localhost
user: guest
password: guest
port: 5672
vhost: /
library: librabbitmq
exchange: nova
exchange_type: topic
queue_name: monitor.info
env_keys:
- usage_notifications
Change-Id: If1958135ad6fbed88e2c18b9fac7efde51ee3113
Slight change on the old way, which was a single .verified on the
one EOD .exists. Now it generates a .verified for every .exists
seen.
Change-Id: I7bdced936f203cbec4bf8b7ee2b956c388e66ff1
Also adds support for warnings. Will generate a
compute.instance.exists.warnings event when there
is something suspicious but not an actual error.
Change-Id: I00f135b20917231a8cf3f603f0954f061de15410
Introduces the time_sync object which can sync
time with an external time service (like the time_sync
service in notigen).
This is used for playback of old events. It prevents
premature expiry triggers.
Also some tweaks to the UsageHandler, work in progress
and used for testing.
Change-Id: I45033fbd9c12d98f96816a4f90cf7dc8c915ef51
Allows for per-trigger-definition debugging. Simply add
debug_level=1 to your trigger definition.
debug_level=2 gives detailed explainations of why your
stream didn't fire or trigger.
This way, you can leave the overall debug level at INFO
and still get details on the stream you're working on.
Yagi worker now uses idle() callback for debug updates.
and minor cleanups for pep8/HACKING
Change-Id: Id0af7a0adbcc47335ad250130958932c708b5c18
Save newly created events from pipeline run if pipeline commits.
Refactor trigger manager api wart, move save_event call into add_event
to make add_event and add_notification symmetric.