Merge "xenapi: support the session to "unix://local""

This commit is contained in:
Jenkins 2015-08-20 19:27:15 +00:00 committed by Gerrit Code Review
commit f445788734

View File

@ -66,7 +66,8 @@ def get_api_session():
exception = api.Failure(_("Unable to log in to XenAPI "
"(is the Dom0 disk full?)"))
try:
session = api.Session(url)
session = (api.xapi_local() if url == 'unix://local'
else api.Session(url))
with timeout.Timeout(CONF.xenapi.login_timeout, exception):
session.login_with_password(username, password)
except api.Failure as e: