use of org.ovirt.engine.core.common.businessentities.network.Network in project ovirt-engine by oVirt.
the class HostNetworkAttachmentsPersister method initReportedNetworksAndNics.
private void initReportedNetworksAndNics(List<VdsNetworkInterface> nics) {
for (VdsNetworkInterface nic : nics) {
if (nic.getNetworkName() != null) {
Network network = clusterNetworks.get(nic.getNetworkName());
if (network != null) {
reportedNetworksById.put(network.getId(), network);
reportedNicsByNetworkId.put(network.getId(), nic);
}
}
}
}
use of org.ovirt.engine.core.common.businessentities.network.Network in project ovirt-engine by oVirt.
the class HostNetworkAttachmentsPersisterTest method createNetworkWithName.
private Network createNetworkWithName(String networkName) {
Network network = new Network();
network.setName(networkName);
network.setId(Guid.newGuid());
return network;
}
use of org.ovirt.engine.core.common.businessentities.network.Network in project ovirt-engine by oVirt.
the class DataCenterNetworkListModel method edit.
public void edit() {
final Network network = getSelectedItem();
if (getWindow() != null) {
return;
}
final NetworkModel networkModel = new EditNetworkModel(network, this);
setWindow(networkModel);
networkModel.getDataCenters().setItems(Arrays.asList(getEntity()));
networkModel.getDataCenters().setSelectedItem(getEntity());
}
use of org.ovirt.engine.core.common.businessentities.network.Network in project ovirt-engine by oVirt.
the class RemoveNetworksModel method onRemove.
public void onRemove() {
ArrayList<ActionParametersBase> pb = new ArrayList<>();
for (Object a : sourceListModel.getSelectedItems()) {
Network network = (Network) a;
if (network.isExternal()) {
pb.add(new RemoveNetworkParameters(network.getId(), getForce().getEntity()));
} else {
pb.add(new RemoveNetworkParameters(network.getId()));
}
}
Frontend.getInstance().runMultipleAction(ActionType.RemoveNetwork, pb);
sourceListModel.setConfirmWindow(null);
}
use of org.ovirt.engine.core.common.businessentities.network.Network in project ovirt-engine by oVirt.
the class ExecuteNetworkCommandInNetworkOperationTest method createNetwork.
private Network createNetwork(String networkA) {
Network result = new Network();
result.setId(Guid.newGuid());
result.setName(networkA);
return result;
}
Aggregations