From 10ce42a9871f6604d766dfc2c8401185f0585576 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionu=C8=9B=20Ar=C8=9B=C4=83ri=C8=99i?= Date: Thu, 3 Jul 2014 10:47:49 +0200 Subject: [PATCH] use new python_packages attributes from -common *_python_packages attributes are being moved to -common in order to remove the duplication from all the cookbooks which are using them Change-Id: I03d0acf12d4c53952498beeaefad9f3b237ccb9d Implements: blueprint move-python-db-client-attrs-to-common --- CHANGELOG.md | 5 +++++ README.md | 4 +--- attributes/default.rb | 9 +-------- metadata.rb | 4 ++-- recipes/common.rb | 4 ++-- 5 files changed, 11 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a5a80c..c328892 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ openstack-telemetry Cookbook CHANGELG ============================== This file is used to list changes made in each version of the openstack-metering cookbook. + +## 9.3.0 +* python_packages database client attributes have been migrated to +the -common cookbook + ## 9.2.0 * Change the action of all package resources from default to :upgrade diff --git a/README.md b/README.md index 4d2fb90..a932b90 100644 --- a/README.md +++ b/README.md @@ -60,8 +60,6 @@ Attributes ========== * `openstack['telemetry']['api']['auth']['version']` - Select v2.0 or v3.0. Default v2.0. The auth API version used to interact with identity service. -TODO: Add DB2 support on other platforms -* `openstack['telemetry']['platform']['db2_python_packages']` - Array of DB2 python packages, only available on redhat platform * `openstack['telemetry']['sample_source'] - The source name of emitted samples, default value is openstack. The following attributes are defined in attributes/default.rb of the common cookbook, but are documented here due to their relevance: @@ -104,7 +102,7 @@ License and Author | **Copyright** | Copyright (c) 2013, AT&T Services, Inc. | | **Copyright** | Copyright (c) 2013, Rackspace US, Inc. | | **Copyright** | Copyright (c) 2013-2014, IBM, Corp. | -| **Copyright** | Copyright (c) 2013, SUSE Linux GmbH | +| **Copyright** | Copyright (c) 2013-2014, SUSE Linux GmbH | Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/attributes/default.rb b/attributes/default.rb index 81c9cdd..2a8c11c 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -4,7 +4,7 @@ # Recipe:: default # # Copyright 2013, AT&T Services, Inc. -# Copyright 2013, SUSE Linux GmbH +# Copyright 2013-2014, SUSE Linux GmbH # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -54,8 +54,6 @@ end case platform_family when 'suse' # :pragma-foodcritic: ~FC024 - won't fix this default['openstack']['telemetry']['platform'] = { - 'mysql_python_packages' => ['python-mysql'], - 'postgresql_python_packages' => ['python-psycopg2'], 'common_packages' => ['openstack-ceilometer'], 'agent_central_packages' => ['openstack-ceilometer-agent-central'], 'agent_central_service' => 'openstack-ceilometer-agent-central', @@ -77,9 +75,6 @@ when 'suse' # :pragma-foodcritic: ~FC024 - won't fix this when 'fedora', 'rhel' default['openstack']['telemetry']['platform'] = { - 'mysql_python_packages' => ['MySQL-python'], - 'db2_python_packages' => ['python-ibm-db', 'python-ibm-db-sa'], - 'postgresql_python_packages' => ['python-psycopg2'], 'common_packages' => ['openstack-ceilometer-common'], 'agent_central_packages' => ['openstack-ceilometer-central'], 'agent_central_service' => 'openstack-ceilometer-central', @@ -101,8 +96,6 @@ when 'fedora', 'rhel' when 'debian' default['openstack']['telemetry']['platform'] = { - 'mysql_python_packages' => ['python-mysqldb'], - 'postgresql_python_packages' => ['python-psycopg2'], 'common_packages' => ['ceilometer-common'], 'agent_central_packages' => ['ceilometer-agent-central'], 'agent_central_service' => 'ceilometer-agent-central', diff --git a/metadata.rb b/metadata.rb index 3cc4a15..1b02d1c 100644 --- a/metadata.rb +++ b/metadata.rb @@ -4,7 +4,7 @@ maintainer_email 'cookbooks@lists.tfoundry.com' license 'Apache 2.0' description 'The OpenStack Metering service Ceilometer.' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version '9.2.0' +version '9.3.0' recipe 'openstack-telemetry::agent-central', 'Installs agent central service.' recipe 'openstack-telemetry::agent-compute', 'Installs agent compute service.' @@ -21,6 +21,6 @@ recipe 'openstack-telemetry::identity_registration', 'Registers the endpoints, t supports os end -depends 'openstack-common', '~> 9.4' +depends 'openstack-common', '~> 9.5' depends 'openstack-identity', '~> 9.0' depends 'openstack-compute', '~> 9.0' diff --git a/recipes/common.rb b/recipes/common.rb index c6245db..0688ddc 100644 --- a/recipes/common.rb +++ b/recipes/common.rb @@ -5,7 +5,7 @@ # # Copyright 2013, AT&T Services, Inc. # Copyright 2013, Craig Tracey -# Copyright 2013, SUSE Linux GmbH +# Copyright 2013-2014, SUSE Linux GmbH # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -31,7 +31,7 @@ end platform = node['openstack']['telemetry']['platform'] db_type = node['openstack']['db']['telemetry']['service_type'] -platform["#{db_type}_python_packages"].each do |pkg| +node['openstack']['db']['python_packages'][db_type].each do |pkg| package pkg do action :upgrade end