Package com.cloud.exception

Examples of com.cloud.exception.CloudException


                    addProxyObject(idList.get(i));
                }
            }
            setCSErrorCode(rt.getCSErrorCode());
        } else if (cause instanceof CloudException) {
            CloudException rt = (CloudException) cause;
            ArrayList<String> idList = rt.getIdProxyList();
            if (idList != null) {
                for (int i = 0; i < idList.size(); i++) {
                    addProxyObject(idList.get(i));
                }
            }
            setCSErrorCode(rt.getCSErrorCode());
        }
    }
View Full Code Here


                TrafficType.Storage
        };

        TrafficType trafficType = nicTo.getType();
        if (!Arrays.asList(supportedTrafficTypes).contains(trafficType)) {
            throw new CloudException("Traffic type " + trafficType.toString() + " for nic " + nicTo.toString() + " is not supported.");
        }

        String switchName = null;
        VirtualSwitchType switchType = VirtualSwitchType.StandardVirtualSwitch;
        String vlanToken = Vlan.UNTAGGED;
View Full Code Here

                TrafficType.Storage
        };

        TrafficType trafficType = nicTo.getType();
        if (!Arrays.asList(supportedTrafficTypes).contains(trafficType)) {
            throw new CloudException("Traffic type " + trafficType.toString() + " for nic " + nicTo.toString() + " is not supported.");
        }

        String switchName = null;
        VirtualSwitchType switchType = VirtualSwitchType.StandardVirtualSwitch;
        String vlanToken = Vlan.UNTAGGED;
View Full Code Here

                    addProxyObject(idList.get(i));
                }
            }
            setCSErrorCode(rt.getCSErrorCode());
        } else if (cause instanceof CloudException) {
            CloudException rt = (CloudException)cause;
            ArrayList<String> idList = rt.getIdProxyList();
            if (idList != null) {
                for (int i = 0; i < idList.size(); i++) {
                    addProxyObject(idList.get(i));
                }
            }
            setCSErrorCode(rt.getCSErrorCode());
        }
    }
View Full Code Here

        if (results != null && results.size() > 1) {
            s_logger.warn("Multiple files with name " + fileName + " exists in datastore " + datastorePath + ". Trying to choose first file found in search attempt.");
        } else if (results == null) {
            String msg = "No file found with name " + fileName + " found in datastore " + datastorePath;
            s_logger.error(msg);
            throw new CloudException(msg);
        }
        for (HostDatastoreBrowserSearchResults result : results) {
            List<FileInfo> info = result.getFile();
            if (info != null && info.size() > 0) {
                for (FileInfo fi : info) {
View Full Code Here

        if(!ovfImportResult.getError().isEmpty()) {
            for (LocalizedMethodFault fault : ovfImportResult.getError()) {
                s_logger.error("createImportSpec error: " + fault.getLocalizedMessage());
            }
            throw new CloudException("Failed to create an import spec from " + ovfFilePath + ". Check log for details.");
        }

        if (!ovfImportResult.getWarning().isEmpty()) {
            for (LocalizedMethodFault fault : ovfImportResult.getError()) {
                s_logger.warn("createImportSpec warning: " + fault.getLocalizedMessage());
View Full Code Here

                    addProxyObject(idList.get(i));
                }
            }
            setCSErrorCode(rt.getCSErrorCode());
        } else if (cause instanceof CloudException) {
            CloudException rt = (CloudException) cause;
            ArrayList<String> idList = rt.getIdProxyList();
            if (idList != null) {
                for (int i = 0; i < idList.size(); i++) {
                    addProxyObject(idList.get(i));
                }
            }
            setCSErrorCode(rt.getCSErrorCode());
        }
    }
View Full Code Here

        if (results != null && results.size() > 1) {
            s_logger.warn("Multiple files with name " + fileName + " exists in datastore " + datastorePath + ". Trying to choose first file found in search attempt.");
        } else if (results == null) {
            String msg = "No file found with name " + fileName + " found in datastore " + datastorePath;
            s_logger.error(msg);
            throw new CloudException(msg);
        }

        for (HostDatastoreBrowserSearchResults result : results) {
            List<FileInfo> info = result.getFile();
            if (info != null && info.size() > 0) {
View Full Code Here

        if(!ovfImportResult.getError().isEmpty()) {
            for (LocalizedMethodFault fault : ovfImportResult.getError()) {
                s_logger.error("createImportSpec error: " + fault.getLocalizedMessage());
            }
            throw new CloudException("Failed to create an import spec from " + ovfFilePath + ". Check log for details.");
        }

        if (!ovfImportResult.getWarning().isEmpty()) {
            for (LocalizedMethodFault fault : ovfImportResult.getError()) {
                s_logger.warn("createImportSpec warning: " + fault.getLocalizedMessage());
View Full Code Here

                    addProxyObject(idList.get(i));
                }
            }
            setCSErrorCode(rt.getCSErrorCode());
        } else if (cause instanceof CloudException) {
            CloudException rt = (CloudException) cause;
            ArrayList<String> idList = rt.getIdProxyList();
            if (idList != null) {
                for (int i = 0; i < idList.size(); i++) {
                    addProxyObject(idList.get(i));
                }
            }
            setCSErrorCode(rt.getCSErrorCode());
        }
    }
View Full Code Here

TOP

Related Classes of com.cloud.exception.CloudException

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.