Package com.abiquo.server.core.cloud

Examples of com.abiquo.server.core.cloud.VirtualDatacenterDto


   public void testUpdate() {
      env.virtualDatacenter.setName("Aloha updated");
      env.virtualDatacenter.update();

      // Recover the updated virtual datacenter
      VirtualDatacenterDto updated = env.cloudApi.getVirtualDatacenter(env.virtualDatacenter.getId());

      assertEquals(updated.getName(), "Aloha updated");
   }
View Full Code Here


    *      > http://community.abiquo.com/display/ABI20/Virtual+Datacenter+
    *      Resource# VirtualDatacenterResource-RetrieveaVirtualDatacenter</a>
    */
   public VirtualDatacenter getVirtualDatacenter() {
      Integer virtualDatacenterId = target.getIdFromLink(ParentLinkName.VIRTUAL_DATACENTER);
      VirtualDatacenterDto dto = context.getApi().getCloudApi().getVirtualDatacenter(virtualDatacenterId);
      virtualDatacenter = wrap(context, VirtualDatacenter.class, dto);
      return virtualDatacenter;
   }
View Full Code Here

    *      > http://community.abiquo.com/display/ABI20/Virtual+Datacenter+
    *      Resource# VirtualDatacenterResource-RetrieveaVirtualDatacenter</a>
    */
   public VirtualDatacenter getVirtualDatacenter() {
      Integer virtualDatacenterId = target.getIdFromLink(ParentLinkName.VIRTUAL_DATACENTER);
      VirtualDatacenterDto dto = context.getApi().getCloudApi().getVirtualDatacenter(virtualDatacenterId);
      virtualDatacenter = wrap(context, VirtualDatacenter.class, dto);
      return virtualDatacenter;
   }
View Full Code Here

                  .payload(
                        payloadFromResourceWithContentType("/payloads/publicips-available-lastpage.xml",
                              normalize(PublicIpsDto.MEDIA_TYPE))) //
                  .build());

      VirtualDatacenterDto vdc = new VirtualDatacenterDto();
      vdc.addLink(new RESTLink("topurchase", "http://localhost/api/cloud/virtualdatacenters/1/publicips/topurchase"));

      PagedIterable<PublicIpDto> publicIps = api.listAvailablePublicIps(vdc);
      List<PublicIpDto> ips = publicIps.concat().toList();

      assertEquals(ips.size(), 4);
View Full Code Here

                  .payload(
                        payloadFromResourceWithContentType("/payloads/publicips-available-lastpage.xml",
                              normalize(PublicIpsDto.MEDIA_TYPE))) //
                  .build());

      VirtualDatacenterDto vdc = new VirtualDatacenterDto();
      vdc.addLink(new RESTLink("topurchase", "http://localhost/api/cloud/virtualdatacenters/1/publicips/topurchase"));

      IpOptions options = IpOptions.builder().startWith(3).build();
      PaginatedCollection<PublicIpDto, PublicIpsDto> ips = api.listAvailablePublicIps(vdc, options);

      assertEquals(ips.size(), 2);
View Full Code Here

                  .payload(
                        payloadFromResourceWithContentType("/payloads/publicips-purchased-lastpage.xml",
                              normalize(PublicIpsDto.MEDIA_TYPE))) //
                  .build());

      VirtualDatacenterDto vdc = new VirtualDatacenterDto();
      vdc.addLink(new RESTLink("purchased", "http://localhost/api/cloud/virtualdatacenters/1/publicips/purchased"));

      PagedIterable<PublicIpDto> publicIps = api.listPurchasedPublicIps(vdc);
      List<PublicIpDto> ips = publicIps.concat().toList();

      assertEquals(ips.size(), 4);
View Full Code Here

                  .payload(
                        payloadFromResourceWithContentType("/payloads/publicips-purchased-lastpage.xml",
                              normalize(PublicIpsDto.MEDIA_TYPE))) //
                  .build());

      VirtualDatacenterDto vdc = new VirtualDatacenterDto();
      vdc.addLink(new RESTLink("purchased", "http://localhost/api/cloud/virtualdatacenters/1/publicips/purchased"));

      IpOptions options = IpOptions.builder().startWith(3).build();
      PaginatedCollection<PublicIpDto, PublicIpsDto> ips = api.listPurchasedPublicIps(vdc, options);

      assertEquals(ips.size(), 2);
View Full Code Here

                  .payload(
                        payloadFromResourceWithContentType("/payloads/available-templates-lastpage.xml",
                              normalize(VirtualMachineTemplatesDto.MEDIA_TYPE))) //
                  .build());

      VirtualDatacenterDto vdc = new VirtualDatacenterDto();
      vdc.addLink(new RESTLink("templates", "http://example.com/api/cloud/virtualdatacenters/1/action/templates"));

      PagedIterable<VirtualMachineTemplateDto> templates = api.listAvailableTemplates(vdc);
      List<VirtualMachineTemplateDto> all = templates.concat().toList();

      assertEquals(all.size(), 2);
View Full Code Here

                  .payload(
                        payloadFromResourceWithContentType("/payloads/available-templates-lastpage.xml",
                              normalize(VirtualMachineTemplatesDto.MEDIA_TYPE))) //
                  .build());

      VirtualDatacenterDto vdc = new VirtualDatacenterDto();
      vdc.addLink(new RESTLink("templates", "http://example.com/api/cloud/virtualdatacenters/1/action/templates"));

      VirtualMachineTemplateOptions options = VirtualMachineTemplateOptions.builder().startWith(1).build();
      PaginatedCollection<VirtualMachineTemplateDto, VirtualMachineTemplatesDto> templates = api
            .listAvailableTemplates(vdc, options);
View Full Code Here

                  .payload(
                        payloadFromResourceWithContentType("/payloads/volumes-lastpage.xml",
                              normalize(VolumesManagementDto.MEDIA_TYPE))) //
                  .build());

      VirtualDatacenterDto vdc = new VirtualDatacenterDto();
      vdc.addLink(new RESTLink("volumes", "http://example.com/api/cloud/virtualdatacenters/1/volumes"));

      PagedIterable<VolumeManagementDto> volumes = api.listVolumes(vdc);
      List<VolumeManagementDto> all = volumes.concat().toList();

      assertEquals(all.size(), 2);
View Full Code Here

TOP

Related Classes of com.abiquo.server.core.cloud.VirtualDatacenterDto

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.