Esempio n. 1
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();
  }
Esempio n. 2
0
 @Override
 protected void initIsVm() {
   getIsVmNetwork().setEntity(ApplicationModeHelper.isModeSupported(ApplicationMode.VirtOnly));
 }