Search in sources :

Example 1 with GetLldpVDSCommandParameters

use of org.ovirt.engine.core.common.vdscommands.GetLldpVDSCommandParameters in project ovirt-engine by oVirt.

the class GetTlvsByHostNicIdQuery method executeQueryCommand.

@Override
protected void executeQueryCommand() {
    String interfaceName = getNic().getName();
    setLldpVDSCommandParameters(new GetLldpVDSCommandParameters(getNic().getVdsId(), new String[] { interfaceName }));
    super.executeQueryCommand();
    Map<String, LldpInfo> lldpInfos = getQueryReturnValue().getReturnValue();
    if (lldpInfos != null) {
        LldpInfo lldpInfo = lldpInfos.get(interfaceName);
        getQueryReturnValue().setReturnValue(lldpInfo.isEnabled() ? lldpInfo.getTlvs() : null);
    }
}
Also used : LldpInfo(org.ovirt.engine.core.common.businessentities.network.LldpInfo) GetLldpVDSCommandParameters(org.ovirt.engine.core.common.vdscommands.GetLldpVDSCommandParameters)

Example 2 with GetLldpVDSCommandParameters

use of org.ovirt.engine.core.common.vdscommands.GetLldpVDSCommandParameters in project ovirt-engine by oVirt.

the class GetMultipleTlvsByHostIdQuery method executeQueryCommand.

@Override
protected void executeQueryCommand() {
    String[] names = new String[0];
    setLldpVDSCommandParameters(new GetLldpVDSCommandParameters(getHostId(), names));
    super.executeQueryCommand();
}
Also used : GetLldpVDSCommandParameters(org.ovirt.engine.core.common.vdscommands.GetLldpVDSCommandParameters)

Aggregations

GetLldpVDSCommandParameters (org.ovirt.engine.core.common.vdscommands.GetLldpVDSCommandParameters)2 LldpInfo (org.ovirt.engine.core.common.businessentities.network.LldpInfo)1