hudson.plugins.virtualbox
Class VirtualBoxPlugin

java.lang.Object
  extended by hudson.Plugin
      extended by hudson.plugins.virtualbox.VirtualBoxPlugin
All Implemented Interfaces:
hudson.model.Saveable

public class VirtualBoxPlugin
extends hudson.Plugin

TODO see https://jax-ws.dev.java.net/issues/show_bug.cgi?id=554

Author:
Evgeny Mandrikov

Nested Class Summary
 
Nested classes/interfaces inherited from class hudson.Plugin
hudson.Plugin.DummyImpl
 
Field Summary
 
Fields inherited from interface hudson.model.Saveable
NOOP
 
Constructor Summary
VirtualBoxPlugin()
           
 
Method Summary
 void doComputerNameValues(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse resp, String hostName)
          For UI.
 void doGetSlaveAgent(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse resp, String macAddress)
          Used for discovering VirtualBoxSlave with specified MAC Address.
static List<VirtualBoxMachine> getDefinedVirtualMachines(String hostName)
           
static VirtualBoxCloud getHost(String hostName)
           
static List<VirtualBoxCloud> getHosts()
           
static VirtualBoxMachine getVirtualBoxMachine(String hostName, String virtualMachineName)
           
 void start()
           
 void stop()
           
 
Methods inherited from class hudson.Plugin
configure, configure, doDynamic, getConfigXml, load, postInitialize, save, setServletContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VirtualBoxPlugin

public VirtualBoxPlugin()
Method Detail

start

public void start()
           throws Exception
Overrides:
start in class hudson.Plugin
Throws:
Exception

stop

public void stop()
          throws Exception
Overrides:
stop in class hudson.Plugin
Throws:
Exception

getHosts

public static List<VirtualBoxCloud> getHosts()
Returns:
all registered VirtualBoxCloud

getHost

public static VirtualBoxCloud getHost(String hostName)
Parameters:
hostName - host name
Returns:
VirtualBoxCloud by specified name, null if not found

getDefinedVirtualMachines

public static List<VirtualBoxMachine> getDefinedVirtualMachines(String hostName)
Parameters:
hostName - host name
Returns:
all registered VirtualBoxMachine from specified host, empty list if unknown host

getVirtualBoxMachine

public static VirtualBoxMachine getVirtualBoxMachine(String hostName,
                                                     String virtualMachineName)
Parameters:
hostName - host name
virtualMachineName - virtual machine name
Returns:
VirtualBoxMachine from specified host with specified name, null if not found

doComputerNameValues

public void doComputerNameValues(org.kohsuke.stapler.StaplerRequest req,
                                 org.kohsuke.stapler.StaplerResponse resp,
                                 @QueryParameter(value="hostName")
                                 String hostName)
                          throws IOException,
                                 javax.servlet.ServletException
For UI.

Throws:
IOException
javax.servlet.ServletException

doGetSlaveAgent

public void doGetSlaveAgent(org.kohsuke.stapler.StaplerRequest req,
                            org.kohsuke.stapler.StaplerResponse resp,
                            @QueryParameter(value="macAddress")
                            String macAddress)
                     throws IOException
Used for discovering VirtualBoxSlave with specified MAC Address. HTTP 404 Error will be returned, if slave can't be found.

For example: if slave named "virtual" has MAC Adress 080027E852CC, then http://localhost:8080/hudson/plugin/virtualbox/getSlaveAgent?macAddress=080027E852CC redirects to http://localhost:8080/hudson/computer/virtual/slave-agent.jnlp

Parameters:
req - request
resp - response
macAddress - MAC Address
Throws:
IOException - if something wrong


Copyright © 2004-2013. All Rights Reserved.