Examples of StoragePoolDetailVO


Examples of org.apache.cloudstack.storage.datastore.db.StoragePoolDetailVO

        accountDetail = _accountDetailsDao.findDetail(accountId, SolidFireUtil.CHAP_INITIATOR_SECRET);

        String chapInitiatorSecret = accountDetail.getValue();

        StoragePoolDetailVO storagePoolDetail = _storagePoolDetailsDao.findDetail(volumeInfo.getPoolId(), SolidFireUtil.USE_MUTUAL_CHAP_FOR_VMWARE);

        boolean useMutualChapForVMware = new Boolean(storagePoolDetail.getValue());

        String chapTargetUsername = null;
        String chapTargetSecret = null;

        if (useMutualChapForVMware) {
View Full Code Here

Examples of org.apache.cloudstack.storage.datastore.db.StoragePoolDetailVO

        return new ChapInfoImpl(chapInitiatorUsername, chapInitiatorSecret,
                chapTargetUsername, chapTargetSecret);
    }

    private long getDefaultMinIops(long storagePoolId) {
        StoragePoolDetailVO storagePoolDetail = _storagePoolDetailsDao.findDetail(storagePoolId, SolidFireUtil.CLUSTER_DEFAULT_MIN_IOPS);

        String clusterDefaultMinIops = storagePoolDetail.getValue();

        return Long.parseLong(clusterDefaultMinIops);
    }
View Full Code Here

Examples of org.apache.cloudstack.storage.datastore.db.StoragePoolDetailVO

        return Long.parseLong(clusterDefaultMinIops);
    }

    private long getDefaultMaxIops(long storagePoolId) {
        StoragePoolDetailVO storagePoolDetail = _storagePoolDetailsDao.findDetail(storagePoolId, SolidFireUtil.CLUSTER_DEFAULT_MAX_IOPS);

        String clusterDefaultMaxIops = storagePoolDetail.getValue();

        return Long.parseLong(clusterDefaultMaxIops);
    }
View Full Code Here

Examples of org.apache.cloudstack.storage.datastore.db.StoragePoolDetailVO

        return Long.parseLong(clusterDefaultMaxIops);
    }

    private long getDefaultBurstIops(long storagePoolId, long maxIops) {
        StoragePoolDetailVO storagePoolDetail = _storagePoolDetailsDao.findDetail(storagePoolId, SolidFireUtil.CLUSTER_DEFAULT_BURST_IOPS_PERCENT_OF_MAX_IOPS);

        String clusterDefaultBurstIopsPercentOfMaxIops = storagePoolDetail.getValue();

        float fClusterDefaultBurstIopsPercentOfMaxIops = Float.parseFloat(clusterDefaultBurstIopsPercentOfMaxIops);

        return (long)(maxIops * fClusterDefaultBurstIopsPercentOfMaxIops);
    }
View Full Code Here

Examples of org.apache.cloudstack.storage.datastore.db.StoragePoolDetailVO

    @Test
    public void testClusterAllocatorWithTags() {
        try {
            createDb();
            StoragePoolDetailVO detailVO = new StoragePoolDetailVO(this.storagePoolId, "high", "true", display);
            poolDetailsDao.persist(detailVO);
            DiskOfferingVO diskOff = this.diskOfferingDao.findById(diskOffering.getId());
            List<String> tags = new ArrayList<String>();
            tags.add("high");
            diskOff.setTagsArray(tags);
View Full Code Here

Examples of org.apache.cloudstack.storage.datastore.db.StoragePoolDetailVO

    @Test
    public void testClusterAllocatorWithWrongTag() {
        try {
            createDb();
            StoragePoolDetailVO detailVO = new StoragePoolDetailVO(this.storagePoolId, "high", "true", display);
            poolDetailsDao.persist(detailVO);
            DiskOfferingVO diskOff = this.diskOfferingDao.findById(diskOffering.getId());
            List<String> tags = new ArrayList<String>();
            tags.add("low");
            diskOff.setTagsArray(tags);
View Full Code Here

Examples of org.apache.cloudstack.storage.datastore.db.StoragePoolDetailVO

        return ConfigKey.Scope.StoragePool;
    }

    @Override
    public String getConfigValue(long id, ConfigKey<?> key) {
        StoragePoolDetailVO vo = findDetail(id, key.key());
        return vo == null ? null : vo.getValue();
    }
View Full Code Here

Examples of org.apache.cloudstack.storage.datastore.db.StoragePoolDetailVO

        return vo == null ? null : vo.getValue();
    }

    @Override
    public void addDetail(long resourceId, String key, String value, boolean display) {
        super.addDetail(new StoragePoolDetailVO(resourceId, key, value, display));
    }
View Full Code Here

Examples of org.apache.cloudstack.storage.datastore.db.StoragePoolDetailVO

            case storagepool:
                StoragePoolVO pool = _storagePoolDao.findById(resourceId);
                if (pool == null) {
                    throw new InvalidParameterValueException("unable to find storage pool by id " + resourceId);
                }
                StoragePoolDetailVO storagePoolDetailVO = _storagePoolDetailsDao.findDetail(resourceId, name);
                if (storagePoolDetailVO == null) {
                    storagePoolDetailVO = new StoragePoolDetailVO(resourceId, name, value);
                    _storagePoolDetailsDao.persist(storagePoolDetailVO);

                } else {
                    storagePoolDetailVO.setValue(value);
                    _storagePoolDetailsDao.update(storagePoolDetailVO.getId(), storagePoolDetailVO);
                }
                break;

            case account:
                AccountVO account = _accountDao.findById(resourceId);
View Full Code Here

Examples of org.apache.cloudstack.storage.datastore.db.StoragePoolDetailVO

                    case storagepool:      StoragePoolVO pool = _storagePoolDao.findById(resourceId);
                                    if (pool == null) {
                                        throw new InvalidParameterValueException("unable to find storage pool by id " + resourceId);
                                    }
                                    StoragePoolDetailVO storagePoolDetailVO = _storagePoolDetailsDao.findDetail(resourceId, name);
                                    if (storagePoolDetailVO != null && storagePoolDetailVO.getValue() != null) {
                                        return storagePoolDetailVO.getValue();
                                    } break;

                    case account:   AccountVO account = _accountDao.findById(resourceId);
                                    if (account == null) {
                                        throw new InvalidParameterValueException("unable to find account by id " + resourceId);
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.