import ovirtsdk4 as sdk
import ovirtsdk4.types as types
connection = sdk.Connection(
url='https://engine.example.com/ovirt-engine/api',
username='admin@internal',
password='password',
ca_file='ca.pem',
)
host_service = connection.system_service().hosts_service()
hosts = host_service.list()
for host in hosts:
print("%s (%s)" % (host.name, host.id))
connection.close()
import ovirtsdk4 as sdk
import ovirtsdk4.types as types
connection = sdk.Connection(
url='https://engine.example.com/ovirt-engine/api',
username='admin@internal',
password='password',
ca_file='ca.pem',
)
host_service = connection.system_service().hosts_service()
hosts = host_service.list()
for host in hosts:
print("%s (%s)" % (host.name, host.id))
connection.close()
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow