-
-
Save bhcopeland/5a4d876d110d07be4682 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_component_ids(auth_content, components): | |
host_ids = [] | |
for x in range(0, len(auth_content["result"])): | |
for comp in components: | |
if auth_content["result"][x]["name"].lower() == comp.lower(): | |
host_ids.append(auth_content["result"][x]["_id"]) | |
host_ids.append(auth_content["result"][x]["containers"][0]["_id"]) | |
else: | |
return 1, None, comp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment