#
# This class is called from opendaylight for service config.
#
-class opendaylight::config {
+class opendaylight::config (
+ $odl_rest_port = $::opendaylight::params::odl_rest_port
+) inherits ::opendaylight::params {
# This is very fragile, but I don't know of a better way to do it.
# Updated ODL versions will break it, as will changes to the file upstream.
file { 'org.apache.karaf.features.cfg':
path => '/opt/opendaylight-0.2.2/etc/org.apache.karaf.features.cfg',
content => template('opendaylight/org.apache.karaf.features.cfg.erb'),
}
+
+ include stdlib
+ $myline= " <Connector port=\"${odl_rest_port}\" protocol=\"HTTP/1.1\""
+ file_line { 'tomcatport':
+ ensure => present,
+ path => '/opt/opendaylight-0.2.2/configuration/tomcat-server.xml',
+ line => $myline,
+ match => '^\s*<Connector\s*port=\"[0-9]+\"\s*protocol=\"HTTP\/1.1\"$',
+ }
}
$install_method = $::opendaylight::params::install_method,
$tarball_url = $::opendaylight::params::tarball_url,
$unitfile_url = $::opendaylight::params::unitfile_url,
+ $odl_rest_port = $::opendaylight::params::odl_rest_port
) inherits ::opendaylight::params {
# NB: This is a work-around for a bug in gini/puppet-archive
}
}
- # Build full list of features to install
- $features = union($default_features, $extra_features)
-
class { '::opendaylight::install': } ->
- class { '::opendaylight::config': } ~>
+ class { '::opendaylight::config': odl_rest_port => $odl_rest_port} ~>
class { '::opendaylight::service': } ->
Class['::opendaylight']
}
$install_method = 'rpm'
$tarball_url = 'https://nexus.opendaylight.org/content/groups/public/org/opendaylight/integration/distribution-karaf/0.2.2-Helium-SR2/distribution-karaf-0.2.2-Helium-SR2.tar.gz'
$unitfile_url = 'https://github.com/dfarrell07/opendaylight-systemd/archive/master/opendaylight-unitfile.tar.gz'
+ $odl_rest_port = '8080'
}