mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
parent
de97dfd903
commit
a381a5c715
@ -310,7 +310,7 @@ public class VirtualMachine extends PoolElement{
|
||||
}
|
||||
|
||||
/**
|
||||
* Resubmits the virtual machine after failure.
|
||||
* Forces a re-deployment of a VM in UNKNOWN or BOOT state.
|
||||
* @return If an error occurs the error message contains the reason.
|
||||
*/
|
||||
public OneResponse restart()
|
||||
@ -318,6 +318,15 @@ public class VirtualMachine extends PoolElement{
|
||||
return action("shutdown");
|
||||
}
|
||||
|
||||
/**
|
||||
* Resubmits a VM to PENDING state.
|
||||
* @return If an error occurs the error message contains the reason.
|
||||
*/
|
||||
public OneResponse resubmit()
|
||||
{
|
||||
return action("resubmit");
|
||||
}
|
||||
|
||||
/**
|
||||
* Migrates the virtual machine to the target host (hid).
|
||||
* <br/>
|
||||
|
@ -271,6 +271,17 @@ public class VirtualMachineTest
|
||||
// TODO
|
||||
}
|
||||
|
||||
@Test
|
||||
public void resubmit()
|
||||
{
|
||||
vm.deploy(hid_A);
|
||||
waitAssert(vm, "ACTIVE", "RUNNING");
|
||||
res = vm.resubmit();
|
||||
|
||||
assertTrue( !res.isError() );
|
||||
waitAssert(vm, "PENDING", "-");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void attributes()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user