Package com.abiquo.server.core.infrastructure.storage

Examples of com.abiquo.server.core.infrastructure.storage.DiskManagementDto


      disk.setSizeInMb(1024L);
      return disk;
   }

   public static DiskManagementDto hardDiskPut() {
      DiskManagementDto disk = hardDiskPost();
      disk.addLink(new RESTLink("edit", "http://localhost/api/cloud/virtualdatacenters/1/disks/1"));
      disk.addLink(new RESTLink("virtualdatacenter", "http://localhost/api/cloud/virtualdatacenters/1"));
      return disk;
   }
View Full Code Here


      checkFilters(request);
   }

   public void testReplaceHardDisks() throws SecurityException, NoSuchMethodException, IOException {
      DiskManagementDto first = CloudResources.hardDiskPut();
      DiskManagementDto second = CloudResources.hardDiskPut();
      second.getEditLink().setHref(second.getEditLink().getHref() + "second");

      Invokable<?, ?> method = method(CloudApi.class, "replaceHardDisks", VirtualMachineDto.class,
            DiskManagementDto[].class);
      GeneratedHttpRequest request = processor.apply(Invocation.create(method,
            ImmutableList.<Object> of(CloudResources.virtualMachinePut(), new DiskManagementDto[] { first, second })));
View Full Code Here

         this.sizeInMb = sizeInMb;
         return this;
      }

      public HardDisk build() {
         DiskManagementDto dto = new DiskManagementDto();
         dto.setSizeInMb(sizeInMb);

         HardDisk hardDisk = new HardDisk(context, dto);
         hardDisk.virtualDatacenter = virtualDatacenter;

         return hardDisk;
View Full Code Here

      DisksManagementDto hardDisks = context.getApi().getCloudApi().listHardDisks(target);
      return wrap(context, HardDisk.class, hardDisks.getCollection());
   }

   public HardDisk getHardDisk(final Integer id) {
      DiskManagementDto hardDisk = context.getApi().getCloudApi().getHardDisk(target, id);
      return wrap(context, HardDisk.class, hardDisk);
   }
View Full Code Here

   public HardDisk findHardDisk(final Predicate<HardDisk> filter) {
      return Iterables.getFirst(filter(listHardDisks(), filter), null);
   }

   public HardDisk getHardDisk(final Integer id) {
      DiskManagementDto hardDisk = context.getApi().getCloudApi().getHardDisk(target, id);
      return wrap(context, HardDisk.class, hardDisk);
   }
View Full Code Here

      checkFilters(request);
   }

   public void testReplaceHardDisks() throws SecurityException, NoSuchMethodException, IOException {
      DiskManagementDto first = CloudResources.hardDiskPut();
      DiskManagementDto second = CloudResources.hardDiskPut();
      second.getEditLink().setHref(second.getEditLink().getHref() + "second");

      Invokable<?, ?> method = method(CloudApi.class, "replaceHardDisks", VirtualMachineDto.class,
            DiskManagementDto[].class);
      GeneratedHttpRequest request = processor.apply(Invocation.create(method,
            ImmutableList.<Object> of(CloudResources.virtualMachinePut(), new DiskManagementDto[] { first, second })));
View Full Code Here

      buffer.append("</virtualmachinetask>");
      return buffer.toString();
   }

   public static DiskManagementDto hardDiskPost() {
      DiskManagementDto disk = new DiskManagementDto();
      disk.setSizeInMb(1024L);
      return disk;
   }
View Full Code Here

      disk.setSizeInMb(1024L);
      return disk;
   }

   public static DiskManagementDto hardDiskPut() {
      DiskManagementDto disk = hardDiskPost();
      disk.addLink(new RESTLink("edit", "http://localhost/api/cloud/virtualdatacenters/1/disks/1"));
      disk.addLink(new RESTLink("virtualdatacenter", "http://localhost/api/cloud/virtualdatacenters/1"));
      return disk;
   }
View Full Code Here

   public HardDisk findHardDisk(final Predicate<HardDisk> filter) {
      return Iterables.getFirst(filter(listHardDisks(), filter), null);
   }

   public HardDisk getHardDisk(final Integer id) {
      DiskManagementDto hardDisk = context.getApi().getCloudApi().getHardDisk(target, id);
      return wrap(context, HardDisk.class, hardDisk);
   }
View Full Code Here

TOP

Related Classes of com.abiquo.server.core.infrastructure.storage.DiskManagementDto

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.