Agaetis
VMWare Maven 2 Plugin

1.0.0.7

com.agaetis.maven.plugins.vmware
Class SuspendMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by com.agaetis.maven.plugins.vmware.SuspendMojo
All Implemented Interfaces:
ContextEnabled, Mojo

public class SuspendMojo
extends AbstractMojo

This goal suspends the virtual machine.

sample :

mvn vmware:suspend -DvixLibPath=./path/to/vixlib -Dusername=myUsername -Dpassword=myPassword
   -Dhost=192.168.x.x -DvmxFilepath="/path/to/the/vmx/file"

Author:
Franck MARCHAND
Is defined by the goal name:
suspend
Requires a Maven project to run:
false

Field Summary
private  String _cmd
           
private  String _guestPassword
          Guest password
private  String _guestUsername
          Guest username
private  String _host
           
private  String _password
          Password for the virtual machine.
private  Integer _port
           
private  Integer _serviceProvider
          the default value is VMWARE_VI_SERVER
private  String _shutdownOpt
          shutdown option
private  String _username
          Username for the virtual machine.
private  String _version
          Plugin version
private  String _vixLibPath
          Path to the vix lib.
private  String _vmxFilepath
          String to define the filepath of the vmx file locally on the vmware server.
private  boolean _waitForTools
          Boolean that defines if after powering on the vm, we should wait for vmware tools to start.
private  Integer _waitForToolsTimeout
          Integer that defines the time to wait before exiting from the waitToolsInGuest method of the virtual machine.
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
SuspendMojo()
           
 
Method Summary
 void execute()
          Main method for the mojo.
 String getCmd()
          Get the cmd
 String getGuestPassword()
          Get the guestPassword
 String getGuestUsername()
          Get the guestUsername
 String getHost()
          Get the host
 String getPassword()
          Get the password
 Integer getPort()
          Get the port
 Integer getServiceProvider()
          Get the serviceProvider
 String getShutdownOpt()
          Get the shutdownOpt
 String getUsername()
          Get the username
 String getVersion()
          Get the version
 String getVixLibPath()
          Get the vixLibPath
 String getVmxFilepath()
          Get the vmxFilepath
 Integer getWaitForToolsTimeout()
          Get the waitForToolsTimeout
 boolean isWaitForTools()
          Get the waitForTools
 void setCmd(String cmd)
          Set the cmd
 void setGuestPassword(String guestPassword)
          Set the guestPassword
 void setGuestUsername(String guestUsername)
          Set the guestUsername
 void setHost(String host)
          Set the host
 void setPassword(String password)
          Set the password
 void setPort(Integer port)
          Set the port
 void setServiceProvider(Integer serviceProvider)
          Set the serviceProvider
 void setShutdownOpt(String shutdownOpt)
          Set the shutdownOpt
 void setUsername(String username)
          Set the username
 void setVersion(String version)
          Set the version
 void setVixLibPath(String vixLibPath)
          Set the vixLibPath
 void setVmxFilepath(String vmxFilepath)
          Set the vmxFilepath
 void setWaitForTools(boolean waitForTools)
          Set the waitForTools
 void setWaitForToolsTimeout(Integer waitForToolsTimeout)
          Set the waitForToolsTimeout
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_guestUsername

private String _guestUsername
Guest username

Is defined by:
default-value:
none
expression:
${guestUsername}
alias:
guestUsername;

_shutdownOpt

private String _shutdownOpt
shutdown option

Is defined by:
default-value:
now
expression:
${shutdownOpt}
alias:
shutdownOpt;

_guestPassword

private String _guestPassword
Guest password

Is defined by:
default-value:
none
expression:
${guestPassword}
alias:
guestPassword;

_vixLibPath

private String _vixLibPath
Path to the vix lib.

Is defined by:
default-value:
none
expression:
${vixLibPath}
alias:
vixLibPath;

_username

private String _username
Username for the virtual machine. It is the user on the remote machine who can run the vm. This is completely different from the guest username.

Is defined by:
default-value:
Anonymous
expression:
${username}
alias:
username;

_password

private String _password
Password for the virtual machine.

Is defined by:
default-value:
****
expression:
${password}
alias:
password;

_serviceProvider

private Integer _serviceProvider
the default value is VMWARE_VI_SERVER

Is defined by:
default-value:
10
expression:
${serviceProvider}
alias:
serviceProvider;

_version

private String _version
Plugin version

Is defined by:
default-value:
${project.version}

_waitForToolsTimeout

