-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.py
44 lines (39 loc) · 1.4 KB
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env python3
"""Proof of concept EESSI test script."""
from cvmfsscraper import scrape
# server = scrape_server("aws-eu-west1.stratum1.cvmfs.eessi-infra.org")
servers = scrape(
stratum0_servers=[
"rug-nl.stratum0.cvmfs.eessi-infra.org",
],
stratum1_servers=[
"aws-eu-west1.stratum1.cvmfs.eessi-infra.org",
"azure-us-east1.stratum1.cvmfs.eessi-infra.org",
"bgo-no.stratum1.cvmfs.eessi-infra.org",
"rug-nl.stratum1.cvmfs.eessi-infra.org",
],
repos=[],
ignore_repos=[
"bla.eessi-hpc.org",
"bob.eessi-hpc.org",
"ci.eessi-hpc.org",
],
)
print("Servers:")
for server in servers:
print(server.name)
print(" GeoAPI status: " + str(server.geoapi_status))
print(" Metadata:")
for key, value in sorted(server.metadata.items(), key=lambda x: x[1]):
print(" - " + key + ": " + value)
print(" Repositories: ")
for repo in server.repositories:
print(" - " + repo.name)
print(f" : Root size: {repo.root_size}")
print(f" : Revision: {repo.revision}")
print(f" : Revision timestamp: {repo.revision_timestamp}")
print(f" : Last snapshot: {repo.last_snapshot}")
print(" ---")
for key, attr in sorted(repo.attribute_mapping().items(), key=lambda x: x[1]):
print(f" : ({key}) {attr}: {repo.attribute(key)}")
print()