Search in sources :

Example 1 with HpuxVersion

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;
    }
}
Also used : HpuxSystem(com.emc.hpux.HpuxSystem) HpuxVersion(com.emc.hpux.model.HpuxVersion)

Example 2 with HpuxVersion

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);
}
Also used : HpuxVersion(com.emc.hpux.model.HpuxVersion)

Example 3 with HpuxVersion

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());
    }
}
Also used : HpuxVersion(com.emc.hpux.model.HpuxVersion)

Aggregations

HpuxVersion (com.emc.hpux.model.HpuxVersion)3 HpuxSystem (com.emc.hpux.HpuxSystem)1