org.ow2.jasmine.vmm.agent.driver.xenapi
Class XenHost

java.lang.Object
  extended by javax.management.NotificationBroadcasterSupport
      extended by org.ow2.jasmine.vmm.agent.domain.ManagedResource
          extended by org.ow2.jasmine.vmm.agent.domain.AbstractHost
              extended by org.ow2.jasmine.vmm.agent.driver.xenapi.XenHost
All Implemented Interfaces:
javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, org.ow2.jasmine.vmm.api.HostMXBean, org.ow2.jasmine.vmm.api.ManagedResourceMXBean

public class XenHost
extends AbstractHost
implements javax.management.NotificationEmitter

XenAPI driver Host MXBean implementation


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.ow2.jasmine.vmm.api.HostMXBean
org.ow2.jasmine.vmm.api.HostMXBean.HostPowerState, org.ow2.jasmine.vmm.api.HostMXBean.PerfMetric
 
Field Summary
 
Fields inherited from class org.ow2.jasmine.vmm.agent.domain.ManagedResource
objectName, path
 
Method Summary
protected  void addVM(XenVirtualMachine vm)
           
 org.ow2.jasmine.vmm.api.VirtualMachineMXBean cloneVM(com.xensource.xenapi.VM vm, java.lang.String clonedVmName, org.ow2.jasmine.vmm.api.VMCustomizationSpec custSpec, boolean sync)
           
 void configurePerfMonitor(java.util.Set<org.ow2.jasmine.vmm.api.HostMXBean.PerfMetric> metricsOfInterest, long periodMillis)
           
 org.ow2.jasmine.vmm.api.VirtualMachineMXBean createVM(org.ow2.jasmine.vmm.api.VMConfigSpec vmSpecIn, boolean sync)
           
 java.util.Map<java.lang.String,java.lang.String> getAttributes()
           
 long getCPUFrequencyMhz()
           
 java.util.Map<java.lang.String,java.lang.String> getCPUInfo()
           
 float getCPULoad()
           
 long getFreeMemoryMB()
           
 java.lang.String getHostName()
           
 org.ow2.jasmine.vmm.api.HostMXBean.HostPowerState getHostState()
           
 java.util.Map<java.lang.String,java.lang.String> getHypervisorInfo()
           
 float[] getLoadPerCPU()
           
 javax.management.MBeanNotificationInfo[] getNotificationInfo()
           
 int getNumCPU()
           
 javax.management.ObjectName getObjectName()
           
 java.util.List<org.ow2.jasmine.vmm.api.VirtualMachineMXBean> getResidentVMs()
           
 org.ow2.jasmine.vmm.api.ServerPoolMXBean getServerPool()
           
 long getTotalMemoryMB()
           
 java.lang.String getUuid()
           
 java.util.Map<java.lang.String,java.lang.Float> getVMCPULoads()
           
 org.ow2.jasmine.vmm.api.VirtualMachineImageStoreMXBean getVMImageStore()
           
 java.util.Map<java.lang.String,org.ow2.jasmine.vmm.api.ResourceUsage> getVMResourceUsage()
           
 boolean isConnectionLost()
           
static XenHost newHost(XenServerPool resourcePool, javax.management.ObjectName objectName, java.lang.String hostName, java.lang.String poolUser, java.lang.String poolPassword, int port, com.xensource.xenapi.Connection masterCon, java.util.Map<java.lang.String,java.lang.String> attributes)
           
 void postMigrateVM(XenVirtualMachine vm, XenHost newHost)
           
 void removeFromInventory()
           
protected  void removeVM(XenVirtualMachine vm)
           
 void removeVMFromInventory(XenVirtualMachine vm)
           
 void start()
           
 void stop()
           
 
Methods inherited from class org.ow2.jasmine.vmm.agent.domain.ManagedResource
emitNotification, emitNotification, getPath
 
Methods inherited from class javax.management.NotificationBroadcasterSupport
addNotificationListener, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.management.NotificationEmitter
removeNotificationListener
 
