use of org.ovirt.engine.core.common.businessentities.network.pseudo.NetworkLabel in project ovirt-engine by oVirt.
the class GetNetworkLabelsByHostNicIdQuery method executeQueryCommand.
@Override
protected void executeQueryCommand() {
VdsNetworkInterface nic = interfaceDao.get(getParameters().getId());
getQueryReturnValue().setReturnValue(nic == null || !NetworkUtils.isLabeled(nic) ? Collections.<NetworkLabel>emptyList() : convertToNetworkLabels(nic.getLabels()));
}
use of org.ovirt.engine.core.common.businessentities.network.pseudo.NetworkLabel in project ovirt-engine by oVirt.
the class GetNetworkLabelsByNetworkIdQuery method executeQueryCommand.
@Override
protected void executeQueryCommand() {
Network network = networkDao.get(getParameters().getId(), getUserID(), getParameters().isFiltered());
getQueryReturnValue().setReturnValue(network == null || !NetworkUtils.isLabeled(network) ? Collections.<NetworkLabel>emptyList() : new ArrayList<>(Arrays.asList(new NetworkLabel(network.getLabel()))));
}
Aggregations