org.redhat.vmtruckloader.service
Interface MachineService

All Known Implementing Classes:
VMWareMachineService

public interface MachineService

Service interface for the MachineService.

Provides functionality to get machine info, start a machine, stop a machine, etc.

Author:
Romain Pelisse - belaran@gmail.com, Duncan Doyle

Method Summary
 MachineSpecification cloneMachine(String sourceMachineName, MachineSpecification spec)
          Clones the source machine to the target machine.
 void deleteMachine(String machineName)
          Stops the machine with the given name.
 void deploy(String netName, String vmName)
          Move a VM to the appropriate VLAN
 void editMachine(MachineSpecification machineCreate)
           
 Collection<com.vmware.vim25.mo.Task> getJobs()
          Returns currently running jobs.
 com.vmware.vim25.mo.VirtualMachine getMachine(String machineName)
          Retrieves the Machine information of the given machine.
 Collection<com.vmware.vim25.mo.VirtualMachine> getMachines()
          Retrieves the Machines.
 void setConnectionData(String username, String password, URL vCenterURL)
          Allow to pass to the instance the credential information for the backend system.
 void startMachine(String machineName)
          Starts the machine with the given name.
 void stopMachine(String machineName)
          Stops the machine with the given name.
 

Method Detail

setConnectionData

void setConnectionData(String username,
                       String password,
                       URL vCenterURL)

Allow to pass to the instance the credential information for the backend system.

Parameters:
username -
password -

getMachines

Collection<com.vmware.vim25.mo.VirtualMachine> getMachines()
Retrieves the Machines.

Returns:
a Collection containing machines.

getMachine

com.vmware.vim25.mo.VirtualMachine getMachine(String machineName)
Retrieves the Machine information of the given machine.

Parameters:
machineName - the name of the machine.
Returns:
the Machine information.

startMachine

void startMachine(String machineName)
Starts the machine with the given name.

Parameters:
machineName - the name of the machine that needs to be started.

stopMachine

void stopMachine(String machineName)
Stops the machine with the given name.

Parameters:
machineName - the name of the machine that needs to be stopped.

deleteMachine

void deleteMachine(String machineName)
Stops the machine with the given name.

Parameters:
machineName - the name of the machine that needs to be stopped.

cloneMachine

MachineSpecification cloneMachine(String sourceMachineName,
                                  MachineSpecification spec)
Clones the source machine to the target machine.

Parameters:
machineName - the name of the machine that needs to be stopped.

getJobs

Collection<com.vmware.vim25.mo.Task> getJobs()
Returns currently running jobs. This operation can be used to check status of long-running jobs like 'clone', etc.

Returns:
a Collection of Jobs.

deploy

void deploy(String netName,
            String vmName)
Move a VM to the appropriate VLAN


editMachine

void editMachine(MachineSpecification machineCreate)
Parameters:
machines - spec


Copyright © 2013. All Rights Reserved.