feat: add DNS setup blueprint and infrastructure automation scripts
This commit is contained in:
34
scripts/check_redfish_node4.py
Normal file
34
scripts/check_redfish_node4.py
Normal file
@@ -0,0 +1,34 @@
|
||||
import urllib.request
|
||||
import ssl
|
||||
import json
|
||||
import base64
|
||||
|
||||
ctx = ssl.create_default_context()
|
||||
ctx.check_hostname = False
|
||||
ctx.verify_mode = ssl.CERT_NONE
|
||||
|
||||
auth = base64.b64encode(b'root:Katzir476!').decode()
|
||||
headers = {'Authorization': 'Basic ' + auth}
|
||||
|
||||
# Query System
|
||||
url = 'https://140.44.44.124/redfish/v1/Systems/System.Embedded.1'
|
||||
req = urllib.request.Request(url, headers=headers)
|
||||
with urllib.request.urlopen(req, context=ctx, timeout=10) as r:
|
||||
sys_data = json.loads(r.read().decode())
|
||||
|
||||
print("Model:", sys_data.get("Model"))
|
||||
print("BiosVersion:", sys_data.get("BiosVersion"))
|
||||
print("ProcessorSummary:", sys_data.get("ProcessorSummary"))
|
||||
print("MemorySummary:", sys_data.get("MemorySummary"))
|
||||
|
||||
# Query BIOS attributes
|
||||
bios_url = 'https://140.44.44.124/redfish/v1/Systems/System.Embedded.1/Bios'
|
||||
req = urllib.request.Request(bios_url, headers=headers)
|
||||
with urllib.request.urlopen(req, context=ctx, timeout=10) as r:
|
||||
bios_data = json.loads(r.read().decode())
|
||||
attrs = bios_data.get("Attributes", {})
|
||||
print("\n=== BIOS KEY ATTRIBUTES ===")
|
||||
for k in ["SysProfile", "ProcVirtualization", "SriovGlobalEnable", "ProcCStates", "ProcC1E", "LogicalProc", "MemOpMode"]:
|
||||
print(f" {k}: {attrs.get(k)}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user