From 1201b37de49ddadd4ee616a3d17c4d6ffd94edf9 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Sun, 21 Nov 2021 22:57:32 +0900 Subject: [PATCH] Ensure vmware-nsx package is installed ... when NSX plugin is used. Change-Id: I0115acd15c72dd683b92f6099f685b69fa3cdb7f --- manifests/plugins/nsx.pp | 6 ++++++ spec/classes/neutron_plugins_nsx_spec.rb | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/manifests/plugins/nsx.pp b/manifests/plugins/nsx.pp index f7b86fc64..71cdd1007 100644 --- a/manifests/plugins/nsx.pp +++ b/manifests/plugins/nsx.pp @@ -84,6 +84,12 @@ class neutron::plugins::nsx ( include neutron::deps include neutron::params + package { 'vmware-nsx': + ensure => $package_ensure, + name => $::neutron::params::nsx_plugin_package, + tag => ['openstack', 'neutron-package'], + } + file { '/etc/neutron/plugins/vmware': ensure => directory, tag => 'neutron-config-file', diff --git a/spec/classes/neutron_plugins_nsx_spec.rb b/spec/classes/neutron_plugins_nsx_spec.rb index 646fa128a..747c1e66b 100644 --- a/spec/classes/neutron_plugins_nsx_spec.rb +++ b/spec/classes/neutron_plugins_nsx_spec.rb @@ -33,6 +33,14 @@ describe 'neutron::plugins::nsx' do context 'with defaults' do it { should contain_class('neutron::params') } + it 'should install the plugin package' do + should contain_package('vmware-nsx').with( + :ensure => 'present', + :name => 'vmware-nsx', + :tag => ['openstack', 'neutron-package'] + ) + end + it 'should have a nsx plugin ini file' do should contain_file('/etc/neutron/plugins/vmware/nsx.ini').with( :ensure => 'file',