|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jenkinsci.plugins.vsphere.tools.VSphere
public class VSphere
| Method Summary | |
|---|---|
static VSphere |
connect(String server,
String user,
String pw)
Initiates Connection to vSphere Server |
static VSphere |
connect(String server,
String user,
String pw,
String cluster,
String resourcePool)
|
void |
destroyVm(String name,
boolean failOnNoExist)
Detroys the VM in vSphere |
com.vmware.vim25.ManagedObjectReference |
findSnapshotInTree(com.vmware.vim25.VirtualMachineSnapshotTree[] snapTree,
String snapName)
|
String |
getIp(com.vmware.vim25.mo.VirtualMachine vm)
Shortcut |
com.vmware.vim25.mo.VirtualMachine |
getVmByName(String vmName)
|
void |
markAsTemplate(String vmName,
String snapName,
String desc,
boolean force)
|
com.vmware.vim25.mo.VirtualMachine |
markAsVm(String name)
|
void |
revertToSnapshot(String vmName,
String snapName)
|
com.vmware.vim25.mo.VirtualMachine |
shallowCloneVm(String cloneName,
String template,
boolean powerOn,
boolean linkedClone)
Creates a new VM from a given template with a given name. |
void |
startVm(String name)
|
void |
takeSnapshot(String name,
String snapshot,
String description)
|
static String |
vSphereOutput(String msg)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static VSphere connect(String server,
String user,
String pw)
throws VSphereException
VSphereException
public static VSphere connect(String server,
String user,
String pw,
String cluster,
String resourcePool)
throws VSphereException
VSphereExceptionpublic static String vSphereOutput(String msg)
public com.vmware.vim25.mo.VirtualMachine shallowCloneVm(String cloneName,
String template,
boolean powerOn,
boolean linkedClone)
throws VSphereException
cloneName - - name of VM to be createdtemplate - - vsphere template name to cloneverboseOutput - - true for extra output to logs
Exception
VSphereException
public void startVm(String name)
throws VSphereException
name - - Name of VM to start
VSphereException
public com.vmware.vim25.ManagedObjectReference findSnapshotInTree(com.vmware.vim25.VirtualMachineSnapshotTree[] snapTree,
String snapName)
public void revertToSnapshot(String vmName,
String snapName)
public void takeSnapshot(String name,
String snapshot,
String description)
throws VSphereException
VSphereException
public void markAsTemplate(String vmName,
String snapName,
String desc,
boolean force)
throws VSphereException
VSphereException
public com.vmware.vim25.mo.VirtualMachine markAsVm(String name)
throws VSphereException
VSphereException
public String getIp(com.vmware.vim25.mo.VirtualMachine vm)
throws VSphereException
name - - VirtualMachine name of which IP is returned
VSphereException
public com.vmware.vim25.mo.VirtualMachine getVmByName(String vmName)
throws com.vmware.vim25.InvalidProperty,
com.vmware.vim25.RuntimeFault,
RemoteException,
MalformedURLException
vmName - - name of VM object to retrieve
com.vmware.vim25.InvalidProperty
com.vmware.vim25.RuntimeFault
RemoteException
MalformedURLException
VSphereException
public void destroyVm(String name,
boolean failOnNoExist)
throws VSphereException
vm - - VM object to destroy
VSphereException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||