Examples of CloudException


Examples of com.cloud.exception.CloudException

                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

Examples of io.fathom.cloud.CloudException

            attachments.setProjectSecret(getClientApp(), auth, project, secret);
        } else {
            try {
                key = KeyczarUtils.unpack(secret);
            } catch (KeyczarException e) {
                throw new CloudException("Error unpacking key", e);
            }
        }

        return KeyczarUtils.buildCrypter(key);
    }
View Full Code Here

Examples of io.fathom.cloud.CloudException

        OpenstackIdentityClient identityClient;
        try {
            identityClient = CertificateAuthTokenProvider.ensureRegistered(keypair, uri, email);
        } catch (RestClientException e) {
            throw new CloudException("Error registering with server", e);
        }

        String project;
        try {
            project = identityClient.getUtils().ensureProjectWithPrefix("__federation__");
        } catch (RestClientException e) {
            throw new CloudException("Error creating project", e);
        }

        backend.setBackendCookie(project);
    }
View Full Code Here

Examples of io.fathom.cloud.CloudException

                return t;
            } catch (OptimisticLockException e) {
                log.warn("Retrying update after OptimisticLockException", e);
                continue;
            } catch (Exception e) {
                throw new CloudException("Error performing update", e);
            } finally {
                unitOfWork.end();
            }
        }
    }
View Full Code Here

Examples of io.fathom.cloud.CloudException

    protected Sftp buildSftp(RemoteFile tempDir) throws CloudException {
        SftpChannel sftpChannel;
        try {
            sftpChannel = sshConfig.getSftpChannel();
        } catch (IOException e) {
            throw new CloudException("Error connecting to host", e);
        }
        return new Sftp(sftpChannel, tempDir);
    }
View Full Code Here

Examples of io.fathom.cloud.CloudException

            }

            int mode = 0660;
            sftp.writeAtomic(new RemoteFile(confFile), ByteStreams.asByteSource(data), mode);
        } catch (IOException e) {
            throw new CloudException("Error updating applyd configuration", e);
        }
        return true;
    }
View Full Code Here

Examples of io.fathom.cloud.CloudException

                return false;
            }

            sftp.delete(confFile);
        } catch (IOException e) {
            throw new CloudException("Error updating applyd configuration", e);
        }
        return true;
    }
View Full Code Here

Examples of io.fathom.cloud.CloudException

        try {
            SshCommand sshCommand = new SshCommand(sshConfig, cmd);
            sshCommand.run();
        } catch (IOException e) {
            throw new CloudException("Error applying applyd configuration", e);
        }
    }
View Full Code Here

Examples of io.fathom.cloud.CloudException

            process.Dir = hostFilesystem.getRootFs(containerId).getAbsolutePath();

            String json = new Gson().toJson(process);
            sftp.writeAtomic(new RemoteFile(processFile), json.getBytes(Charsets.UTF_8));
        } catch (IOException e) {
            throw new CloudException("Error starting container", e);
        }
    }
View Full Code Here

Examples of io.fathom.cloud.CloudException

    private Sftp buildSftp(RemoteFile tempDir) throws CloudException {
        SftpChannel sftpChannel;
        try {
            sftpChannel = sshConfig.getSftpChannel();
        } catch (IOException e) {
            throw new CloudException("Error connecting to host", e);
        }
        return new Sftp(sftpChannel, tempDir);
    }
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.