Fix CI 34/55634/1
authorsrisankethu <sanketh.uppalapati@research.iiit.ac.in>
Tue, 22 Nov 2016 10:55:49 +0000 (16:25 +0530)
committerDaniel Farrell <dfarrell@redhat.com>
Wed, 19 Apr 2017 19:18:40 +0000 (15:18 -0400)
Closes https://github.com/dfarrell07/puppet-opendaylight/issues/109

Change-Id: Ic4e22ba08892f73c3f33feae0262eabec769dace
Signed-off-by: srisankethu <sanketh.uppalapati@research.iiit.ac.in>
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
.travis.yml
manifests/config.pp
manifests/init.pp
spec/classes/opendaylight_spec.rb

index c174c64b5e92a5da21175ab29873b646d1814016..78f0399869ccc868a36412867619e86e2951f268 100644 (file)
@@ -3,7 +3,6 @@ language: ruby
 bundler_args: --without local_only
 before_install: rm Gemfile.lock || true
 rvm:
-  - 1.9.3
   - 2.0.0
   - 2.1.7
   - 2.2.3
index d185dcd4d41fe4a36c1110e767379b5c39842a20..b20b5c93f958c0f2f3ff79bf8521c4185ca1f75b 100644 (file)
@@ -82,9 +82,13 @@ class opendaylight::config {
   # Requires at least CentOS 7.3 for RHEL/CentOS systems
   if ('odl-netvirt-openstack' in $opendaylight::features) {
     if $opendaylight::security_group_mode == 'stateful' {
-      if $opendaylight::stateful_unsupported {
-        warning("Stateful is unsupported in ${::operatingsystemrelease} setting to 'learn'")
-        $sg_mode = 'learn'
+      if defined('$opendaylight::stateful_unsupported') {
+        if $opendaylight::stateful_unsupported {
+          warning("Stateful is unsupported in ${::operatingsystemrelease} setting to 'learn'")
+          $sg_mode = 'learn'
+        } else {
+            $sg_mode = 'learn'
+        }
       } else {
         $sg_mode = 'stateful'
       }
@@ -92,16 +96,17 @@ class opendaylight::config {
       $sg_mode = $opendaylight::security_group_mode
     }
 
-    $odl_datastore = [ '/opt/opendaylight/etc/opendaylight', '/opt/opendaylight/etc/opendaylight/datastore',
-                       '/opt/opendaylight/etc/opendaylight/datastore/initial',
-                       '/opt/opendaylight/etc/opendaylight/datastore/initial/config',
-                     ]
+    $odl_datastore = [
+      '/opt/opendaylight/etc/opendaylight', '/opt/opendaylight/etc/opendaylight/datastore',
+      '/opt/opendaylight/etc/opendaylight/datastore/initial',
+      '/opt/opendaylight/etc/opendaylight/datastore/initial/config',
+    ]
 
     file { $odl_datastore:
-      ensure  =>  directory,
-      mode    =>  0755,
-      owner   => 'odl',
-      group   => 'odl',
+      ensure => directory,
+      mode   => '0755',
+      owner  => 'odl',
+      group  => 'odl',
     }
     ->
     file { 'netvirt-aclservice-config.xml':
index 69d73fa2255a25a1fb29be3433a5e917a34abe83..5b4a9fcc58c55a072986962ea324e6d4147400c5 100644 (file)
@@ -66,10 +66,12 @@ class opendaylight (
       if $::operatingsystemmajrelease != '7' {
         # RHEL/CentOS versions < 7 not supported as they lack systemd
         fail("Unsupported OS: ${::operatingsystem} ${::operatingsystemmajrelease}")
-      } elsif (versioncmp($::operatingsystemrelease, '7.3') < 0) {
-        # Versions < 7.3 do not support stateful security groups
-        $stateful_unsupported = true
-      }
+      } elsif defined('::operatingsystemrelease') {
+          if (versioncmp($::operatingsystemrelease, '7.3') < 0) {
+            # Versions < 7.3 do not support stateful security groups
+            $stateful_unsupported = true
+          }
+        }
     }
     fedora: {
       # Fedora distros < 22 are EOL as of 2015-12-01
index 44b444c5a5d7d7d44a859334f1af507db8f99c77..3c21461ecdb126a5cb5921825e140d3464523a51 100644 (file)
@@ -602,6 +602,7 @@ describe 'opendaylight' do
             :operatingsystem => operatingsystem,
             :operatingsystemrelease => operatingsystemrelease,
             :operatingsystemmajrelease => operatingsystemmajrelease,
+            :architecture => 'x86_64',
             :path => ['/usr/local/bin', '/usr/bin', '/bin'],
           }}
 
@@ -626,6 +627,7 @@ describe 'opendaylight' do
             :operatingsystem => operatingsystem,
             :operatingsystemrelease => operatingsystemrelease,
             :operatingsystemmajrelease => operatingsystemmajrelease,
+            :architecture => 'x86_64',
             :path => ['/usr/local/bin', '/usr/bin', '/bin'],
           }}
 
@@ -654,6 +656,7 @@ describe 'opendaylight' do
             :operatingsystem => operatingsystem,
             :operatingsystemrelease => operatingsystemrelease,
             :operatingsystemmajrelease => operatingsystemmajrelease,
+            :architecture => 'x86_64',
             :path => ['/usr/local/bin', '/usr/bin', '/bin'],
           }}
 
@@ -679,6 +682,7 @@ describe 'opendaylight' do
             :operatingsystem => operatingsystem,
             :operatingsystemrelease => operatingsystemrelease,
             :operatingsystemmajrelease => operatingsystemmajrelease,
+            :architecture => 'x86_64',
             :path => ['/usr/local/bin', '/usr/bin', '/bin'],
           }}
 
@@ -748,7 +752,7 @@ describe 'opendaylight' do
 
       # Run test that specialize in checking security groups
       # Note that this function is defined in spec_helper
-      enable_sg_tests(security_group_mode: 'stateful', osrelease: '7.2.1511')
+      enable_sg_tests(security_group_mode: 'stateful', osrelease: '7.3')
     end
 
     context 'using transparent with unsupported stateful' do