diff --git a/test/integration/targets/vcenter_license/tasks/main.yml b/test/integration/targets/vcenter_license/tasks/main.yml index 8d32212c49..896db9892b 100644 --- a/test/integration/targets/vcenter_license/tasks/main.yml +++ b/test/integration/targets/vcenter_license/tasks/main.yml @@ -43,6 +43,12 @@ url: http://{{ vcenter_host }}:5000/spawn?cluster=2 register: vcsim_instance +- name: Wait for vcsim server to come up online {{ vcenter_host }} + wait_for: + host: "{{ vcenter_host }}" + port: 443 + state: started + - debug: var: vcsim_instance diff --git a/test/integration/targets/vmware_datacenter/tasks/main.yml b/test/integration/targets/vmware_datacenter/tasks/main.yml index cdc112570d..4890c7cd3a 100644 --- a/test/integration/targets/vmware_datacenter/tasks/main.yml +++ b/test/integration/targets/vmware_datacenter/tasks/main.yml @@ -27,6 +27,12 @@ - debug: var=vcsim +- name: Wait for vcsim controller to come online {{ vcsim }} + wait_for: + host: "{{ vcsim }}" + port: 5000 + state: started + - name: kill vcsim uri: url: "{{ 'http://' + vcsim + ':5000/killall' }}" @@ -36,6 +42,12 @@ url: "{{ 'http://' + vcsim + ':5000/spawn?cluster=2' }}" register: vcsim_instance +- name: Wait for vcsim server to come up online + wait_for: + host: "{{ vcsim }}" + port: 443 + state: started + - name: get a list of Datacenter from vcsim uri: url: "{{ 'http://' + vcsim + ':5000/govc_find?filter=DC' }}" diff --git a/test/integration/targets/vmware_guest/tasks/clone_d1_c1_f0.yml b/test/integration/targets/vmware_guest/tasks/clone_d1_c1_f0.yml index fb677ea917..3806aa058c 100644 --- a/test/integration/targets/vmware_guest/tasks/clone_d1_c1_f0.yml +++ b/test/integration/targets/vmware_guest/tasks/clone_d1_c1_f0.yml @@ -1,3 +1,9 @@ +- name: Wait for Flask controller to come up online + wait_for: + host: "{{ vcsim }}" + port: 5000 + state: started + - name: kill vcsim uri: url: "{{ 'http://' + vcsim + ':5000/killall' }}" @@ -6,6 +12,12 @@ url: "{{ 'http://' + vcsim + ':5000/spawn?datacenter=1&cluster=1&folder=0' }}" register: vcsim_instance +- name: Wait for Flask controller to come up online + wait_for: + host: "{{ vcsim }}" + port: 443 + state: started + - name: get a list of VMS from vcsim uri: url: "{{ 'http://' + vcsim + ':5000/govc_find?filter=VM' }}" diff --git a/test/integration/targets/vmware_guest/tasks/poweroff_d1_c1_f0.yml b/test/integration/targets/vmware_guest/tasks/poweroff_d1_c1_f0.yml index f1ba80af2d..c98597c41b 100644 --- a/test/integration/targets/vmware_guest/tasks/poweroff_d1_c1_f0.yml +++ b/test/integration/targets/vmware_guest/tasks/poweroff_d1_c1_f0.yml @@ -3,6 +3,12 @@ # name: pyvmomi # state: latest +- name: Wait for Flask controller to come up online + wait_for: + host: "{{ vcsim }}" + port: 5000 + state: started + - name: kill vcsim uri: url: "{{ 'http://' + vcsim + ':5000/killall' }}" @@ -11,6 +17,12 @@ url: "{{ 'http://' + vcsim + ':5000/spawn?datacenter=1&cluster=1&folder=0' }}" register: vcsim_instance +- name: Wait for Flask controller to come up online + wait_for: + host: "{{ vcsim }}" + port: 443 + state: started + - name: get a list of VMS from vcsim uri: url: "{{ 'http://' + vcsim + ':5000/govc_find?filter=VM' }}" diff --git a/test/integration/targets/vmware_guest/tasks/poweroff_d1_c1_f1.yml b/test/integration/targets/vmware_guest/tasks/poweroff_d1_c1_f1.yml index 8335bae52a..c1646eebbd 100644 --- a/test/integration/targets/vmware_guest/tasks/poweroff_d1_c1_f1.yml +++ b/test/integration/targets/vmware_guest/tasks/poweroff_d1_c1_f1.yml @@ -3,6 +3,12 @@ # name: pyvmomi # state: latest +- name: Wait for Flask controller to come up online + wait_for: + host: "{{ vcsim }}" + port: 5000 + state: started + - name: store the vcenter container ip set_fact: vcsim: "{{ lookup('env', 'vcenter_host') }}" @@ -16,6 +22,12 @@ url: "{{ 'http://' + vcsim + ':5000/spawn?datacenter=1&cluster=1&folder=1' }}" register: vcsim_instance +- name: Wait for Flask controller to come up online + wait_for: + host: "{{ vcsim }}" + port: 443 + state: started + - name: get a list of VMS from vcsim uri: url: "{{ 'http://' + vcsim + ':5000/govc_find?filter=VM' }}" diff --git a/test/integration/targets/vmware_vm_facts/tasks/main.yml b/test/integration/targets/vmware_vm_facts/tasks/main.yml index 5dac7c5476..ce80f5e0ec 100644 --- a/test/integration/targets/vmware_vm_facts/tasks/main.yml +++ b/test/integration/targets/vmware_vm_facts/tasks/main.yml @@ -27,6 +27,12 @@ vcsim: "{{ lookup('env', 'vcenter_host') }}" - debug: var=vcsim +- name: Wait for Flask controller to come up online + wait_for: + host: "{{ vcsim }}" + port: 5000 + state: started + - name: kill vcsim uri: url: "{{ 'http://' + vcsim + ':5000/killall' }}" @@ -35,6 +41,12 @@ url: "{{ 'http://' + vcsim + ':5000/spawn?cluster=2' }}" register: vcsim_instance +- name: Wait for Flask controller to come up online + wait_for: + host: "{{ vcsim }}" + port: 443 + state: started + - debug: var=vcsim_instance # Testcase 0001: Get detail of vms from given esxi diff --git a/test/integration/targets/vmware_vswitch/tasks/main.yml b/test/integration/targets/vmware_vswitch/tasks/main.yml index 691361aa44..f15d34638c 100644 --- a/test/integration/targets/vmware_vswitch/tasks/main.yml +++ b/test/integration/targets/vmware_vswitch/tasks/main.yml @@ -27,6 +27,12 @@ vcsim: "{{ lookup('env', 'vcenter_host') }}" - debug: var=vcsim +- name: Wait for Flask controller to come up online + wait_for: + host: "{{ vcsim }}" + port: 5000 + state: started + - name: kill vcsim uri: url: "{{ 'http://' + vcsim + ':5000/killall' }}" @@ -35,6 +41,12 @@ url: "{{ 'http://' + vcsim + ':5000/spawn?cluster=2' }}" register: vcsim_instance +- name: Wait for Flask controller to come up online + wait_for: + host: "{{ vcsim }}" + port: 443 + state: started + - debug: var=vcsim_instance - name: find folders for each vm