Package com.abiquo.server.core.enterprise

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


         this.repositoryHard = hard;
         return this;
      }

      public Enterprise build() {
         EnterpriseDto dto = new EnterpriseDto();
         dto.setName(name);
         dto.setRamLimitsInMb(ramSoftLimitInMb, ramHardLimitInMb);
         dto.setCpuCountLimits(cpuCountSoftLimit, cpuCountHardLimit);
         dto.setHdLimitsInMb(hdSoftLimitInMb, hdHardLimitInMb);
         dto.setStorageLimits(storageSoft, storageHard);
         dto.setVlansLimits(vlansSoft, vlansHard);
         dto.setPublicIPLimits(publicIpsSoft, publicIpsHard);
         dto.setRepositoryLimits(repositorySoft, repositoryHard);
         dto.setIsReservationRestricted(isReservationRestricted);
         dto.setChefClient(chefClient);
         dto.setChefClientCertificate(chefApiCertificate);
         dto.setChefURL(chefURL);
         dto.setChefValidator(chefValidator);
         dto.setChefValidatorCertificate(chefValidatorCertificate);

         return new Enterprise(context, dto);
      }
View Full Code Here


   }

   @Test(expectedExceptions = NullPointerException.class)
   public void testInvalidId() {
      Function<Object, String> parser = new ParseEnterpriseId();
      parser.apply(new EnterpriseDto());
   }
View Full Code Here

   }

   public void testValidId() {
      Function<Object, String> parser = new ParseEnterpriseId();

      EnterpriseDto enterprise = new EnterpriseDto();
      enterprise.setId(5);
      assertEquals(parser.apply(enterprise), "5");
   }
View Full Code Here

         this.repositoryHard = hard;
         return this;
      }

      public Enterprise build() {
         EnterpriseDto dto = new EnterpriseDto();
         dto.setName(name);
         dto.setRamLimitsInMb(ramSoftLimitInMb, ramHardLimitInMb);
         dto.setCpuCountLimits(cpuCountSoftLimit, cpuCountHardLimit);
         dto.setHdLimitsInMb(hdSoftLimitInMb, hdHardLimitInMb);
         dto.setStorageLimits(storageSoft, storageHard);
         dto.setVlansLimits(vlansSoft, vlansHard);
         dto.setPublicIPLimits(publicIpsSoft, publicIpsHard);
         dto.setRepositoryLimits(repositorySoft, repositoryHard);
         dto.setIsReservationRestricted(isReservationRestricted);
         dto.setChefClient(chefClient);
         dto.setChefClientCertificate(chefApiCertificate);
         dto.setChefURL(chefURL);
         dto.setChefValidator(chefValidator);
         dto.setChefValidatorCertificate(chefValidatorCertificate);

         return new Enterprise(context, dto);
      }
View Full Code Here

    *      > http://community.abiquo.com/display/ABI20/Enterprise+Resource#
    *      EnterpriseResource- RetrieveaEnterprise</a>
    */
   public Enterprise getEnterprise() {
      Integer enterpriseId = target.getIdFromLink(ParentLinkName.ENTERPRISE);
      EnterpriseDto dto = context.getApi().getEnterpriseApi().getEnterprise(enterpriseId);
      return wrap(context, Enterprise.class, dto);
   }
View Full Code Here

   public void testUpdate() {
      enterprise.setName("Updated Enterprise");
      enterprise.update();

      // Recover the updated enterprise
      EnterpriseDto updated = env.enterpriseApi.getEnterprise(enterprise.getId());

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

   public Enterprise getOwnerEnterprise() {
      if (!isReserved()) {
         return null;
      }

      EnterpriseDto enterprise = context.getApi().getEnterpriseApi()
            .getEnterprise(target.getIdFromLink(ParentLinkName.ENTERPRISE));

      return wrap(context, Enterprise.class, enterprise);
   }
View Full Code Here

      return wrap(context, Enterprise.class, result.toPagedIterable().concat());
   }

   @Override
   public Enterprise getEnterprise(final Integer enterpriseId) {
      EnterpriseDto enterprise = context.getApi().getEnterpriseApi().getEnterprise(enterpriseId);
      return wrap(context, Enterprise.class, enterprise);
   }
View Full Code Here

    *      EnterpriseResource- RetrieveanEnterprise</a>
    * @return Enterprise of this virtual machine.
    */
   public Enterprise getEnterprise() {
      Integer enterpriseId = target.getIdFromLink(ParentLinkName.ENTERPRISE);
      EnterpriseDto dto = context.getApi().getEnterpriseApi().getEnterprise(enterpriseId);
      return wrap(context, Enterprise.class, dto);
   }
View Full Code Here

* @author Ignasi Barrera
* @author Francesc Montserrat
*/
public class EnterpriseResources {
   public static EnterpriseDto enterprisePost() {
      EnterpriseDto enterprise = new EnterpriseDto();
      enterprise.setName("Kalakaua");
      return enterprise;
   }
View Full Code Here

TOP

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

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.