# OpenDaylight SDN Controller
#
# === Parameters
-# TODO: Update these param docs
-# [*sample_parameter*]
-# Explanation of what this parameter affects and what it defaults to.
+# [*default_features*]
+# 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*]
+# If installing from a tarball, use this one. Defaults to latest ODL.
+# [*unitfile_url*]
+# OpenDaylight .service file to use for tarball installs. Defaults to one used by ODL RPM.
#
class opendaylight (
- $features = $::opendaylight::params::features,
+ $default_features = $::opendaylight::params::default_features,
+ $extra_features = $::opendaylight::params::extra_features,
+ $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 {
# Validate OS family
- if $::osfamily != 'RedHat' {
- fail("Unsupported OS family: ${::osfamily}")
+ case $::osfamily {
+ RedHat: {}
+ Debian: {
+ warning('Debian has limited support, is less stable, less tested.')
+ }
+ default: {
+ fail("Unsupported OS family: ${::osfamily}")
+ }
}
# Validate OS
fail("Unsupported OS: ${::operatingsystem} ${::operatingsystemmajrelease}")
}
}
+ ubuntu: {
+ if $::operatingsystemmajrelease != '14.04' {
+ # Only tested on 14.04
+ fail("Unsupported OS: ${::operatingsystem} ${::operatingsystemmajrelease}")
+ }
+ }
default: {
fail("Unsupported OS: ${::operatingsystem}")
}
}
+ # 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']
}