
This patch adds a service wrapper based on the existing support from stackforge/puppet-openstack_extras. It allows wrapping an OpenStack service as a Pacemaker resource, including options for cloned resources, resource colocation and resource start ordering. Change-Id: Iccfebb758874f53d8e6a0d1aaf4c0368dda74dce
50 lines
1.3 KiB
Ruby
50 lines
1.3 KiB
Ruby
|
|
#
|
|
# Copyright (C) 2015 Red Hat Inc.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License. You may obtain
|
|
# a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
#
|
|
# Spec tests for cloud::clustering::pacemaker_order
|
|
|
|
require 'spec_helper'
|
|
|
|
describe 'cloud::clustering::pacemaker_order', :type => :define do
|
|
|
|
let (:title) { 'service1' }
|
|
|
|
let :params do
|
|
{
|
|
:service => 'service1',
|
|
:first => ['service2','service3']
|
|
}
|
|
end
|
|
|
|
context 'with default parameters' do
|
|
it 'should create two order constraints' do
|
|
should contain_cs_order('service2-before-service1').with(
|
|
{
|
|
'first' => "p_service2",
|
|
'second' => "p_service1"
|
|
}
|
|
)
|
|
|
|
should contain_cs_order('service3-before-service1').with(
|
|
{
|
|
'first' => "p_service3",
|
|
'second' => "p_service1"
|
|
}
|
|
)
|
|
end
|
|
end
|
|
end
|