Examples of DcDetailVO


Examples of com.cloud.dc.DcDetailVO

                switch (Config.ConfigurationParameterScope.valueOf(scope)) {
                    case zone:      DataCenterVO zone = _zoneDao.findById(resourceId);
                                    if (zone == null) {
                                        throw new InvalidParameterValueException("unable to find zone by id " + resourceId);
                                    }
                                    DcDetailVO dcDetailVO = _dcDetailsDao.findDetail(resourceId, name);
                                    if (dcDetailVO != null && dcDetailVO.getValue() != null) {
                                        return dcDetailVO.getValue();
                                    } break;

                    case cluster:   ClusterVO cluster = _clusterDao.findById(resourceId);
                                    if (cluster == null) {
                                        throw new InvalidParameterValueException("unable to find cluster by id " + resourceId);
View Full Code Here

Examples of com.cloud.dc.DcDetailVO

            case zone:
                DataCenterVO zone = _zoneDao.findById(resourceId);
                if (zone == null) {
                    throw new InvalidParameterValueException("unable to find zone by id " + resourceId);
                }
                DcDetailVO dcDetailVO = _dcDetailsDao.findDetail(resourceId, name.toLowerCase());
                if (dcDetailVO == null) {
                    dcDetailVO = new DcDetailVO(resourceId, name, value);
                    _dcDetailsDao.persist(dcDetailVO);
                } else {
                    dcDetailVO.setValue(value);
                    _dcDetailsDao.update(dcDetailVO.getId(), dcDetailVO);
                }
                break;
            case cluster:
                ClusterVO cluster = _clusterDao.findById(resourceId);
                if (cluster == null) {
View Full Code Here

Examples of com.cloud.dc.DcDetailVO

        SearchCriteria<DcDetailVO> sc = DcSearch.create();
        sc.setParameters("dcId", dcId);
        expunge(sc);
       
        for (Map.Entry<String, String> detail : details.entrySet()) {
            DcDetailVO vo = new DcDetailVO(dcId, detail.getKey(), detail.getValue());
            persist(vo);
        }
        txn.commit();
    }
View Full Code Here

Examples of com.cloud.dc.DcDetailVO

      if(s_logger.isDebugEnabled()){
        s_logger.debug("Successfully loaded the DataCenter from the zone token passed in ");
      }
       
        long zoneId = zone.getId();
        DcDetailVO maxHostsInZone = _zoneDetailsDao.findDetail(zoneId, ZoneConfig.MaxHosts.key());
        if(maxHostsInZone != null){
          long maxHosts = new Long(maxHostsInZone.getValue()).longValue();
          long currentCountOfHosts = _hostDao.countRoutingHostsByDataCenter(zoneId);
          if(s_logger.isDebugEnabled()){
            s_logger.debug("Number of hosts in Zone:"+ currentCountOfHosts + ", max hosts limit: "+ maxHosts);
          }
          if(currentCountOfHosts >= maxHosts){
View Full Code Here

Examples of com.cloud.dc.DcDetailVO

            case zone:
                DataCenterVO zone = _zoneDao.findById(resourceId);
                if (zone == null) {
                    throw new InvalidParameterValueException("unable to find zone by id " + resourceId);
                }
                DcDetailVO dcDetailVO = _dcDetailsDao.findDetail(resourceId, name.toLowerCase());
                if (dcDetailVO == null) {
                    dcDetailVO = new DcDetailVO(resourceId, name, value);
                    _dcDetailsDao.persist(dcDetailVO);
                } else {
                    dcDetailVO.setValue(value);
                    _dcDetailsDao.update(dcDetailVO.getId(), dcDetailVO);
                }
                break;
            case cluster:
                ClusterVO cluster = _clusterDao.findById(resourceId);
                if (cluster == null) {
View Full Code Here

Examples of com.cloud.dc.DcDetailVO

                switch (Config.ConfigurationParameterScope.valueOf(scope)) {
                    case zone:      DataCenterVO zone = _zoneDao.findById(resourceId);
                                    if (zone == null) {
                                        throw new InvalidParameterValueException("unable to find zone by id " + resourceId);
                                    }
                                    DcDetailVO dcDetailVO = _dcDetailsDao.findDetail(resourceId, name);
                                    if (dcDetailVO != null && dcDetailVO.getValue() != null) {
                                        return dcDetailVO.getValue();
                                    } break;

                    case cluster:   ClusterVO cluster = _clusterDao.findById(resourceId);
                                    if (cluster == null) {
                                        throw new InvalidParameterValueException("unable to find cluster by id " + resourceId);
View Full Code Here

Examples of com.cloud.dc.DcDetailVO

      if(s_logger.isDebugEnabled()){
        s_logger.debug("Successfully loaded the DataCenter from the zone token passed in ");
      }
       
        long zoneId = zone.getId();
        DcDetailVO maxHostsInZone = _zoneDetailsDao.findDetail(zoneId, ZoneConfig.MaxHosts.key());
        if(maxHostsInZone != null){
          long maxHosts = new Long(maxHostsInZone.getValue()).longValue();
          long currentCountOfHosts = _hostDao.countRoutingHostsByDataCenter(zoneId);
          if(s_logger.isDebugEnabled()){
            s_logger.debug("Number of hosts in Zone:"+ currentCountOfHosts + ", max hosts limit: "+ maxHosts);
          }
          if(currentCountOfHosts >= maxHosts){
View Full Code Here

Examples of com.cloud.dc.DcDetailVO

        SearchCriteria<DcDetailVO> sc = DcSearch.create();
        sc.setParameters("dcId", dcId);
        expunge(sc);
       
        for (Map.Entry<String, String> detail : details.entrySet()) {
            DcDetailVO vo = new DcDetailVO(dcId, detail.getKey(), detail.getValue());
            persist(vo);
        }
        txn.commit();
    }
View Full Code Here

Examples of org.apache.cloudstack.engine.datacenter.entity.api.db.DcDetailVO

        SearchCriteria<DcDetailVO> sc = DcSearch.create();
        sc.setParameters("dcId", dcId);
        expunge(sc);

        for (Map.Entry<String, String> detail : details.entrySet()) {
            DcDetailVO vo = new DcDetailVO(dcId, detail.getKey(), detail.getValue());
            persist(vo);
        }
        txn.commit();
    }
View Full Code Here

Examples of org.apache.cloudstack.engine.datacenter.entity.api.db.DcDetailVO

        SearchCriteria<DcDetailVO> sc = DcSearch.create();
        sc.setParameters("dcId", dcId);
        expunge(sc);

        for (Map.Entry<String, String> detail : details.entrySet()) {
            DcDetailVO vo = new DcDetailVO(dcId, detail.getKey(), detail.getValue());
            persist(vo);
        }
        txn.commit();
    }
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.