Methods inherited from interface javax.management.NotificationBroadcaster
addNotificationListener, removeNotificationListener
 
Methods inherited from interface org.ow2.jasmine.vmm.api.ManagedResourceMXBean
getPath
 

Method Detail

newHost

public static XenHost newHost(XenServerPool resourcePool,
                              javax.management.ObjectName objectName,
                              java.lang.String hostName,
                              java.lang.String poolUser,
                              java.lang.String poolPassword,
                              int port,
                              com.xensource.xenapi.Connection masterCon,
                              java.util.Map<java.lang.String,java.lang.String> attributes)

removeVMFromInventory

public void removeVMFromInventory(XenVirtualMachine vm)

isConnectionLost

public boolean isConnectionLost()
Specified by:
isConnectionLost in interface org.ow2.jasmine.vmm.api.HostMXBean

addVM

protected void addVM(XenVirtualMachine vm)

removeVM

protected void removeVM(XenVirtualMachine vm)

getServerPool

public org.ow2.jasmine.vmm.api.ServerPoolMXBean getServerPool()
Specified by:
getServerPool in interface org.ow2.jasmine.vmm.api.HostMXBean

postMigrateVM

public void postMigrateVM(XenVirtualMachine vm,
                          XenHost newHost)

configurePerfMonitor

public void configurePerfMonitor(java.util.Set<org.ow2.jasmine.vmm.api.HostMXBean.PerfMetric> metricsOfInterest,
                                 long periodMillis)
Specified by:
configurePerfMonitor in interface org.ow2.jasmine.vmm.api.HostMXBean

getObjectName

public javax.management.ObjectName getObjectName()
Specified by:
getObjectName in interface org.ow2.jasmine.vmm.api.ManagedResourceMXBean
Overrides:
getObjectName in class ManagedResource

getHypervisorInfo

public java.util.Map<java.lang.String,java.lang.String> getHypervisorInfo()
                                                                   throws org.ow2.jasmine.vmm.api.VMMException
Specified by:
getHypervisorInfo in interface org.ow2.jasmine.vmm.api.HostMXBean
Throws:
org.ow2.jasmine.vmm.api.VMMException

getCPUInfo

public java.util.Map<java.lang.String,java.lang.String> getCPUInfo()
                                                            throws org.ow2.jasmine.vmm.api.VMMException
Specified by:
getCPUInfo in interface org.ow2.jasmine.vmm.api.HostMXBean
Throws:
org.ow2.jasmine.vmm.api.VMMException

getCPUFrequencyMhz

public long getCPUFrequencyMhz()
                        throws org.ow2.jasmine.vmm.api.VMMException
Throws:
org.ow2.jasmine.vmm.api.VMMException

getNumCPU

public int getNumCPU()
              throws org.ow2.jasmine.vmm.api.VMMException
Specified by:
getNumCPU in interface org.ow2.jasmine.vmm.api.HostMXBean
Throws:
org.ow2.jasmine.vmm.api.VMMException

getHostName

public java.lang.String getHostName()
Specified by:
getHostName in interface org.ow2.jasmine.vmm.api.HostMXBean

getUuid

public java.lang.String getUuid()

getVMImageStore

public org.ow2.jasmine.vmm.api.VirtualMachineImageStoreMXBean getVMImageStore()
Specified by:
getVMImageStore in interface org.ow2.jasmine.vmm.api.HostMXBean

getFreeMemoryMB

public long getFreeMemoryMB()
                     throws org.ow2.jasmine.vmm.api.VMMException
Specified by:
getFreeMemoryMB in interface org.ow2.jasmine.vmm.api.HostMXBean
Throws:
org.ow2.jasmine.vmm.api.VMMException

getResidentVMs

public java.util.List<org.ow2.jasmine.vmm.api.VirtualMachineMXBean> getResidentVMs()
Specified by:
getResidentVMs in interface org.ow2.jasmine.vmm.api.HostMXBean

createVM

