Package com.cloud.utils.storage.encoding

Examples of com.cloud.utils.storage.encoding.DecodedDataStore


        String dataStoreUri = cmd.getDataStore();
        Connection conn = hypervisorResource.getConnection();
        try {
            DecodedDataObject obj = Decoder.decode(dataStoreUri);

            DecodedDataStore store = obj.getStore();

            SR sr = hypervisorResource.getStorageRepository(conn, store.getUuid());
            hypervisorResource.setupHeartbeatSr(conn, sr, false);
            long capacity = sr.getPhysicalSize(conn);
            long available = capacity - sr.getPhysicalUtilisation(conn);
            if (capacity == -1) {
                String msg = "Pool capacity is -1! pool: ";
View Full Code Here


        String dataStoreUri = cmd.getDataStore();
        Connection conn = hypervisorResource.getConnection();
        try {
            DecodedDataObject obj = Decoder.decode(dataStoreUri);

            DecodedDataStore store = obj.getStore();

            SR sr = hypervisorResource.getStorageRepository(conn, store.getUuid());
            hypervisorResource.setupHeartbeatSr(conn, sr, false);
            long capacity = sr.getPhysicalSize(conn);
            long available = capacity - sr.getPhysicalUtilisation(conn);
            if (capacity == -1) {
                String msg = "Pool capacity is -1! pool: ";
View Full Code Here

        String dataStoreUri = cmd.getDataStore();
        Connection conn = hypervisorResource.getConnection();
        try {
            DecodedDataObject obj = Decoder.decode(dataStoreUri);

            DecodedDataStore store = obj.getStore();

            SR sr = hypervisorResource.getStorageRepository(conn, store.getUuid());
            hypervisorResource.setupHeartbeatSr(conn, sr, false);
            long capacity = sr.getPhysicalSize(conn);
            long available = capacity - sr.getPhysicalUtilisation(conn);
            if (capacity == -1) {
                String msg = "Pool capacity is -1! pool: ";
View Full Code Here

        boolean result = false;
        String errorMsg = null;
       
        try {
            obj = Decoder.decode(uriString);
            DecodedDataStore store = obj.getStore();
            if (obj.getObjType().equalsIgnoreCase("template") && store.getRole().equalsIgnoreCase("image")) {
                return getTemplateSize(cmd, obj.getPath());
            }
           
            long size = obj.getSize();
            String name = obj.getName();
            String storeUuid = store.getUuid();
            SR primaryDataStoreSR = getSRByNameLabel(conn, storeUuid);
            vdi = createVdi(conn, name, primaryDataStoreSR, size);
            VDI.Record record = vdi.getRecord(conn);
            result = true;
            return new CreateObjectAnswer(cmd, record.uuid, record.virtualSize);
View Full Code Here

        Connection conn = hypervisorResource.getConnection();
        String storeUrl = cmd.getDataStore();

        try {
            DecodedDataObject obj = Decoder.decode(storeUrl);
            DecodedDataStore store = obj.getStore();
            if (store.getScheme().equalsIgnoreCase("nfs")) {
                SR sr = getNfsSR(conn, store);
            } else if (store.getScheme().equalsIgnoreCase("iscsi")) {
                //getIscsiSR(conn, dataStore);
            } else if (store.getScheme().equalsIgnoreCase("presetup")) {
            } else {
                return new Answer(cmd, false, "The pool type: " + store.getScheme() + " is not supported.");
            }
            return new Answer(cmd, true, "success");
        } catch (Exception e) {
           // String msg = "Catch Exception " + e.getClass().getName() + ", create StoragePool failed due to " + e.toString() + " on host:" + _host.uuid + " pool: " + pool.getHost() + pool.getPath();
            //s_logger.warn(msg, e);
View Full Code Here

    protected Answer execute(AttachPrimaryDataStoreCmd cmd) {
        String dataStoreUri = cmd.getDataStore();
        Connection conn = hypervisorResource.getConnection();
        try {
            DecodedDataObject obj = Decoder.decode(dataStoreUri);
            DecodedDataStore store = obj.getStore();
            SR sr = hypervisorResource.getStorageRepository(conn, store.getUuid());
            hypervisorResource.setupHeartbeatSr(conn, sr, false);
            long capacity = sr.getPhysicalSize(conn);
            long available = capacity - sr.getPhysicalUtilisation(conn);
            if (capacity == -1) {
                String msg = "Pool capacity is -1! pool: ";
View Full Code Here

        String dataStoreUri = cmd.getDataStore();
        Connection conn = hypervisorResource.getConnection();
        try {
            DecodedDataObject obj = Decoder.decode(dataStoreUri);

            DecodedDataStore store = obj.getStore();

            SR sr = hypervisorResource.getStorageRepository(conn, store.getUuid());
            hypervisorResource.setupHeartbeatSr(conn, sr, false);
            long capacity = sr.getPhysicalSize(conn);
            long available = capacity - sr.getPhysicalUtilisation(conn);
            if (capacity == -1) {
                String msg = "Pool capacity is -1! pool: ";
View Full Code Here

TOP

Related Classes of com.cloud.utils.storage.encoding.DecodedDataStore

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.