/[projects]/misc/xenconsole/cdaction.php
ViewVC logotype

Annotation of /misc/xenconsole/cdaction.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2018 - (hide annotations) (download)
Thu Jul 18 13:00:14 2013 UTC (10 years, 10 months ago) by torben
File size: 574 byte(s)
first functioning CD selector
1 torben 2018 <?php
2     include("config.php");
3     include('xenapi.php');
4    
5     // http://docs.vmd.citrix.com/XenServer/5.5.0/1.0/en_gb/api/docs/html/browser.html
6    
7     /* Establish session with Xenserver */
8     $xenserver = new XenApi($url, $login, $password);
9    
10    
11     if ($_GET["action"] != "" ) {
12     if ($_GET["key"] != $password) {
13     die("Invalid key");
14     }
15     $vbd = $_GET["VBD"];
16    
17     $action = $_GET["action"];
18    
19     if ($action == "eject") {
20     $xenserver->VBD__eject($vbd);
21     }
22     if ($action == "mount") {
23     $vdi = $_GET["VDI"];
24     $xenserver->VBD__insert($vbd, $vdi);
25     }
26    
27     echo "OK";
28     } else {
29     echo "Missing action";
30     }
31     ?>

  ViewVC Help
Powered by ViewVC 1.1.20