use of com.vmware.vim25.HostMountInfo in project cloudstack by apache.
the class DatastoreMO method isAccessibleToHost.
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;
}
use of com.vmware.vim25.HostMountInfo in project coprhd-controller by CoprHD.
the class VerifyDatastoreForRemoval method checkDatastoreAccessibility.
private void checkDatastoreAccessibility(DatastoreHostMount mount) {
HostMountInfo mountInfo = mount.getMountInfo();
if (mountInfo.getAccessible() == Boolean.FALSE) {
HostSystem host = vcenter.lookupManagedEntity(mount.getKey());
String hostName = host.getName();
String reason = StringUtils.defaultIfBlank(mountInfo.getInaccessibleReason(), "unknown");
logWarn("verify.datastore.removal.inaccessible", hostName, reason);
}
}
Aggregations