Use 0 vs null for ha_node_index default 45/55645/1
authorDaniel Farrell <dfarrell@redhat.com>
Wed, 18 Jan 2017 19:58:58 +0000 (14:58 -0500)
committerDaniel Farrell <dfarrell@redhat.com>
Wed, 19 Apr 2017 19:18:40 +0000 (15:18 -0400)
Empty value was causing malformed manifests and Beaker failures.

Change-Id: I2049a86f82292f1c8be5518924eba1e0fc546228
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
manifests/params.pp
spec/spec_helper.rb
spec/spec_helper_acceptance.rb

index 405475a225372141ea53e4b7d042e89508fd4950..a2925ff75479211a9de31fa399c0db27c7e3c442 100644 (file)
@@ -21,6 +21,6 @@ class opendaylight::params {
   $log_levels = {}
   $enable_ha = false
   $ha_node_ips = []
-  $ha_node_index = ''
+  $ha_node_index = 0
   $security_group_mode = 'stateful'
 }
index 18ea6a6e123e176f0971d8d8bd2048db65281f3a..659b636efb79766aa3a7e73574d5aed8f3d92d08 100644 (file)
@@ -233,7 +233,7 @@ def enable_ha_tests(options = {})
   # Extract params
   enable_ha = options.fetch(:enable_ha, false)
   ha_node_ips = options.fetch(:ha_node_ips, [])
-  ha_node_index = options.fetch(:ha_node_index, '')
+  ha_node_index = options.fetch(:ha_node_index, 0)
   # HA_NODE_IPS size
   ha_node_count = ha_node_ips.size
 
index 1257f502dfdd8a577831e508eae2706eb7c9499e..da63f437f92556d398c0e40f596223d6e4fbcb76 100644 (file)
@@ -65,7 +65,7 @@ def install_odl(options = {})
   enable_l3 = options.fetch(:enable_l3, 'no')
   enable_ha = options.fetch(:enable_ha, false)
   ha_node_ips = options.fetch(:ha_node_ips, [])
-  ha_node_index = options.fetch(:ha_node_index, '')
+  ha_node_index = options.fetch(:ha_node_index, 0)
 
   # Build script for consumption by Puppet apply
   it 'should work idempotently with no errors' do
@@ -319,7 +319,7 @@ def enable_ha_validations(options = {})
   # TODO: Remove this possible source of bugs^^
   enable_ha = options.fetch(:enable_ha, false)
   ha_node_ips = options.fetch(:ha_node_ips, [])
-  ha_node_index = options.fetch(:ha_node_index, '')
+  ha_node_index = options.fetch(:ha_node_index, 0)
   # HA_NODE_IPS size
   ha_node_count = ha_node_ips.size