264 |
264 |
beparams=beparams,
|
265 |
265 |
file_storage_dir=fn('file_storage_dir', None),
|
266 |
266 |
file_driver=fn('file_driver', 'loop'),
|
|
267 |
dry_run=bool(self.dryRun()),
|
267 |
268 |
)
|
268 |
269 |
|
269 |
270 |
return baserlib.SubmitJob([op])
|
... | ... | |
289 |
290 |
|
290 |
291 |
"""
|
291 |
292 |
op = opcodes.OpRemoveInstance(instance_name=self.items[0],
|
292 |
|
ignore_failures=False)
|
|
293 |
ignore_failures=False,
|
|
294 |
dry_run=bool(self.dryRun()))
|
293 |
295 |
return baserlib.SubmitJob([op])
|
294 |
296 |
|
295 |
297 |
|
... | ... | |
313 |
315 |
[False])[0])
|
314 |
316 |
op = opcodes.OpRebootInstance(instance_name=instance_name,
|
315 |
317 |
reboot_type=reboot_type,
|
316 |
|
ignore_secondaries=ignore_secondaries)
|
|
318 |
ignore_secondaries=ignore_secondaries,
|
|
319 |
dry_run=bool(self.dryRun()))
|
317 |
320 |
|
318 |
321 |
return baserlib.SubmitJob([op])
|
319 |
322 |
|
... | ... | |
334 |
337 |
instance_name = self.items[0]
|
335 |
338 |
force_startup = bool(self.queryargs.get('force', [False])[0])
|
336 |
339 |
op = opcodes.OpStartupInstance(instance_name=instance_name,
|
337 |
|
force=force_startup)
|
|
340 |
force=force_startup,
|
|
341 |
dry_run=bool(self.dryRun()))
|
338 |
342 |
|
339 |
343 |
return baserlib.SubmitJob([op])
|
340 |
344 |
|
... | ... | |
350 |
354 |
|
351 |
355 |
"""
|
352 |
356 |
instance_name = self.items[0]
|
353 |
|
op = opcodes.OpShutdownInstance(instance_name=instance_name)
|
|
357 |
op = opcodes.OpShutdownInstance(instance_name=instance_name,
|
|
358 |
dry_run=bool(self.dryRun()))
|
354 |
359 |
|
355 |
360 |
return baserlib.SubmitJob([op])
|
356 |
361 |
|
... | ... | |
396 |
401 |
raise http.HttpBadRequest("Please specify tag(s) to add using the"
|
397 |
402 |
" the 'tag' parameter")
|
398 |
403 |
return baserlib._Tags_PUT(self.TAG_LEVEL,
|
399 |
|
self.queryargs['tag'], name=self.name)
|
|
404 |
self.queryargs['tag'], name=self.name,
|
|
405 |
dry_run=bool(self.dryRun()))
|
400 |
406 |
|
401 |
407 |
def DELETE(self):
|
402 |
408 |
"""Delete a tag.
|
... | ... | |
412 |
418 |
" tag(s) using the 'tag' parameter")
|
413 |
419 |
return baserlib._Tags_DELETE(self.TAG_LEVEL,
|
414 |
420 |
self.queryargs['tag'],
|
415 |
|
name=self.name)
|
|
421 |
name=self.name,
|
|
422 |
dry_run=bool(self.dryRun()))
|
416 |
423 |
|
417 |
424 |
|
418 |
425 |
class R_2_instances_name_tags(_R_Tags):
|