use of com.vmware.vim25.HostOpaqueNetworkInfo in project cloudstack by apache.
the class HostMO method hasOpaqueNSXNetwork.
public boolean hasOpaqueNSXNetwork() throws Exception {
HostNetworkInfo netInfo = getHostNetworkInfo();
List<HostOpaqueNetworkInfo> opaqueNetworks = netInfo.getOpaqueNetwork();
if (opaqueNetworks != null) {
for (HostOpaqueNetworkInfo opaqueNetwork : opaqueNetworks) {
if (opaqueNetwork.getOpaqueNetworkId() != null && opaqueNetwork.getOpaqueNetworkId().equals("br-int") && opaqueNetwork.getOpaqueNetworkType() != null && opaqueNetwork.getOpaqueNetworkType().equals("nsx.network")) {
return true;
}
}
throw new Exception("NSX API VERSION >= 4.2 BUT br-int (nsx.network) NOT FOUND");
} else {
throw new Exception("NSX API VERSION >= 4.2 BUT br-int (nsx.network) NOT FOUND");
}
}
Aggregations