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

Function fetch_api_client

tools/marvin/marvin/lib/utils.py:203–215  ·  view source on GitHub ↗

Fetch the Cloudstack API Client

(config_file='datacenterCfg')

Source from the content-addressed store, hash-verified

201
202
203def fetch_api_client(config_file='datacenterCfg'):
204 """Fetch the Cloudstack API Client"""
205 config = marvin.configGenerator.get_setup_config(config_file)
206 mgt = config.mgtSvr[0]
207 testClientLogger = logging.getLogger("testClient")
208 asyncTimeout = 3600
209 return cloudstackAPIClient.CloudStackAPIClient(
210 marvin.cloudstackConnection.cloudConnection(
211 mgt,
212 asyncTimeout,
213 testClientLogger
214 )
215 )
216
217def get_host_credentials(config, hostip):
218 """Get login information for a host `hostip` (ipv4) from marvin's `config`

Callers

nothing calls this directly

Calls 1

getLoggerMethod · 0.45

Tested by

no test coverage detected