Skip to content
Snippets Groups Projects
Commit 70d01325 authored by Davide Vaghetti's avatar Davide Vaghetti
Browse files

Updated identity_federations_contacts.py to list only active federations + belonging COUNTRY

parent 860e6ed7
Branches
No related tags found
1 merge request!5Master
#!/usr/bin/env python3 #!/usr/bin/env python3
# This script consume the eduGAIN API to retrieve the details of all the # This script consume the eduGAIN API to retrieve the details of all the
# eduGAIN identity federations and parse it to create a list of # eduGAIN identity federations and parse it to create a list of security
# security email addresses, if available, and the corresponding # email addresses, if available, and the corresponding federation name in
# federation name in CSV format. # CSV format.
# This list will be printed to stdout. # This list will be printed to stdout.
import requests import requests
...@@ -12,6 +12,8 @@ feds = requests.get('https://technical.edugain.org/api.php?action=list_feds_full ...@@ -12,6 +12,8 @@ feds = requests.get('https://technical.edugain.org/api.php?action=list_feds_full
feds_dict = feds.json() feds_dict = feds.json()
print('#NAME,EMAIL')
for fed in feds_dict: for fed in feds_dict:
if 'security_contact' in feds_dict[fed]: if 'security_contact' in feds_dict[fed]:
if 'mail' in feds_dict[fed]['security_contact']: if 'mail' in feds_dict[fed]['security_contact']:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment