23 lines
852 B
Python
23 lines
852 B
Python
import paramiko
|
|
|
|
for ip, name in [("140.44.44.122", "Node 2"), ("140.44.44.123", "Node 3")]:
|
|
c = paramiko.SSHClient()
|
|
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
c.connect(ip, username='root', password='Katzir476!', timeout=10)
|
|
|
|
stdin, stdout, stderr = c.exec_command('racadm get bios.SysProfileSettings.SysProfile')
|
|
prof = stdout.read().decode().strip().splitlines()[-1]
|
|
|
|
c.close()
|
|
|
|
# New connection for second command
|
|
c = paramiko.SSHClient()
|
|
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
c.connect(ip, username='root', password='Katzir476!', timeout=10)
|
|
stdin, stdout, stderr = c.exec_command('racadm get bios.IntegratedDevices.SriovGlobalEnable')
|
|
sriov = stdout.read().decode().strip().splitlines()[-1]
|
|
c.close()
|
|
|
|
print(f"[{name} - {ip}] {prof} | {sriov}")
|
|
|