Examples of ListOptions


Examples of org.jclouds.atmos.options.ListOptions

      checkFilters(request);
   }

   public void testListDirectoriesOptions() throws SecurityException, NoSuchMethodException, IOException {
      Invokable<?, ?> method = method(AtmosClient.class, "listDirectories", ListOptions[].class);
      GeneratedHttpRequest request = processor.createRequest(method, ImmutableList.<Object> of(new ListOptions().limit(1).token("asda")));

      assertRequestLineEquals(request, "GET https://accesspoint.atmosonline.com/rest/namespace/ HTTP/1.1");
      assertNonPayloadHeadersEqual(request, HttpHeaders.ACCEPT + ": text/xml\nx-emc-limit: 1\nx-emc-token: asda\n");
      assertPayloadEquals(request, null, null, false);
View Full Code Here

Examples of org.jclouds.atmos.options.ListOptions

      checkFilters(request);
   }

   public void testListDirectoryOptions() throws SecurityException, NoSuchMethodException, IOException {
      Invokable<?, ?> method = method(AtmosClient.class, "listDirectory", String.class, ListOptions[].class);
      GeneratedHttpRequest request = processor.createRequest(method, ImmutableList.<Object> of("directory", new ListOptions().limit(1).token("asda")));

      assertRequestLineEquals(request, "GET https://accesspoint.atmosonline.com/rest/namespace/directory/ HTTP/1.1");
      assertNonPayloadHeadersEqual(request, HttpHeaders.ACCEPT + ": text/xml\nx-emc-limit: 1\nx-emc-token: asda\n");
      assertPayloadEquals(request, null, null, false);
View Full Code Here

Examples of org.jclouds.atmos.options.ListOptions

    */
   @Override
   public PageSet<? extends StorageMetadata> list(String container,
            org.jclouds.blobstore.options.ListContainerOptions options) {
      container = AtmosUtils.adjustContainerIfDirOptionPresent(container, options);
      ListOptions nativeOptions = container2ContainerListOptions.apply(options);
      // until includeMeta() option works for namespace interface
      PageSet<? extends StorageMetadata> list = container2ResourceList.apply(sync.listDirectory(container,
               nativeOptions));
      return options.isDetailed() ? fetchBlobMetadataProvider.get().setContainerName(container).apply(list) : list;
   }
View Full Code Here

Examples of org.jclouds.googlecloudstorage.options.ListOptions

   public void testListBucketWithOptionsResponseIs2xx() throws Exception {

      BucketApi api = requestsSendResponses(requestForScopes(STORAGE_FULLCONTROL_SCOPE), TOKEN_RESPONSE,
               LIST_BUCKET_REQUEST_WITHOPTIONS, LIST_BUCKET_RESPONSE).getBucketApi();

      ListOptions options = new ListOptions().maxResults(2).pageToken("jcloudtestbucket500");

      assertEquals(api.listBucket(EXPECTED_TEST_PROJECT_NUMBER, options), new NoAclBucketListTest().expected());

   }
View Full Code Here

Examples of org.jclouds.googlecomputeengine.options.ListOptions

      builder.name(network.getName());
      builder.uri(network.getSelfLink());

      ImmutableSet.Builder permBuilder = ImmutableSet.builder();

      ListOptions options = new ListOptions.Builder().filter("network eq .*/" + network.getName());

      for (Firewall fw : api.getFirewallApiForProject(project.get()).list(options).concat()) {
         permBuilder.addAll(firewallToPerms.apply(fw));
      }

View Full Code Here

Examples of org.jclouds.googlecomputeengine.options.ListOptions

   }

   @Test(groups = "live", dependsOnMethods = "testGetRoute")
   public void testListRoute() {

      PagedIterable<Route> routes = api().list(new ListOptions()
              .filter("name eq " + ROUTE_NAME));

      List<Route> routesAsList = Lists.newArrayList(routes.concat());

      assertEquals(routesAsList.size(), 1);
View Full Code Here

Examples of org.jclouds.googlecomputeengine.options.ListOptions

      checkNotNull(id, "id");
      if (api.getNetworkApiForProject(userProject.get()).get(id) == null) {
         return false;
      }

      ListOptions options = new ListOptions.Builder().filter("network eq .*/" + id);

      FluentIterable<Firewall> fws = api.getFirewallApiForProject(userProject.get()).list(options).concat();

      for (Firewall fw : fws) {
         AtomicReference<Operation> operation = Atomics.newReference(api.getFirewallApiForProject(userProject.get())
View Full Code Here

Examples of org.jclouds.googlecomputeengine.options.ListOptions

      checkNotNull(group, "group");
      checkNotNull(ipPermission, "ipPermission");

      checkNotNull(api.getNetworkApiForProject(userProject.get()).get(group.getId()) == null, "network for group is null");

      ListOptions options = new ListOptions.Builder().filter("network eq .*/" + group.getName());

      if (api.getFirewallApiForProject(userProject.get()).list(options).concat().anyMatch(providesIpPermission(ipPermission))) {
         // Permission already exists.
         return group;
      }
View Full Code Here

Examples of org.jclouds.googlecomputeengine.options.ListOptions

      checkNotNull(group, "group");
      checkNotNull(ipPermission, "ipPermission");

      checkNotNull(api.getNetworkApiForProject(userProject.get()).get(group.getId()) == null, "network for group is null");

      ListOptions options = new ListOptions.Builder().filter("network eq .*/" + group.getName());

      FluentIterable<Firewall> fws = api.getFirewallApiForProject(userProject.get()).list(options).concat();

      for (Firewall fw : fws) {
         if (equalsIpPermission(ipPermission).apply(fw)) {
View Full Code Here

Examples of org.jclouds.googlecomputeengine.options.ListOptions

   public boolean supportsPortRangesForGroups() {
      return true;
   }

   private SecurityGroup groupForTagsInNetwork(Network nw, final Set <String> tags) {
      ListOptions opts = new Builder().filter("network eq .*/" + nw.getName());
      Set<Firewall> fws = api.getFirewallApiForProject(userProject.get()).list(opts).concat()
              .filter(new Predicate<Firewall>() {
                 @Override
                 public boolean apply(final Firewall input) {
                    // If any of the targetTags on the firewall apply or the firewall has no target tags...
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.