Correct Jenkins file for cord master

Change-Id: Iab35269a333bc50ec42d54ed7994e6058968a22a
diff --git a/Jenkinsfile b/Jenkinsfile
index 557699d..09c139a 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -105,7 +105,7 @@
                                              "${config.head.user}",
                                              "${config.head.pass}",
                                              "maas pod-maas nodes list | grep -i deployed | wc -l").trim()
-                                return num == '2'
+                                return num.toInteger() == config.compute_nodes.size()
                             } catch (exception) {
                                 return false
                             }
@@ -124,7 +124,7 @@
                                 out = runCmd("${config.head.ip}",
                                              "${config.head.user}",
                                              "${config.head.pass}",
-                                             "curl -sS http://$ip:4243/provision/ | jq -c '.[] | select(.status | contains(2))'").trim()
+                                             "curl -sS http://$ip:4243/provision/ | jq -c \".[] | select(.status | contains(${config.compute_nodes.size()}))\"".trim())
                                 return out != ""
                             } catch (exception) {
                                 return false
@@ -184,7 +184,7 @@
                                                                   "${config.head.user}",
                                                                   "${config.head.pass}",
                                                                   "cord harvest list '|' grep -i fabric '|' wc -l").trim()
-                                    return harvestCompleted == config.fabric_switches.size().toString()
+                                    return harvestCompleted.toInteger() == config.fabric_switches.size()
                                 } catch (exception) {
                                     return false
                                 }
@@ -255,7 +255,7 @@
  * @return the output of the command
  */
 def runCmd(ip, user, pass, command) {
-    return sh(returnStdout: true, script: "sshpass -p ${pass} ssh -o UserKnownHostsFile=/dev/null -l ${user} ${ip} ${command}")
+    return sh(returnStdout: true, script: "sshpass -p ${pass} ssh -oStrictHostKeyChecking=no -l ${user} ${ip} ${command}")
 }
 
 /**
@@ -271,8 +271,5 @@
  * @return the output of the command
  */
 def runFabricCmd(headIp, headUser, headPass, ip, user, pass, command) {
-    return runCmd("${haedIp}",
-                  "${headUser}",
-                  "${headPass}",
-                  "sshpass -p ${pass} ssh -o UserKnownHostsFile=/dev/null -l ${user} ${ip} ${command}")
+    return sh(returnStdout: true, script: "sshpass -p ${headPass} ssh -oStrictHostKeyChecking=no -l ${headUser} ${headIp} \"sshpass -p ${pass} ssh -oStrictHostKeyChecking=no -l ${user} ${ip} ${command}\"")
 }
\ No newline at end of file