MCPcopy
hub / github.com/trailofbits/algo / find

Function find

library/scaleway_compute.py:537–548  ·  view source on GitHub ↗
(compute_api, wished_server, per_page=1)

Source from the content-addressed store, hash-verified

535
536
537def find(compute_api, wished_server, per_page=1):
538 compute_api.module.debug("Getting inside find")
539 # Only the name attribute is accepted in the Compute query API
540 response = compute_api.get("servers", params={"name": wished_server["name"], "per_page": per_page})
541
542 if not response.ok:
543 msg = "Error during server search: (%s) %s" % (response.status_code, response.json)
544 compute_api.module.fail_json(msg=msg)
545
546 search_results = response.json["servers"]
547
548 return search_results
549
550
551PATCH_MUTABLE_SERVER_ATTRIBUTES = (

Callers 5

present_strategyFunction · 0.85
absent_strategyFunction · 0.85
running_strategyFunction · 0.85
stop_strategyFunction · 0.85
restart_strategyFunction · 0.85

Calls 1

fail_jsonMethod · 0.80

Tested by

no test coverage detected