Revision f2b85641
Added by Stephen Benjamin almost 9 years ago
manifests/router/link_route_pattern.pp | ||
---|---|---|
#
|
||
# $prefix:: Prefix to use
|
||
#
|
||
# $direction:: Direction when using asymmetric routing
|
||
#
|
||
# $connector:: Connector for this link route pattern
|
||
#
|
||
define qpid::router::link_route_pattern(
|
||
$prefix = 'queue.',
|
||
$direction = undef,
|
||
$connector = undef,
|
||
){
|
||
|
spec/classes/qpid_router_config_spec.rb | ||
---|---|---|
end
|
||
end
|
||
|
||
context 'with link route pattern' do
|
||
context 'with symmetric link route pattern' do
|
||
let :pre_condition do
|
||
'class {"qpid::router":}
|
||
|
||
... | ... | |
]
|
||
end
|
||
end
|
||
|
||
context 'with asymmetric link route pattern' do
|
||
let :pre_condition do
|
||
'class {"qpid::router":}
|
||
|
||
qpid::router::connector { "broker":
|
||
addr => "127.0.0.1",
|
||
port => "5672",
|
||
role => "on-demand",
|
||
ssl_profile => "router-ssl",
|
||
}
|
||
|
||
qpid::router::link_route_pattern { "broker-link":
|
||
connector => "broker",
|
||
direction => "in",
|
||
prefix => "unicorn.",
|
||
}'
|
||
end
|
||
|
||
it 'should have link_route_pattern fragment' do
|
||
content = catalogue.resource('concat_fragment', 'qdrouter+link_route_pattern_broker-link.conf').send(:parameters)[:content]
|
||
content.split("\n").reject { |c| c =~ /(^#|^$)/ }.should == [
|
||
'linkRoutePattern {',
|
||
' prefix: unicorn.',
|
||
' dir: in',
|
||
' connector: broker',
|
||
'}'
|
||
]
|
||
end
|
||
end
|
||
end
|
||
end
|
templates/router/link_route_pattern.conf.erb | ||
---|---|---|
linkRoutePattern {
|
||
prefix: <%= @prefix %>
|
||
<% unless [nil, :undefined, :undef, ''].include?(@direction) -%>
|
||
dir: <%= @direction %>
|
||
<% end -%>
|
||
<% unless [nil, :undefined, :undef, ''].include?(@connector) -%>
|
||
connector: <%= @connector %>
|
||
<% end -%>
|
Also available in: Unified diff
Support asymmetric routing in qpid dispatcher