require => File['org.ops4j.pax.web.cfg']
}
+ file_line { 'disable pax HTTP':
+ ensure => present,
+ path => '/opt/opendaylight/etc/org.ops4j.pax.web.cfg',
+ line => 'org.osgi.service.http.enabled = false',
+ match => '^#?org.osgi.service.http.enabled.*$',
+ require => File['org.ops4j.pax.web.cfg']
+ }
+
file {'aaa-cert-config.xml':
ensure => file,
path => '/opt/opendaylight/etc/opendaylight/datastore/initial/config/aaa-cert-config.xml',
"set Call[1]/Arg/New/Set[#attribute[name='port']]/Property/#attribute/default
${opendaylight::odl_rest_port}"]
}
+
+ file_line { 'set pax bind port':
+ ensure => present,
+ path => '/opt/opendaylight/etc/org.ops4j.pax.web.cfg',
+ line => "org.osgi.service.http.port = ${opendaylight::odl_rest_port}",
+ match => '^#?org.osgi.service.http.port\s.*$',
+ require => File['org.ops4j.pax.web.cfg']
+ }
}
# Configure OpenFlow plugin to use TCP/TLS
file { 'default-openflow-connection-config.xml':
}
}
- file_line { 'set pax bind port':
- ensure => present,
- path => '/opt/opendaylight/etc/org.ops4j.pax.web.cfg',
- line => "org.osgi.service.http.port = ${opendaylight::odl_rest_port}",
- require => File['org.ops4j.pax.web.cfg']
- }
-
# Set any custom log levels
$opendaylight::log_levels.each |$log_name, $logging_level| {
$underscored_version = regsubst($log_name, '\.', '_', 'G')
'ensure' => 'present',
'path' => '/opt/opendaylight/etc/org.ops4j.pax.web.cfg',
'line' => "org.osgi.service.http.port = #{odl_rest_port}",
+ 'match' => '^#?org.osgi.service.http.port\s.*$',
'require' => 'File[org.ops4j.pax.web.cfg]'
)
}
'line' => 'org.osgi.service.http.secure.enabled = true',
'match' => '^#?org.osgi.service.http.secure.enabled.*$',
)
+ should contain_file_line('disable pax HTTP').with(
+ 'ensure' => 'present',
+ 'path' => '/opt/opendaylight/etc/org.ops4j.pax.web.cfg',
+ 'line' => 'org.osgi.service.http.enabled = false',
+ 'match' => '^#?org.osgi.service.http.enabled.*$',
+ )
should contain_file('org.ops4j.pax.web.cfg').with(
'ensure' => 'file',
'path' => '/opt/opendaylight/etc/org.ops4j.pax.web.cfg',
its(:content) { should match /org.ops4j.pax.web.ssl.password = #{tls_keystore_password}/ }
its(:content) { should match /org.ops4j.pax.web.ssl.keypassword = #{tls_keystore_password}/ }
its(:content) { should match /org.osgi.service.http.secure.enabled = true/ }
+ its(:content) { should match /org.osgi.service.http.enabled = false/ }
end
describe file('/opt/opendaylight/etc/org.opendaylight.ovsdb.library.cfg') do