Package com.abiquo.server.core.enterprise

Examples of com.abiquo.server.core.enterprise.DatacentersLimitsDto


    *      Resource# DatacenterLimitsResource-
    *      Deleteanexistinglimitforanenterpriseinadatacenter</a>
    */
   public void prohibitDatacenter(final Datacenter datacenter) {
      // Get limits
      DatacentersLimitsDto dto = context.getApi().getEnterpriseApi().getLimits(target, datacenter.unwrap());

      // Delete limits (if any)
      if (dto != null && !dto.isEmpty()) {
         // Should be only one limit
         context.getApi().getEnterpriseApi().deleteLimits(dto.getCollection().get(0));
      }
   }
View Full Code Here


      return "Enterprise [id=" + getId() + ", isReservationRestricted=" + getIsReservationRestricted() + ", name="
            + getName() + "]";
   }

   private DatacenterLimitsDto getLimits(final Datacenter datacenter) {
      DatacentersLimitsDto limits = context.getApi().getEnterpriseApi().listLimits(target);

      return Iterables.find(limits.getCollection(), new Predicate<DatacenterLimitsDto>() {
         @Override
         public boolean apply(final DatacenterLimitsDto input) {
            RESTLink datacenterLink = input.searchLink("datacenter");
            return datacenterLink != null
                  && datacenterLink.getHref().equals(datacenter.unwrap().getEditLink().getHref());
View Full Code Here

TOP

Related Classes of com.abiquo.server.core.enterprise.DatacentersLimitsDto

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.