package org.ovirt.engine.core.common.action;

import org.ovirt.engine.core.common.businessentities.Network;
import org.ovirt.engine.core.common.businessentities.VDSGroup;
import org.ovirt.engine.core.common.businessentities.network_cluster;

public class AttachNetworkToVdsGroupParameter extends NetworkClusterParameters {
    private static final long serialVersionUID = -2874549285727269806L;
    private Network _network;

    public AttachNetworkToVdsGroupParameter(VDSGroup group, Network net) {
        super(new network_cluster(group.getId(),
                net.getId(),
                null,

                // Cluster attachment data can sometimes be missing, so use defaults in that case.
                net.getCluster() == null ? false : net.getCluster().getis_display(),
                net.getCluster() == null ? true : net.getCluster().isRequired()));
        _network = net;
    }

    public Network getNetwork() {
        return _network;
    }

    public AttachNetworkToVdsGroupParameter() {
    }
}

@@ -101,16 +101,84 @@
 etwork;%0A
+import org.ovirt.engine.core.common.businessentities.NetworkStatus;%0A
 import o
@@ -656,19 +656,43 @@
         
-nul
+NetworkStatus.NonOperationa
 l,%0A%0A    

Fix default network status on attach