feat: add homelab deployment configs, documentation, and automation scripts
This commit is contained in:
18
scripts/test_rancher_customapi.py
Normal file
18
scripts/test_rancher_customapi.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import requests
|
||||
import json
|
||||
import urllib3
|
||||
urllib3.disable_warnings()
|
||||
|
||||
full_key = "kubeconfig-u-aqzkufonck4hmbd:bw22b96nv8844k8w5r8lzpz8gnk22tjwj95j6nkzr7hd5dhm4bs6z7"
|
||||
headers = {
|
||||
"Authorization": f"Bearer {full_key}",
|
||||
"Accept": "application/json"
|
||||
}
|
||||
|
||||
for cid in ["local", "c-cclnt"]:
|
||||
r = requests.get(f"https://aerodrome.snarfnet.net/v3/clusters/{cid}", headers=headers, verify=False, timeout=10)
|
||||
print(f"Cluster {cid} status: {r.status_code}")
|
||||
if r.status_code == 200:
|
||||
d = r.json()
|
||||
print(f"Name: {d.get('name')}, State: {d.get('state')}")
|
||||
print("Capacity:", d.get('capacity'))
|
||||
Reference in New Issue
Block a user