org.ow2.jasmine.vmm.agent.driver.libvirt
Class LibvirtConfigFileUtils

java.lang.Object
  extended by org.ow2.jasmine.vmm.agent.driver.libvirt.LibvirtConfigFileUtils

public class LibvirtConfigFileUtils
extends java.lang.Object

LibvirtConfigFileUtils is a XML Parser dedicated to Libvirt Driver, To get stats of Network Interfaces or/and Disk Devices, we need to know the name of the device. The only way to get the name is to parse VM XML config file.


Constructor Summary
LibvirtConfigFileUtils()
           
 
Method Summary
static java.lang.Object getConfigItem(java.lang.String xmlConfig, java.lang.String xpathExpression, javax.xml.namespace.QName returnType)
           
static java.util.List<java.lang.String> getDiskDevices(java.lang.String xmlConfig)
          Get the name of every disk devices plugged on the VM.
static java.util.List<java.lang.String> getDiskFiles(java.lang.String xmlConfig)
          Get the name of every disk file plugged on the VM.
static java.util.List<java.lang.String> getNetDevices(java.lang.String xmlConfig)
          Get the name of every Network Interfaces plugged on the VM.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LibvirtConfigFileUtils

public LibvirtConfigFileUtils()
Method Detail

getConfigItem

public static java.lang.Object getConfigItem(java.lang.String xmlConfig,
                                             java.lang.String xpathExpression,
                                             javax.xml.namespace.QName returnType)

getDiskDevices

public static java.util.List<java.lang.String> getDiskDevices(java.lang.String xmlConfig)
Get the name of every disk devices plugged on the VM.

Parameters:
xmlConfig - The VM XML config file
Returns:
A list of Disk Device name

getDiskFiles

public static java.util.List<java.lang.String> getDiskFiles(java.lang.String xmlConfig)
Get the name of every disk file plugged on the VM.

Parameters:
xmlConfig - The VM XML config file
Returns:
A list of Disk file name

getNetDevices

public static java.util.List<java.lang.String> getNetDevices(java.lang.String xmlConfig)
Get the name of every Network Interfaces plugged on the VM.

Parameters:
xmlConfig - The VM XML config file
Returns:
A list of Network Device name


Copyright © 2010 OW2 Consortium. All Rights Reserved.