Add zaqar::transport::wsgi class
This class helps manage zaqar transport settings for wsgi. Change-Id: I668ecc79f1684438beff620394711c6bb8f2cc34
This commit is contained in:
parent
623ed3789b
commit
6c05509bcc
21
manifests/transport/wsgi.pp
Normal file
21
manifests/transport/wsgi.pp
Normal file
@ -0,0 +1,21 @@
|
||||
# == class: zaqar::transport::wsgi
|
||||
#
|
||||
# [*bind*]
|
||||
# Address on which the self-hosting server will listen.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*port*]
|
||||
# Port on which the self-hosting server will listen.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
class zaqar::transport::wsgi(
|
||||
$bind = $::os_service_default,
|
||||
$port = $::os_service_default,
|
||||
) {
|
||||
|
||||
zaqar_config {
|
||||
'drivers:transport:wsgi/bind': value => $bind;
|
||||
'drivers:transport:wsgi/port': value => $port;
|
||||
}
|
||||
|
||||
}
|
23
spec/classes/zaqar_transport_wsgi_spec.rb
Normal file
23
spec/classes/zaqar_transport_wsgi_spec.rb
Normal file
@ -0,0 +1,23 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'zaqar::transport::wsgi' do
|
||||
|
||||
let :facts do
|
||||
{ :osfamily => 'RedHat' }
|
||||
end
|
||||
|
||||
describe 'with custom values' do
|
||||
let :params do
|
||||
{
|
||||
:bind => '1',
|
||||
:port => '2',
|
||||
}
|
||||
end
|
||||
|
||||
it 'configures custom values' do
|
||||
is_expected.to contain_zaqar_config('drivers:transport:wsgi/bind').with_value('1')
|
||||
is_expected.to contain_zaqar_config('drivers:transport:wsgi/port').with_value('2')
|
||||
end
|
||||
end
|
||||
|
||||
end
|
Loading…
Reference in New Issue
Block a user