Package org.apache.cloudstack.storage.datastore.db

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


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

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

    @Test
    public void testClusterAllocatorWithTags() {
        try {
            createDb();
            StoragePoolDetailVO detailVO = new StoragePoolDetailVO(this.storagePoolId, "high", "true");
            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

    @Test
    public void testClusterAllocatorWithWrongTag() {
        try {
            createDb();
            StoragePoolDetailVO detailVO = new StoragePoolDetailVO(this.storagePoolId, "high", "true");
            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

            return _clusterAdminPassword;
        }
    }

    private SolidFireConnection getSolidFireConnection(long storagePoolId) {
        StoragePoolDetailVO storagePoolDetail = _storagePoolDetailsDao.findDetail(storagePoolId, SolidFireUtil.MANAGEMENT_VIP);

        String mVip = storagePoolDetail.getValue();

        storagePoolDetail = _storagePoolDetailsDao.findDetail(storagePoolId, SolidFireUtil.MANAGEMENT_PORT);

        int mPort = Integer.parseInt(storagePoolDetail.getValue());

        storagePoolDetail = _storagePoolDetailsDao.findDetail(storagePoolId, SolidFireUtil.CLUSTER_ADMIN_USERNAME);

        String clusterAdminUsername = storagePoolDetail.getValue();

        storagePoolDetail = _storagePoolDetailsDao.findDetail(storagePoolId, SolidFireUtil.CLUSTER_ADMIN_PASSWORD);

        String clusterAdminPassword = storagePoolDetail.getValue();

        return new SolidFireConnection(mVip, mPort, clusterAdminUsername, clusterAdminPassword);
    }
View Full Code Here

        return lstIqns.toArray(new String[0]);
    }

    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

        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

        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

TOP

Related Classes of org.apache.cloudstack.storage.datastore.db.StoragePoolDetailVO

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.