public HostSetupNetworksParameters createHostSetupNetworksParameters() { HostSetupNetworksParameters result = new HostSetupNetworksParameters(getEntity().getId()); for (NetworkAttachment attachment : hostSetupNetworksParametersData.getNetworkAttachments()) { attachment.setOverrideConfiguration(shouldSyncNetwork(attachment.getNetworkName())); } result.setNetworkAttachments( new ArrayList<NetworkAttachment>(hostSetupNetworksParametersData.getNetworkAttachments())); result.setRemovedNetworkAttachments(hostSetupNetworksParametersData.getRemovedNetworkAttachments()); result.setCreateOrUpdateBonds(new ArrayList<CreateOrUpdateBond>(hostSetupNetworksParametersData.getBonds())); result.setRemovedBonds(new HashSet<>(hostSetupNetworksParametersData.getRemovedBonds())); result.setRemovedUnmanagedNetworks(hostSetupNetworksParametersData.getRemovedUnmanagedNetworks()); result.setLabels(hostSetupNetworksParametersData.getLabels()); result.setRemovedLabels(hostSetupNetworksParametersData.getRemovedLabels()); result.setCommitOnSuccess(commitChanges.getEntity()); return result; }
Guid networkAttachmentId = asGuid(model.getId()); if (networkAttachmentFromParams.containsKey(networkAttachmentId)) { networkAttachmentFromParams.get(networkAttachmentId).setOverrideConfiguration(true); } else if (attachmentsById.containsKey(networkAttachmentId)) { NetworkAttachment networkAttachment = attachmentsById.get(networkAttachmentId); networkAttachment.setOverrideConfiguration(true); parameters.getNetworkAttachments().add(networkAttachment); } else {