public org.ow2.jasmine.vmm.api.VirtualMachineMXBean createVM(org.ow2.jasmine.vmm.api.VMConfigSpec vmSpecIn,
                                                             boolean sync)
                                                      throws org.ow2.jasmine.vmm.api.InvalidVMConfigException,
                                                             org.ow2.jasmine.vmm.api.VMMException
Specified by:
createVM in interface org.ow2.jasmine.vmm.api.HostMXBean
Throws:
org.ow2.jasmine.vmm.api.InvalidVMConfigException
org.ow2.jasmine.vmm.api.VMMException

cloneVM

public org.ow2.jasmine.vmm.api.VirtualMachineMXBean cloneVM(com.xensource.xenapi.VM vm,
                                                            java.lang.String clonedVmName,
                                                            org.ow2.jasmine.vmm.api.VMCustomizationSpec custSpec,
                                                            boolean sync)
                                                     throws org.ow2.jasmine.vmm.api.InsufficientResourcesException,
                                                            org.ow2.jasmine.vmm.api.VMMException
Throws:
org.ow2.jasmine.vmm.api.InsufficientResourcesException
org.ow2.jasmine.vmm.api.VMMException

getTotalMemoryMB

public long getTotalMemoryMB()
                      throws org.ow2.jasmine.vmm.api.VMMException
Specified by:
getTotalMemoryMB in interface org.ow2.jasmine.vmm.api.HostMXBean
Throws:
org.ow2.jasmine.vmm.api.VMMException

getLoadPerCPU

public float[] getLoadPerCPU()
                      throws org.ow2.jasmine.vmm.api.VMMException
Specified by:
getLoadPerCPU in interface org.ow2.jasmine.vmm.api.HostMXBean
Throws:
org.ow2.jasmine.vmm.api.VMMException

getCPULoad

public float getCPULoad()
                 throws org.ow2.jasmine.vmm.api.VMMException
Specified by:
getCPULoad in interface org.ow2.jasmine.vmm.api.HostMXBean
Throws:
org.ow2.jasmine.vmm.api.VMMException

getVMCPULoads

public java.util.Map<java.lang.String,java.lang.Float> getVMCPULoads()
                                                              throws org.ow2.jasmine.vmm.api.VMMException
Specified by:
getVMCPULoads in interface org.ow2.jasmine.vmm.api.HostMXBean
Throws:
org.ow2.jasmine.vmm.api.VMMException

getNotificationInfo

public javax.management.MBeanNotificationInfo[] getNotificationInfo()
Specified by:
getNotificationInfo in interface javax.management.NotificationBroadcaster
Overrides:
getNotificationInfo in class javax.management.NotificationBroadcasterSupport

getVMResourceUsage

public java.util.Map<java.lang.String,org.ow2.jasmine.vmm.api.ResourceUsage> getVMResourceUsage()
                                                                                         throws org.ow2.jasmine.vmm.api.VMMException
Specified by:
getVMResourceUsage in interface org.ow2.jasmine.vmm.api.HostMXBean
Throws:
org.ow2.jasmine.vmm.api.VMMException

getAttributes

public java.util.Map<java.lang.String,java.lang.String> getAttributes()
Specified by:
getAttributes in interface org.ow2.jasmine.vmm.api.HostMXBean

removeFromInventory

public void removeFromInventory()
Specified by:
removeFromInventory in class AbstractHost

getHostState

public org.ow2.jasmine.vmm.api.HostMXBean.HostPowerState getHostState()
                                                               throws org.ow2.jasmine.vmm.api.VMMException
Specified by:
getHostState in interface org.ow2.jasmine.vmm.api.HostMXBean
Throws:
org.ow2.jasmine.vmm.api.VMMException

start

public void start()
Specified by:
start in interface org.ow2.jasmine.vmm.api.HostMXBean

stop

public void stop()
Specified by:
stop in interface org.ow2.jasmine.vmm.api.HostMXBean


Copyright © 2011 OW2 Consortium. All Rights Reserved.