View Source XenSession (XenAPI v0.3.0)

XenSession is the session struct used in all XAPI calls.

Link to this section Summary

Functions

Returns a XenSession struct after logging in to the host with provided username and password.

Returns a XenSession struct after logging in to the host with provided username and password. Raises error if failed.

Logout the provided XenSession from the host.

Link to this section Functions

Link to this function

login(host, username, password)

View Source
@spec login(binary(), any(), any()) ::
  {:ok, %XenSession{host: binary(), session: any()}} | {:error, any()}

Returns a XenSession struct after logging in to the host with provided username and password.

Link to this function

login!(host, username, password)

View Source
@spec login!(binary(), any(), any()) :: %XenSession{host: term(), session: term()}

Returns a XenSession struct after logging in to the host with provided username and password. Raises error if failed.

@spec logout(%XenSession{host: binary(), session: any()}) ::
  {:error, list()} | {:fault, [...]} | {:ok, any()}

Logout the provided XenSession from the host.