Package io.fathom.cloud.compute.api.os.model

Examples of io.fathom.cloud.compute.api.os.model.Hypervisor


    public HypervisorStatistics getHypervisorsStatistics() throws CloudException {
        checkDomainAdmin();

        HypervisorStatistics response = new HypervisorStatistics();

        Hypervisor stats = null;

        for (SchedulerHost host : scheduler.getAllHosts()) {
            if (stats == null) {
                stats = toModel(host);
                stats.count = 1L;
            } else {
                Hypervisor model = toModel(host);
                add(stats, model);
            }
        }

        if (stats == null) {
            stats = new Hypervisor();
            stats.count = 0L;
        }

        response.hypervisor_statistics = stats;
View Full Code Here


        }
        return response;
    }

    private Hypervisor toModel(SchedulerHost host) {
        Hypervisor model = new Hypervisor();
        model.id = host.getId();

        model.hypervisor_hostname = InetAddresses.toAddrString(host.getIpAddress());

        model.memory_mb = 0L;
View Full Code Here

TOP

Related Classes of io.fathom.cloud.compute.api.os.model.Hypervisor

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.