Fix counting nodes in 'Deployed' state

Change-Id: I739387426695886b5ede0b865ea749c8c8fc4458
diff --git a/Jenkinsfile.newBuildSystem b/Jenkinsfile.newBuildSystem
index ee26974..92b1796 100644
--- a/Jenkinsfile.newBuildSystem
+++ b/Jenkinsfile.newBuildSystem
@@ -108,7 +108,7 @@
                                 num = runCmd("${config.head.ip}",
                                              "${config.head.user}",
                                              "${config.head.pass}",
-                                             "maas pod-maas nodes list | grep -i deployed | wc -l").trim()
+                                             "maas pod-maas nodes list | grep substatus_name | grep -i deployed | wc -l").trim()
                                 return num.toInteger() == config.compute_nodes.size()
                             } catch (exception) {
                                 return false