Add some middlewares (tempurl, staticweb, formpost)
This commit is contained in:
parent
995ec33b13
commit
3ac424cc42
manifests/proxy
spec/classes
templates/proxy
27
manifests/proxy/formpost.pp
Normal file
27
manifests/proxy/formpost.pp
Normal file
@ -0,0 +1,27 @@
|
||||
#
|
||||
# Configure swift cache_errors.
|
||||
#
|
||||
# == Dependencies
|
||||
#
|
||||
# == Examples
|
||||
#
|
||||
# include 'swift::proxy::formpost'
|
||||
#
|
||||
# == Authors
|
||||
#
|
||||
# Mehdi Abaakouk <sileht@sileht.net>
|
||||
#
|
||||
# == Copyright
|
||||
#
|
||||
# Copyright 2012 eNovance licensing@enovance.com
|
||||
#
|
||||
|
||||
class swift::proxy::formpost() {
|
||||
|
||||
concat::fragment { 'swift-proxy-formpost':
|
||||
target => '/etc/swift/proxy-server.conf',
|
||||
content => template('swift/proxy/formpost.conf.erb'),
|
||||
order => '31',
|
||||
}
|
||||
|
||||
}
|
27
manifests/proxy/staticweb.pp
Normal file
27
manifests/proxy/staticweb.pp
Normal file
@ -0,0 +1,27 @@
|
||||
#
|
||||
# Configure swift cache_errors.
|
||||
#
|
||||
# == Dependencies
|
||||
#
|
||||
# == Examples
|
||||
#
|
||||
# include 'swift::proxy::staticweb'
|
||||
#
|
||||
# == Authors
|
||||
#
|
||||
# Mehdi Abaakouk <sileht@sileht.net>
|
||||
#
|
||||
# == Copyright
|
||||
#
|
||||
# Copyright 2012 eNovance licensing@enovance.com
|
||||
#
|
||||
|
||||
class swift::proxy::staticweb() {
|
||||
|
||||
concat::fragment { 'swift-proxy-staticweb':
|
||||
target => '/etc/swift/proxy-server.conf',
|
||||
content => template('swift/proxy/staticweb.conf.erb'),
|
||||
order => '32',
|
||||
}
|
||||
|
||||
}
|
27
manifests/proxy/tempurl.pp
Normal file
27
manifests/proxy/tempurl.pp
Normal file
@ -0,0 +1,27 @@
|
||||
#
|
||||
# Configure swift cache_errors.
|
||||
#
|
||||
# == Dependencies
|
||||
#
|
||||
# == Examples
|
||||
#
|
||||
# include 'swift::proxy::tempurl'
|
||||
#
|
||||
# == Authors
|
||||
#
|
||||
# Mehdi Abaakouk <sileht@sileht.net>
|
||||
#
|
||||
# == Copyright
|
||||
#
|
||||
# Copyright 2012 eNovance licensing@enovance.com
|
||||
#
|
||||
|
||||
class swift::proxy::tempurl() {
|
||||
|
||||
concat::fragment { 'swift-proxy-tempurl':
|
||||
target => '/etc/swift/proxy-server.conf',
|
||||
content => template('swift/proxy/tempurl.conf.erb'),
|
||||
order => '29',
|
||||
}
|
||||
|
||||
}
|
23
spec/classes/swift_proxy_formpost_spec.rb
Normal file
23
spec/classes/swift_proxy_formpost_spec.rb
Normal file
@ -0,0 +1,23 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'swift::proxy::formpost' do
|
||||
|
||||
let :facts do
|
||||
{
|
||||
:concat_basedir => '/var/lib/puppet/concat'
|
||||
}
|
||||
end
|
||||
|
||||
let :pre_condition do
|
||||
'class { "concat::setup": }
|
||||
concat { "/etc/swift/proxy-server.conf": }'
|
||||
end
|
||||
|
||||
let :fragment_file do
|
||||
"/var/lib/puppet/concat/_etc_swift_proxy-server.conf/fragments/31_swift-proxy-formpost"
|
||||
end
|
||||
|
||||
it { should contain_file(fragment_file).with_content(/[filter:formpost]/) }
|
||||
it { should contain_file(fragment_file).with_content(/use = egg:swift#formpost/) }
|
||||
|
||||
end
|
23
spec/classes/swift_proxy_staticweb_spec.rb
Normal file
23
spec/classes/swift_proxy_staticweb_spec.rb
Normal file
@ -0,0 +1,23 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'swift::proxy::staticweb' do
|
||||
|
||||
let :facts do
|
||||
{
|
||||
:concat_basedir => '/var/lib/puppet/concat'
|
||||
}
|
||||
end
|
||||
|
||||
let :pre_condition do
|
||||
'class { "concat::setup": }
|
||||
concat { "/etc/swift/proxy-server.conf": }'
|
||||
end
|
||||
|
||||
let :fragment_file do
|
||||
"/var/lib/puppet/concat/_etc_swift_proxy-server.conf/fragments/32_swift-proxy-staticweb"
|
||||
end
|
||||
|
||||
it { should contain_file(fragment_file).with_content(/[filter:staticweb]/) }
|
||||
it { should contain_file(fragment_file).with_content(/use = egg:swift#staticweb/) }
|
||||
|
||||
end
|
23
spec/classes/swift_proxy_tempurl_spec.rb
Normal file
23
spec/classes/swift_proxy_tempurl_spec.rb
Normal file
@ -0,0 +1,23 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'swift::proxy::tempurl' do
|
||||
|
||||
let :facts do
|
||||
{
|
||||
:concat_basedir => '/var/lib/puppet/concat'
|
||||
}
|
||||
end
|
||||
|
||||
let :pre_condition do
|
||||
'class { "concat::setup": }
|
||||
concat { "/etc/swift/proxy-server.conf": }'
|
||||
end
|
||||
|
||||
let :fragment_file do
|
||||
"/var/lib/puppet/concat/_etc_swift_proxy-server.conf/fragments/29_swift-proxy-tempurl"
|
||||
end
|
||||
|
||||
it { should contain_file(fragment_file).with_content(/[filter:tempurl]/) }
|
||||
it { should contain_file(fragment_file).with_content(/use = egg:swift#tempurl/) }
|
||||
|
||||
end
|
4
templates/proxy/formpost.conf.erb
Normal file
4
templates/proxy/formpost.conf.erb
Normal file
@ -0,0 +1,4 @@
|
||||
|
||||
[filter:formpost]
|
||||
use = egg:swift#formpost
|
||||
|
4
templates/proxy/staticweb.conf.erb
Normal file
4
templates/proxy/staticweb.conf.erb
Normal file
@ -0,0 +1,4 @@
|
||||
|
||||
[filter:staticweb]
|
||||
use = egg:swift#staticweb
|
||||
|
4
templates/proxy/tempurl.conf.erb
Normal file
4
templates/proxy/tempurl.conf.erb
Normal file
@ -0,0 +1,4 @@
|
||||
|
||||
[filter:tempurl]
|
||||
use = egg:swift#tempurl
|
||||
|
Loading…
x
Reference in New Issue
Block a user