b036eea91b
- Remove host interface creation from ns_ntp ocf - Create new crm resource vrouter that handles other_networks - Update direct_networks.rb to parse custom routes Change-Id: Iea26e1755e7e6d6310ad7cdb77ef1b21d850ff36 Closes-Bug: 1436868
33 lines
832 B
Ruby
33 lines
832 B
Ruby
require 'spec_helper'
|
|
require 'shared-examples'
|
|
manifest = 'cluster-vrouter/cluster-vrouter.pp'
|
|
|
|
describe manifest do
|
|
shared_examples 'puppet catalogue' do
|
|
settings = Noop.fuel_settings
|
|
networks = []
|
|
settings['network_scheme']['endpoints'].each{ |k,v|
|
|
if v['IP'].is_a?(Array)
|
|
v['IP'].each { |ip|
|
|
networks << IPAddr.new(ip).to_s + "/" + ip.split('/')[1]
|
|
}
|
|
end
|
|
if v.has_key?('routes') and v['routes'].is_a?(Array)
|
|
v['routes'].each { |route|
|
|
networks << route['net']
|
|
}
|
|
end
|
|
}
|
|
|
|
it "should delcare cluster::vrouter_ocf with other_networks set to #{networks.join(' ')}" do
|
|
should contain_class('cluster::vrouter_ocf').with(
|
|
'other_networks' => networks.join(' '),
|
|
)
|
|
end
|
|
|
|
end
|
|
|
|
test_ubuntu_and_centos manifest
|
|
end
|
|
|