Examples of VmmNode


Examples of org.globus.workspace.remoting.admin.VmmNode

                            hostname, pool, networks, memory, active);
                } catch (NodeManagementDisabled e) {
                    throw new RemoteException(e.getMessage());
                }

                final VmmNode node = translateResourcepoolEntry(entry);
                reports.add(new NodeReport(hostname, NodeReport.STATE_UPDATED,
                        node));
            } catch (NodeInUseException e) {
                logger.info("VMM node was in use, failed to update: " + hostname);
                reports.add(
View Full Code Here

Examples of org.globus.workspace.remoting.admin.VmmNode

    private static VmmNode translateResourcepoolEntry(ResourcepoolEntry entry) {
        if (entry == null) {
             return null;
        }
        VmmNode vmm = new VmmNode(entry.getHostname(), entry.isActive(),
                entry.getResourcePool(), entry.getMemMax(),
                entry.getSupportedAssociations(), entry.isVacant());

        vmm.setMemRemain(entry.getMemCurrent());
        return vmm;
    }
View Full Code Here

Examples of org.globus.workspace.remoting.admin.VmmNode

        String zone1 = "zone1";
        String zone2 = "zone2";
        boolean vacant = true;
        Gson gson = new Gson();
        List<VmmNode> nodes = new ArrayList<VmmNode>(4);
        nodes.add(new VmmNode("fakehost1", active, zone1, 64, "public", vacant));
        nodes.add(new VmmNode("fakehost2", active, zone2, 64, "public", vacant));
        final String nodesJson = gson.toJson(nodes);
        RemoteNodeManagement rnm = this.locator.getNodeManagement();
        rnm.addNodes(nodesJson);
    }
View Full Code Here

Examples of org.globus.workspace.remoting.admin.VmmNode

                            Opts.POOL_LONG +") or config value");
        }

        final List<VmmNode> nodes = new ArrayList<VmmNode>(this.hosts.size());
        for (String hostname : this.hosts) {
            nodes.add(new VmmNode(hostname, this.nodeActive, this.nodePool,
                    this.nodeMemory, this.nodeNetworks, true));
        }
        final String nodesJson = gson.toJson(nodes);
        NodeReport[] reports = null;
        try {
View Full Code Here

Examples of org.globus.workspace.remoting.admin.VmmNode

    private static Map<String,String> nodeReportToMap(NodeReport nodeReport) {
        final HashMap<String, String> map =
                new HashMap<String, String>(2);
        map.put(FIELD_HOSTNAME, nodeReport.getHostname());
        map.put(FIELD_RESULT, nodeReport.getState());
        final VmmNode node = nodeReport.getNode();
        if (node == null) {
            map.put(FIELD_POOL, null);
            map.put(FIELD_MEMORY, null);
            map.put(FIELD_NETWORKS, null);
            map.put(FIELD_IN_USE, null);
            map.put(FIELD_ACTIVE, null);
        } else {
            map.put(FIELD_POOL, node.getPoolName());
            map.put(FIELD_MEMORY, String.valueOf(node.getMemory()));
            map.put(FIELD_NETWORKS, node.getNetworkAssociations());
            map.put(FIELD_IN_USE, String.valueOf(!node.isVacant()));
            map.put(FIELD_ACTIVE, String.valueOf(node.isActive()));
        }
        return map;
    }
View Full Code Here

Examples of org.globus.workspace.remoting.admin.VmmNode

        String net = "*";
        boolean vacant = true;

        Gson gson = new Gson();
        List<VmmNode> nodes = new ArrayList<VmmNode>(4);
        nodes.add(new VmmNode("fakehost1", active, nodePool, nodeMemory, net, vacant));
        nodes.add(new VmmNode("fakehost2", active, nodePool, nodeMemory, net, vacant));
        nodes.add(new VmmNode("fakehost3", active, nodePool, nodeMemory, net, vacant));
        nodes.add(new VmmNode("fakehost4", active, nodePool, nodeMemory, net, vacant));
        nodes.add(new VmmNode("fakehost5", active, nodePool, nodeMemory, net, vacant));
        nodes.add(new VmmNode("fakehost6", active, nodePool, nodeMemory, net, vacant));
        nodes.add(new VmmNode("fakehost7", active, nodePool, nodeMemory, net, vacant));
        nodes.add(new VmmNode("fakehost8", active, nodePool, nodeMemory, net, vacant));
        nodes.add(new VmmNode("fakehost9", active, nodePool, nodeMemory, net, vacant));
        nodes.add(new VmmNode("fakehost10", active, nodePool, nodeMemory, net, vacant));

        final String nodesJson = gson.toJson(nodes);
        RemoteNodeManagement rnm = this.locator.getNodeManagement();
        rnm.addNodes(nodesJson);
    }
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.