XenAPI: Support local connections

Currently there is no way to connect to XAPI through the unix socket,
requiring a URL and credentials.

This change allows you to run in dom0 (particularly in xenserver-core
environments) and connect to XAPI using the unix domain socket by
specifying "unix://local"
DocImpact

Change-Id: I3d5ace31c9c0411fa711cfdf87383d36f61bfa4a
This commit is contained in:
Bob Ball
2013-08-13 15:07:14 +01:00
parent dcc61f35e7
commit c128dbc74a
7 changed files with 46 additions and 11 deletions

View File

@@ -62,7 +62,7 @@ def stubout_session(stubs, cls, product_version=(5, 6, 2),
def stubout_get_this_vm_uuid(stubs):
def f():
def f(session):
vms = [rec['uuid'] for ref, rec
in fake.get_all_records('VM').iteritems()
if rec['is_control_domain']]