MCPcopy Create free account
hub / github.com/apache/cloudstack / wait_for_cleanup

Function wait_for_cleanup

tools/marvin/marvin/lib/common.py:126–147  ·  view source on GitHub ↗

Sleeps till the cleanup configs passed

(apiclient, configs=None)

Source from the content-addressed store, hash-verified

124
125
126def wait_for_cleanup(apiclient, configs=None):
127 """Sleeps till the cleanup configs passed"""
128
129 # Configs list consists of the list of global configs
130 if not isinstance(configs, list):
131 return
132 for config in configs:
133 cmd = listConfigurations.listConfigurationsCmd()
134 cmd.name = config
135 cmd.listall = True
136 try:
137 config_descs = apiclient.listConfigurations(cmd)
138 except Exception as e:
139 raise Exception("Failed to fetch configurations: %s" % e)
140
141 if not isinstance(config_descs, list):
142 raise Exception("List configs didn't returned a valid data")
143
144 config_desc = config_descs[0]
145 # Sleep for the config_desc.value time
146 time.sleep(int(config_desc.value))
147 return
148
149
150def add_netscaler(apiclient, zoneid, NSservice):

Callers 15

test_03_restart_vpcvrMethod · 0.90
tearDownMethod · 0.90
tearDownMethod · 0.90
tearDownMethod · 0.90
tearDownMethod · 0.90
tearDownMethod · 0.90

Calls 3

intFunction · 0.85
listConfigurationsMethod · 0.65
sleepMethod · 0.45

Tested by 15

test_03_restart_vpcvrMethod · 0.72
tearDownMethod · 0.72
tearDownMethod · 0.72
tearDownMethod · 0.72
tearDownMethod · 0.72
tearDownMethod · 0.72