File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717# http://www.apache.org/licenses/LICENSE-2.0.html
1818#
1919class one::oned::oneflow::service {
20+
21+ if ($one::ha_setup ) {
22+ $oneflow_enable = false
23+ $oneflow_ensure = undef
24+ } else {
25+ $oneflow_enable = true
26+ $oneflow_ensure = running
27+ }
28+
2029 service {'opennebula-flow' :
21- ensure => running ,
22- enable => true ,
30+ ensure => $oneflow_ensure ,
31+ enable => $oneflow_enable ,
2332 require => Service[' opennebula' ],
2433 }
2534}
Original file line number Diff line number Diff line change 1717# http://www.apache.org/licenses/LICENSE-2.0.html
1818#
1919class one::oned::onegate::service {
20+
21+ if ($one::ha_setup ) {
22+ $onegate_enable = false
23+ $onegate_ensure = undef
24+ } else {
25+ $onegate_enable = true
26+ $onegate_ensure = running
27+ }
28+
2029 service {'opennebula-gate' :
21- ensure => running ,
22- enable => true ,
30+ ensure => $onegate_ensure ,
31+ enable => $onegate_enable ,
2332 require => Service[' opennebula' ],
2433 }
2534}
Original file line number Diff line number Diff line change 286286 #it { should contain_package('parse-cron') }
287287 end
288288 it { should contain_service ( 'opennebula-gate' ) . with_ensure ( 'running' ) }
289+ context 'with ha-setup' do
290+ let ( :params ) { {
291+ :onegate => true ,
292+ :oneflow => true ,
293+ :ha_setup => true
294+ } }
295+ it { should contain_class ( 'one::oned::onegate' ) }
296+ it { should contain_service ( 'opennebula-flow' ) . with_enable ( false ) }
297+ it { should contain_service ( 'opennebula-flow' ) . without_ensure }
298+ it { should contain_service ( 'opennebula-gate' ) . with_enable ( false ) }
299+ it { should contain_service ( 'opennebula-gate' ) . without_ensure }
300+ end
289301 end
290302 context 'with sunstone' do
291303 let ( :params ) { {
338350 let ( :params ) { {
339351 :oned => true ,
340352 :sunstone => true ,
341- :ha_setup => true ,
353+ :ha_setup => true
342354 } }
343355 it { should contain_service ( 'opennebula' ) . with_enable ( 'false' ) }
344356 it { should contain_service ( 'opennebula-sunstone' ) . with_ensure ( 'running' ) }
You can’t perform that action at this time.
0 commit comments