Fix method name

Change-Id: I04efc29239643eb311271839f0a527530e25379b
diff --git a/cicd-lab-pipeline.groovy b/cicd-lab-pipeline.groovy
index 40c911e..94556a4 100644
--- a/cicd-lab-pipeline.groovy
+++ b/cicd-lab-pipeline.groovy
@@ -131,9 +131,9 @@
 
         retry(30) {
             out = salt.cmdRun(saltMaster, 'I@docker:swarm:role:master', """/bin/bash -c 'docker service ls | grep -E "0/[0-9]+"' && echo 'Some services are not running'""")
-            for (int a = 0; a < out['return'].length(); a++) {
+            for (int a = 0; a < out['return'].size(); a++) {
                 def entry = a
-                for (int i = 0; i < entry.length(); i++) {
+                for (int i = 0; i < entry.size(); i++) {
                     def node = entry[i]
                     if (node.value =~ /Some services are not running/) {
                         sleep(10)