line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package VM::HetznerCloud::API::Servers; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# ABSTRACT: Servers |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
# --- |
6
|
|
|
|
|
|
|
# This class is auto-generated by bin/get_hetzner_info.pl |
7
|
|
|
|
|
|
|
# --- |
8
|
|
|
|
|
|
|
|
9
|
4
|
|
|
4
|
|
235239
|
use v5.24; |
|
4
|
|
|
|
|
24
|
|
10
|
|
|
|
|
|
|
|
11
|
4
|
|
|
4
|
|
650
|
use Moo; |
|
4
|
|
|
|
|
12344
|
|
|
4
|
|
|
|
|
30
|
|
12
|
4
|
|
|
4
|
|
3082
|
use Types::Standard qw(:all); |
|
4
|
|
|
|
|
120332
|
|
|
4
|
|
|
|
|
35
|
|
13
|
|
|
|
|
|
|
|
14
|
4
|
|
|
4
|
|
96867
|
use Mojo::Base -strict, -signatures; |
|
4
|
|
|
|
|
166101
|
|
|
4
|
|
|
|
|
34
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
extends 'VM::HetznerCloud::APIBase'; |
17
|
|
|
|
|
|
|
|
18
|
4
|
|
|
4
|
|
5065
|
use utf8; |
|
4
|
|
|
|
|
25
|
|
|
4
|
|
|
|
|
25
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
our $VERSION = '0.0.3'; # VERSION |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
has endpoint => ( is => 'ro', isa => Str, default => sub { 'servers' } ); |
23
|
|
|
|
|
|
|
|
24
|
4
|
|
|
4
|
1
|
20503
|
sub list ($self, %params) { |
|
4
|
|
|
|
|
12
|
|
|
4
|
|
|
|
|
14
|
|
|
4
|
|
|
|
|
7
|
|
25
|
4
|
|
|
|
|
42
|
my $request_params = { |
26
|
|
|
|
|
|
|
'label_selector' => { |
27
|
|
|
|
|
|
|
'in' => 'query', |
28
|
|
|
|
|
|
|
'required' => 0, |
29
|
|
|
|
|
|
|
'validate' => 'string', |
30
|
|
|
|
|
|
|
}, |
31
|
|
|
|
|
|
|
'name' => { |
32
|
|
|
|
|
|
|
'in' => 'query', |
33
|
|
|
|
|
|
|
'required' => 0, |
34
|
|
|
|
|
|
|
'validate' => 'string', |
35
|
|
|
|
|
|
|
}, |
36
|
|
|
|
|
|
|
'sort' => { |
37
|
|
|
|
|
|
|
'in' => 'query', |
38
|
|
|
|
|
|
|
'required' => 0, |
39
|
|
|
|
|
|
|
'validate' => 'string', |
40
|
|
|
|
|
|
|
}, |
41
|
|
|
|
|
|
|
'status' => { |
42
|
|
|
|
|
|
|
'in' => 'query', |
43
|
|
|
|
|
|
|
'required' => 0, |
44
|
|
|
|
|
|
|
'validate' => 'string', |
45
|
|
|
|
|
|
|
}, |
46
|
|
|
|
|
|
|
}; |
47
|
|
|
|
|
|
|
|
48
|
4
|
|
|
|
|
31
|
return $self->_request( '', \%params, $request_params, { type => 'get', oid => '/servers#get' } ); |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
0
|
|
|
0
|
1
|
0
|
sub create ($self, %params) { |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
52
|
0
|
|
|
|
|
0
|
my $request_params = {}; |
53
|
0
|
|
|
|
|
0
|
return $self->_request( '', \%params, $request_params, { type => 'post', oid => '/servers#post' } ); |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
0
|
|
|
0
|
1
|
0
|
sub delete ($self, %params) { |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
57
|
0
|
|
|
|
|
0
|
my $request_params = { |
58
|
|
|
|
|
|
|
'id' => { |
59
|
|
|
|
|
|
|
'in' => 'path', |
60
|
|
|
|
|
|
|
'required' => 1, |
61
|
|
|
|
|
|
|
'validate' => 'int64', |
62
|
|
|
|
|
|
|
}, |
63
|
|
|
|
|
|
|
}; |
64
|
|
|
|
|
|
|
|
65
|
0
|
|
|
|
|
0
|
return $self->_request( '/:id', \%params, $request_params, { type => 'delete', oid => '/servers/{id}#delete' } ); |
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
|
68
|
3
|
|
|
3
|
1
|
11902
|
sub get ($self, %params) { |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
8
|
|
69
|
3
|
|
|
|
|
15
|
my $request_params = { |
70
|
|
|
|
|
|
|
'id' => { |
71
|
|
|
|
|
|
|
'in' => 'path', |
72
|
|
|
|
|
|
|
'required' => 1, |
73
|
|
|
|
|
|
|
'validate' => 'int64', |
74
|
|
|
|
|
|
|
}, |
75
|
|
|
|
|
|
|
}; |
76
|
|
|
|
|
|
|
|
77
|
3
|
|
|
|
|
22
|
return $self->_request( '/:id', \%params, $request_params, { type => 'get', oid => '/servers/{id}#get' } ); |
78
|
|
|
|
|
|
|
} |
79
|
|
|
|
|
|
|
|
80
|
0
|
|
|
0
|
1
|
|
sub put ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
81
|
0
|
|
|
|
|
|
my $request_params = { |
82
|
|
|
|
|
|
|
'id' => { |
83
|
|
|
|
|
|
|
'in' => 'path', |
84
|
|
|
|
|
|
|
'required' => 1, |
85
|
|
|
|
|
|
|
'validate' => 'int64', |
86
|
|
|
|
|
|
|
}, |
87
|
|
|
|
|
|
|
}; |
88
|
|
|
|
|
|
|
|
89
|
0
|
|
|
|
|
|
return $self->_request( '/:id', \%params, $request_params, { type => 'put', oid => '/servers/{id}#put' } ); |
90
|
|
|
|
|
|
|
} |
91
|
|
|
|
|
|
|
|
92
|
0
|
|
|
0
|
1
|
|
sub list_actions ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
93
|
0
|
|
|
|
|
|
my $request_params = { |
94
|
|
|
|
|
|
|
'id' => { |
95
|
|
|
|
|
|
|
'in' => 'path', |
96
|
|
|
|
|
|
|
'required' => 1, |
97
|
|
|
|
|
|
|
'validate' => 'int64', |
98
|
|
|
|
|
|
|
}, |
99
|
|
|
|
|
|
|
'sort' => { |
100
|
|
|
|
|
|
|
'in' => 'query', |
101
|
|
|
|
|
|
|
'required' => 0, |
102
|
|
|
|
|
|
|
'validate' => 'string', |
103
|
|
|
|
|
|
|
}, |
104
|
|
|
|
|
|
|
'status' => { |
105
|
|
|
|
|
|
|
'in' => 'query', |
106
|
|
|
|
|
|
|
'required' => 0, |
107
|
|
|
|
|
|
|
'validate' => 'string', |
108
|
|
|
|
|
|
|
}, |
109
|
|
|
|
|
|
|
}; |
110
|
|
|
|
|
|
|
|
111
|
0
|
|
|
|
|
|
return $self->_request( '/:id/actions', \%params, $request_params, { type => 'get', oid => '/servers/{id}/actions#get' } ); |
112
|
|
|
|
|
|
|
} |
113
|
|
|
|
|
|
|
|
114
|
0
|
|
|
0
|
1
|
|
sub add_to_placement_group ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
115
|
0
|
|
|
|
|
|
my $request_params = { |
116
|
|
|
|
|
|
|
'id' => { |
117
|
|
|
|
|
|
|
'in' => 'path', |
118
|
|
|
|
|
|
|
'required' => 1, |
119
|
|
|
|
|
|
|
'validate' => 'int64', |
120
|
|
|
|
|
|
|
}, |
121
|
|
|
|
|
|
|
}; |
122
|
|
|
|
|
|
|
|
123
|
0
|
|
|
|
|
|
return $self->_request( '/:id/actions/add_to_placement_group', \%params, $request_params, { type => 'post', oid => '/servers/{id}/actions/add_to_placement_group#post' } ); |
124
|
|
|
|
|
|
|
} |
125
|
|
|
|
|
|
|
|
126
|
0
|
|
|
0
|
1
|
|
sub attach_iso ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
127
|
0
|
|
|
|
|
|
my $request_params = { |
128
|
|
|
|
|
|
|
'id' => { |
129
|
|
|
|
|
|
|
'in' => 'path', |
130
|
|
|
|
|
|
|
'required' => 1, |
131
|
|
|
|
|
|
|
'validate' => 'int64', |
132
|
|
|
|
|
|
|
}, |
133
|
|
|
|
|
|
|
}; |
134
|
|
|
|
|
|
|
|
135
|
0
|
|
|
|
|
|
return $self->_request( '/:id/actions/attach_iso', \%params, $request_params, { type => 'post', oid => '/servers/{id}/actions/attach_iso#post' } ); |
136
|
|
|
|
|
|
|
} |
137
|
|
|
|
|
|
|
|
138
|
0
|
|
|
0
|
1
|
|
sub attach_to_network ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
139
|
0
|
|
|
|
|
|
my $request_params = { |
140
|
|
|
|
|
|
|
'id' => { |
141
|
|
|
|
|
|
|
'in' => 'path', |
142
|
|
|
|
|
|
|
'required' => 1, |
143
|
|
|
|
|
|
|
'validate' => 'int64', |
144
|
|
|
|
|
|
|
}, |
145
|
|
|
|
|
|
|
}; |
146
|
|
|
|
|
|
|
|
147
|
0
|
|
|
|
|
|
return $self->_request( '/:id/actions/attach_to_network', \%params, $request_params, { type => 'post', oid => '/servers/{id}/actions/attach_to_network#post' } ); |
148
|
|
|
|
|
|
|
} |
149
|
|
|
|
|
|
|
|
150
|
0
|
|
|
0
|
1
|
|
sub change_alias_ips ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
151
|
0
|
|
|
|
|
|
my $request_params = { |
152
|
|
|
|
|
|
|
'id' => { |
153
|
|
|
|
|
|
|
'in' => 'path', |
154
|
|
|
|
|
|
|
'required' => 1, |
155
|
|
|
|
|
|
|
'validate' => 'int64', |
156
|
|
|
|
|
|
|
}, |
157
|
|
|
|
|
|
|
}; |
158
|
|
|
|
|
|
|
|
159
|
0
|
|
|
|
|
|
return $self->_request( '/:id/actions/change_alias_ips', \%params, $request_params, { type => 'post', oid => '/servers/{id}/actions/change_alias_ips#post' } ); |
160
|
|
|
|
|
|
|
} |
161
|
|
|
|
|
|
|
|
162
|
0
|
|
|
0
|
1
|
|
sub change_dns_ptr ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
163
|
0
|
|
|
|
|
|
my $request_params = { |
164
|
|
|
|
|
|
|
'id' => { |
165
|
|
|
|
|
|
|
'in' => 'path', |
166
|
|
|
|
|
|
|
'required' => 1, |
167
|
|
|
|
|
|
|
'validate' => 'int64', |
168
|
|
|
|
|
|
|
}, |
169
|
|
|
|
|
|
|
}; |
170
|
|
|
|
|
|
|
|
171
|
0
|
|
|
|
|
|
return $self->_request( '/:id/actions/change_dns_ptr', \%params, $request_params, { type => 'post', oid => '/servers/{id}/actions/change_dns_ptr#post' } ); |
172
|
|
|
|
|
|
|
} |
173
|
|
|
|
|
|
|
|
174
|
0
|
|
|
0
|
1
|
|
sub change_protection ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
175
|
0
|
|
|
|
|
|
my $request_params = { |
176
|
|
|
|
|
|
|
'id' => { |
177
|
|
|
|
|
|
|
'in' => 'path', |
178
|
|
|
|
|
|
|
'required' => 1, |
179
|
|
|
|
|
|
|
'validate' => 'int64', |
180
|
|
|
|
|
|
|
}, |
181
|
|
|
|
|
|
|
}; |
182
|
|
|
|
|
|
|
|
183
|
0
|
|
|
|
|
|
return $self->_request( '/:id/actions/change_protection', \%params, $request_params, { type => 'post', oid => '/servers/{id}/actions/change_protection#post' } ); |
184
|
|
|
|
|
|
|
} |
185
|
|
|
|
|
|
|
|
186
|
0
|
|
|
0
|
1
|
|
sub change_type ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
187
|
0
|
|
|
|
|
|
my $request_params = { |
188
|
|
|
|
|
|
|
'id' => { |
189
|
|
|
|
|
|
|
'in' => 'path', |
190
|
|
|
|
|
|
|
'required' => 1, |
191
|
|
|
|
|
|
|
'validate' => 'int64', |
192
|
|
|
|
|
|
|
}, |
193
|
|
|
|
|
|
|
}; |
194
|
|
|
|
|
|
|
|
195
|
0
|
|
|
|
|
|
return $self->_request( '/:id/actions/change_type', \%params, $request_params, { type => 'post', oid => '/servers/{id}/actions/change_type#post' } ); |
196
|
|
|
|
|
|
|
} |
197
|
|
|
|
|
|
|
|
198
|
0
|
|
|
0
|
1
|
|
sub create_image ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
199
|
0
|
|
|
|
|
|
my $request_params = { |
200
|
|
|
|
|
|
|
'id' => { |
201
|
|
|
|
|
|
|
'in' => 'path', |
202
|
|
|
|
|
|
|
'required' => 1, |
203
|
|
|
|
|
|
|
'validate' => 'int64', |
204
|
|
|
|
|
|
|
}, |
205
|
|
|
|
|
|
|
}; |
206
|
|
|
|
|
|
|
|
207
|
0
|
|
|
|
|
|
return $self->_request( '/:id/actions/create_image', \%params, $request_params, { type => 'post', oid => '/servers/{id}/actions/create_image#post' } ); |
208
|
|
|
|
|
|
|
} |
209
|
|
|
|
|
|
|
|
210
|
0
|
|
|
0
|
1
|
|
sub detach_from_network ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
211
|
0
|
|
|
|
|
|
my $request_params = { |
212
|
|
|
|
|
|
|
'id' => { |
213
|
|
|
|
|
|
|
'in' => 'path', |
214
|
|
|
|
|
|
|
'required' => 1, |
215
|
|
|
|
|
|
|
'validate' => 'int64', |
216
|
|
|
|
|
|
|
}, |
217
|
|
|
|
|
|
|
}; |
218
|
|
|
|
|
|
|
|
219
|
0
|
|
|
|
|
|
return $self->_request( '/:id/actions/detach_from_network', \%params, $request_params, { type => 'post', oid => '/servers/{id}/actions/detach_from_network#post' } ); |
220
|
|
|
|
|
|
|
} |
221
|
|
|
|
|
|
|
|
222
|
0
|
|
|
0
|
1
|
|
sub detach_iso ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
223
|
0
|
|
|
|
|
|
my $request_params = { |
224
|
|
|
|
|
|
|
'id' => { |
225
|
|
|
|
|
|
|
'in' => 'path', |
226
|
|
|
|
|
|
|
'required' => 1, |
227
|
|
|
|
|
|
|
'validate' => 'int64', |
228
|
|
|
|
|
|
|
}, |
229
|
|
|
|
|
|
|
}; |
230
|
|
|
|
|
|
|
|
231
|
0
|
|
|
|
|
|
return $self->_request( '/:id/actions/detach_iso', \%params, $request_params, { type => 'post', oid => '/servers/{id}/actions/detach_iso#post' } ); |
232
|
|
|
|
|
|
|
} |
233
|
|
|
|
|
|
|
|
234
|
0
|
|
|
0
|
1
|
|
sub disable_backup ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
235
|
0
|
|
|
|
|
|
my $request_params = { |
236
|
|
|
|
|
|
|
'id' => { |
237
|
|
|
|
|
|
|
'in' => 'path', |
238
|
|
|
|
|
|
|
'required' => 1, |
239
|
|
|
|
|
|
|
'validate' => 'int64', |
240
|
|
|
|
|
|
|
}, |
241
|
|
|
|
|
|
|
}; |
242
|
|
|
|
|
|
|
|
243
|
0
|
|
|
|
|
|
return $self->_request( '/:id/actions/disable_backup', \%params, $request_params, { type => 'post', oid => '/servers/{id}/actions/disable_backup#post' } ); |
244
|
|
|
|
|
|
|
} |
245
|
|
|
|
|
|
|
|
246
|
0
|
|
|
0
|
1
|
|
sub disable_rescue ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
247
|
0
|
|
|
|
|
|
my $request_params = { |
248
|
|
|
|
|
|
|
'id' => { |
249
|
|
|
|
|
|
|
'in' => 'path', |
250
|
|
|
|
|
|
|
'required' => 1, |
251
|
|
|
|
|
|
|
'validate' => 'int64', |
252
|
|
|
|
|
|
|
}, |
253
|
|
|
|
|
|
|
}; |
254
|
|
|
|
|
|
|
|
255
|
0
|
|
|
|
|
|
return $self->_request( '/:id/actions/disable_rescue', \%params, $request_params, { type => 'post', oid => '/servers/{id}/actions/disable_rescue#post' } ); |
256
|
|
|
|
|
|
|
} |
257
|
|
|
|
|
|
|
|
258
|
0
|
|
|
0
|
1
|
|
sub enable_backup ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
259
|
0
|
|
|
|
|
|
my $request_params = { |
260
|
|
|
|
|
|
|
'id' => { |
261
|
|
|
|
|
|
|
'in' => 'path', |
262
|
|
|
|
|
|
|
'required' => 1, |
263
|
|
|
|
|
|
|
'validate' => 'int64', |
264
|
|
|
|
|
|
|
}, |
265
|
|
|
|
|
|
|
}; |
266
|
|
|
|
|
|
|
|
267
|
0
|
|
|
|
|
|
return $self->_request( '/:id/actions/enable_backup', \%params, $request_params, { type => 'post', oid => '/servers/{id}/actions/enable_backup#post' } ); |
268
|
|
|
|
|
|
|
} |
269
|
|
|
|
|
|
|
|
270
|
0
|
|
|
0
|
1
|
|
sub enable_rescue ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
271
|
0
|
|
|
|
|
|
my $request_params = { |
272
|
|
|
|
|
|
|
'id' => { |
273
|
|
|
|
|
|
|
'in' => 'path', |
274
|
|
|
|
|
|
|
'required' => 1, |
275
|
|
|
|
|
|
|
'validate' => 'int64', |
276
|
|
|
|
|
|
|
}, |
277
|
|
|
|
|
|
|
}; |
278
|
|
|
|
|
|
|
|
279
|
0
|
|
|
|
|
|
return $self->_request( '/:id/actions/enable_rescue', \%params, $request_params, { type => 'post', oid => '/servers/{id}/actions/enable_rescue#post' } ); |
280
|
|
|
|
|
|
|
} |
281
|
|
|
|
|
|
|
|
282
|
0
|
|
|
0
|
1
|
|
sub poweroff ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
283
|
0
|
|
|
|
|
|
my $request_params = { |
284
|
|
|
|
|
|
|
'id' => { |
285
|
|
|
|
|
|
|
'in' => 'path', |
286
|
|
|
|
|
|
|
'required' => 1, |
287
|
|
|
|
|
|
|
'validate' => 'int64', |
288
|
|
|
|
|
|
|
}, |
289
|
|
|
|
|
|
|
}; |
290
|
|
|
|
|
|
|
|
291
|
0
|
|
|
|
|
|
return $self->_request( '/:id/actions/poweroff', \%params, $request_params, { type => 'post', oid => '/servers/{id}/actions/poweroff#post' } ); |
292
|
|
|
|
|
|
|
} |
293
|
|
|
|
|
|
|
|
294
|
0
|
|
|
0
|
1
|
|
sub poweron ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
295
|
0
|
|
|
|
|
|
my $request_params = { |
296
|
|
|
|
|
|
|
'id' => { |
297
|
|
|
|
|
|
|
'in' => 'path', |
298
|
|
|
|
|
|
|
'required' => 1, |
299
|
|
|
|
|
|
|
'validate' => 'int64', |
300
|
|
|
|
|
|
|
}, |
301
|
|
|
|
|
|
|
}; |
302
|
|
|
|
|
|
|
|
303
|
0
|
|
|
|
|
|
return $self->_request( '/:id/actions/poweron', \%params, $request_params, { type => 'post', oid => '/servers/{id}/actions/poweron#post' } ); |
304
|
|
|
|
|
|
|
} |
305
|
|
|
|
|
|
|
|
306
|
0
|
|
|
0
|
1
|
|
sub reboot ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
307
|
0
|
|
|
|
|
|
my $request_params = { |
308
|
|
|
|
|
|
|
'id' => { |
309
|
|
|
|
|
|
|
'in' => 'path', |
310
|
|
|
|
|
|
|
'required' => 1, |
311
|
|
|
|
|
|
|
'validate' => 'int64', |
312
|
|
|
|
|
|
|
}, |
313
|
|
|
|
|
|
|
}; |
314
|
|
|
|
|
|
|
|
315
|
0
|
|
|
|
|
|
return $self->_request( '/:id/actions/reboot', \%params, $request_params, { type => 'post', oid => '/servers/{id}/actions/reboot#post' } ); |
316
|
|
|
|
|
|
|
} |
317
|
|
|
|
|
|
|
|
318
|
0
|
|
|
0
|
1
|
|
sub rebuild ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
319
|
0
|
|
|
|
|
|
my $request_params = { |
320
|
|
|
|
|
|
|
'id' => { |
321
|
|
|
|
|
|
|
'in' => 'path', |
322
|
|
|
|
|
|
|
'required' => 1, |
323
|
|
|
|
|
|
|
'validate' => 'int64', |
324
|
|
|
|
|
|
|
}, |
325
|
|
|
|
|
|
|
}; |
326
|
|
|
|
|
|
|
|
327
|
0
|
|
|
|
|
|
return $self->_request( '/:id/actions/rebuild', \%params, $request_params, { type => 'post', oid => '/servers/{id}/actions/rebuild#post' } ); |
328
|
|
|
|
|
|
|
} |
329
|
|
|
|
|
|
|
|
330
|
0
|
|
|
0
|
1
|
|
sub remove_from_placement_group ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
331
|
0
|
|
|
|
|
|
my $request_params = { |
332
|
|
|
|
|
|
|
'id' => { |
333
|
|
|
|
|
|
|
'in' => 'path', |
334
|
|
|
|
|
|
|
'required' => 1, |
335
|
|
|
|
|
|
|
'validate' => 'int64', |
336
|
|
|
|
|
|
|
}, |
337
|
|
|
|
|
|
|
}; |
338
|
|
|
|
|
|
|
|
339
|
0
|
|
|
|
|
|
return $self->_request( '/:id/actions/remove_from_placement_group', \%params, $request_params, { type => 'post', oid => '/servers/{id}/actions/remove_from_placement_group#post' } ); |
340
|
|
|
|
|
|
|
} |
341
|
|
|
|
|
|
|
|
342
|
0
|
|
|
0
|
1
|
|
sub request_console ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
343
|
0
|
|
|
|
|
|
my $request_params = { |
344
|
|
|
|
|
|
|
'id' => { |
345
|
|
|
|
|
|
|
'in' => 'path', |
346
|
|
|
|
|
|
|
'required' => 1, |
347
|
|
|
|
|
|
|
'validate' => 'int64', |
348
|
|
|
|
|
|
|
}, |
349
|
|
|
|
|
|
|
}; |
350
|
|
|
|
|
|
|
|
351
|
0
|
|
|
|
|
|
return $self->_request( '/:id/actions/request_console', \%params, $request_params, { type => 'post', oid => '/servers/{id}/actions/request_console#post' } ); |
352
|
|
|
|
|
|
|
} |
353
|
|
|
|
|
|
|
|
354
|
0
|
|
|
0
|
1
|
|
sub reset ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
355
|
0
|
|
|
|
|
|
my $request_params = { |
356
|
|
|
|
|
|
|
'id' => { |
357
|
|
|
|
|
|
|
'in' => 'path', |
358
|
|
|
|
|
|
|
'required' => 1, |
359
|
|
|
|
|
|
|
'validate' => 'int64', |
360
|
|
|
|
|
|
|
}, |
361
|
|
|
|
|
|
|
}; |
362
|
|
|
|
|
|
|
|
363
|
0
|
|
|
|
|
|
return $self->_request( '/:id/actions/reset', \%params, $request_params, { type => 'post', oid => '/servers/{id}/actions/reset#post' } ); |
364
|
|
|
|
|
|
|
} |
365
|
|
|
|
|
|
|
|
366
|
0
|
|
|
0
|
1
|
|
sub reset_password ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
367
|
0
|
|
|
|
|
|
my $request_params = { |
368
|
|
|
|
|
|
|
'id' => { |
369
|
|
|
|
|
|
|
'in' => 'path', |
370
|
|
|
|
|
|
|
'required' => 1, |
371
|
|
|
|
|
|
|
'validate' => 'int64', |
372
|
|
|
|
|
|
|
}, |
373
|
|
|
|
|
|
|
}; |
374
|
|
|
|
|
|
|
|
375
|
0
|
|
|
|
|
|
return $self->_request( '/:id/actions/reset_password', \%params, $request_params, { type => 'post', oid => '/servers/{id}/actions/reset_password#post' } ); |
376
|
|
|
|
|
|
|
} |
377
|
|
|
|
|
|
|
|
378
|
0
|
|
|
0
|
1
|
|
sub shutdown ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
379
|
0
|
|
|
|
|
|
my $request_params = { |
380
|
|
|
|
|
|
|
'id' => { |
381
|
|
|
|
|
|
|
'in' => 'path', |
382
|
|
|
|
|
|
|
'required' => 1, |
383
|
|
|
|
|
|
|
'validate' => 'int64', |
384
|
|
|
|
|
|
|
}, |
385
|
|
|
|
|
|
|
}; |
386
|
|
|
|
|
|
|
|
387
|
0
|
|
|
|
|
|
return $self->_request( '/:id/actions/shutdown', \%params, $request_params, { type => 'post', oid => '/servers/{id}/actions/shutdown#post' } ); |
388
|
|
|
|
|
|
|
} |
389
|
|
|
|
|
|
|
|
390
|
0
|
|
|
0
|
1
|
|
sub get_actions ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
391
|
0
|
|
|
|
|
|
my $request_params = { |
392
|
|
|
|
|
|
|
'action_id' => { |
393
|
|
|
|
|
|
|
'in' => 'path', |
394
|
|
|
|
|
|
|
'required' => 1, |
395
|
|
|
|
|
|
|
'validate' => 'int64', |
396
|
|
|
|
|
|
|
}, |
397
|
|
|
|
|
|
|
'id' => { |
398
|
|
|
|
|
|
|
'in' => 'path', |
399
|
|
|
|
|
|
|
'required' => 1, |
400
|
|
|
|
|
|
|
'validate' => 'int64', |
401
|
|
|
|
|
|
|
}, |
402
|
|
|
|
|
|
|
}; |
403
|
|
|
|
|
|
|
|
404
|
0
|
|
|
|
|
|
return $self->_request( '/:id/actions/:action_id', \%params, $request_params, { type => 'get', oid => '/servers/{id}/actions/{action_id}#get' } ); |
405
|
|
|
|
|
|
|
} |
406
|
|
|
|
|
|
|
|
407
|
0
|
|
|
0
|
1
|
|
sub list_metrics ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
408
|
0
|
|
|
|
|
|
my $request_params = { |
409
|
|
|
|
|
|
|
'end' => { |
410
|
|
|
|
|
|
|
'in' => 'query', |
411
|
|
|
|
|
|
|
'required' => 1, |
412
|
|
|
|
|
|
|
'validate' => 'string', |
413
|
|
|
|
|
|
|
}, |
414
|
|
|
|
|
|
|
'id' => { |
415
|
|
|
|
|
|
|
'in' => 'path', |
416
|
|
|
|
|
|
|
'required' => 1, |
417
|
|
|
|
|
|
|
'validate' => 'int64', |
418
|
|
|
|
|
|
|
}, |
419
|
|
|
|
|
|
|
'start' => { |
420
|
|
|
|
|
|
|
'in' => 'query', |
421
|
|
|
|
|
|
|
'required' => 1, |
422
|
|
|
|
|
|
|
'validate' => 'string', |
423
|
|
|
|
|
|
|
}, |
424
|
|
|
|
|
|
|
'step' => { |
425
|
|
|
|
|
|
|
'in' => 'query', |
426
|
|
|
|
|
|
|
'required' => 0, |
427
|
|
|
|
|
|
|
'validate' => 'string', |
428
|
|
|
|
|
|
|
}, |
429
|
|
|
|
|
|
|
'type' => { |
430
|
|
|
|
|
|
|
'in' => 'query', |
431
|
|
|
|
|
|
|
'required' => 1, |
432
|
|
|
|
|
|
|
'validate' => 'string', |
433
|
|
|
|
|
|
|
}, |
434
|
|
|
|
|
|
|
}; |
435
|
|
|
|
|
|
|
|
436
|
0
|
|
|
|
|
|
return $self->_request( '/:id/metrics', \%params, $request_params, { type => 'get', oid => '/servers/{id}/metrics#get' } ); |
437
|
|
|
|
|
|
|
} |
438
|
|
|
|
|
|
|
|
439
|
|
|
|
|
|
|
|
440
|
|
|
|
|
|
|
1; |
441
|
|
|
|
|
|
|
|
442
|
|
|
|
|
|
|
__END__ |