Remove require on main init class
Now all Sahara packages are fixed and we don't need use require for main init.pp class from service classes anymore. Change-Id: If11b03675ed62f3f56e69cb4fbeb75a3d46a5ab7
This commit is contained in:
parent
e9b312c5bb
commit
0c465a0333
@ -22,7 +22,8 @@ class sahara::service::all (
|
||||
$package_ensure = 'present',
|
||||
) {
|
||||
|
||||
require ::sahara
|
||||
include ::sahara::policy
|
||||
include ::sahara::params
|
||||
|
||||
Sahara_config<||> ~> Service['sahara-all']
|
||||
Class['sahara::policy'] ~> Service['sahara-all']
|
||||
|
@ -28,7 +28,8 @@ class sahara::service::api (
|
||||
$package_ensure = 'present',
|
||||
) {
|
||||
|
||||
require ::sahara
|
||||
include ::sahara::policy
|
||||
include ::sahara::params
|
||||
|
||||
Sahara_config<||> ~> Service['sahara-api']
|
||||
Class['sahara::policy'] ~> Service['sahara-api']
|
||||
|
@ -22,10 +22,9 @@ class sahara::service::engine (
|
||||
$package_ensure = 'present',
|
||||
) {
|
||||
|
||||
require ::sahara
|
||||
include ::sahara::params
|
||||
|
||||
Sahara_config<||> ~> Service['sahara-engine']
|
||||
Class['sahara::policy'] ~> Service['sahara-engine']
|
||||
|
||||
package { 'sahara-engine':
|
||||
ensure => $package_ensure,
|
||||
|
@ -2,12 +2,6 @@ require 'spec_helper'
|
||||
|
||||
describe 'sahara::service::all' do
|
||||
|
||||
shared_examples_for 'sahara-all' do
|
||||
context 'require main class' do
|
||||
it { is_expected.to contain_class('sahara') }
|
||||
end
|
||||
end
|
||||
|
||||
context 'on Debian platforms' do
|
||||
let :facts do
|
||||
@default_facts.merge({
|
||||
@ -16,8 +10,6 @@ describe 'sahara::service::all' do
|
||||
})
|
||||
end
|
||||
|
||||
it_configures 'sahara-all'
|
||||
|
||||
it_behaves_like 'generic sahara service', {
|
||||
:name => 'sahara-all',
|
||||
:package_name => 'sahara',
|
||||
@ -29,8 +21,6 @@ describe 'sahara::service::all' do
|
||||
@default_facts.merge({ :osfamily => 'RedHat' })
|
||||
end
|
||||
|
||||
it_configures 'sahara-all'
|
||||
|
||||
it_behaves_like 'generic sahara service', {
|
||||
:name => 'sahara-all',
|
||||
:package_name => 'openstack-sahara',
|
||||
|
@ -4,10 +4,6 @@ describe 'sahara::service::api' do
|
||||
|
||||
shared_examples_for 'sahara-api' do
|
||||
|
||||
context 'require main class' do
|
||||
it { is_expected.to contain_class('sahara') }
|
||||
end
|
||||
|
||||
context 'default params' do
|
||||
it { is_expected.to contain_sahara_config('DEFAULT/api_workers').with_value('<SERVICE DEFAULT>') }
|
||||
end
|
||||
|
@ -2,19 +2,11 @@ require 'spec_helper'
|
||||
|
||||
describe 'sahara::service::engine' do
|
||||
|
||||
shared_examples_for 'sahara-engine' do
|
||||
context 'require main class' do
|
||||
it { is_expected.to contain_class('sahara') }
|
||||
end
|
||||
end
|
||||
|
||||
context 'on Debian platforms' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'Debian' })
|
||||
end
|
||||
|
||||
it_configures 'sahara-engine'
|
||||
|
||||
it_behaves_like 'generic sahara service', {
|
||||
:name => 'sahara-engine',
|
||||
:package_name => 'sahara-engine',
|
||||
@ -26,8 +18,6 @@ describe 'sahara::service::engine' do
|
||||
@default_facts.merge({ :osfamily => 'RedHat' })
|
||||
end
|
||||
|
||||
it_configures 'sahara-engine'
|
||||
|
||||
it_behaves_like 'generic sahara service', {
|
||||
:name => 'sahara-engine',
|
||||
:package_name => 'openstack-sahara-engine',
|
||||
|
@ -11,7 +11,7 @@ shared_examples 'generic sahara service' do |service|
|
||||
is_expected.to contain_package(service[:name]).with({
|
||||
:name => service[:package_name],
|
||||
:ensure => 'present',
|
||||
:notify => ["Service[#{service[:name]}]", 'Exec[sahara-dbmanage]']
|
||||
:notify => "Service[#{service[:name]}]"
|
||||
})
|
||||
is_expected.to contain_service(service[:name]).with({
|
||||
:name => service[:service_name],
|
||||
@ -32,7 +32,7 @@ shared_examples 'generic sahara service' do |service|
|
||||
is_expected.to contain_package(service[:name]).with({
|
||||
:name => service[:package_name],
|
||||
:ensure => '2014.2-1',
|
||||
:notify => ["Service[#{service[:name]}]", 'Exec[sahara-dbmanage]']
|
||||
:notify => "Service[#{service[:name]}]"
|
||||
})
|
||||
is_expected.to contain_service(service[:name]).with({
|
||||
:name => service[:service_name],
|
||||
|
Loading…
Reference in New Issue
Block a user