Examples of VolumeManagementDto


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

   public Volume findVolume(final Predicate<Volume> filter) {
      return Iterables.getFirst(filter(listVolumes(), filter), null);
   }

   public Volume getVolume(final Integer id) {
      VolumeManagementDto volume = context.getApi().getCloudApi().getVolume(target, id);
      return wrap(context, Volume.class, volume);
   }
View Full Code Here

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

      checkFilters(request);
   }

   public void testReplaceVolumes() throws SecurityException, NoSuchMethodException, IOException {
      VolumeManagementDto first = CloudResources.volumePut();
      VolumeManagementDto second = CloudResources.volumePut();
      second.getEditLink().setHref(second.getEditLink().getHref() + "second");

      Invokable<?, ?> method = method(CloudApi.class, "replaceVolumes", VirtualMachineDto.class,
            VirtualMachineOptions.class, VolumeManagementDto[].class);
      GeneratedHttpRequest request = processor.apply(Invocation.create(
            method,
View Full Code Here

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

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

   public static VolumeManagementDto volumePost() {
      VolumeManagementDto volume = new VolumeManagementDto();
      volume.setName("Volume");
      volume.setSizeInMB(1024);
      volume.addLink(new RESTLink("tier", "http://localhost/api/cloud/virtualdatacenters/1/tiers/1"));
      return volume;
   }
View Full Code Here

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

      volume.addLink(new RESTLink("tier", "http://localhost/api/cloud/virtualdatacenters/1/tiers/1"));
      return volume;
   }

   public static VolumeManagementDto volumePut() {
      VolumeManagementDto volume = volumePost();
      volume.setId(1);
      volume.setState(VolumeState.DETACHED.name());

      volume.getLinks().clear();

      RESTLink mappings = new RESTLink("action",
            "http://localhost/api/cloud/virtualdatacenters/1/volumes/1/action/initiatormappings");
      mappings.setTitle("initiator mappings");
      volume.addLink(mappings);
      volume.addLink(new RESTLink("edit", "http://localhost/api/cloud/virtualdatacenters/1/volumes/1"));
      volume.addLink(new RESTLink("tier", "http://localhost/api/cloud/virtualdatacenters/1/tiers/1"));
      volume.addLink(new RESTLink("virtualdatacenter", "http://localhost/api/cloud/virtualdatacenters/1"));
      return volume;
   }
View Full Code Here

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

   public Volume findVolume(final Predicate<Volume> filter) {
      return Iterables.getFirst(filter(listVolumes(), filter), null);
   }

   public Volume getVolume(final Integer id) {
      VolumeManagementDto volume = context.getApi().getCloudApi().getVolume(target, id);
      return wrap(context, Volume.class, volume);
   }
View Full Code Here

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

         this.sizeInMb = sizeInMb;
         return this;
      }

      public Volume build() {
         VolumeManagementDto dto = new VolumeManagementDto();
         dto.setName(name);
         dto.setDescription(description);
         dto.setSizeInMB(sizeInMb);
         dto.setState(DEFAULT_STATE.name());

         RESTLink link = tier.unwrap().searchLink("self");
         checkNotNull(link, ValidationErrors.MISSING_REQUIRED_LINK);
         dto.addLink(new RESTLink("tier", link.getHref()));

         Volume volume = new Volume(context, dto);
         volume.virtualDatacenter = virtualDatacenter;
         volume.tier = tier;
View Full Code Here

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

         HttpResponse rp = checkNotNull(context.getApi().get(target.searchLink("volume")), "volume");

         ParseXMLWithJAXB<VolumeManagementDto> parser = new ParseXMLWithJAXB<VolumeManagementDto>(
               context.utils().xml(), TypeLiteral.get(VolumeManagementDto.class));

         VolumeManagementDto dto = parser.apply(rp);
         return new Volume(context, dto);
      }
      return null;
   }
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.