root / lib / rpc_defs.py @ 2bbf280e
History | View | Annotate | Download (22.4 kB)
1 | d5a2a550 | Michael Hanselmann | #
|
---|---|---|---|
2 | d5a2a550 | Michael Hanselmann | #
|
3 | d5a2a550 | Michael Hanselmann | |
4 | cad0723b | Iustin Pop | # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Google Inc.
|
5 | d5a2a550 | Michael Hanselmann | #
|
6 | d5a2a550 | Michael Hanselmann | # This program is free software; you can redistribute it and/or modify
|
7 | d5a2a550 | Michael Hanselmann | # it under the terms of the GNU General Public License as published by
|
8 | d5a2a550 | Michael Hanselmann | # the Free Software Foundation; either version 2 of the License, or
|
9 | d5a2a550 | Michael Hanselmann | # (at your option) any later version.
|
10 | d5a2a550 | Michael Hanselmann | #
|
11 | d5a2a550 | Michael Hanselmann | # This program is distributed in the hope that it will be useful, but
|
12 | d5a2a550 | Michael Hanselmann | # WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 | d5a2a550 | Michael Hanselmann | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14 | d5a2a550 | Michael Hanselmann | # General Public License for more details.
|
15 | d5a2a550 | Michael Hanselmann | #
|
16 | d5a2a550 | Michael Hanselmann | # You should have received a copy of the GNU General Public License
|
17 | d5a2a550 | Michael Hanselmann | # along with this program; if not, write to the Free Software
|
18 | d5a2a550 | Michael Hanselmann | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
19 | d5a2a550 | Michael Hanselmann | # 02110-1301, USA.
|
20 | d5a2a550 | Michael Hanselmann | |
21 | d5a2a550 | Michael Hanselmann | """RPC definitions for communication between master and node daemons.
|
22 | d5a2a550 | Michael Hanselmann |
|
23 | 033684dd | Michael Hanselmann | RPC definition fields:
|
24 | 033684dd | Michael Hanselmann |
|
25 | 033684dd | Michael Hanselmann | - Name as string
|
26 | 033684dd | Michael Hanselmann | - L{SINGLE} for single-node calls, L{MULTI} for multi-node
|
27 | dd6d2d09 | Michael Hanselmann | - Name resolver option(s), can be callable receiving all arguments in a tuple
|
28 | 2ff587d4 | Agata Murawska | - Timeout (e.g. L{constants.RPC_TMO_NORMAL}), or callback receiving all
|
29 | 2ff587d4 | Agata Murawska | arguments in a tuple to calculate timeout
|
30 | 033684dd | Michael Hanselmann | - List of arguments as tuples
|
31 | 033684dd | Michael Hanselmann |
|
32 | 033684dd | Michael Hanselmann | - Name as string
|
33 | cd40dc53 | Michael Hanselmann | - Argument kind used for encoding/decoding
|
34 | 033684dd | Michael Hanselmann | - Description for docstring (can be C{None})
|
35 | 033684dd | Michael Hanselmann |
|
36 | 60154921 | Iustin Pop | - Custom body encoder (e.g. for preparing per-node bodies)
|
37 | 033684dd | Michael Hanselmann | - Return value wrapper (e.g. for deserializing into L{objects}-based objects)
|
38 | 033684dd | Michael Hanselmann | - Short call description for docstring
|
39 | 033684dd | Michael Hanselmann |
|
40 | d5a2a550 | Michael Hanselmann | """
|
41 | d5a2a550 | Michael Hanselmann | |
42 | 2ff587d4 | Agata Murawska | from ganeti import constants |
43 | a09f9847 | Michael Hanselmann | from ganeti import utils |
44 | 26d502d0 | Michael Hanselmann | from ganeti import objects |
45 | a09f9847 | Michael Hanselmann | |
46 | d5a2a550 | Michael Hanselmann | |
47 | 0d1e78dd | Michael Hanselmann | # Guidelines for choosing timeouts:
|
48 | 2ff587d4 | Agata Murawska | # - call used during watcher: timeout of 1min, constants.RPC_TMO_URGENT
|
49 | 2ff587d4 | Agata Murawska | # - trivial (but be sure it is trivial)
|
50 | 2ff587d4 | Agata Murawska | # (e.g. reading a file): 5min, constants.RPC_TMO_FAST
|
51 | 2ff587d4 | Agata Murawska | # - other calls: 15 min, constants.RPC_TMO_NORMAL
|
52 | 2ff587d4 | Agata Murawska | # - special calls (instance add, etc.):
|
53 | 2ff587d4 | Agata Murawska | # either constants.RPC_TMO_SLOW (1h) or huge timeouts
|
54 | d5a2a550 | Michael Hanselmann | |
55 | d5a2a550 | Michael Hanselmann | SINGLE = "single-node"
|
56 | d5a2a550 | Michael Hanselmann | MULTI = "multi-node"
|
57 | d5a2a550 | Michael Hanselmann | |
58 | 890ea4ce | Michael Hanselmann | ACCEPT_OFFLINE_NODE = object()
|
59 | 890ea4ce | Michael Hanselmann | |
60 | cd40dc53 | Michael Hanselmann | # Constants for encoding/decoding
|
61 | cd40dc53 | Michael Hanselmann | (ED_OBJECT_DICT, |
62 | cd40dc53 | Michael Hanselmann | ED_OBJECT_DICT_LIST, |
63 | cd40dc53 | Michael Hanselmann | ED_INST_DICT, |
64 | cd40dc53 | Michael Hanselmann | ED_INST_DICT_HVP_BEP, |
65 | cd40dc53 | Michael Hanselmann | ED_NODE_TO_DISK_DICT, |
66 | b8291e00 | René Nussbaumer | ED_INST_DICT_OSP_DP, |
67 | cd40dc53 | Michael Hanselmann | ED_IMPEXP_IO, |
68 | cd40dc53 | Michael Hanselmann | ED_FILE_DETAILS, |
69 | cd40dc53 | Michael Hanselmann | ED_FINALIZE_EXPORT_DISKS, |
70 | cd40dc53 | Michael Hanselmann | ED_COMPRESS, |
71 | aedf5fd7 | René Nussbaumer | ED_BLOCKDEV_RENAME, |
72 | aedf5fd7 | René Nussbaumer | ED_DISKS_DICT_DP, |
73 | aedf5fd7 | René Nussbaumer | ED_SINGLE_DISK_DICT_DP) = range(1, 14) |
74 | d565f83f | Michael Hanselmann | |
75 | a09f9847 | Michael Hanselmann | |
76 | a09f9847 | Michael Hanselmann | def _Prepare(calls): |
77 | a09f9847 | Michael Hanselmann | """Converts list of calls to dictionary.
|
78 | a09f9847 | Michael Hanselmann |
|
79 | a09f9847 | Michael Hanselmann | """
|
80 | a09f9847 | Michael Hanselmann | return utils.SequenceToDict(calls)
|
81 | a09f9847 | Michael Hanselmann | |
82 | a09f9847 | Michael Hanselmann | |
83 | 26d502d0 | Michael Hanselmann | def _MigrationStatusPostProc(result): |
84 | 26d502d0 | Michael Hanselmann | """Post-processor for L{rpc.RpcRunner.call_instance_get_migration_status}.
|
85 | 26d502d0 | Michael Hanselmann |
|
86 | 26d502d0 | Michael Hanselmann | """
|
87 | 26d502d0 | Michael Hanselmann | if not result.fail_msg and result.payload is not None: |
88 | 26d502d0 | Michael Hanselmann | result.payload = objects.MigrationStatus.FromDict(result.payload) |
89 | 26d502d0 | Michael Hanselmann | return result
|
90 | 26d502d0 | Michael Hanselmann | |
91 | 26d502d0 | Michael Hanselmann | |
92 | 26d502d0 | Michael Hanselmann | def _BlockdevFindPostProc(result): |
93 | 26d502d0 | Michael Hanselmann | """Post-processor for L{rpc.RpcRunner.call_blockdev_find}.
|
94 | 26d502d0 | Michael Hanselmann |
|
95 | 26d502d0 | Michael Hanselmann | """
|
96 | 26d502d0 | Michael Hanselmann | if not result.fail_msg and result.payload is not None: |
97 | 26d502d0 | Michael Hanselmann | result.payload = objects.BlockDevStatus.FromDict(result.payload) |
98 | 26d502d0 | Michael Hanselmann | return result
|
99 | 26d502d0 | Michael Hanselmann | |
100 | 26d502d0 | Michael Hanselmann | |
101 | 26d502d0 | Michael Hanselmann | def _BlockdevGetMirrorStatusPostProc(result): |
102 | 26d502d0 | Michael Hanselmann | """Post-processor for L{rpc.RpcRunner.call_blockdev_getmirrorstatus}.
|
103 | 26d502d0 | Michael Hanselmann |
|
104 | 26d502d0 | Michael Hanselmann | """
|
105 | 26d502d0 | Michael Hanselmann | if not result.fail_msg: |
106 | 26d502d0 | Michael Hanselmann | result.payload = map(objects.BlockDevStatus.FromDict, result.payload)
|
107 | 26d502d0 | Michael Hanselmann | return result
|
108 | 26d502d0 | Michael Hanselmann | |
109 | 26d502d0 | Michael Hanselmann | |
110 | 5449685e | Iustin Pop | def _BlockdevGetMirrorStatusMultiPreProc(node, args): |
111 | 5449685e | Iustin Pop | """Prepares the appropriate node values for blockdev_getmirrorstatus_multi.
|
112 | 5449685e | Iustin Pop |
|
113 | 5449685e | Iustin Pop | """
|
114 | 5449685e | Iustin Pop | # there should be only one argument to this RPC, already holding a
|
115 | 5449685e | Iustin Pop | # node->disks dictionary, we just need to extract the value for the
|
116 | 5449685e | Iustin Pop | # current node
|
117 | 5449685e | Iustin Pop | assert len(args) == 1 |
118 | 5449685e | Iustin Pop | return [args[0][node]] |
119 | 5449685e | Iustin Pop | |
120 | 5449685e | Iustin Pop | |
121 | 26d502d0 | Michael Hanselmann | def _BlockdevGetMirrorStatusMultiPostProc(result): |
122 | 26d502d0 | Michael Hanselmann | """Post-processor for L{rpc.RpcRunner.call_blockdev_getmirrorstatus_multi}.
|
123 | 26d502d0 | Michael Hanselmann |
|
124 | 26d502d0 | Michael Hanselmann | """
|
125 | 82cce526 | Michael Hanselmann | if not result.fail_msg: |
126 | 82cce526 | Michael Hanselmann | for idx, (success, status) in enumerate(result.payload): |
127 | 26d502d0 | Michael Hanselmann | if success:
|
128 | 82cce526 | Michael Hanselmann | result.payload[idx] = (success, objects.BlockDevStatus.FromDict(status)) |
129 | 26d502d0 | Michael Hanselmann | |
130 | 26d502d0 | Michael Hanselmann | return result
|
131 | 26d502d0 | Michael Hanselmann | |
132 | 26d502d0 | Michael Hanselmann | |
133 | 26d502d0 | Michael Hanselmann | def _OsGetPostProc(result): |
134 | 26d502d0 | Michael Hanselmann | """Post-processor for L{rpc.RpcRunner.call_os_get}.
|
135 | 26d502d0 | Michael Hanselmann |
|
136 | 26d502d0 | Michael Hanselmann | """
|
137 | 26d502d0 | Michael Hanselmann | if not result.fail_msg and isinstance(result.payload, dict): |
138 | 26d502d0 | Michael Hanselmann | result.payload = objects.OS.FromDict(result.payload) |
139 | 26d502d0 | Michael Hanselmann | return result
|
140 | 26d502d0 | Michael Hanselmann | |
141 | 26d502d0 | Michael Hanselmann | |
142 | 26d502d0 | Michael Hanselmann | def _ImpExpStatusPostProc(result): |
143 | 26d502d0 | Michael Hanselmann | """Post-processor for import/export status.
|
144 | 26d502d0 | Michael Hanselmann |
|
145 | 26d502d0 | Michael Hanselmann | @rtype: Payload containing list of L{objects.ImportExportStatus} instances
|
146 | 26d502d0 | Michael Hanselmann | @return: Returns a list of the state of each named import/export or None if
|
147 | 26d502d0 | Michael Hanselmann | a status couldn't be retrieved
|
148 | 26d502d0 | Michael Hanselmann |
|
149 | 26d502d0 | Michael Hanselmann | """
|
150 | 26d502d0 | Michael Hanselmann | if not result.fail_msg: |
151 | 26d502d0 | Michael Hanselmann | decoded = [] |
152 | 26d502d0 | Michael Hanselmann | |
153 | 26d502d0 | Michael Hanselmann | for i in result.payload: |
154 | 26d502d0 | Michael Hanselmann | if i is None: |
155 | 26d502d0 | Michael Hanselmann | decoded.append(None)
|
156 | 26d502d0 | Michael Hanselmann | continue
|
157 | 26d502d0 | Michael Hanselmann | decoded.append(objects.ImportExportStatus.FromDict(i)) |
158 | 26d502d0 | Michael Hanselmann | |
159 | 26d502d0 | Michael Hanselmann | result.payload = decoded |
160 | 26d502d0 | Michael Hanselmann | |
161 | 26d502d0 | Michael Hanselmann | return result
|
162 | 26d502d0 | Michael Hanselmann | |
163 | 26d502d0 | Michael Hanselmann | |
164 | f7d9b3aa | Michael Hanselmann | def _TestDelayTimeout((duration, )): |
165 | f7d9b3aa | Michael Hanselmann | """Calculate timeout for "test_delay" RPC.
|
166 | f7d9b3aa | Michael Hanselmann |
|
167 | f7d9b3aa | Michael Hanselmann | """
|
168 | f7d9b3aa | Michael Hanselmann | return int(duration + 5) |
169 | f7d9b3aa | Michael Hanselmann | |
170 | f7d9b3aa | Michael Hanselmann | |
171 | 033684dd | Michael Hanselmann | _FILE_STORAGE_CALLS = [ |
172 | 2ff587d4 | Agata Murawska | ("file_storage_dir_create", SINGLE, None, constants.RPC_TMO_FAST, [ |
173 | 033684dd | Michael Hanselmann | ("file_storage_dir", None, "File storage directory"), |
174 | 60154921 | Iustin Pop | ], None, None, "Create the given file storage directory"), |
175 | 2ff587d4 | Agata Murawska | ("file_storage_dir_remove", SINGLE, None, constants.RPC_TMO_FAST, [ |
176 | 033684dd | Michael Hanselmann | ("file_storage_dir", None, "File storage directory"), |
177 | 60154921 | Iustin Pop | ], None, None, "Remove the given file storage directory"), |
178 | 2ff587d4 | Agata Murawska | ("file_storage_dir_rename", SINGLE, None, constants.RPC_TMO_FAST, [ |
179 | 033684dd | Michael Hanselmann | ("old_file_storage_dir", None, "Old name"), |
180 | 033684dd | Michael Hanselmann | ("new_file_storage_dir", None, "New name"), |
181 | 60154921 | Iustin Pop | ], None, None, "Rename file storage directory"), |
182 | 033684dd | Michael Hanselmann | ] |
183 | 033684dd | Michael Hanselmann | |
184 | 033684dd | Michael Hanselmann | _STORAGE_CALLS = [ |
185 | 2ff587d4 | Agata Murawska | ("storage_list", MULTI, None, constants.RPC_TMO_NORMAL, [ |
186 | 033684dd | Michael Hanselmann | ("su_name", None, None), |
187 | 033684dd | Michael Hanselmann | ("su_args", None, None), |
188 | 033684dd | Michael Hanselmann | ("name", None, None), |
189 | 033684dd | Michael Hanselmann | ("fields", None, None), |
190 | 60154921 | Iustin Pop | ], None, None, "Get list of storage units"), |
191 | 2ff587d4 | Agata Murawska | ("storage_modify", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
192 | 033684dd | Michael Hanselmann | ("su_name", None, None), |
193 | 033684dd | Michael Hanselmann | ("su_args", None, None), |
194 | 033684dd | Michael Hanselmann | ("name", None, None), |
195 | 033684dd | Michael Hanselmann | ("changes", None, None), |
196 | 60154921 | Iustin Pop | ], None, None, "Modify a storage unit"), |
197 | 2ff587d4 | Agata Murawska | ("storage_execute", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
198 | 033684dd | Michael Hanselmann | ("su_name", None, None), |
199 | 033684dd | Michael Hanselmann | ("su_args", None, None), |
200 | 033684dd | Michael Hanselmann | ("name", None, None), |
201 | 033684dd | Michael Hanselmann | ("op", None, None), |
202 | 60154921 | Iustin Pop | ], None, None, "Executes an operation on a storage unit"), |
203 | 033684dd | Michael Hanselmann | ] |
204 | 033684dd | Michael Hanselmann | |
205 | 033684dd | Michael Hanselmann | _INSTANCE_CALLS = [ |
206 | 2ff587d4 | Agata Murawska | ("instance_info", SINGLE, None, constants.RPC_TMO_URGENT, [ |
207 | 033684dd | Michael Hanselmann | ("instance", None, "Instance name"), |
208 | 033684dd | Michael Hanselmann | ("hname", None, "Hypervisor type"), |
209 | 60154921 | Iustin Pop | ], None, None, "Returns information about a single instance"), |
210 | 2ff587d4 | Agata Murawska | ("all_instances_info", MULTI, None, constants.RPC_TMO_URGENT, [ |
211 | 033684dd | Michael Hanselmann | ("hypervisor_list", None, "Hypervisors to query for instances"), |
212 | 60154921 | Iustin Pop | ], None, None, |
213 | 60154921 | Iustin Pop | "Returns information about all instances on the given nodes"),
|
214 | 2ff587d4 | Agata Murawska | ("instance_list", MULTI, None, constants.RPC_TMO_URGENT, [ |
215 | 033684dd | Michael Hanselmann | ("hypervisor_list", None, "Hypervisors to query for instances"), |
216 | 60154921 | Iustin Pop | ], None, None, "Returns the list of running instances on the given nodes"), |
217 | 2ff587d4 | Agata Murawska | ("instance_reboot", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
218 | cd40dc53 | Michael Hanselmann | ("inst", ED_INST_DICT, "Instance object"), |
219 | 033684dd | Michael Hanselmann | ("reboot_type", None, None), |
220 | 033684dd | Michael Hanselmann | ("shutdown_timeout", None, None), |
221 | 60154921 | Iustin Pop | ], None, None, "Returns the list of running instances on the given nodes"), |
222 | 2ff587d4 | Agata Murawska | ("instance_shutdown", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
223 | cd40dc53 | Michael Hanselmann | ("instance", ED_INST_DICT, "Instance object"), |
224 | 033684dd | Michael Hanselmann | ("timeout", None, None), |
225 | 60154921 | Iustin Pop | ], None, None, "Stops an instance"), |
226 | 2ff587d4 | Agata Murawska | ("instance_balloon_memory", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
227 | ebe466d8 | Guido Trotter | ("instance", ED_INST_DICT, "Instance object"), |
228 | ebe466d8 | Guido Trotter | ("memory", None, None), |
229 | ebe466d8 | Guido Trotter | ], None, None, "Modify the amount of an instance's runtime memory"), |
230 | 2ff587d4 | Agata Murawska | ("instance_run_rename", SINGLE, None, constants.RPC_TMO_SLOW, [ |
231 | cd40dc53 | Michael Hanselmann | ("instance", ED_INST_DICT, "Instance object"), |
232 | 033684dd | Michael Hanselmann | ("old_name", None, None), |
233 | 033684dd | Michael Hanselmann | ("debug", None, None), |
234 | 60154921 | Iustin Pop | ], None, None, "Run the OS rename script for an instance"), |
235 | 2ff587d4 | Agata Murawska | ("instance_migratable", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
236 | cd40dc53 | Michael Hanselmann | ("instance", ED_INST_DICT, "Instance object"), |
237 | 60154921 | Iustin Pop | ], None, None, "Checks whether the given instance can be migrated"), |
238 | 2ff587d4 | Agata Murawska | ("migration_info", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
239 | cd40dc53 | Michael Hanselmann | ("instance", ED_INST_DICT, "Instance object"), |
240 | 60154921 | Iustin Pop | ], None, None, |
241 | 033684dd | Michael Hanselmann | "Gather the information necessary to prepare an instance migration"),
|
242 | 2ff587d4 | Agata Murawska | ("accept_instance", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
243 | cd40dc53 | Michael Hanselmann | ("instance", ED_INST_DICT, "Instance object"), |
244 | 033684dd | Michael Hanselmann | ("info", None, "Result for the call_migration_info call"), |
245 | 033684dd | Michael Hanselmann | ("target", None, "Target hostname (usually an IP address)"), |
246 | 60154921 | Iustin Pop | ], None, None, "Prepare a node to accept an instance"), |
247 | 2ff587d4 | Agata Murawska | ("instance_finalize_migration_dst", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
248 | cd40dc53 | Michael Hanselmann | ("instance", ED_INST_DICT, "Instance object"), |
249 | 033684dd | Michael Hanselmann | ("info", None, "Result for the call_migration_info call"), |
250 | 033684dd | Michael Hanselmann | ("success", None, "Whether the migration was a success or failure"), |
251 | 60154921 | Iustin Pop | ], None, None, "Finalize any target-node migration specific operation"), |
252 | 2ff587d4 | Agata Murawska | ("instance_migrate", SINGLE, None, constants.RPC_TMO_SLOW, [ |
253 | cd40dc53 | Michael Hanselmann | ("instance", ED_INST_DICT, "Instance object"), |
254 | 033684dd | Michael Hanselmann | ("target", None, "Target node name"), |
255 | 033684dd | Michael Hanselmann | ("live", None, "Whether the migration should be done live or not"), |
256 | 60154921 | Iustin Pop | ], None, None, "Migrate an instance"), |
257 | 2ff587d4 | Agata Murawska | ("instance_finalize_migration_src", SINGLE, None, constants.RPC_TMO_SLOW, [ |
258 | cd40dc53 | Michael Hanselmann | ("instance", ED_INST_DICT, "Instance object"), |
259 | 033684dd | Michael Hanselmann | ("success", None, "Whether the migration succeeded or not"), |
260 | 033684dd | Michael Hanselmann | ("live", None, "Whether the user requested a live migration or not"), |
261 | 60154921 | Iustin Pop | ], None, None, "Finalize the instance migration on the source node"), |
262 | 2ff587d4 | Agata Murawska | ("instance_get_migration_status", SINGLE, None, constants.RPC_TMO_SLOW, [ |
263 | cd40dc53 | Michael Hanselmann | ("instance", ED_INST_DICT, "Instance object"), |
264 | 60154921 | Iustin Pop | ], None, _MigrationStatusPostProc, "Report migration status"), |
265 | 2ff587d4 | Agata Murawska | ("instance_start", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
266 | cd40dc53 | Michael Hanselmann | ("instance_hvp_bep", ED_INST_DICT_HVP_BEP, None), |
267 | c4de9b7a | Michael Hanselmann | ("startup_paused", None, None), |
268 | 60154921 | Iustin Pop | ], None, None, "Starts an instance"), |
269 | 2ff587d4 | Agata Murawska | ("instance_os_add", SINGLE, None, constants.RPC_TMO_1DAY, [ |
270 | b8291e00 | René Nussbaumer | ("instance_osp", ED_INST_DICT_OSP_DP, None), |
271 | c4de9b7a | Michael Hanselmann | ("reinstall", None, None), |
272 | c4de9b7a | Michael Hanselmann | ("debug", None, None), |
273 | 60154921 | Iustin Pop | ], None, None, "Starts an instance"), |
274 | 033684dd | Michael Hanselmann | ] |
275 | 033684dd | Michael Hanselmann | |
276 | 033684dd | Michael Hanselmann | _IMPEXP_CALLS = [ |
277 | 2ff587d4 | Agata Murawska | ("import_start", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
278 | cd40dc53 | Michael Hanselmann | ("opts", ED_OBJECT_DICT, None), |
279 | cd40dc53 | Michael Hanselmann | ("instance", ED_INST_DICT, None), |
280 | 46c293f0 | Michael Hanselmann | ("component", None, None), |
281 | cd40dc53 | Michael Hanselmann | ("dest", ED_IMPEXP_IO, "Import destination"), |
282 | 60154921 | Iustin Pop | ], None, None, "Starts an import daemon"), |
283 | 2ff587d4 | Agata Murawska | ("export_start", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
284 | cd40dc53 | Michael Hanselmann | ("opts", ED_OBJECT_DICT, None), |
285 | 46c293f0 | Michael Hanselmann | ("host", None, None), |
286 | 46c293f0 | Michael Hanselmann | ("port", None, None), |
287 | cd40dc53 | Michael Hanselmann | ("instance", ED_INST_DICT, None), |
288 | 46c293f0 | Michael Hanselmann | ("component", None, None), |
289 | cd40dc53 | Michael Hanselmann | ("source", ED_IMPEXP_IO, "Export source"), |
290 | 60154921 | Iustin Pop | ], None, None, "Starts an export daemon"), |
291 | 2ff587d4 | Agata Murawska | ("impexp_status", SINGLE, None, constants.RPC_TMO_FAST, [ |
292 | 033684dd | Michael Hanselmann | ("names", None, "Import/export names"), |
293 | 60154921 | Iustin Pop | ], None, _ImpExpStatusPostProc, "Gets the status of an import or export"), |
294 | 2ff587d4 | Agata Murawska | ("impexp_abort", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
295 | 033684dd | Michael Hanselmann | ("name", None, "Import/export name"), |
296 | 60154921 | Iustin Pop | ], None, None, "Aborts an import or export"), |
297 | 2ff587d4 | Agata Murawska | ("impexp_cleanup", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
298 | 033684dd | Michael Hanselmann | ("name", None, "Import/export name"), |
299 | 60154921 | Iustin Pop | ], None, None, "Cleans up after an import or export"), |
300 | 2ff587d4 | Agata Murawska | ("export_info", SINGLE, None, constants.RPC_TMO_FAST, [ |
301 | 033684dd | Michael Hanselmann | ("path", None, None), |
302 | 60154921 | Iustin Pop | ], None, None, "Queries the export information in a given path"), |
303 | 2ff587d4 | Agata Murawska | ("finalize_export", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
304 | cd40dc53 | Michael Hanselmann | ("instance", ED_INST_DICT, None), |
305 | cd40dc53 | Michael Hanselmann | ("snap_disks", ED_FINALIZE_EXPORT_DISKS, None), |
306 | 60154921 | Iustin Pop | ], None, None, "Request the completion of an export operation"), |
307 | 2ff587d4 | Agata Murawska | ("export_list", MULTI, None, constants.RPC_TMO_FAST, [], None, None, |
308 | 60154921 | Iustin Pop | "Gets the stored exports list"),
|
309 | 2ff587d4 | Agata Murawska | ("export_remove", SINGLE, None, constants.RPC_TMO_FAST, [ |
310 | 033684dd | Michael Hanselmann | ("export", None, None), |
311 | 60154921 | Iustin Pop | ], None, None, "Requests removal of a given export"), |
312 | 033684dd | Michael Hanselmann | ] |
313 | 033684dd | Michael Hanselmann | |
314 | 033684dd | Michael Hanselmann | _X509_CALLS = [ |
315 | 2ff587d4 | Agata Murawska | ("x509_cert_create", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
316 | 033684dd | Michael Hanselmann | ("validity", None, "Validity in seconds"), |
317 | 60154921 | Iustin Pop | ], None, None, "Creates a new X509 certificate for SSL/TLS"), |
318 | 2ff587d4 | Agata Murawska | ("x509_cert_remove", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
319 | 033684dd | Michael Hanselmann | ("name", None, "Certificate name"), |
320 | 60154921 | Iustin Pop | ], None, None, "Removes a X509 certificate"), |
321 | 033684dd | Michael Hanselmann | ] |
322 | 033684dd | Michael Hanselmann | |
323 | 033684dd | Michael Hanselmann | _BLOCKDEV_CALLS = [ |
324 | 2ff587d4 | Agata Murawska | ("bdev_sizes", MULTI, None, constants.RPC_TMO_URGENT, [ |
325 | 033684dd | Michael Hanselmann | ("devices", None, None), |
326 | 60154921 | Iustin Pop | ], None, None, |
327 | 60154921 | Iustin Pop | "Gets the sizes of requested block devices present on a node"),
|
328 | 2ff587d4 | Agata Murawska | ("blockdev_create", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
329 | cd40dc53 | Michael Hanselmann | ("bdev", ED_OBJECT_DICT, None), |
330 | 033684dd | Michael Hanselmann | ("size", None, None), |
331 | 033684dd | Michael Hanselmann | ("owner", None, None), |
332 | 033684dd | Michael Hanselmann | ("on_primary", None, None), |
333 | 033684dd | Michael Hanselmann | ("info", None, None), |
334 | 60154921 | Iustin Pop | ], None, None, "Request creation of a given block device"), |
335 | 2ff587d4 | Agata Murawska | ("blockdev_wipe", SINGLE, None, constants.RPC_TMO_SLOW, [ |
336 | c7ea9827 | René Nussbaumer | ("bdev", ED_SINGLE_DISK_DICT_DP, None), |
337 | 033684dd | Michael Hanselmann | ("offset", None, None), |
338 | 033684dd | Michael Hanselmann | ("size", None, None), |
339 | 60154921 | Iustin Pop | ], None, None, |
340 | 033684dd | Michael Hanselmann | "Request wipe at given offset with given size of a block device"),
|
341 | 2ff587d4 | Agata Murawska | ("blockdev_remove", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
342 | cd40dc53 | Michael Hanselmann | ("bdev", ED_OBJECT_DICT, None), |
343 | 60154921 | Iustin Pop | ], None, None, "Request removal of a given block device"), |
344 | 2ff587d4 | Agata Murawska | ("blockdev_pause_resume_sync", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
345 | c7ea9827 | René Nussbaumer | ("disks", ED_DISKS_DICT_DP, None), |
346 | 033684dd | Michael Hanselmann | ("pause", None, None), |
347 | 60154921 | Iustin Pop | ], None, None, "Request a pause/resume of given block device"), |
348 | 2ff587d4 | Agata Murawska | ("blockdev_assemble", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
349 | c7ea9827 | René Nussbaumer | ("disk", ED_SINGLE_DISK_DICT_DP, None), |
350 | 033684dd | Michael Hanselmann | ("owner", None, None), |
351 | 033684dd | Michael Hanselmann | ("on_primary", None, None), |
352 | 033684dd | Michael Hanselmann | ("idx", None, None), |
353 | 60154921 | Iustin Pop | ], None, None, "Request assembling of a given block device"), |
354 | 2ff587d4 | Agata Murawska | ("blockdev_shutdown", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
355 | 55de1d68 | René Nussbaumer | ("disk", ED_SINGLE_DISK_DICT_DP, None), |
356 | 60154921 | Iustin Pop | ], None, None, "Request shutdown of a given block device"), |
357 | 2ff587d4 | Agata Murawska | ("blockdev_addchildren", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
358 | c7ea9827 | René Nussbaumer | ("bdev", ED_SINGLE_DISK_DICT_DP, None), |
359 | cd40dc53 | Michael Hanselmann | ("ndevs", ED_OBJECT_DICT_LIST, None), |
360 | 60154921 | Iustin Pop | ], None, None, |
361 | 60154921 | Iustin Pop | "Request adding a list of children to a (mirroring) device"),
|
362 | 2ff587d4 | Agata Murawska | ("blockdev_removechildren", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
363 | cd40dc53 | Michael Hanselmann | ("bdev", ED_OBJECT_DICT, None), |
364 | cd40dc53 | Michael Hanselmann | ("ndevs", ED_OBJECT_DICT_LIST, None), |
365 | 60154921 | Iustin Pop | ], None, None, |
366 | 60154921 | Iustin Pop | "Request removing a list of children from a (mirroring) device"),
|
367 | 2ff587d4 | Agata Murawska | ("blockdev_close", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
368 | 033684dd | Michael Hanselmann | ("instance_name", None, None), |
369 | cd40dc53 | Michael Hanselmann | ("disks", ED_OBJECT_DICT_LIST, None), |
370 | 60154921 | Iustin Pop | ], None, None, "Closes the given block devices"), |
371 | 2ff587d4 | Agata Murawska | ("blockdev_getsize", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
372 | cd40dc53 | Michael Hanselmann | ("disks", ED_OBJECT_DICT_LIST, None), |
373 | 60154921 | Iustin Pop | ], None, None, "Returns the size of the given disks"), |
374 | 2ff587d4 | Agata Murawska | ("drbd_disconnect_net", MULTI, None, constants.RPC_TMO_NORMAL, [ |
375 | 033684dd | Michael Hanselmann | ("nodes_ip", None, None), |
376 | cd40dc53 | Michael Hanselmann | ("disks", ED_OBJECT_DICT_LIST, None), |
377 | 60154921 | Iustin Pop | ], None, None, "Disconnects the network of the given drbd devices"), |
378 | 2ff587d4 | Agata Murawska | ("drbd_attach_net", MULTI, None, constants.RPC_TMO_NORMAL, [ |
379 | 033684dd | Michael Hanselmann | ("nodes_ip", None, None), |
380 | c7ea9827 | René Nussbaumer | ("disks", ED_DISKS_DICT_DP, None), |
381 | 033684dd | Michael Hanselmann | ("instance_name", None, None), |
382 | 033684dd | Michael Hanselmann | ("multimaster", None, None), |
383 | 60154921 | Iustin Pop | ], None, None, "Connects the given DRBD devices"), |
384 | 2ff587d4 | Agata Murawska | ("drbd_wait_sync", MULTI, None, constants.RPC_TMO_SLOW, [ |
385 | 033684dd | Michael Hanselmann | ("nodes_ip", None, None), |
386 | c7ea9827 | René Nussbaumer | ("disks", ED_DISKS_DICT_DP, None), |
387 | 60154921 | Iustin Pop | ], None, None, |
388 | 60154921 | Iustin Pop | "Waits for the synchronization of drbd devices is complete"),
|
389 | 2ff587d4 | Agata Murawska | ("blockdev_grow", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
390 | c7ea9827 | René Nussbaumer | ("cf_bdev", ED_SINGLE_DISK_DICT_DP, None), |
391 | 033684dd | Michael Hanselmann | ("amount", None, None), |
392 | 033684dd | Michael Hanselmann | ("dryrun", None, None), |
393 | cad0723b | Iustin Pop | ("backingstore", None, None), |
394 | cad0723b | Iustin Pop | ], None, None, "Request growing of the given block device by a" |
395 | cad0723b | Iustin Pop | " given amount"),
|
396 | 2ff587d4 | Agata Murawska | ("blockdev_export", SINGLE, None, constants.RPC_TMO_1DAY, [ |
397 | c7ea9827 | René Nussbaumer | ("cf_bdev", ED_SINGLE_DISK_DICT_DP, None), |
398 | 033684dd | Michael Hanselmann | ("dest_node", None, None), |
399 | 033684dd | Michael Hanselmann | ("dest_path", None, None), |
400 | 033684dd | Michael Hanselmann | ("cluster_name", None, None), |
401 | 60154921 | Iustin Pop | ], None, None, "Export a given disk to another node"), |
402 | 2ff587d4 | Agata Murawska | ("blockdev_snapshot", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
403 | c7ea9827 | René Nussbaumer | ("cf_bdev", ED_SINGLE_DISK_DICT_DP, None), |
404 | 60154921 | Iustin Pop | ], None, None, "Export a given disk to another node"), |
405 | 2ff587d4 | Agata Murawska | ("blockdev_rename", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
406 | cd40dc53 | Michael Hanselmann | ("devlist", ED_BLOCKDEV_RENAME, None), |
407 | 60154921 | Iustin Pop | ], None, None, "Request rename of the given block devices"), |
408 | 2ff587d4 | Agata Murawska | ("blockdev_find", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
409 | cd40dc53 | Michael Hanselmann | ("disk", ED_OBJECT_DICT, None), |
410 | 60154921 | Iustin Pop | ], None, _BlockdevFindPostProc,
|
411 | 033684dd | Michael Hanselmann | "Request identification of a given block device"),
|
412 | 2ff587d4 | Agata Murawska | ("blockdev_getmirrorstatus", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
413 | 70817cee | René Nussbaumer | ("disks", ED_DISKS_DICT_DP, None), |
414 | 60154921 | Iustin Pop | ], None, _BlockdevGetMirrorStatusPostProc,
|
415 | 033684dd | Michael Hanselmann | "Request status of a (mirroring) device"),
|
416 | 2ff587d4 | Agata Murawska | ("blockdev_getmirrorstatus_multi", MULTI, None, constants.RPC_TMO_NORMAL, [ |
417 | cd40dc53 | Michael Hanselmann | ("node_disks", ED_NODE_TO_DISK_DICT, None), |
418 | 5449685e | Iustin Pop | ], _BlockdevGetMirrorStatusMultiPreProc, |
419 | 5449685e | Iustin Pop | _BlockdevGetMirrorStatusMultiPostProc, |
420 | 033684dd | Michael Hanselmann | "Request status of (mirroring) devices from multiple nodes"),
|
421 | 033684dd | Michael Hanselmann | ] |
422 | 033684dd | Michael Hanselmann | |
423 | 033684dd | Michael Hanselmann | _OS_CALLS = [ |
424 | 2ff587d4 | Agata Murawska | ("os_diagnose", MULTI, None, constants.RPC_TMO_FAST, [], None, None, |
425 | 033684dd | Michael Hanselmann | "Request a diagnose of OS definitions"),
|
426 | 2ff587d4 | Agata Murawska | ("os_validate", MULTI, None, constants.RPC_TMO_FAST, [ |
427 | 033684dd | Michael Hanselmann | ("required", None, None), |
428 | 033684dd | Michael Hanselmann | ("name", None, None), |
429 | 033684dd | Michael Hanselmann | ("checks", None, None), |
430 | 033684dd | Michael Hanselmann | ("params", None, None), |
431 | 60154921 | Iustin Pop | ], None, None, "Run a validation routine for a given OS"), |
432 | 2ff587d4 | Agata Murawska | ("os_get", SINGLE, None, constants.RPC_TMO_FAST, [ |
433 | 033684dd | Michael Hanselmann | ("name", None, None), |
434 | 60154921 | Iustin Pop | ], None, _OsGetPostProc, "Returns an OS definition"), |
435 | 033684dd | Michael Hanselmann | ] |
436 | 033684dd | Michael Hanselmann | |
437 | 033684dd | Michael Hanselmann | _NODE_CALLS = [ |
438 | 2ff587d4 | Agata Murawska | ("node_has_ip_address", SINGLE, None, constants.RPC_TMO_FAST, [ |
439 | 033684dd | Michael Hanselmann | ("address", None, "IP address"), |
440 | 60154921 | Iustin Pop | ], None, None, "Checks if a node has the given IP address"), |
441 | 2ff587d4 | Agata Murawska | ("node_info", MULTI, None, constants.RPC_TMO_URGENT, [ |
442 | 78519c10 | Michael Hanselmann | ("vg_names", None, |
443 | 78519c10 | Michael Hanselmann | "Names of the volume groups to ask for disk space information"),
|
444 | 78519c10 | Michael Hanselmann | ("hv_names", None, |
445 | 78519c10 | Michael Hanselmann | "Names of the hypervisors to ask for node information"),
|
446 | 60154921 | Iustin Pop | ], None, None, "Return node information"), |
447 | 2ff587d4 | Agata Murawska | ("node_verify", MULTI, None, constants.RPC_TMO_NORMAL, [ |
448 | 033684dd | Michael Hanselmann | ("checkdict", None, None), |
449 | 033684dd | Michael Hanselmann | ("cluster_name", None, None), |
450 | 60154921 | Iustin Pop | ], None, None, "Request verification of given parameters"), |
451 | 2ff587d4 | Agata Murawska | ("node_volumes", MULTI, None, constants.RPC_TMO_FAST, [], None, None, |
452 | 60154921 | Iustin Pop | "Gets all volumes on node(s)"),
|
453 | 2ff587d4 | Agata Murawska | ("node_demote_from_mc", SINGLE, None, constants.RPC_TMO_FAST, [], None, None, |
454 | 033684dd | Michael Hanselmann | "Demote a node from the master candidate role"),
|
455 | 2ff587d4 | Agata Murawska | ("node_powercycle", SINGLE, ACCEPT_OFFLINE_NODE, constants.RPC_TMO_NORMAL, [
|
456 | 033684dd | Michael Hanselmann | ("hypervisor", None, "Hypervisor type"), |
457 | 60154921 | Iustin Pop | ], None, None, "Tries to powercycle a node"), |
458 | 033684dd | Michael Hanselmann | ] |
459 | 033684dd | Michael Hanselmann | |
460 | 033684dd | Michael Hanselmann | _MISC_CALLS = [ |
461 | 2ff587d4 | Agata Murawska | ("lv_list", MULTI, None, constants.RPC_TMO_URGENT, [ |
462 | 033684dd | Michael Hanselmann | ("vg_name", None, None), |
463 | 60154921 | Iustin Pop | ], None, None, "Gets the logical volumes present in a given volume group"), |
464 | 2ff587d4 | Agata Murawska | ("vg_list", MULTI, None, constants.RPC_TMO_URGENT, [], None, None, |
465 | dd6d2d09 | Michael Hanselmann | "Gets the volume group list"),
|
466 | 2ff587d4 | Agata Murawska | ("bridges_exist", SINGLE, None, constants.RPC_TMO_URGENT, [ |
467 | 033684dd | Michael Hanselmann | ("bridges_list", None, "Bridges which must be present on remote node"), |
468 | 60154921 | Iustin Pop | ], None, None, "Checks if a node has all the bridges given"), |
469 | 2ff587d4 | Agata Murawska | ("etc_hosts_modify", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
470 | 033684dd | Michael Hanselmann | ("mode", None, |
471 | 033684dd | Michael Hanselmann | "Mode to operate; currently L{constants.ETC_HOSTS_ADD} or"
|
472 | 033684dd | Michael Hanselmann | " L{constants.ETC_HOSTS_REMOVE}"),
|
473 | 033684dd | Michael Hanselmann | ("name", None, "Hostname to be modified"), |
474 | 033684dd | Michael Hanselmann | ("ip", None, "IP address (L{constants.ETC_HOSTS_ADD} only)"), |
475 | 60154921 | Iustin Pop | ], None, None, "Modify hosts file with name"), |
476 | 2ff587d4 | Agata Murawska | ("drbd_helper", MULTI, None, constants.RPC_TMO_URGENT, [], |
477 | 2ff587d4 | Agata Murawska | None, None, "Gets DRBD helper"), |
478 | 2ff587d4 | Agata Murawska | ("run_oob", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
479 | 033684dd | Michael Hanselmann | ("oob_program", None, None), |
480 | 033684dd | Michael Hanselmann | ("command", None, None), |
481 | 033684dd | Michael Hanselmann | ("remote_node", None, None), |
482 | 033684dd | Michael Hanselmann | ("timeout", None, None), |
483 | 60154921 | Iustin Pop | ], None, None, "Runs out-of-band command"), |
484 | 2ff587d4 | Agata Murawska | ("hooks_runner", MULTI, None, constants.RPC_TMO_NORMAL, [ |
485 | 033684dd | Michael Hanselmann | ("hpath", None, None), |
486 | 033684dd | Michael Hanselmann | ("phase", None, None), |
487 | 033684dd | Michael Hanselmann | ("env", None, None), |
488 | 60154921 | Iustin Pop | ], None, None, "Call the hooks runner"), |
489 | 2ff587d4 | Agata Murawska | ("iallocator_runner", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
490 | 033684dd | Michael Hanselmann | ("name", None, "Iallocator name"), |
491 | 033684dd | Michael Hanselmann | ("idata", None, "JSON-encoded input string"), |
492 | 60154921 | Iustin Pop | ], None, None, "Call an iallocator on a remote node"), |
493 | dd6d2d09 | Michael Hanselmann | ("test_delay", MULTI, None, _TestDelayTimeout, [ |
494 | 033684dd | Michael Hanselmann | ("duration", None, None), |
495 | 60154921 | Iustin Pop | ], None, None, "Sleep for a fixed time on given node(s)"), |
496 | 2ff587d4 | Agata Murawska | ("hypervisor_validate_params", MULTI, None, constants.RPC_TMO_NORMAL, [ |
497 | 68959ca5 | Michael Hanselmann | ("hvname", None, "Hypervisor name"), |
498 | 68959ca5 | Michael Hanselmann | ("hvfull", None, "Parameters to be validated"), |
499 | 60154921 | Iustin Pop | ], None, None, "Validate hypervisor params"), |
500 | 033684dd | Michael Hanselmann | ] |
501 | 033684dd | Michael Hanselmann | |
502 | d5a2a550 | Michael Hanselmann | CALLS = { |
503 | 5ae4945a | Iustin Pop | "RpcClientDefault":
|
504 | a09f9847 | Michael Hanselmann | _Prepare(_IMPEXP_CALLS + _X509_CALLS + _OS_CALLS + _NODE_CALLS + |
505 | a09f9847 | Michael Hanselmann | _FILE_STORAGE_CALLS + _MISC_CALLS + _INSTANCE_CALLS + |
506 | a09f9847 | Michael Hanselmann | _BLOCKDEV_CALLS + _STORAGE_CALLS), |
507 | a09f9847 | Michael Hanselmann | "RpcClientJobQueue": _Prepare([
|
508 | 2ff587d4 | Agata Murawska | ("jobqueue_update", MULTI, None, constants.RPC_TMO_URGENT, [ |
509 | fb1ffbca | Michael Hanselmann | ("file_name", None, None), |
510 | cd40dc53 | Michael Hanselmann | ("content", ED_COMPRESS, None), |
511 | 60154921 | Iustin Pop | ], None, None, "Update job queue file"), |
512 | 2ff587d4 | Agata Murawska | ("jobqueue_purge", SINGLE, None, constants.RPC_TMO_NORMAL, [], None, None, |
513 | dd6d2d09 | Michael Hanselmann | "Purge job queue"),
|
514 | 2ff587d4 | Agata Murawska | ("jobqueue_rename", MULTI, None, constants.RPC_TMO_URGENT, [ |
515 | fb1ffbca | Michael Hanselmann | ("rename", None, None), |
516 | 60154921 | Iustin Pop | ], None, None, "Rename job queue file"), |
517 | a09f9847 | Michael Hanselmann | ]), |
518 | a09f9847 | Michael Hanselmann | "RpcClientBootstrap": _Prepare([
|
519 | 2ff587d4 | Agata Murawska | ("node_start_master_daemons", SINGLE, None, constants.RPC_TMO_FAST, [ |
520 | db04ce5d | Michael Hanselmann | ("no_voting", None, None), |
521 | 60154921 | Iustin Pop | ], None, None, "Starts master daemons on a node"), |
522 | 2ff587d4 | Agata Murawska | ("node_activate_master_ip", SINGLE, None, constants.RPC_TMO_FAST, [ |
523 | c79198a0 | Andrea Spadaccini | ("master_params", ED_OBJECT_DICT, "Network parameters of the master"), |
524 | 57c7bc57 | Andrea Spadaccini | ("use_external_mip_script", None, |
525 | 57c7bc57 | Andrea Spadaccini | "Whether to use the user-provided master IP address setup script"),
|
526 | 60154921 | Iustin Pop | ], None, None, |
527 | 8da2bd43 | Andrea Spadaccini | "Activates master IP on a node"),
|
528 | 2ff587d4 | Agata Murawska | ("node_stop_master", SINGLE, None, constants.RPC_TMO_FAST, [], None, None, |
529 | db04ce5d | Michael Hanselmann | "Deactivates master IP and stops master daemons on a node"),
|
530 | 2ff587d4 | Agata Murawska | ("node_deactivate_master_ip", SINGLE, None, constants.RPC_TMO_FAST, [ |
531 | c79198a0 | Andrea Spadaccini | ("master_params", ED_OBJECT_DICT, "Network parameters of the master"), |
532 | 57c7bc57 | Andrea Spadaccini | ("use_external_mip_script", None, |
533 | 57c7bc57 | Andrea Spadaccini | "Whether to use the user-provided master IP address setup script"),
|
534 | 60154921 | Iustin Pop | ], None, None, |
535 | db04ce5d | Michael Hanselmann | "Deactivates master IP on a node"),
|
536 | 2ff587d4 | Agata Murawska | ("node_change_master_netmask", SINGLE, None, constants.RPC_TMO_FAST, [ |
537 | 41e079ce | Andrea Spadaccini | ("old_netmask", None, "The old value of the netmask"), |
538 | 41e079ce | Andrea Spadaccini | ("netmask", None, "The new value of the netmask"), |
539 | 41e079ce | Andrea Spadaccini | ("master_ip", None, "The master IP"), |
540 | 41e079ce | Andrea Spadaccini | ("master_netdev", None, "The master network device"), |
541 | 60154921 | Iustin Pop | ], None, None, "Change master IP netmask"), |
542 | 2ff587d4 | Agata Murawska | ("node_leave_cluster", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
543 | db04ce5d | Michael Hanselmann | ("modify_ssh_setup", None, None), |
544 | 60154921 | Iustin Pop | ], None, None, |
545 | 60154921 | Iustin Pop | "Requests a node to clean the cluster information it has"),
|
546 | 2ff587d4 | Agata Murawska | ("master_info", MULTI, None, constants.RPC_TMO_URGENT, [], None, None, |
547 | dd6d2d09 | Michael Hanselmann | "Query master info"),
|
548 | bd6d1202 | René Nussbaumer | ]), |
549 | bd6d1202 | René Nussbaumer | "RpcClientDnsOnly": _Prepare([
|
550 | 2ff587d4 | Agata Murawska | ("version", MULTI, ACCEPT_OFFLINE_NODE, constants.RPC_TMO_URGENT, [], None, |
551 | 2ff587d4 | Agata Murawska | None, "Query node version"), |
552 | a09f9847 | Michael Hanselmann | ]), |
553 | a09f9847 | Michael Hanselmann | "RpcClientConfig": _Prepare([
|
554 | 2ff587d4 | Agata Murawska | ("upload_file", MULTI, None, constants.RPC_TMO_NORMAL, [ |
555 | cd40dc53 | Michael Hanselmann | ("file_name", ED_FILE_DETAILS, None), |
556 | 60154921 | Iustin Pop | ], None, None, "Upload a file"), |
557 | 2ff587d4 | Agata Murawska | ("write_ssconf_files", MULTI, None, constants.RPC_TMO_NORMAL, [ |
558 | 415a7304 | Michael Hanselmann | ("values", None, None), |
559 | 60154921 | Iustin Pop | ], None, None, "Write ssconf files"), |
560 | a09f9847 | Michael Hanselmann | ]), |
561 | d5a2a550 | Michael Hanselmann | } |