Tabnine Logo
ListSnapshotsOptions$Builder
Code IndexAdd Tabnine to your IDE (free)

How to use
ListSnapshotsOptions$Builder
in
org.jclouds.cloudstack.options

Best Java code snippets using org.jclouds.cloudstack.options.ListSnapshotsOptions$Builder (Showing top 6 results out of 315)

origin: jclouds/legacy-jclouds

public void testListSnapshotsById() {
 Iterable<String> snapshotIds = Iterables.transform(client.getSnapshotClient().listSnapshots(), new Function<Snapshot, String>() {
   public String apply(Snapshot input) {
     return input.getId();
   }
 });
 assertNotNull(snapshotIds);
 assertFalse(Iterables.isEmpty(snapshotIds));
 for (String id : snapshotIds) {
   Set<Snapshot> found = client.getSnapshotClient().listSnapshots(ListSnapshotsOptions.Builder.id(id));
   assertNotNull(found);
   assertEquals(1, found.size());
   Snapshot snapshot = Iterables.getOnlyElement(found);
   assertEquals(id, snapshot.getId());
   checkSnapshot(snapshot);
 }
}
origin: apache/jclouds

public void testListSnapshotsOptions() throws NoSuchMethodException {
 Invokable<?, ?> method = method(SnapshotApi.class, "listSnapshots", ListSnapshotsOptions[].class);
 GeneratedHttpRequest httpRequest = processor.createRequest(method,
    ImmutableList.<Object> of(ListSnapshotsOptions.Builder.accountInDomain("acc", "7")
       .id("5")
       .interval(Snapshot.Interval.MONTHLY)
       .isRecursive(true)
       .keyword("fred")
       .name("fred's snapshot")
       .snapshotType(Snapshot.Type.RECURRING)
       .volumeId("11")));
 assertRequestLineEquals(httpRequest,
    "GET http://localhost:8080/client/api?response=json&command=listSnapshots&listAll=true&account=acc&domainid=7&id=5&intervaltype=MONTHLY&isrecursive=true&keyword=fred&name=fred%27s%20snapshot&snapshottype=RECURRING&volumeid=11 HTTP/1.1");
 assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
 assertPayloadEquals(httpRequest, null, null, false);
 assertResponseParserClassEquals(method, httpRequest, ParseFirstJsonValueNamed.class);
 assertSaxResponseParserClassEquals(method, null);
 assertFallbackClassEquals(method, EmptySetOnNotFoundOr404.class);
 checkFilters(httpRequest);
}
origin: apache/jclouds

public void testListSnapshotsById() {
 Iterable<String> snapshotIds = Iterables.transform(client.getSnapshotApi().listSnapshots(), new Function<Snapshot, String>() {
   public String apply(Snapshot input) {
     return input.getId();
   }
 });
 assertNotNull(snapshotIds);
 assertFalse(Iterables.isEmpty(snapshotIds));
 for (String id : snapshotIds) {
   Set<Snapshot> found = client.getSnapshotApi().listSnapshots(ListSnapshotsOptions.Builder.id(id));
   assertNotNull(found);
   assertEquals(1, found.size());
   Snapshot snapshot = Iterables.getOnlyElement(found);
   assertEquals(id, snapshot.getId());
   checkSnapshot(snapshot);
 }
}
origin: apache/jclouds

public void testListSnapshotsNonexistantId() {
 Set<Snapshot> found = client.getSnapshotApi().listSnapshots(ListSnapshotsOptions.Builder.id("foo"));
 assertNotNull(found);
 assertTrue(found.isEmpty());
}
origin: jclouds/legacy-jclouds

public void testListSnapshotsNonexistantId() {
 Set<Snapshot> found = client.getSnapshotClient().listSnapshots(ListSnapshotsOptions.Builder.id("foo"));
 assertNotNull(found);
 assertTrue(found.isEmpty());
}
origin: jclouds/legacy-jclouds

public void testListSnapshotsOptions() throws NoSuchMethodException {
 Invokable<?, ?> method = method(SnapshotAsyncClient.class, "listSnapshots", ListSnapshotsOptions[].class);
 GeneratedHttpRequest httpRequest = processor.createRequest(method, ImmutableList.<Object> of(ListSnapshotsOptions.Builder.accountInDomain("acc", "7").id("5").interval(Snapshot.Interval.MONTHLY).isRecursive(true).keyword("fred").name("fred's snapshot").snapshotType(Snapshot.Type.RECURRING).volumeId("11")));
 assertRequestLineEquals(httpRequest,
    "GET http://localhost:8080/client/api?response=json&command=listSnapshots&listAll=true&account=acc&domainid=7&id=5&intervaltype=MONTHLY&isrecursive=true&keyword=fred&name=fred%27s%20snapshot&snapshottype=RECURRING&volumeid=11 HTTP/1.1");
 assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
 assertPayloadEquals(httpRequest, null, null, false);
 assertResponseParserClassEquals(method, httpRequest, ParseFirstJsonValueNamed.class);
 assertSaxResponseParserClassEquals(method, null);
 assertFallbackClassEquals(method, EmptySetOnNotFoundOr404.class);
 checkFilters(httpRequest);
}
org.jclouds.cloudstack.optionsListSnapshotsOptions$Builder

Most used methods

  • accountInDomain
  • id

Popular in Java

  • Finding current android device location
  • setContentView (Activity)
  • setRequestProperty (URLConnection)
  • onRequestPermissionsResult (Fragment)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now