/**
   * Lists VnicProfile objects.
   *
   * @param max
   *     <pre>
   *    [max results]
   *    </pre>
   *
   * @return List of {@link VnicProfile }
   * @throws ClientProtocolException Signals that HTTP/S protocol error has occurred.
   * @throws ServerException Signals that an oVirt api error has occurred.
   * @throws IOException Signals that an I/O exception of some sort has occurred.
   */
  public List<VnicProfile> list(Integer max)
      throws ClientProtocolException, ServerException, IOException {

    HttpHeaderBuilder headersBuilder = new HttpHeaderBuilder();
    List<Header> headers = headersBuilder.build();

    UrlBuilder urlBuilder = new UrlBuilder(SLASH + getName());
    if (max != null) {
      urlBuilder.add("max", max, UrlParameterType.MATRIX);
    }

    String url = urlBuilder.build();

    return list(url, org.ovirt.engine.sdk.entities.VnicProfiles.class, VnicProfile.class, headers);
  }
  /**
   * Deletes object.
   *
   * @param async
   *     <pre>
   *    [true|false]
   *    </pre>
   *
   * @return {@link Response }
   * @throws ClientProtocolException Signals that HTTP/S protocol error has occurred.
   * @throws ServerException Signals that an oVirt api error has occurred.
   * @throws IOException Signals that an I/O exception of some sort has occurred.
   */
  public Response delete(Boolean async)
      throws ClientProtocolException, ServerException, IOException {
    String url = this.getHref();

    HttpHeaderBuilder headersBuilder = new HttpHeaderBuilder();
    List<Header> headers = headersBuilder.build();

    UrlBuilder urlBuilder = new UrlBuilder(url);
    if (async != null) {
      urlBuilder.add("async", async, UrlParameterType.MATRIX);
    }

    url = urlBuilder.build();

    return getProxy().delete(url, Response.class, headers);
  }
  /**
   * Lists StorageDomainTemplateDisk objects.
   *
   * @param max
   *     <pre>
   *    [max results]
   *    </pre>
   *
   * @return List of {@link StorageDomainTemplateDisk }
   * @throws ClientProtocolException Signals that HTTP/S protocol error has occurred.
   * @throws ServerException Signals that an oVirt api error has occurred.
   * @throws IOException Signals that an I/O exception of some sort has occurred.
   */
  public List<StorageDomainTemplateDisk> list(Integer max)
      throws ClientProtocolException, ServerException, IOException {

    HttpHeaderBuilder headersBuilder = new HttpHeaderBuilder();
    List<Header> headers = headersBuilder.build();

    UrlBuilder urlBuilder = new UrlBuilder(this.parent.getHref() + SLASH + getName());
    if (max != null) {
      urlBuilder.add("max", max, UrlParameterType.MATRIX);
    }

    String url = urlBuilder.build();

    return list(
        url, org.ovirt.engine.sdk.entities.Disks.class, StorageDomainTemplateDisk.class, headers);
  }
Exemplo n.º 4
0
  /**
   * Lists VMNIC objects.
   *
   * @param max
   *     <pre>
   *    [max results]
   *    </pre>
   *
   * @param allContent
   *     <pre>
   *    [true|false]
   *    </pre>
   *
   * @return List of {@link VMNIC }
   * @throws ClientProtocolException Signals that HTTP/S protocol error has occurred.
   * @throws ServerException Signals that an oVirt api error has occurred.
   * @throws IOException Signals that an I/O exception of some sort has occurred.
   */
  public List<VMNIC> list(Integer max, String allContent)
      throws ClientProtocolException, ServerException, IOException {

    HttpHeaderBuilder headersBuilder = new HttpHeaderBuilder();
    if (allContent != null) {
      headersBuilder.add("All-Content", allContent);
    }
    List<Header> headers = headersBuilder.build();

    UrlBuilder urlBuilder = new UrlBuilder(this.parent.getHref() + SLASH + getName());
    if (max != null) {
      urlBuilder.add("max", max, UrlParameterType.MATRIX);
    }

    String url = urlBuilder.build();

    return list(url, org.ovirt.engine.sdk.entities.Nics.class, VMNIC.class, headers);
  }