While trying to connect RHEV with RHEV API using the Python SDK, why it is throwing an error?

Solution Verified - Updated -

Issue

from ovirtsdk.api import API
from ovirtsdk.xml import params

try:
    api = API(url="https://rhevm.example.com", 
              username='admin', 
              password="secret_password_here",
              ca_file="rhevm.cer")
  • After running above code, it outputs:
Unexpected error: 
status: 401
reason: Unauthorized
detail: HTTP Status 401
  • From engine.log:
### Your title here...2013-05-03 08:01:03,840 INFO  [org.ovirt.engine.api.restapi.security.auth.LoginValidator] (ajp-/127.0.0.1:8702-1) Login failure, user: admin domain: null reason: Missing domain component in User Principal Name (UPN)

Environment

  • Red Hat Enterprise Virtualization3.1

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content