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

Contents of /misc/xenconsole/getisolist.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2016 - (show annotations) (download)
Wed Jul 17 20:31:42 2013 UTC (10 years, 10 months ago) by torben
File size: 582 byte(s)
prepare CD/iso managemnt function
1 <?php
2
3 require('config.php');
4 include('xenapi.php');
5
6 /* Establish session with Xenserver */
7 $xenserver = new XenApi($url, $login, $password);
8
9 $srlist = $xenserver->SR__get_all_records();
10
11 foreach($srlist as $sr) {
12 $srname = $sr["name_label"];
13 $srtype = $sr["type"];
14 if ($srtype != "iso" )
15 continue;
16 //var_dump($sr);
17
18 echo "<optgroup label='$srname'>\n";
19 foreach($sr["VDIs"] as $vdiuuid) {
20 $vdi = $xenserver->VDI__get_record($vdiuuid);
21 $uuid = $vdi["uuid"];
22 $iso = $vdi["name_label"];
23 echo "<option value='{$vdiuuid}'>$iso</option>\n";
24 }
25 echo "</optgroup>\n";
26 }

  ViewVC Help
Powered by ViewVC 1.1.20