View Source XenAPI

Elixir package to interact with Xen XML-RPC

installation

Installation

def deps do
  [
    {:xenapi, "~> 0.1.2"}
  ]
end

usage

Usage

All XenAPI resource module functions require session argument of type XenSession. For the Xen XMLRPC to succeed the XenSession should have a valid logged-in session ref.

logging-in

Logging In

To login to a XenServer and obtain a XenSession use:

{:ok, xen_session} = XenSession.login(host, username, password)

calling-xenapi

Calling XenAPI

Now the logged in XenSession can be passed on to the XenAPI calls. eg:

xen_session 
  |> XenAPI.VM.get_all

logging-out

Logging Out

To logout the XenSession from the Xen server use:

xen_session 
  |> XenSession.logout