Package org.jclouds.abiquo.domain.enterprise.options

Examples of org.jclouds.abiquo.domain.enterprise.options.EnterpriseOptions$Builder


                  .payload(
                        payloadFromResourceWithContentType("/payloads/enterprises-page.xml",
                              normalize(EnterprisesDto.MEDIA_TYPE))) //
                  .build());

      EnterpriseOptions options = EnterpriseOptions.builder().limit(1).has("text").build();
      PaginatedCollection<EnterpriseDto, EnterprisesDto> result = api.listEnterprises(options);

      assertEquals(result.size(), 1);
      assertEquals(result.getTotalSize().intValue(), 2);
      assertEquals(result.get(0).getId().intValue(), 1);
View Full Code Here


                  .build());

      DatacenterDto datacenter = new DatacenterDto();
      datacenter.addLink(new RESTLink("enterprises", "http://localhost/api/admin/datacenters/1/action/enterprises"));

      EnterpriseOptions options = EnterpriseOptions.builder().limit(1).has("text").build();
      PaginatedCollection<EnterpriseDto, EnterprisesDto> result = api.listEnterprises(datacenter, options);

      assertEquals(result.size(), 1);
      assertEquals(result.getTotalSize().intValue(), 2);
      assertEquals(result.get(0).getId().intValue(), 1);
View Full Code Here

                  .payload(
                        payloadFromResourceWithContentType("/payloads/enterprises-page.xml",
                              normalize(EnterprisesDto.MEDIA_TYPE))) //
                  .build());

      EnterpriseOptions options = EnterpriseOptions.builder().limit(1).has("text").build();
      PaginatedCollection<EnterpriseDto, EnterprisesDto> result = api.listEnterprises(options);

      assertEquals(result.size(), 1);
      assertEquals(result.getTotalSize().intValue(), 2);
      assertEquals(result.get(0).getId().intValue(), 1);
View Full Code Here

                  .build());

      DatacenterDto datacenter = new DatacenterDto();
      datacenter.addLink(new RESTLink("enterprises", "http://localhost/api/admin/datacenters/1/action/enterprises"));

      EnterpriseOptions options = EnterpriseOptions.builder().limit(1).has("text").build();
      PaginatedCollection<EnterpriseDto, EnterprisesDto> result = api.listEnterprises(datacenter, options);

      assertEquals(result.size(), 1);
      assertEquals(result.getTotalSize().intValue(), 2);
      assertEquals(result.get(0).getId().intValue(), 1);
View Full Code Here

      checkFilters(request);
   }

   public void testListEnterprisesWithOptions() throws SecurityException, NoSuchMethodException, IOException {
      EnterpriseOptions options = EnterpriseOptions.builder().has("abi").orderBy(OrderBy.NAME).ascendant(true).build();

      Invokable<?, ?> method = method(EnterpriseApi.class, "listEnterprises", EnterpriseOptions.class);
      GeneratedHttpRequest request = processor.apply(Invocation.create(method, ImmutableList.<Object> of(options)));

      assertRequestLineEquals(request, "GET http://localhost/api/admin/enterprises?has=abi&by=name&asc=true HTTP/1.1");
View Full Code Here

      checkFilters(request);
   }

   public void testListEnterprisesByDatacenter() throws SecurityException, NoSuchMethodException, IOException {
      EnterpriseOptions options = EnterpriseOptions.builder().startWith(0).limit(25).network(true).build();

      Invokable<?, ?> method = method(EnterpriseApi.class, "listEnterprises", DatacenterDto.class,
            EnterpriseOptions.class);
      GeneratedHttpRequest request = processor.apply(Invocation.create(method,
            ImmutableList.<Object> of(InfrastructureResources.datacenterPut(), options)));
View Full Code Here

TOP

Related Classes of org.jclouds.abiquo.domain.enterprise.options.EnterpriseOptions$Builder

Copyright © 2018 www.massapicom. 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.