Search in sources :

Example 6 with CommandException

use of com.iwave.ext.command.CommandException in project coprhd-controller by CoprHD.

the class HpuxHostDiscoveryAdapter method setNativeGuid.

@Override
protected void setNativeGuid(Host host) {
    HpuxSystem hpux = getCli(host);
    try {
        String macAddress = hpux.getNetworkAdapterMacAddress(LAN0);
        if (macAddress != null && !host.getNativeGuid().equalsIgnoreCase(macAddress)) {
            checkDuplicateHost(host, macAddress);
            info("Setting nativeGuid for " + host.getId() + " as " + macAddress);
            host.setNativeGuid(macAddress);
            save(host);
        }
    } catch (CommandException ex) {
        LOG.warn("Failed to get MAC address of adapter during discovery");
    }
}
Also used : HpuxSystem(com.emc.hpux.HpuxSystem) CommandException(com.iwave.ext.command.CommandException)

Aggregations

CommandException (com.iwave.ext.command.CommandException)6 CommandOutput (com.iwave.ext.command.CommandOutput)2 JSchException (com.jcraft.jsch.JSchException)2 IOException (java.io.IOException)2 AixSystem (com.emc.aix.AixSystem)1 AixVioCLI (com.emc.aix.AixVioCLI)1 HpuxSystem (com.emc.hpux.HpuxSystem)1 LinuxSystemCLI (com.iwave.ext.linux.LinuxSystemCLI)1 GetLinuxVersionLSBReleaseCommand (com.iwave.ext.linux.command.version.GetLinuxVersionLSBReleaseCommand)1 GetRedhatVersionCommandOne (com.iwave.ext.linux.command.version.GetRedhatVersionCommandOne)1 GetRedhatVersionCommandThree (com.iwave.ext.linux.command.version.GetRedhatVersionCommandThree)1 GetRedhatVersionCommandTwo (com.iwave.ext.linux.command.version.GetRedhatVersionCommandTwo)1 GetSuSEVersionCommand (com.iwave.ext.linux.command.version.GetSuSEVersionCommand)1 LinuxVersionCommand (com.iwave.ext.linux.command.version.LinuxVersionCommand)1 LinuxVersion (com.iwave.ext.linux.model.LinuxVersion)1 ChannelExec (com.jcraft.jsch.ChannelExec)1 ArrayList (java.util.ArrayList)1