Revision 3a9fe2bc lib/rapi/rlib2.py
b/lib/rapi/rlib2.py | ||
---|---|---|
1143 | 1143 |
|
1144 | 1144 |
return self.SubmitJob(ops) |
1145 | 1145 |
|
1146 |
class R_2_instances_name_snapshot(baserlib.OpcodeResource): |
|
1147 |
|
|
1148 |
"""/2/instances/[instance_name]/snapshot resource. |
|
1149 |
|
|
1150 |
Implements an instance snapshot. |
|
1151 |
|
|
1152 |
""" |
|
1153 |
POST_OPCODE = opcodes.OpInstanceSnapshot |
|
1154 |
|
|
1155 |
def GetPostOpInput(self): |
|
1156 |
"""Snapshot an instance. |
|
1157 |
|
|
1158 |
The URI takes os=name and nostartup=[0|1] optional |
|
1159 |
parameters. By default, the instance will be started |
|
1160 |
automatically. |
|
1161 |
|
|
1162 |
""" |
|
1163 |
|
|
1164 |
return (self.request_body, { |
|
1165 |
"instance_name": self.items[0], |
|
1166 |
"dry_run": self.dryRun(), |
|
1167 |
}) |
|
1146 | 1168 |
|
1147 | 1169 |
class R_2_instances_name_replace_disks(baserlib.OpcodeResource): |
1148 | 1170 |
"""/2/instances/[instance_name]/replace-disks resource. |
Also available in: Unified diff