From ea9b5d3632008ce68819525f426b6be896604f7b Mon Sep 17 00:00:00 2001 From: Mark Vanderwiel Date: Mon, 14 Apr 2014 11:39:43 -0500 Subject: [PATCH] Add notification attributes Add attrs related for notification Add tests Change-Id: I559d4d610cd63a78e783fb57922012cf97ec6ad6 Closes-Bug: #1306703 --- CHANGELOG.md | 3 +++ README.md | 8 ++++++++ attributes/default.rb | 7 +++++++ metadata.rb | 2 +- templates/default/heat.conf.erb | 11 +++++------ 5 files changed, 24 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44600fb..df57485 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # CHANGELOG for cookbook-openstack-orchestration This file is used to list changes made in each version of cookbook-openstack-orchestration +## 9.1.0 +* Add notification attributes + ## 9.0.1 * Remove policy file diff --git a/README.md b/README.md index 1b03638..b6c82de 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,14 @@ Attributes for the Heat service are in the ['openstack']['orchestration'] namesp * `openstack['orchestration']['platform']` - hash of platform specific package/service names and options * `openstack['orchestration']['api']['auth']['version']` - Select v2.0 or v3.0. Default v2.0. The auth API version used to interact with identity service. +Notification definitions +------------------------ +* `openstack['orchestration']['notification_driver']` - driver +* `openstack['orchestration']['default_notification_level']` - level +* `openstack['orchestration']['default_publisher_id']` - publisher id +* `openstack['orchestration']['list_notifier_drivers']` - list of drivers +* `openstack['orchestration']['notification_topics']` - notifications topics + MQ attributes ------------- * `openstack["orchestration"]["mq"]["service_type"]` - Select qpid or rabbitmq. default rabbitmq diff --git a/attributes/default.rb b/attributes/default.rb index 12b5e00..263f937 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -68,6 +68,13 @@ default['openstack']['orchestration']['rpc_thread_pool_size'] = 64 default['openstack']['orchestration']['rpc_conn_pool_size'] = 30 default['openstack']['orchestration']['rpc_response_timeout'] = 60 +# Notification definitions +default['openstack']['orchestration']['notification_driver'] = 'heat.openstack.common.notifier.rpc_notifier' +default['openstack']['orchestration']['default_notification_level'] = 'INFO' +default['openstack']['orchestration']['default_publisher_id'] = '' +default['openstack']['orchestration']['list_notifier_drivers'] = 'heat.openstack.common.notifier.no_op_notifier' +default['openstack']['orchestration']['notification_topics'] = 'notifications' + # platform-specific settings case platform_family when 'fedora', 'rhel' # :pragma-foodcritic: ~FC024 - won't fix this diff --git a/metadata.rb b/metadata.rb index bf2141d..b1355b1 100644 --- a/metadata.rb +++ b/metadata.rb @@ -4,7 +4,7 @@ maintainer 'IBM, Inc.' license 'Apache 2.0' description 'Installs and configures the Heat Service' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version '9.0.1' +version '9.1.0' recipe 'openstack-orchestration::api', 'Start and configure the Heat API service' recipe 'openstack-orchestration::api-cfn', 'Start and configure the Heat API CloudFormation service' recipe 'openstack-orchestration::api-cloudwatch', 'Start and configure the Heat API CloudWatch service' diff --git a/templates/default/heat.conf.erb b/templates/default/heat.conf.erb index 99dbcb2..8de80a7 100755 --- a/templates/default/heat.conf.erb +++ b/templates/default/heat.conf.erb @@ -312,15 +312,15 @@ log_config = /etc/openstack/logging.conf # Driver or drivers to handle sending notifications (multi # valued) -#notification_driver= +notification_driver = <%= node['openstack']['orchestration']['notification_driver'] %> # Default notification level for outgoing notifications # (string value) -#default_notification_level=INFO +default_notification_level = <%= node['openstack']['orchestration']['default_notification_level'] %> # Default publisher_id for outgoing notifications (string # value) -#default_publisher_id= +default_publisher_id = <%= node['openstack']['orchestration']['default_publisher_id'] %> # @@ -328,15 +328,14 @@ log_config = /etc/openstack/logging.conf # # List of drivers to send notifications (multi valued) -#list_notifier_drivers=heat.openstack.common.notifier.no_op_notifier - +list_notifier_drivers = <%= node['openstack']['orchestration']['list_notifier_drivers'] %> # # Options defined in heat.openstack.common.notifier.rpc_notifier # # AMQP topic used for OpenStack notifications (list value) -#notification_topics=notifications +notification_topics = <%= node['openstack']['orchestration']['notification_topics'] %> #