diff --git a/manifests/ovs.pp b/manifests/ovs.pp index 2243dad5..d1f394c1 100644 --- a/manifests/ovs.pp +++ b/manifests/ovs.pp @@ -91,22 +91,9 @@ class vswitch::ovs( create_resources('vs_config', $vs_config) service { 'openvswitch': - ensure => true, - enable => true, - name => $::vswitch::params::ovs_service_name, - status => $::vswitch::params::ovs_status, - hasstatus => $::vswitch::params::ovs_service_hasstatus - } - - if $::vswitch::params::ovsdb_service_name { - service { 'ovsdb-server': - ensure => true, - enable => true, - name => $::vswitch::params::ovsdb_service_name, - status => $::vswitch::params::ovsdb_status, - } - - Service['ovsdb-server'] ~> Service['openvswitch'] + ensure => true, + enable => true, + name => $::vswitch::params::ovs_service_name, } # NOTE(tkajinam): This resource is defined to restart the openvswitch service diff --git a/manifests/params.pp b/manifests/params.pp index 58a7a12a..a8125208 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -10,18 +10,12 @@ class vswitch::params { # OVS and also DPDK (if enabled at runtime). $ovs_dpdk_package_name = 'openvswitch' $ovs_service_name = 'openvswitch' - $ovsdb_service_name = undef - $ovs_service_hasstatus = undef - $ovs_status = undef $provider = 'ovs' } 'Debian': { $ovs_package_name = 'openvswitch-switch' $ovs_dpdk_package_name = 'openvswitch-switch-dpdk' $ovs_service_name = 'openvswitch-switch' - $ovsdb_service_name = undef - $ovs_service_hasstatus = true - $ovs_status = undef $provider = 'ovs' } default: { diff --git a/spec/classes/vswitch_ovs_spec.rb b/spec/classes/vswitch_ovs_spec.rb index ac863da1..af2e4fd7 100644 --- a/spec/classes/vswitch_ovs_spec.rb +++ b/spec/classes/vswitch_ovs_spec.rb @@ -41,11 +41,9 @@ describe 'vswitch::ovs' do it 'configures service' do is_expected.to contain_service('openvswitch').with( - :ensure => true, - :enable => true, - :name => platform_params[:ovs_service_name], - :hasstatus => platform_params[:service_hasstatus], - :status => platform_params[:service_status], + :ensure => true, + :enable => true, + :name => platform_params[:ovs_service_name], ) end @@ -117,14 +115,12 @@ describe 'vswitch::ovs' do :ovs_package_name => 'openvswitch-switch', :ovs_service_name => 'openvswitch-switch', :provider => 'ovs', - :service_hasstatus => true, } elsif facts[:os]['name'] == 'Ubuntu' { :ovs_package_name => 'openvswitch-switch', :ovs_service_name => 'openvswitch-switch', :provider => 'ovs', - :service_hasstatus => true, } end when 'RedHat'