class opendaylight::config {
# Configuration of Karaf features to install
file { 'org.apache.karaf.features.cfg':
- ensure => file,
- path => '/opt/opendaylight/etc/org.apache.karaf.features.cfg',
+ ensure => file,
+ 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'),
+ owner => 'odl',
+ group => 'odl',
+ }
+ $features_csv = join($opendaylight::features, ',')
+ file_line { 'featuresBoot':
+ path => '/opt/opendaylight/etc/org.apache.karaf.features.cfg',
+ line => "featuresBoot=${features_csv}",
+ match => '^featuresBoot=.*$',
}
# Configuration of ODL NB REST port to listen on
# The order of this list concat matters
features = default_features + extra_features
+ features_csv = features.join(',')
# Confirm properties of Karaf features config file
# NB: These hashes don't work with Ruby 1.8.7, but we
'path' => '/opt/opendaylight/etc/org.apache.karaf.features.cfg',
'owner' => 'odl',
'group' => 'odl',
- 'content' => /^featuresBoot=#{features.join(",")}/
+ )
+ }
+ it {
+ should contain_file_line('featuresBoot').with(
+ 'path' => '/opt/opendaylight/etc/org.apache.karaf.features.cfg',
+ 'line' => "featuresBoot=#{features_csv}",
+ 'match' => '^featuresBoot=.*$',
)
}
end
+++ /dev/null
-################################################################################
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-################################################################################
-
-#
-# Defines if the startlvl should be respected during feature startup. The default value is true. The default
-# behavior for 2.x is false (!) for this property
-#
-# Be aware that this property is deprecated and will be removed in Karaf 4.0. So, if you need to
-# set this to false, please use this only as a temporary solution!
-#
-#respectStartLvlDuringFeatureStartup=true
-
-
-#
-# Defines if the startlvl should be respected during feature uninstall. The default value is true.
-# If true, means stop bundles respecting the descend order of start level in a certain feature.
-#
-#respectStartLvlDuringFeatureUninstall=true
-
-#
-# Comma separated list of features repositories to register by default
-#
-featuresRepositories = mvn:org.apache.karaf.features/standard/3.0.3/xml/features,mvn:org.apache.karaf.features/enterprise/3.0.3/xml/features,mvn:org.ops4j.pax.web/pax-web-features/3.1.4/xml/features,mvn:org.apache.karaf.features/spring/3.0.3/xml/features,mvn:org.opendaylight.integration/features-integration-index/0.4.0-Beryllium-RC1/xml/features
-
-#
-# Comma separated list of features to install at startup
-# Default features:
-# config,standard,region,package,kar,ssh,management
-#
-featuresBoot=<%= scope.lookupvar('opendaylight::features').join(",") %>
-
-#
-# Defines if the boot features are started in asynchronous mode (in a dedicated thread)
-#
-featuresBootAsynchronous=false