Exemplo n.º 1
0
  protected NetworkClusterModel createNetworkClusterModel(VDSGroup cluster) {
    NetworkClusterModel networkClusterModel = new NetworkClusterModel(cluster);
    networkClusterModel.setAttached(true);
    networkClusterModel.setRequired(!(Boolean) getExport().getEntity());

    return networkClusterModel;
  }
Exemplo n.º 2
0
  @Override
  protected void onExportChanged() {
    boolean externalNetwork = getExport().getEntity();
    getExternalProviders().setIsChangeable(externalNetwork);
    getIsVmNetwork()
        .setIsChangeable(
            !externalNetwork
                && isSupportBridgesReportByVDSM()
                && ApplicationModeHelper.isModeSupported(ApplicationMode.VirtOnly));
    if (externalNetwork) {
      getIsVmNetwork().setEntity(true);
    }

    Iterable<NetworkClusterModel> networkClusters = getNetworkClusterList().getItems();
    if (networkClusters != null) {
      for (NetworkClusterModel networkCluster : networkClusters) {
        if (!(Boolean)
            AsyncDataProvider.getInstance()
                .getConfigValuePreConverted(
                    ConfigurationValues.SupportCustomDeviceProperties,
                    networkCluster.getEntity().getCompatibilityVersion().getValue())) {
          networkCluster.setIsChangeable(!externalNetwork);
          networkCluster.setAttached(!externalNetwork);
        }
        networkCluster.setRequired(!externalNetwork);
      }
    }

    super.onExportChanged();
  }