# == Class opendaylight::config
#
-# This class is called from opendaylight for service config.
+# This class handles ODL config changes.
+# It's called from the opendaylight class.
+#
+# === Parameters
+# [*odl_rest_port *]
+# Port for ODL northbound REST interface to listen on.
#
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.
+ # Ideally, ODL's version wouldn't be in the path, to make this more robust
file { 'org.apache.karaf.features.cfg':
ensure => file,
path => '/opt/opendaylight-0.2.2/etc/org.apache.karaf.features.cfg',
content => template('opendaylight/org.apache.karaf.features.cfg.erb'),
}
-
+
+ # TODO: Is this include needed?
include stdlib
+ # TODO: Better var name (this is from PR #35)
+ # TODO: Consider moving to a template, for consistency
$myline= " <Connector port=\"${odl_rest_port}\" protocol=\"HTTP/1.1\""
file_line { 'tomcatport':
ensure => present,
+ # Ideally, ODL's version wouldn't be in the path, to make this more robust
path => '/opt/opendaylight-0.2.2/configuration/tomcat-server.xml',
line => $myline,
match => '^\s*<Connector\s*port=\"[0-9]+\"\s*protocol=\"HTTP\/1.1\"$',
# Features that should normally be installed by default, but can be overridden.
# [*extra_features*]
# List of features to install in addition to the default ones.
+# [*odl_rest_port *]
+# Port for ODL northbound REST interface to listen on.
# [*install_method *]
# How to install OpenDaylight. Current options are "rpm" and "tarball", default is RPM.
# [*tarball_url*]
# == Class opendaylight::install
#
-# This class is called from opendaylight for install.
+# Manages the installation of OpenDaylight.
#
class opendaylight::install {
if $opendaylight::install_method == 'rpm' {
# == Class opendaylight::params
#
-# This class is meant to be called from opendaylight.
-# It sets variables according to platform.
+# This class manages the default params for the ODL class.
#
class opendaylight::params {
$default_features = ['config', 'standard', 'region', 'package', 'kar', 'ssh', 'management']
# == Class opendaylight::service
#
-# This class is meant to be called from opendaylight.
-# It ensure the service is running.
+# Starts the OpenDaylight systemd service.
#
class opendaylight::service {
service { 'opendaylight':