1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

Features #457 & #455: Resubmit action for VMs added to Java API

This commit is contained in:
Carlos Martín 2011-01-19 18:52:26 +01:00
parent de97dfd903
commit a381a5c715
2 changed files with 21 additions and 1 deletions

View File

@ -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/>

View File

@ -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()
{