org.ow2.jasmine.vmm.agent.driver.hyperv
Class HyperVConnection

java.lang.Object
  extended by org.ow2.jasmine.vmm.agent.driver.hyperv.HyperVConnection

public class HyperVConnection
extends java.lang.Object


Nested Class Summary
 class HyperVConnection.Template
           
 class HyperVConnection.VM
           
 
Constructor Summary
HyperVConnection(java.lang.String hostName, java.lang.String username, java.lang.String password)
           
 
Method Summary
 void closeConnection()
           
 void connectToHyperv()
           
 void connectToWin32()
           
 boolean createVM(java.lang.String vmName, java.lang.String VHDPath)
           
 boolean destroyVM(HyperVHost host, java.lang.String ElementName)
           
 java.util.Set<HyperVConnection.VM> getAllVM()
           
 float getCPULoad(java.lang.String nameLabel)
           
 int getEnabledState(HyperVHost host, java.lang.String ElementName)
           
 java.util.HashMap<java.lang.String,java.lang.String> getHostCPUInfo()
           
 float[] getHostCPULoad()
           
 long getHostFreeSpaceMB(java.lang.String path)
           
 int getHostNumCPU()
           
 long getHostSizeMB(java.lang.String path)
           
 java.util.Set<HyperVConnection.Template> getHostVMTemplates(java.lang.String imageStorePath)
           
 java.lang.String getMacAddress(java.lang.String nameLabel)
           
 long getMemorySize(java.lang.String nameLabel)
           
 long getMemoryUsage(java.lang.String nameLabel)
           
 int getNumberOfProcessors(java.lang.String nameLabel)
           
 int getSchedulingCap(java.lang.String nameLabel)
           
 int getSchedulingWeight(java.lang.String nameLabel)
           
 java.lang.String getStartTime(HyperVHost host, java.lang.String ElementName)
           
 java.util.HashMap<java.lang.String,java.lang.Float> getVMCPULoads()
           
 boolean hostCopyFile(java.lang.String originPath, java.lang.String destinationPath)
           
 boolean hostDeleteFile(java.lang.String folderPath, java.lang.String name)
           
 boolean rebootVM(HyperVHost host, java.lang.String ElementName)
           
 boolean setCPUCount(java.lang.String ElementName, int numVCPU)
           
 boolean setMemorySize(java.lang.String ElementName, long memorySizeMB)
           
 boolean setSchedulingCap(java.lang.String ElementName, int schedulingCap)
           
 boolean setSchedulingWeight(java.lang.String ElementName, int schedulingWeight)
           
 boolean shutdownVM(HyperVHost host, java.lang.String ElementName)
           
 boolean startVM(HyperVHost host, java.lang.String ElementName)
           
 boolean suspendVM(HyperVHost host, java.lang.String ElementName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HyperVConnection

public HyperVConnection(java.lang.String hostName,
                        java.lang.String username,
                        java.lang.String password)
Method Detail

connectToHyperv

public void connectToHyperv()

connectToWin32

public void connectToWin32()

closeConnection

public void closeConnection()

getAllVM

public java.util.Set<HyperVConnection.VM> getAllVM()
                                            throws org.jinterop.dcom.common.JIException
Throws:
org.jinterop.dcom.common.JIException

startVM

public boolean startVM(HyperVHost host,
                       java.lang.String ElementName)
                throws java.lang.Exception
Throws:
java.lang.Exception

shutdownVM

public boolean shutdownVM(HyperVHost host,
                          java.lang.String ElementName)
                   throws java.lang.Exception
Throws:
java.lang.Exception

rebootVM

public boolean rebootVM(HyperVHost host,
                        java.lang.String ElementName)
                 throws java.lang.Exception
Throws:
java.lang.Exception

suspendVM

public boolean suspendVM(HyperVHost host,
                         java.lang.String ElementName)
                  throws java.lang.Exception
Throws:
java.lang.Exception

destroyVM

public boolean destroyVM(HyperVHost host,
                         java.lang.String ElementName)
                  throws java.lang.Exception
Throws:
java.lang.Exception

createVM

public boolean createVM(java.lang.String vmName,
                        java.lang.String VHDPath)
                 throws org.jinterop.dcom.common.JIException
Throws:
org.jinterop.dcom.common.JIException

getEnabledState

public int getEnabledState(HyperVHost host,
                           java.lang.String ElementName)
                    throws java.lang.Exception
Throws:
java.lang.Exception

setCPUCount

public boolean setCPUCount(java.lang.String ElementName,
                           int numVCPU)
                    throws java.lang.Exception
Throws:
java.lang.Exception

setMemorySize

public boolean setMemorySize(java.lang.String ElementName,
                             long memorySizeMB)
                      throws java.lang.Exception
Throws:
java.lang.Exception

setSchedulingCap

public boolean setSchedulingCap(java.lang.String ElementName,
                                int schedulingCap)
                         throws java.lang.Exception
Throws:
java.lang.Exception

setSchedulingWeight

public boolean setSchedulingWeight(java.lang.String ElementName,
                                   int schedulingWeight)
                            throws java.lang.Exception
Throws:
java.lang.Exception

getSchedulingWeight

public int getSchedulingWeight(java.lang.String nameLabel)
                        throws org.jinterop.dcom.common.JIException
Throws:
org.jinterop.dcom.common.JIException

getSchedulingCap

public int getSchedulingCap(java.lang.String nameLabel)
                     throws org.jinterop.dcom.common.JIException
Throws:
org.jinterop.dcom.common.JIException

getMacAddress

public java.lang.String getMacAddress(java.lang.String nameLabel)
                               throws org.jinterop.dcom.common.JIException
Throws:
org.jinterop.dcom.common.JIException

getStartTime

public java.lang.String getStartTime(HyperVHost host,
                                     java.lang.String ElementName)
                              throws java.lang.Exception
Throws:
java.lang.Exception

getNumberOfProcessors

public int getNumberOfProcessors(java.lang.String nameLabel)
                          throws org.jinterop.dcom.common.JIException
Throws:
org.jinterop.dcom.common.JIException

getCPULoad

public float getCPULoad(java.lang.String nameLabel)
                 throws org.jinterop.dcom.common.JIException
Throws:
org.jinterop.dcom.common.JIException

getMemorySize

public long getMemorySize(java.lang.String nameLabel)
                   throws java.lang.Exception
Throws:
java.lang.Exception

getMemoryUsage

public long getMemoryUsage(java.lang.String nameLabel)
                    throws org.jinterop.dcom.common.JIException
Throws:
org.jinterop.dcom.common.JIException

getVMCPULoads

public java.util.HashMap<java.lang.String,java.lang.Float> getVMCPULoads()
                                                                  throws org.jinterop.dcom.common.JIException
Throws:
org.jinterop.dcom.common.JIException

getHostVMTemplates

public java.util.Set<HyperVConnection.Template> getHostVMTemplates(java.lang.String imageStorePath)
                                                            throws org.jinterop.dcom.common.JIException
Throws:
org.jinterop.dcom.common.JIException

hostDeleteFile

public boolean hostDeleteFile(java.lang.String folderPath,
                              java.lang.String name)
                       throws org.jinterop.dcom.common.JIException
Throws:
org.jinterop.dcom.common.JIException

hostCopyFile

public boolean hostCopyFile(java.lang.String originPath,
                            java.lang.String destinationPath)
                     throws org.jinterop.dcom.common.JIException
Throws:
org.jinterop.dcom.common.JIException

getHostSizeMB

public long getHostSizeMB(java.lang.String path)
                   throws org.jinterop.dcom.common.JIException
Throws:
org.jinterop.dcom.common.JIException

getHostFreeSpaceMB

public long getHostFreeSpaceMB(java.lang.String path)
                        throws org.jinterop.dcom.common.JIException
Throws:
org.jinterop.dcom.common.JIException

getHostNumCPU

public int getHostNumCPU()
                  throws org.jinterop.dcom.common.JIException
Throws:
org.jinterop.dcom.common.JIException

getHostCPUInfo

public java.util.HashMap<java.lang.String,java.lang.String> getHostCPUInfo()
                                                                    throws org.jinterop.dcom.common.JIException
Throws:
org.jinterop.dcom.common.JIException

getHostCPULoad

public float[] getHostCPULoad()
                       throws org.jinterop.dcom.common.JIException
Throws:
org.jinterop.dcom.common.JIException


Copyright © 2009 OW2 Consortium. All Rights Reserved.