Exemplo n.º 1
0
  @Override
  protected void PostDiscoverTargets(java.util.ArrayList<SanTargetModel> newItems) {
    super.PostDiscoverTargets(newItems);

    InitializeItems(null, newItems);

    // Remember all discovered targets.
    lastDiscoveredTargets.clear();
    lastDiscoveredTargets.addAll(newItems);
  }
Exemplo n.º 2
0
  @Override
  protected void UpdateInternal() {
    super.UpdateInternal();

    if (getContainer().getProgress() != null) {
      return;
    }

    VDS host = (VDS) getContainer().getHost().getSelectedItem();
    if (host == null) {
      ProposeDiscover();
      return;
    }

    ClearItems();
    InitializeItems(null, null);

    getContainer().StartProgress(null);

    Frontend.RunQuery(
        VdcQueryType.GetDeviceList,
        new GetDeviceListQueryParameters(host.getvds_id(), getType()),
        new AsyncQuery(
            this,
            new INewAsyncCallback() {
              @Override
              public void OnSuccess(Object target, Object returnValue) {

                SanStorageModel model = (SanStorageModel) target;
                VdcQueryReturnValue response = (VdcQueryReturnValue) returnValue;
                if (response.getSucceeded()) {
                  model.ApplyData((java.util.ArrayList<LUNs>) response.getReturnValue(), false);
                } else {
                  model.setGetLUNsFailure("Could not retrieve LUNs, please check your storage.");
                }
                model.getContainer().StopProgress();
              }
            },
            true));
  }
Exemplo n.º 3
0
  @Override
  protected void Update() {
    lastDiscoveredTargets.clear();

    super.Update();
  }