Home - nowhere-cloud/xen-api GitHub Wiki
This repository contains the source code of interacting a XenServer Hypervisor over its XML-RPC API.
Feel free to explore the code, using the API navigator on the right-hand-side
Requirements
- Ruby >= 2.3.0 w/ Bundler
- Linux
How To use/Test?
# Set Environment Variables
cd .../xen-api
export XEN_SERVER_ADDR='192.168.0.123'
export XEN_SERVER_PORT=443
export XEN_SERVER_USER='root'
export XEN_SERVER_PASS='foo-change-me'
# Play the API on Interactive Ruby Script Environment
irb --noprompt
require './xenapi.rb'
# Login
xenapi = XenApi.new(ENV['XEN_SERVER_ADDR'], ENV['XEN_SERVER_PORT'], ENV['XEN_SERVER_USER'], ENV['XEN_SERVER_PASS'])
# logout
xenapi.logout
Acknowledgements
- Nori XML Parser
- XAPI Project
- Navigating in website farrrrrr better than 600 Pages PDF
- JSON Test Code Snippet from ascendbruce
- A Guide on using Ruby XMLRPC Client over HTTPS
- An Answer on raising exception while some ENV is not set
- Get IP Address of VIF