package org.ovirt.engine.core.bll.network.host;

import org.ovirt.engine.core.bll.Backend;
import org.ovirt.engine.core.bll.VdsCommand;
import org.ovirt.engine.core.common.AuditLogType;
import org.ovirt.engine.core.common.action.VdsActionParameters;
import org.ovirt.engine.core.common.vdscommands.VDSCommandType;
import org.ovirt.engine.core.common.vdscommands.VDSReturnValue;
import org.ovirt.engine.core.common.vdscommands.VdsIdVDSCommandParametersBase;

@SuppressWarnings("serial")
public class CommitNetworkChangesCommand<T extends VdsActionParameters> extends VdsCommand<T> {
    public CommitNetworkChangesCommand(T param) {
        super(param);
    }

    @Override
    protected void executeCommand() {
        VDSReturnValue retVal = Backend
                .getInstance()
                .getResourceManager()
                .RunVdsCommand(VDSCommandType.SetSafeNetworkConfig,
                        new VdsIdVDSCommandParametersBase(getParameters().getVdsId()));

        getVds().setNetConfigDirty(false);
        getDbFacade().getVdsDynamicDao().update(getVds().getDynamicData());
        setSucceeded(retVal.getSucceeded());
    }

    @Override
    protected boolean canDoAction() {
        return true;
    }

    @Override
    public AuditLogType getAuditLogTypeValue() {
        return getSucceeded() ? AuditLogType.NETWORK_COMMINT_NETWORK_CHANGES
                : AuditLogType.NETWORK_COMMINT_NETWORK_CHANGES_FAILED;
    }
}

@@ -46,50 +46,8 @@
 t;%0A%0A
-import org.ovirt.engine.core.bll.Backend;%0A
 impo
@@ -699,104 +699,26 @@
 al =
- Backend%0A                .getInstance()%0A                .getResourceManager()%0A                .R
+%0A                r
 unVd
@@ -867,113 +867,92 @@
  get
-Vds().setNetConfigDirty(false);%0A        getDbFacade().getVdsDynamicDao().update(getVds().getDynamicData()
+DbFacade().getVdsDynamicDao().updateNetConfigDirty(getParameters().getVdsId(), false
 );%0A 

Use proper method to mark net changes as saved