# == 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.
#
class opendaylight::config {
- # TODO: Confirm that this is a reasonable place to configure these
- $default_features = ['config', 'standard', 'region', 'package', 'kar', 'ssh', 'management']
-
- # TODO: Get extra features from user, add to default features
- $features = $default_features
-
- # 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.
+ # Configuration of Karaf features to install
file { 'org.apache.karaf.features.cfg':
ensure => file,
- path => '/opt/etc/org.apache.karaf.features.cfg',
+ path => '/opt/opendaylight/etc/org.apache.karaf.features.cfg',
+ # Set user:group owners
+ owner => 'odl',
+ group => 'odl',
+ # Use a template to populate the content
content => template('opendaylight/org.apache.karaf.features.cfg.erb'),
}
+
+ # Configuration of ODL NB REST port to listen on
+ file { 'tomcat-server.xml':
+ ensure => file,
+ path => '/opt/opendaylight/configuration/tomcat-server.xml',
+ # Set user:group owners
+ owner => 'odl',
+ group => 'odl',
+ # Use a template to populate the content
+ content => template('opendaylight/tomcat-server.xml.erb'),
+ }
}