Source:
protected void executeCommand() { final DisplayNetworkClusterHelper displayNetworkClusterHelper = new DisplayNetworkClusterHelper( networkClusterDao, vmDao, getNetworkCluster(), getNetworkName(), auditLogDirector); if (displayNetworkClusterHelper.isDisplayToBeUpdated()) { displayNetworkClusterHelper.warnOnActiveVm(); } networkClusterDao.update(getNetworkCluster()); final Network managementNetwork; if (getNetworkCluster().isManagement() && !getOldNetworkCluster().isManagement()) { networkClusterDao.setNetworkExclusivelyAsManagement(getClusterId(), getPersistedNetwork().getId()); managementNetwork = getPersistedNetwork(); } else { managementNetwork = managementNetworkUtil.getManagementNetwork(getClusterId()); } if (getNetworkCluster().isDisplay() != getOldNetworkCluster().isDisplay()) { networkClusterDao.setNetworkExclusivelyAsDisplay(getClusterId(), getNetworkCluster().isDisplay() ? getPersistedNetwork().getId() : managementNetwork.getId()); } if (getNetworkCluster().isMigration() != getOldNetworkCluster().isMigration()) { networkClusterDao.setNetworkExclusivelyAsMigration(getClusterId(), getNetworkCluster().isMigration() ? getPersistedNetwork().getId() : managementNetwork.getId()); } if (getNetworkCluster().isGluster() != getOldNetworkCluster().isGluster()) { networkClusterDao.setNetworkExclusivelyAsGluster(getClusterId(), getNetworkCluster().isGluster() ? getPersistedNetwork().getId() : null); } if (getNetworkCluster().isDefaultRoute() != getOldNetworkCluster().isDefaultRoute()) { networkClusterDao.setNetworkExclusivelyAsDefaultRoute(getClusterId(), getNetworkCluster().isDefaultRoute() ? getPersistedNetwork().getId() : null); } NetworkClusterHelper.setStatus(getClusterId(), getPersistedNetwork()); setSucceeded(true); }

Target:
protected void executeCommand() { final DisplayNetworkClusterHelper displayNetworkClusterHelper = new DisplayNetworkClusterHelper( networkClusterDao, vmDao, getNetworkCluster(), getNetworkName(), auditLogDirector); if (displayNetworkClusterHelper.isDisplayToBeUpdated()) { displayNetworkClusterHelper.warnOnActiveVm(); } networkClusterDao.update(getNetworkCluster()); final Network managementNetwork; if (getNetworkCluster().isManagement() && !getOldNetworkCluster().isManagement()) { networkClusterDao.setNetworkExclusivelyAsManagement(getClusterId(), getPersistedNetwork().getId()); managementNetwork = getPersistedNetwork(); } else { managementNetwork = managementNetworkUtil.getManagementNetwork(getClusterId()); } if (getNetworkCluster().isDisplay() != getOldNetworkCluster().isDisplay()) { networkClusterDao.setNetworkExclusivelyAsDisplay(getClusterId(), getNetworkCluster().isDisplay() ? getPersistedNetwork().getId() : managementNetwork.getId()); } if (getNetworkCluster().isMigration() != getOldNetworkCluster().isMigration()) { networkClusterDao.setNetworkExclusivelyAsMigration(getClusterId(), getNetworkCluster().isMigration() ? getPersistedNetwork().getId() : managementNetwork.getId()); } if (getNetworkCluster().isGluster() != getOldNetworkCluster().isGluster()) { networkClusterDao.setNetworkExclusivelyAsGluster(getClusterId(), getNetworkCluster().isGluster() ? getPersistedNetwork().getId() : null); } if (getNetworkCluster().isDefaultRoute() != getOldNetworkCluster().isDefaultRoute()) { networkClusterDao.setNetworkExclusivelyAsDefaultRoute(getClusterId(), getNetworkCluster().isDefaultRoute() ? getPersistedNetwork().getId() : managementNetwork.getId()); } NetworkClusterHelper.setStatus(getClusterId(), getPersistedNetwork()); setSucceeded(true); }