diff options
author | Juraj Linkeš <jlinkes@cisco.com> | 2016-08-15 08:10:08 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2016-08-15 08:10:08 +0000 |
commit | 3285c8e93ea59d98b392591ef6dfa5b1de3bb92d (patch) | |
tree | 795fe6b7263a4a3b5b06ce5f750ec883037d4346 /testing/puppet-fdio/manifests/init.pp | |
parent | 7ac44c4a1406bf060911c645f23eef18a13dc0af (diff) | |
parent | 9dd5d7bf353fe5ffd478ff811bb6b26538afe092 (diff) |
Merge "puppet module added"
Diffstat (limited to 'testing/puppet-fdio/manifests/init.pp')
-rw-r--r-- | testing/puppet-fdio/manifests/init.pp | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/testing/puppet-fdio/manifests/init.pp b/testing/puppet-fdio/manifests/init.pp new file mode 100644 index 0000000..ee6d25d --- /dev/null +++ b/testing/puppet-fdio/manifests/init.pp @@ -0,0 +1,51 @@ +# == Class: fdio +# +# fd.io +# +# === Parameters +# [* vpp_port *] +# Port for VPP to listen on. +# [* dpdk_pmd_driver *] +# Sets VPP's uio-driver value +class fdio inherits ::fdio::params { + + # Validate OS family + case $::osfamily { + 'RedHat': {} + 'Debian': { + warning('Debian has limited support, is less stable, less tested.') + } + default: { + fail("Unsupported OS family: ${::osfamily}") + } + } + + # Validate OS + case $::operatingsystem { + centos, redhat: { + if $::operatingsystemmajrelease != '7' { + # RHEL/CentOS versions < 7 not supported as they lack systemd + fail("Unsupported OS: ${::operatingsystem} ${::operatingsystemmajrelease}") + } + } + fedora: { + # Fedora distros < 22 are EOL as of 2015-12-01 + # https://fedoraproject.org/wiki/End_of_life + if $::operatingsystemmajrelease < '22' { + 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}") + } + } + + class { '::fdio::install': } -> + Class['::fdio'] +} |