mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-23 13:15:14 +09:00
Feature #1835: Add poweroff --hard to cli, ruby & java oca
This commit is contained in:
1 parent
2589ab86fe
commit
bf2a63daf6
3 files changed
+22
-5
No files matched your search
@@ -838,7 +838,20 @@ public class VirtualMachine extends PoolElement{
|
||||
*/
|
||||
public OneResponse poweroff()
|
||||
{
|
||||
return action("poweroff");
|
||||
return poweroff(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Powers off a running VM.
|
||||
* @param hard True to perform a hard (no acpi) shutdown, false for a
|
||||
* graceful shutdown
|
||||
* @return If an error occurs the error message contains the reason.
|
||||
*/
|
||||
public OneResponse poweroff(boolean hard)
|
||||
{
|
||||
String actionSt = hard ? "poweroff-hard" : "poweroff";
|
||||
|
||||
return action(actionSt);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user