Search in sources :

Example 1 with NetworkConfigurator

use of org.ovirt.engine.core.bll.network.NetworkConfigurator in project ovirt-engine by oVirt.

the class InstallVdsInternalCommand method configureManagementNetwork.

private void configureManagementNetwork() {
    final NetworkConfigurator networkConfigurator = new NetworkConfigurator(getVds(), getContext());
    if (!networkConfigurator.awaitVdsmResponse()) {
        throw new VdsInstallException(VDSStatus.NonResponsive, "Network error during communication with the host");
    }
    try {
        networkConfigurator.refreshNetworkConfiguration();
        networkConfigurator.createManagementNetworkIfRequired();
    } catch (VDSNetworkException e) {
        log.error("Exception", e);
        throw new VdsInstallException(VDSStatus.NonResponsive, "Network error during communication with the host", e);
    } catch (Exception e) {
        log.error("Exception", e);
        throw new VdsInstallException(VDSStatus.NonOperational, "Failed to configure management network on the host", e);
    }
}
Also used : VDSNetworkException(org.ovirt.engine.core.vdsbroker.vdsbroker.VDSNetworkException) IOException(java.io.IOException) VDSNetworkException(org.ovirt.engine.core.vdsbroker.vdsbroker.VDSNetworkException) NetworkConfigurator(org.ovirt.engine.core.bll.network.NetworkConfigurator)

Aggregations

IOException (java.io.IOException)1 NetworkConfigurator (org.ovirt.engine.core.bll.network.NetworkConfigurator)1 VDSNetworkException (org.ovirt.engine.core.vdsbroker.vdsbroker.VDSNetworkException)1