Add wait for vcsim to come online (#27887)

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
pull/27907/head
Abhijeet Kasurde 7 years ago committed by jctanner
parent 4648dc9702
commit e244deedbd

@ -43,6 +43,12 @@
url: http://{{ vcenter_host }}:5000/spawn?cluster=2 url: http://{{ vcenter_host }}:5000/spawn?cluster=2
register: vcsim_instance register: vcsim_instance
- name: Wait for vcsim server to come up online {{ vcenter_host }}
wait_for:
host: "{{ vcenter_host }}"
port: 443
state: started
- debug: - debug:
var: vcsim_instance var: vcsim_instance

@ -27,6 +27,12 @@
- debug: var=vcsim - debug: var=vcsim
- name: Wait for vcsim controller to come online {{ vcsim }}
wait_for:
host: "{{ vcsim }}"
port: 5000
state: started
- name: kill vcsim - name: kill vcsim
uri: uri:
url: "{{ 'http://' + vcsim + ':5000/killall' }}" url: "{{ 'http://' + vcsim + ':5000/killall' }}"
@ -36,6 +42,12 @@
url: "{{ 'http://' + vcsim + ':5000/spawn?cluster=2' }}" url: "{{ 'http://' + vcsim + ':5000/spawn?cluster=2' }}"
register: vcsim_instance 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 - name: get a list of Datacenter from vcsim
uri: uri:
url: "{{ 'http://' + vcsim + ':5000/govc_find?filter=DC' }}" url: "{{ 'http://' + vcsim + ':5000/govc_find?filter=DC' }}"

@ -1,3 +1,9 @@
- name: Wait for Flask controller to come up online
wait_for:
host: "{{ vcsim }}"
port: 5000
state: started
- name: kill vcsim - name: kill vcsim
uri: uri:
url: "{{ 'http://' + vcsim + ':5000/killall' }}" url: "{{ 'http://' + vcsim + ':5000/killall' }}"
@ -6,6 +12,12 @@
url: "{{ 'http://' + vcsim + ':5000/spawn?datacenter=1&cluster=1&folder=0' }}" url: "{{ 'http://' + vcsim + ':5000/spawn?datacenter=1&cluster=1&folder=0' }}"
register: vcsim_instance 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 - name: get a list of VMS from vcsim
uri: uri:
url: "{{ 'http://' + vcsim + ':5000/govc_find?filter=VM' }}" url: "{{ 'http://' + vcsim + ':5000/govc_find?filter=VM' }}"

@ -3,6 +3,12 @@
# name: pyvmomi # name: pyvmomi
# state: latest # state: latest
- name: Wait for Flask controller to come up online
wait_for:
host: "{{ vcsim }}"
port: 5000
state: started
- name: kill vcsim - name: kill vcsim
uri: uri:
url: "{{ 'http://' + vcsim + ':5000/killall' }}" url: "{{ 'http://' + vcsim + ':5000/killall' }}"
@ -11,6 +17,12 @@
url: "{{ 'http://' + vcsim + ':5000/spawn?datacenter=1&cluster=1&folder=0' }}" url: "{{ 'http://' + vcsim + ':5000/spawn?datacenter=1&cluster=1&folder=0' }}"
register: vcsim_instance 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 - name: get a list of VMS from vcsim
uri: uri:
url: "{{ 'http://' + vcsim + ':5000/govc_find?filter=VM' }}" url: "{{ 'http://' + vcsim + ':5000/govc_find?filter=VM' }}"

@ -3,6 +3,12 @@
# name: pyvmomi # name: pyvmomi
# state: latest # 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 - name: store the vcenter container ip
set_fact: set_fact:
vcsim: "{{ lookup('env', 'vcenter_host') }}" vcsim: "{{ lookup('env', 'vcenter_host') }}"
@ -16,6 +22,12 @@
url: "{{ 'http://' + vcsim + ':5000/spawn?datacenter=1&cluster=1&folder=1' }}" url: "{{ 'http://' + vcsim + ':5000/spawn?datacenter=1&cluster=1&folder=1' }}"
register: vcsim_instance 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 - name: get a list of VMS from vcsim
uri: uri:
url: "{{ 'http://' + vcsim + ':5000/govc_find?filter=VM' }}" url: "{{ 'http://' + vcsim + ':5000/govc_find?filter=VM' }}"

@ -27,6 +27,12 @@
vcsim: "{{ lookup('env', 'vcenter_host') }}" vcsim: "{{ lookup('env', 'vcenter_host') }}"
- debug: var=vcsim - debug: var=vcsim
- name: Wait for Flask controller to come up online
wait_for:
host: "{{ vcsim }}"
port: 5000
state: started
- name: kill vcsim - name: kill vcsim
uri: uri:
url: "{{ 'http://' + vcsim + ':5000/killall' }}" url: "{{ 'http://' + vcsim + ':5000/killall' }}"
@ -35,6 +41,12 @@
url: "{{ 'http://' + vcsim + ':5000/spawn?cluster=2' }}" url: "{{ 'http://' + vcsim + ':5000/spawn?cluster=2' }}"
register: vcsim_instance register: vcsim_instance
- name: Wait for Flask controller to come up online
wait_for:
host: "{{ vcsim }}"
port: 443
state: started
- debug: var=vcsim_instance - debug: var=vcsim_instance
# Testcase 0001: Get detail of vms from given esxi # Testcase 0001: Get detail of vms from given esxi

@ -27,6 +27,12 @@
vcsim: "{{ lookup('env', 'vcenter_host') }}" vcsim: "{{ lookup('env', 'vcenter_host') }}"
- debug: var=vcsim - debug: var=vcsim
- name: Wait for Flask controller to come up online
wait_for:
host: "{{ vcsim }}"
port: 5000
state: started
- name: kill vcsim - name: kill vcsim
uri: uri:
url: "{{ 'http://' + vcsim + ':5000/killall' }}" url: "{{ 'http://' + vcsim + ':5000/killall' }}"
@ -35,6 +41,12 @@
url: "{{ 'http://' + vcsim + ':5000/spawn?cluster=2' }}" url: "{{ 'http://' + vcsim + ':5000/spawn?cluster=2' }}"
register: vcsim_instance register: vcsim_instance
- name: Wait for Flask controller to come up online
wait_for:
host: "{{ vcsim }}"
port: 443
state: started
- debug: var=vcsim_instance - debug: var=vcsim_instance
- name: find folders for each vm - name: find folders for each vm

Loading…
Cancel
Save