|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
//---------------------------------------------------------------------- |
|
4
|
|
|
// |
|
5
|
|
|
// Copyright (C) 2015-2017 Artem Rodygin |
|
6
|
|
|
// |
|
7
|
|
|
// This file is part of Linode API Client Library for PHP. |
|
8
|
|
|
// |
|
9
|
|
|
// You should have received a copy of the MIT License along with |
|
10
|
|
|
// the library. If not, see <http://opensource.org/licenses/MIT>. |
|
11
|
|
|
// |
|
12
|
|
|
//---------------------------------------------------------------------- |
|
13
|
|
|
|
|
14
|
|
|
namespace Linode; |
|
15
|
|
|
|
|
16
|
|
|
/** |
|
17
|
|
|
* This class is autogenerated. |
|
18
|
|
|
* |
|
19
|
|
|
* @version Linode API v3.3 |
|
20
|
|
|
*/ |
|
21
|
|
|
class AvailApi extends BaseLinodeApi |
|
22
|
|
|
{ |
|
23
|
|
|
/** |
|
24
|
|
|
* Returns a list of Linode data center facilities. |
|
25
|
|
|
* |
|
26
|
|
|
* @return array |
|
27
|
|
|
*/ |
|
28
|
1 |
|
public function dataCenters() |
|
29
|
|
|
{ |
|
30
|
1 |
|
return $this->call('avail.datacenters'); |
|
|
|
|
|
|
31
|
|
|
} |
|
32
|
|
|
|
|
33
|
|
|
/** |
|
34
|
|
|
* Returns a list of available Linux Distributions. |
|
35
|
|
|
* |
|
36
|
|
|
* @param int $DistributionID [optional] Limits the results to the specified DistributionID |
|
37
|
|
|
* |
|
38
|
|
|
* @return array |
|
39
|
|
|
*/ |
|
40
|
1 |
|
public function distributions($DistributionID = null) |
|
41
|
|
|
{ |
|
42
|
1 |
|
return $this->call('avail.distributions', [ |
|
|
|
|
|
|
43
|
1 |
|
'DistributionID' => $DistributionID, |
|
44
|
|
|
]); |
|
45
|
|
|
} |
|
46
|
|
|
|
|
47
|
|
|
/** |
|
48
|
|
|
* List available kernels. |
|
49
|
|
|
* |
|
50
|
|
|
* @param bool $isXen [optional] Show or hide Xen compatible kernels |
|
51
|
|
|
* @param bool $isKVM [optional] Show or hide KVM compatible kernels |
|
52
|
|
|
* |
|
53
|
|
|
* @return array |
|
54
|
|
|
*/ |
|
55
|
1 |
|
public function kernels($isXen = null, $isKVM = null) |
|
56
|
|
|
{ |
|
57
|
1 |
|
return $this->call('avail.kernels', [ |
|
|
|
|
|
|
58
|
1 |
|
'isXen' => $isXen, |
|
59
|
1 |
|
'isKVM' => $isKVM, |
|
60
|
|
|
]); |
|
61
|
|
|
} |
|
62
|
|
|
|
|
63
|
|
|
/** |
|
64
|
|
|
* Returns a structure of Linode PlanIDs containing the Plan label and the availability in each |
|
65
|
|
|
* Datacenter. |
|
66
|
|
|
* |
|
67
|
|
|
* @param int $PlanID [optional] Limits the list to the specified PlanID |
|
68
|
|
|
* |
|
69
|
|
|
* @return array |
|
70
|
|
|
*/ |
|
71
|
1 |
|
public function linodePlans($PlanID = null) |
|
72
|
|
|
{ |
|
73
|
1 |
|
return $this->call('avail.linodeplans', [ |
|
|
|
|
|
|
74
|
1 |
|
'PlanID' => $PlanID, |
|
75
|
|
|
]); |
|
76
|
|
|
} |
|
77
|
|
|
|
|
78
|
|
|
/** |
|
79
|
|
|
* Returns NodeBalancer pricing information. |
|
80
|
|
|
* |
|
81
|
|
|
* @return array |
|
82
|
|
|
*/ |
|
83
|
1 |
|
public function nodeBalancers() |
|
84
|
|
|
{ |
|
85
|
1 |
|
return $this->call('avail.nodebalancers'); |
|
|
|
|
|
|
86
|
|
|
} |
|
87
|
|
|
|
|
88
|
|
|
/** |
|
89
|
|
|
* Returns a list of available public StackScripts. |
|
90
|
|
|
* |
|
91
|
|
|
* @param int $DistributionID [optional] Limit the results to StackScripts that can be applied to this DistributionID |
|
92
|
|
|
* @param string $DistributionVendor [optional] Debian, Ubuntu, Fedora, etc. |
|
93
|
|
|
* @param string $keywords [optional] Search terms |
|
94
|
|
|
* |
|
95
|
|
|
* @return array |
|
96
|
|
|
*/ |
|
97
|
1 |
|
public function stackScripts($DistributionID = null, $DistributionVendor = null, $keywords = null) |
|
98
|
|
|
{ |
|
99
|
1 |
|
return $this->call('avail.stackscripts', [ |
|
|
|
|
|
|
100
|
1 |
|
'DistributionID' => $DistributionID, |
|
101
|
1 |
|
'DistributionVendor' => $DistributionVendor, |
|
102
|
1 |
|
'keywords' => $keywords, |
|
103
|
|
|
]); |
|
104
|
|
|
} |
|
105
|
|
|
} |
|
106
|
|
|
|