From cd831f7a69d634ae735bc9642839024f8cf03c11 Mon Sep 17 00:00:00 2001 From: Chris Hoge Date: Sat, 4 Oct 2014 09:08:59 -0700 Subject: [PATCH] Install package libreswan in RHEL 7 systems for vpnaas RHEL 7 systems have replaced the openswan package with libreswan. Change-Id: I4c8e891b83b8301cb111af1be6e84ec4cf9c69a1 --- manifests/params.pp | 6 +++++- spec/classes/neutron_agents_vpnaas_spec.rb | 24 +++++++++++++++++++--- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/manifests/params.pp b/manifests/params.pp index c143bf890..f62cd782d 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -43,7 +43,11 @@ $vpnaas_agent_package = 'openstack-neutron-vpn-agent' $vpnaas_agent_service = 'neutron-vpn-agent' - $openswan_package = 'openswan' + if $::operatingsystemrelease =~ /^7.*/ { + $openswan_package = 'libreswan' + } else { + $openswan_package = 'openswan' + } $l3_agent_package = false $l3_agent_service = 'neutron-l3-agent' diff --git a/spec/classes/neutron_agents_vpnaas_spec.rb b/spec/classes/neutron_agents_vpnaas_spec.rb index ec6351136..8ecf1ff60 100644 --- a/spec/classes/neutron_agents_vpnaas_spec.rb +++ b/spec/classes/neutron_agents_vpnaas_spec.rb @@ -126,13 +126,31 @@ it_configures 'neutron vpnaas agent' end - context 'on RedHat platforms' do + context 'on RedHat 6 platforms' do let :facts do - { :osfamily => 'RedHat' } + { :osfamily => 'RedHat', + :operatingsystemrelease => '6.5', + :operatingsystemmajrelease => 6 } end let :platform_params do - { :openswan_package => 'openswan', + { :openswan_package => 'openswan', + :vpnaas_agent_package => 'openstack-neutron-vpn-agent', + :vpnaas_agent_service => 'neutron-vpn-agent'} + end + + it_configures 'neutron vpnaas agent' + end + + context 'on RedHat 7 platforms' do + let :facts do + { :osfamily => 'RedHat', + :operatingsystemrelease => '7.1.2', + :operatingsystemmajrelease => 7 } + end + + let :platform_params do + { :openswan_package => 'libreswan', :vpnaas_agent_package => 'openstack-neutron-vpn-agent', :vpnaas_agent_service => 'neutron-vpn-agent'} end