Very minor doc fix
[integration/packaging/puppet-opendaylight.git] / manifests / init.pp
1 # == Class: opendaylight
2 #
3 # OpenDaylight SDN Controller
4 #
5 # === Parameters
6 #
7 # [*sample_parameter*]
8 #   Explanation of what this parameter affects and what it defaults to.
9 #
10 class opendaylight (
11   $package_name = $::opendaylight::params::package_name,
12   $service_name = $::opendaylight::params::service_name,
13 ) inherits ::opendaylight::params {
14
15   # Validate OS
16   case $::operatingsystem {
17     centos, redhat: {
18       if $::operatingsystemmajrelease != 7 {
19         # RHEL/CentOS versions < 7 not supported as they lack systemd
20         fail("Unsupported OS: ${::operatingsystem} ${::operatingsystemmajrelease}")
21       }
22     }
23     fedora: {
24       # Fedora distros < 20 are EOL as of Jan 6th 2015
25       if ! ($::operatingsystemmajrelease in [20, 21]) {
26         fail("Unsupported OS: ${::operatingsystem} ${::operatingsystemmajrelease}")
27       }
28     }
29     default: {
30       fail("Unsupported OS: ${::operatingsystem}")
31     }
32   }
33
34   class { '::opendaylight::install': } ->
35   class { '::opendaylight::config': } ~>
36   class { '::opendaylight::service': } ->
37   Class['::opendaylight']
38 }