本文整理汇总了Java中com.vmware.vim25.HostMountInfo类的典型用法代码示例。如果您正苦于以下问题:Java HostMountInfo类的具体用法?Java HostMountInfo怎么用?Java HostMountInfo使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
HostMountInfo类属于com.vmware.vim25包,在下文中一共展示了HostMountInfo类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: printFileVolumeInfo
import com.vmware.vim25.HostMountInfo; //导入依赖的package包/类
static void printFileVolumeInfo(HostFileSystemVolumeInfo info)
{
String[] volTypes = info.getVolumeTypeList();
for(int i=0; volTypes!=null && i<volTypes.length; i++)
{
System.out.println(volTypes[i]);
}
System.out.println("\nThe file system volumes mounted:");
HostFileSystemMountInfo[] mis = info.getMountInfo();
for(int i=0; mis!=null && i<mis.length; i++)
{
HostMountInfo hmi = mis[i].getMountInfo();
System.out.println("\nAccessible:" + hmi.getAccessible());
System.out.println("AccessMode:" + hmi.getAccessMode());
System.out.println("Path:" + hmi.getPath());
HostFileSystemVolume hfsv = mis[i].getVolume();
System.out.println("Capacity:" + hfsv.getCapacity());
System.out.println("Name:" + hfsv.getName());
System.out.println("Type:" + hfsv.getType());
}
}
示例2: isAccessibleToHost
import com.vmware.vim25.HostMountInfo; //导入依赖的package包/类
public boolean isAccessibleToHost(String hostValue) throws Exception {
boolean isAccessible = true;
List<DatastoreHostMount> hostMounts = getHostMounts();
for (DatastoreHostMount hostMount : hostMounts) {
String hostMountValue = hostMount.getKey().getValue();
if (hostMountValue.equalsIgnoreCase(hostValue)) {
HostMountInfo mountInfo = hostMount.getMountInfo();
isAccessible = mountInfo.isAccessible();
break;
}
}
return isAccessible;
}