Examples of EnterpriseDto


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

      checkFilters(request);
   }

   public void testUpdateLimits() throws SecurityException, NoSuchMethodException, IOException {
      EnterpriseDto enterprise = EnterpriseResources.enterprisePut();

      Invokable<?, ?> method = method(EnterpriseApi.class, "updateLimits", DatacenterLimitsDto.class);
      GeneratedHttpRequest request = processor.apply(Invocation.create(method,
            ImmutableList.<Object> of(EnterpriseResources.datacenterLimitsPut(enterprise))));
View Full Code Here

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

      checkFilters(request);
   }

   public void testDeleteLimits() throws SecurityException, NoSuchMethodException {
      EnterpriseDto enterprise = EnterpriseResources.enterprisePut();

      Invokable<?, ?> method = method(EnterpriseApi.class, "deleteLimits", DatacenterLimitsDto.class);
      GeneratedHttpRequest request = processor.apply(Invocation.create(method,
            ImmutableList.<Object> of(EnterpriseResources.datacenterLimitsPut(enterprise))));
View Full Code Here

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

      checkFilters(request);
   }

   public void testCreateUser() throws SecurityException, NoSuchMethodException, IOException {
      EnterpriseDto enterprise = EnterpriseResources.enterprisePut();
      UserDto user = EnterpriseResources.userPost();

      Invokable<?, ?> method = method(EnterpriseApi.class, "createUser", EnterpriseDto.class, UserDto.class);
      GeneratedHttpRequest request = processor.apply(Invocation.create(method,
            ImmutableList.<Object> of(enterprise, user)));
View Full Code Here

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

      checkFilters(request);
   }

   public void testCreateTemplateDefinitionList() throws SecurityException, NoSuchMethodException, IOException {
      EnterpriseDto enterprise = EnterpriseResources.enterprisePut();
      TemplateDefinitionListDto template = EnterpriseResources.templateListPost();

      Invokable<?, ?> method = method(EnterpriseApi.class, "createTemplateDefinitionList", EnterpriseDto.class,
            TemplateDefinitionListDto.class);
      GeneratedHttpRequest request = processor.apply(Invocation.create(method,
View Full Code Here

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

   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

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

    *      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

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

   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

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

    *      > 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

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

      return Iterables.getFirst(listEnterprises(filter), null);
   }

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

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
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.