Created
June 27, 2014 13:13
-
-
Save apahim/779578fd3c6c190c65fc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ovirtsdk.xml import params | |
from ovirtsdk.api import API | |
ENGINE_SERVER = "https://rhevm34.pahim.org" | |
ENGINE_USER = "admin@internal" | |
ENGINE_PASS = "admin" | |
ENGINE_CERT = "/etc/pki/ovirt-engine/ca.pem" | |
def Connect(url,username,password,ca_file): | |
global api | |
api = API(url = url, | |
username = username, | |
password = password, | |
ca_file = ca_file) | |
def Disconnect(): | |
api.disconnect() | |
Connect(ENGINE_SERVER, ENGINE_USER, ENGINE_PASS, ENGINE_CERT) | |
for host in api.hosts.list(): | |
print host.name | |
Disconnect() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment