import java.util.ArrayList;
public class VirtualMachine
-{
+{
private String name ;
private String ip ;
private String initial_archive_name ;
private Status status ;
private int computation_id ;
private String working_directory ;
- private ArrayList<ServicesClient> save_neighbors ;
+ private ArrayList<SaveNeighbor> save_neighbors ;
private String clientInVM ;
private String vm_user ;
private String vm_user_passwd ;
status = new Status() ;
status.setStatus( "stopped" ) ;
computation_id = -1 ;
- save_neighbors = new ArrayList<ServicesClient>() ;
+ save_neighbors = new ArrayList<SaveNeighbor>() ;
clientInVM = "/home/mpi/InGuest" ;
vm_user = "mpi" ;
vm_user_passwd = "mpi" ;
}
- public ArrayList<ServicesClient> getSaveNeighbors() { return save_neighbors ; }
+ public ArrayList<SaveNeighbor> getSaveNeighbors() { return save_neighbors ; }
@SuppressWarnings("unchecked")
- public void setSaveNeighbors( ArrayList<ServicesClient> _sn )
+ public void setSaveNeighbors( ArrayList<SaveNeighbor> _sn )
{
if( _sn != null )
{
- save_neighbors = (ArrayList<ServicesClient>) _sn.clone() ;
+ save_neighbors = (ArrayList<SaveNeighbor>) _sn.clone() ;
}
}
- public void addSaveNeighbor( ServicesClient _sn )
+ public void addSaveNeighbor( SaveNeighbor _sn )
{
if( _sn != null )
{
public int checkVmx()
{
+ deploy = false ;
+ first = false ;
+ deployFault = false ;
+
// Initial deployment
File file = new File( working_directory + "/" + directory + "/initial.hpcvm" ) ;
file = null ;
+ // If nothing to do
+ if( ! deploy && ! first && ! deployFault )
+ {
+ return 0 ;
+ }
+
// Deployment of the VM
if( deploy )
if( p.exitValue() == 0 )
{
- System.out.println( "Successfully deletion of the deployment mark." ) ;
+ System.out.println( "Successful deletion of the deployment mark." ) ;
} else {
System.err.println( "Unsuccessful deletion of the deployment mark!" ) ;
printProcessError( p ) ;
if( p.exitValue() == 0 )
{
- System.out.println( "Successfully deletion of the first start mark." ) ;
+ System.out.println( "Successful deletion of the first start mark." ) ;
} else {
System.err.println( "Unsuccessful deletion of the first start mark!" ) ;
printProcessError( p ) ;
if( p.exitValue() == 0 )
{
- System.out.println( "Successfully deletion of the fault mark." ) ;
+ System.out.println( "Successful deletion of the fault mark." ) ;
} else {
System.err.println( "Unsuccessful deletion of the fault mark!" ) ;
printProcessError( p ) ;