When there're multiple regions in openstack system, like 'regionOne' and
'regionTwo', aodh do not specify a region to get the endpoint of zaqar.
An endpoint url should be uniquely determined by 'service_id','interface',
'region_id'.
Closes-Bug: #1798033
Change-Id: I5b8d279d7ce08b165002422c07792f59f1e9912f
Since Aodh uses trust IDs stored in alarm URLs unconditionally - without
checking for tenant safety - it is not safe to allow users to pass in their own
trust IDs. Forbid this and allow only trusts created by Aodh to be used. It is
highly unlikely that there is any (legitimate) use of this feature in the wild,
since allowing Aodh to create the trust is easier anyway.
Change-Id: I8fd11a7f9fe3c0ea5f9843a89686ac06713b7851
Closes-Bug: #1649333
change os_username to username, change os_passwd to passwd, change os_tenant_name to project_name, change os_auth_url to auth_url
Closes-Bug: #1699468
Change-Id: Ic81d30fc90673053bb2ce7a55a491c54bcc6776d
Turn on the flag in setup.cfg.
Fix some formatting issues with a couple of docstrings.
Fix some mistakes in the rst files.
Suppress warnings from Sphinx extensions that used to be suppressed by
pbr with older versions of Sphinx.
Change-Id: I549292b5e22cf8ae0f54f878793a36f2cd3b8e6c
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Allow Zaqar messages to be posted to a queue under the user's own tenant
by using a Keystone trust.
Change-Id: Ia9e200ecef13ba46479a155fee064d6dded08917
Avoid duplicating the code for getting a Zaqar client.
Also fix the tests, where assertion failures in the FakeZaqarClient code
were being suppressed because of indiscriminate exception catching. We
now actually check that a message was sent, so if there is an error
we'll see the failure.
Change-Id: Ibbd7bcec15eead9ef2afda4e1c98b576162bfe8a
Flesh out the documentation with details of how to use the Zaqar
notifier and what data needs to be included in the URL.
Change-Id: I90661dd0bbae41a3cc053e32b80123a0346f2432
Now since os-endpoint-type has been deprecated, so we need to use
'interface' to get the correct endpoint type of zaqar.
Change-Id: I9fb4d4836f1ef4e43359e9fddfe789a5e00d354c
Currently the zaqar notifer driver will create a queue per alarm
in service tenant, as a result, end user can't access the queue
from zaqar. Which makes it's hard to add a subscriber like mistral
because it needs a complex subscription options. The patch will
provide a capabability for end user let aodh forward the alarms
to user's queue instead of the queue created automatically in
service tenant. And this patch could benefit any 3rd party which
interested in the alarm information.
Change-Id: I4b843b39c8a13bd40aa2923a62ba681c81e06e9a
We have no global conf configured, when service is started, we
initialize a local object of cfg.ConfigOpt() instead of using
cfg.CONF. Acrossing whole Aodh project, there is only one place
still uses the global unconfigured conf object, that is zaqar.
This problem is not exposed early is because previously zaqar
register its options inside its module, hence it actually always
uses the default values, which is wrong but enough for test. After
patch I0f3b6b151fe71b25ed49d66f5c2bdecb11fb6f5f lands, it will
raise NoSuchOptError.
Let's fix this one, decision of global conf V.S. local conf can
be in another patch.
Change-Id: Ie05d778444f27f2dc07b4afb43c7037e66b3c331
aodh.notifier.zaqar registers options inside its own module, hence
cannot returned by list_opts, which leads to absent from
`tox -e genconfig`.
Change-Id: I0f3b6b151fe71b25ed49d66f5c2bdecb11fb6f5f
Support for sending alarm notifications to zaqar queues.
This supports publishing and subscribing alarm notification
messages to zaqar queues.
Change-Id: If0e3105563d0aa05aa0d84abdba4eb3a2f601580