Examples of IntroduceObjectAnswer


Examples of org.apache.cloudstack.storage.command.IntroduceObjectAnswer

        }
        if (answer == null || !answer.getResult()) {
            String errMsg = answer == null ? null : answer.getDetails();
            throw new CloudRuntimeException("Failed to introduce object, due to " + errMsg);
        }
        IntroduceObjectAnswer introduceObjectAnswer = (IntroduceObjectAnswer)answer;
        return introduceObjectAnswer.getDataTO();
    }
View Full Code Here

Examples of org.apache.cloudstack.storage.command.IntroduceObjectAnswer

        try {
            Connection conn = hypervisorResource.getConnection();
            DataStoreTO store = cmd.getDataTO().getDataStore();
            SR poolSr = hypervisorResource.getStorageRepository(conn, store.getUuid());
            poolSr.scan(conn);
            return new IntroduceObjectAnswer(cmd.getDataTO());
        } catch (Exception e) {
            s_logger.debug("Failed to introduce object", e);
            return new Answer(cmd, false, e.toString());
        }
    }
View Full Code Here

Examples of org.apache.cloudstack.storage.command.IntroduceObjectAnswer

        try {
            Connection conn = hypervisorResource.getConnection();
            DataTO data = cmd.getDataTO();
            VDI vdi = VDI.getByUuid(conn, data.getPath());
            vdi.forget(conn);
            return new IntroduceObjectAnswer(cmd.getDataTO());
        } catch (Exception e) {
            s_logger.debug("Failed to introduce object", e);
            return new Answer(cmd, false, e.toString());
        }
    }
View Full Code Here

Examples of org.apache.cloudstack.storage.command.IntroduceObjectAnswer

        try {
            Connection conn = hypervisorResource.getConnection();
            DataStoreTO store = cmd.getDataTO().getDataStore();
            SR poolSr = hypervisorResource.getStorageRepository(conn, store.getUuid());
            poolSr.scan(conn);
            return new IntroduceObjectAnswer(cmd.getDataTO());
        } catch (Exception e) {
            s_logger.debug("Failed to introduce object", e);
            return new Answer(cmd, false, e.toString());
        }
    }
View Full Code Here

Examples of org.apache.cloudstack.storage.command.IntroduceObjectAnswer

        try {
            Connection conn = hypervisorResource.getConnection();
            DataTO data = cmd.getDataTO();
            VDI vdi = VDI.getByUuid(conn, data.getPath());
            vdi.forget(conn);
            return new IntroduceObjectAnswer(cmd.getDataTO());
        } catch (Exception e) {
            s_logger.debug("Failed to introduce object", e);
            return new Answer(cmd, false, e.toString());
        }
    }
View Full Code Here

Examples of org.apache.cloudstack.storage.command.IntroduceObjectAnswer

        }
        if (answer == null || !answer.getResult()) {
            String errMsg = answer == null ? null : answer.getDetails();
            throw new CloudRuntimeException("Failed to introduce object, due to " + errMsg);
        }
        IntroduceObjectAnswer introduceObjectAnswer = (IntroduceObjectAnswer)answer;
        return introduceObjectAnswer.getDataTO();
    }
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.