use of com.emc.hpux.model.HpuxVersion in project coprhd-controller by CoprHD.
the class HpuxHostDiscoveryAdapter method getVersion.
protected HpuxVersion getVersion(Host host) {
HpuxSystem cli = getCli(host);
HpuxVersion version = cli.getVersion();
if (version == null) {
error("Could not determine version of HPUX host %s", host.getLabel());
return new HpuxVersion("");
} else {
return version;
}
}
use of com.emc.hpux.model.HpuxVersion in project coprhd-controller by CoprHD.
the class GetHpuxVersionCommand method parseOutput.
@Override
public void parseOutput() {
String stdOut = getOutput().getStdout();
results = new HpuxVersion(stdOut);
}
use of com.emc.hpux.model.HpuxVersion in project coprhd-controller by CoprHD.
the class HpuxHostDiscoveryAdapter method discoverHost.
@Override
protected void discoverHost(Host host, HostStateChange changes) {
validateHost(host);
HpuxVersion version = getVersion(host);
host.setOsVersion(version.toString());
if (getVersionValidator().isValidHpuxVersion(version)) {
host.setCompatibilityStatus(CompatibilityStatus.COMPATIBLE.name());
save(host);
super.discoverHost(host, changes);
} else {
host.setCompatibilityStatus(CompatibilityStatus.INCOMPATIBLE.name());
save(host);
throw ComputeSystemControllerException.exceptions.incompatibleHostVersion(getSupportedType(), version.toString(), getVersionValidator().getHpuxMinimumVersion(false).toString());
}
}
Aggregations