Search in sources :

Example 1 with HostConfigInfo

use of com.vmware.vim25.HostConfigInfo in project coprhd-controller by CoprHD.

the class EsxHostDiscoveryAdapter method getNics.

/**
 * Fetch Nics for the hostsystem
 *
 * @param hostSystem
 *            - {@link HostSystem} vi sdk MO
 * @return
 */
protected List<HostVirtualNic> getNics(HostSystem hostSystem) {
    List<HostVirtualNic> nics = Lists.newArrayList();
    HostConfigInfo config = hostSystem.getConfig();
    if ((config != null) && (config.getNetwork() != null) && (config.getNetwork().getVnic() != null)) {
        for (HostVirtualNic nic : config.getNetwork().getVnic()) {
            nics.add(nic);
        }
    }
    return nics;
}
Also used : HostVirtualNic(com.vmware.vim25.HostVirtualNic) HostConfigInfo(com.vmware.vim25.HostConfigInfo)

Example 2 with HostConfigInfo

use of com.vmware.vim25.HostConfigInfo in project cloudstack by apache.

the class VmwareResource method getHardwareAccelerationSupportForDataStore.

private boolean getHardwareAccelerationSupportForDataStore(ManagedObjectReference host, String dataStoreName) throws Exception {
    HostConfigInfo config = getServiceContext().getVimClient().getDynamicProperty(host, "config");
    List<HostFileSystemMountInfo> mountInfoList = config.getFileSystemVolume().getMountInfo();
    for (HostFileSystemMountInfo hostFileSystemMountInfo : mountInfoList) {
        if (hostFileSystemMountInfo.getVolume().getName().equals(dataStoreName)) {
            return hostFileSystemMountInfo.getVStorageSupport().equals("vStorageSupported");
        }
    }
    return false;
}
Also used : HostConfigInfo(com.vmware.vim25.HostConfigInfo) HostFileSystemMountInfo(com.vmware.vim25.HostFileSystemMountInfo)

Aggregations

HostConfigInfo (com.vmware.vim25.HostConfigInfo)2 HostFileSystemMountInfo (com.vmware.vim25.HostFileSystemMountInfo)1 HostVirtualNic (com.vmware.vim25.HostVirtualNic)1