-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.php
64 lines (63 loc) · 1.48 KB
/
demo.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
// include apicaller
require __DIR__.'/apicaller.php';
// create new apicaller
$client = new apicaller();
// DEMO get_all_* functions (No actions)
// pls dont look at render_cli() :c
$locations = $client->get_all_locations();
foreach($locations as $value)
{
echo "Location: \r\n";
echo $client->render_cli($value);
echo '------------'."\r\n";
}
$datacenters = $client->get_all_datacenters();
foreach($datacenters as $value)
{
echo "Datacenter: \r\n";
echo $client->render_cli($value);
echo '------------'."\r\n";
}
$images = $client->get_all_images();
foreach($images as $value)
{
echo "Images: \r\n";
echo $client->render_cli($value);
echo '------------'."\r\n";
}
$servers = $client->get_all_servers();
foreach($servers as $value)
{
echo "Servers: \r\n";
echo $client->render_cli($value);
echo '------------'."\r\n";
}
$volumes = $client->get_all_volumes();
foreach($volumes as $value)
{
echo "Volumes: \r\n";
echo $client->render_cli($value);
echo '------------'."\r\n";
}
$floating_ips = $client->get_all_floating_ips();
foreach($floating_ips as $value)
{
echo "Floating Ips: \r\n";
echo $client->render_cli($value);
echo '------------'."\r\n";
}
$ssh_keys = $client->get_all_ssh_keys();
foreach($ssh_keys as $value)
{
echo "SSH Keys: \r\n";
echo $client->render_cli($value);
echo '------------'."\r\n";
}
$server_types = $client->get_all_server_types();
foreach($server_types as $value)
{
echo "Server Types: \r\n";
echo $client->render_cli($value);
echo '------------'."\r\n";
}