-
Notifications
You must be signed in to change notification settings - Fork 0
HOWTO
This page contains quick-start instructions to play around with the vdsm rest API.
The current vdsm API is undergoing significant changes which makes writing a new downstream API very challenging. For that reason, the rest API will work best if you use the same vdsm revision that it was developed against. Additionally, a temporary vdsm API extension was needed to enable image management. Follow these steps to get a vdsm version that will work well with the API:
Clone the vdsm git repository:
git clone git://git.fedorahosted.org/vdsm.git ; cd vdsm
Create a branch at the older revision
git checkout -b vdsm-rest 151db4a0e1c5cece80fb584623672a0b7b823976
Apply API extension patch
wget -O patch https://github.com/downloads/aglitke/vdsm-rest/createImage.patch ; patch -p1 < patch
Build and install vdsm
make rpm ; rpm -Uvh <vdsm rpms>
Restart vdsm
sudo service vdsmd restart
Check out the code
git clone git://github.com/aglitke/vdsm-rest.git ; cd vdsm-rest
Install dependencies
yum install python-cherrypy.noarch python-cheetah.x86_64
Start it
sudo -u vdsm ./server
Take a look at this file for an example session that includes setup of local storage, VM creation, and storage tear-down.