Examples of CloudException


Examples of io.fathom.cloud.CloudException

            // Don't use atomic... we don't have the right tmp, and we don't
            String lxcConfig = container.lxcConfig.build();
            WriteFile.with(sshConfig).from(lxcConfig).to(new File(configDir, "config.lxc")).run();
        } catch (IOException e) {
            throw new CloudException("Error creating container", e);
        }
    }
View Full Code Here

Examples of io.fathom.cloud.CloudException

        try (Sftp sftp = buildSftp()) {
            File processFile = getProcessFile(containerId);
            sftp.delete(processFile);
            return true;
        } catch (IOException e) {
            throw new CloudException("Error stopping container", e);
        }
    }
View Full Code Here

Examples of io.fathom.cloud.CloudException

        for (String instanceEc2Id : instanceEc2Ids) {
            long instanceId = decodeEc2Id("i-", instanceEc2Id);
            InstanceData instance = instanceStateStore.getInstances(getProject().getId()).find(instanceId);
            if (instance == null) {
                throw new CloudException("The instance ID '" + instanceEc2Id + "' does not exist");
            }
            stopInstances.add(instance);
        }

        asyncTasks.stopInstances(stopInstances);
View Full Code Here

Examples of io.fathom.cloud.CloudException

        byte[] secretData;
        try {
            secretData = host.getSecret(containerId, key);
        } catch (IOException e) {
            throw new CloudException("Error reading secret", e);
        }
        return secretData;
    }
View Full Code Here

Examples of io.fathom.cloud.CloudException

    // }

    public Csr buildCsr(KeyPair keyPair, String subject) throws CloudException {
        String domainName = subject;
        if (domainName == null) {
            throw new CloudException("Subject must be specified");
        }

        X500Principal principal = buildPrincipal(subject);

        Csr csr = Csr.buildCsr(keyPair, principal);
View Full Code Here

Examples of io.fathom.cloud.CloudException

        ByteString data;
        try {
            data = codec.serialize(msg);
        } catch (IOException e) {
            throw new CloudException("Error serializing data", e);
        }

        node.update(data);
        return msg;
    }
View Full Code Here

Examples of io.fathom.cloud.CloudException

            ByteString data;
            try {
                data = codec.serialize(built);
            } catch (IOException e) {
                throw new CloudException("Error serializing data", e);
            }
            StateNode node = parentNode.child(Long.toHexString(id));

            if (!node.create(data)) {
                continue;
View Full Code Here

Examples of io.fathom.cloud.CloudException

            return response.id;
        } catch (RestClientException e) {
            if (e.is(409)) {
                throw new DuplicateValueException();
            }
            throw new CloudException("Error creating zone", e);
        }
    }
View Full Code Here

Examples of io.fathom.cloud.CloudException

            List<Recordset> requested = readFromDatabase(true);
            List<Recordset> current;
            try {
                current = readFromOpenstack(zone);
            } catch (RestClientException e) {
                throw new CloudException("Error reading zone", e);
            }

            Changes changes = computeChanges(current, requested);

            try {
                OpenstackDnsClient client = openstackClient.getDns();
                for (Recordset r : changes.remove) {
                    client.deleteRecordset(zone.id, r.id);
                }
                for (Recordset r : changes.create) {
                    client.createRecordset(zone.id, r);
                }
            } catch (RestClientException e) {
                throw new CloudException("Error applying zone changes", e);
            }

            return null;
        }
View Full Code Here

Examples of io.fathom.cloud.CloudException

                    zone = client.createZone(zone);
                }

                return zone;
            } catch (RestClientException e) {
                throw new CloudException("Error mapping zone: " + zoneName, e);
            }
        }
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.