private Integer _waitForToolsTimeout
Integer that defines the time to wait before exiting from the waitToolsInGuest method of the virtual machine.

Is defined by:
default-value:
60000
expression:
${waitForToolsTimeout}
alias:
waitForToolsTimeout;

_waitForTools

private boolean _waitForTools
Boolean that defines if after powering on the vm, we should wait for vmware tools to start.

Is defined by:
default-value:
false
expression:
${waitForTools}
alias:
waitForTools;

_vmxFilepath

private String _vmxFilepath
String to define the filepath of the vmx file locally on the vmware server. e.g : "/var/lib/vmware/Virtual Machines/test/test.vmx"

Is defined by:
expression:
${vmxFilepath}
alias:
vmxFilepath;

_host

private String _host
Is defined by:
default-value:
localhost
expression:
${host}
alias:
host;

_port

private Integer _port
Is defined by:
default-value:
902
expression:
${port}
alias:
port;

_cmd

private String _cmd
Is defined by:
expression:
${cmd}
default-value:
suspend
Constructor Detail

SuspendMojo

public SuspendMojo()
Method Detail

getVixLibPath

public String getVixLibPath()
Get the vixLibPath

Returns:
the vixLibPath

setVixLibPath

public void setVixLibPath(String vixLibPath)
Set the vixLibPath

Parameters:
vixLibPath - the vixLibPath to set

getUsername

public String getUsername()
Get the username

Returns:
the username

setUsername

public void setUsername(String username)
Set the username

Parameters:
username - the username to set

getPassword

public String getPassword()
Get the password

Returns:
the password

setPassword

public void setPassword(String password)
Set the password

Parameters:
password - the password to set

getServiceProvider

public Integer getServiceProvider()
Get the serviceProvider

Returns:
the serviceProvider

setServiceProvider

public void setServiceProvider(Integer serviceProvider)
Set the serviceProvider

Parameters:
serviceProvider - the serviceProvider to set

getVersion

public String getVersion()
Get the version

Returns:
the version

setVersion

public void setVersion(String version)
Set the version

Parameters:
version - the version to set

getVmxFilepath

public String getVmxFilepath()
Get the vmxFilepath

Returns:
the vmxFilepath

setVmxFilepath

public void setVmxFilepath(String vmxFilepath)
Set the vmxFilepath

Parameters:
vmxFilepath - the vmxFilepath to set

isWaitForTools

public boolean isWaitForTools()
Get the waitForTools

Returns:
the waitForTools

setWaitForTools

public void setWaitForTools(boolean waitForTools)
Set the waitForTools

Parameters:
waitForTools - the waitForTools to set

getHost

public String getHost()
Get the host

Returns:
the host

setHost

public void setHost(String host)
Set the host

Parameters:
host - the host to set

getPort

public Integer getPort()
Get the port

Returns:
the port

setPort

public void setPort(Integer port)
Set the port

Parameters:
port - the port to set

getCmd

public String getCmd()
Get the cmd

Returns:
the cmd

setCmd

public void setCmd(String cmd)
Set the cmd

Parameters:
cmd - the cmd to set

getGuestUsername

public String getGuestUsername()
Get the guestUsername

Returns:
the guestUsername

setGuestUsername

public void setGuestUsername(String guestUsername)
Set the guestUsername

Parameters:
guestUsername - the guestUsername to set

getShutdownOpt

public String getShutdownOpt()
Get the shutdownOpt

Returns:
the shutdownOpt

setShutdownOpt

public void setShutdownOpt(String shutdownOpt)
Set the shutdownOpt

Parameters:
shutdownOpt - the shutdownOpt to set

getGuestPassword

public String getGuestPassword()
Get the guestPassword

Returns:
the guestPassword

setGuestPassword

public void setGuestPassword(String guestPassword)
Set the guestPassword

Parameters:
guestPassword - the guestPassword to set

getWaitForToolsTimeout

public Integer getWaitForToolsTimeout()
Get the waitForToolsTimeout

Returns:
the waitForToolsTimeout

setWaitForToolsTimeout

public void setWaitForToolsTimeout(Integer waitForToolsTimeout)
Set the waitForToolsTimeout

Parameters:
waitForToolsTimeout - the waitForToolsTimeout to set

execute

public void execute()
             throws MojoExecutionException,
                    MojoFailureException
Main method for the mojo.

Throws:
MojoExecutionException
MojoFailureException

Agaetis
VMWare Maven 2 Plugin

1.0.0.7

2009 Agaetis