Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Refunding the restart/redeployment mechanisms.
[hpcvm.git] / src / and / hpcvm / User.java
index e70bc43..63e8028 100644 (file)
@@ -86,6 +86,25 @@ public class User
                }
        }
        
+       
+       public void deploy( String _name, String _archive, String _directory )
+       {
+               int nb = 0 ;
+               try {
+                       nb = ss.deployVM( _name, _archive, _directory ) ;
+               } catch (RemoteException e) {
+                       e.printStackTrace();
+               }
+               
+               if( nb > 0 )
+               {
+                       if( nb == 1 )
+                               System.out.println( "There is only 1 machine available." ) ;
+                       if( nb > 1 )
+                               System.out.println( "There are " + nb + " machines available." ) ;
+               }
+       }
+       
 }