本文整理汇总了Java中com.vmware.vim25.HostScsiTopologyTarget类的典型用法代码示例。如果您正苦于以下问题:Java HostScsiTopologyTarget类的具体用法?Java HostScsiTopologyTarget怎么用?Java HostScsiTopologyTarget使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
HostScsiTopologyTarget类属于com.vmware.vim25包,在下文中一共展示了HostScsiTopologyTarget类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: printScsiTopology
import com.vmware.vim25.HostScsiTopologyTarget; //导入依赖的package包/类
static void printScsiTopology(HostScsiTopology hst)
{
HostScsiTopologyInterface[] hstis = hst.getAdapter();
for(int i=0; hstis!=null && i<hstis.length; i++)
{
System.out.println("Adapter:" + hstis[i].getAdapter());
System.out.println("Key:" + hstis[i].getKey());
HostScsiTopologyTarget[] hstts = hstis[i].getTarget();
for(int j=0; hstts!=null && j<hstts.length; j++)
{
System.out.println("Key:" + hstts[j].getKey());
System.out.println("Target:" + hstts[j].getTarget());
System.out.println("Transport:"
+ hstts[j].getTransport().getClass().getName());
HostScsiTopologyLun[] luns = hstts[j].getLun();
for(int k=0; luns!=null && k<luns.length; k++)
{
System.out.println("Key:" + luns[k].getKey());
System.out.println("LUN:" + luns[k].getLun());
System.out.println("ScsiLun:" + luns[k].getScsiLun());
}
}
}
}
示例2: getHostScsiDisk
import com.vmware.vim25.HostScsiTopologyTarget; //导入依赖的package包/类
private static HostScsiDisk getHostScsiDisk(HostScsiTopology hst, List<HostScsiDisk> lstHostScsiDisks, String iqn) {
for (HostScsiTopologyInterface adapter : hst.getAdapter()) {
if (adapter.getTarget() != null) {
for (HostScsiTopologyTarget target : adapter.getTarget()) {
if (target.getTransport() instanceof HostInternetScsiTargetTransport) {
String iScsiName = ((HostInternetScsiTargetTransport)target.getTransport()).getIScsiName();
if (iqn.equals(iScsiName)) {
for (HostScsiDisk hostScsiDisk : lstHostScsiDisks) {
for (HostScsiTopologyLun hstl : target.getLun()) {
if (hstl.getScsiLun().contains(hostScsiDisk.getUuid())) {
return hostScsiDisk;
}
}
}
}
}
}
}
}
return null;
}