Examples of InventoryReport


Examples of org.rhq.core.clientapi.server.discovery.InventoryReport

    public String executeDiscovery(Boolean detailedDiscovery) {

        StringBuilder results = new StringBuilder();

        InventoryReport report = this.pluginContainer.getInventoryManager().executeServerScanImmediately();
        results.append(generateInventoryReportString(report));

        if (detailedDiscovery != null && detailedDiscovery.booleanValue()) {
            report = this.pluginContainer.getInventoryManager().executeServiceScanImmediately();
            results.append('\n');
View Full Code Here

Examples of org.rhq.core.clientapi.server.discovery.InventoryReport

        assert (pluginEnvironment.getPluginName().equals(PLUGIN_NAME));
    }

    @Test(dependsOnMethods = "testPluginLoad")
    public void testDiscovery() throws Exception {
        InventoryReport report = PluginContainer.getInstance().getInventoryManager().executeServerScanImmediately();
        assert report != null;
        log.info("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");

        Thread.sleep(1000);

        report = PluginContainer.getInstance().getInventoryManager().executeServiceScanImmediately();
        assert report != null;
        log.info("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");

        Set<Resource> resources = findResource(PluginContainer.getInstance().getInventoryManager().getPlatform());
        log.info("Found " + resources.size() + " mod_cluster and mod_cluster_context instance(s).");

        assert (resources.size() != 0) : "No mod_cluster or related instances found.";
View Full Code Here

Examples of org.rhq.core.clientapi.server.discovery.InventoryReport

        InventoryManager inventoryManager = this.pluginContainer.getInventoryManager();
        inventoryManager.getPlatform().getChildResources().clear(); // just clear everything, sync'ing should give us back unignored ones

        // Now execute a full discovery again, this time, we should see the ignored resources go away
        System.out.println("Executing full discovery...");
        InventoryReport report = inventoryManager.executeServerScanImmediately();
        inventoryManager.handleReport(report);
        waitForInventory(3);
        validatePartiallyIgnoredInventory();
    }
View Full Code Here

Examples of org.rhq.core.clientapi.server.discovery.InventoryReport

        ignoredTypes.clear();

        // Now execute a full discovery again, this time, we should see the full inventory come in
        System.out.println("Executing full discovery...");
        InventoryManager inventoryManager = this.pluginContainer.getInventoryManager();
        InventoryReport report = inventoryManager.executeServerScanImmediately();
        inventoryManager.handleReport(report);
        report = inventoryManager.executeServiceScanImmediately();
        inventoryManager.handleReport(report);
        waitForInventory(5);
        validateFullInventory();
View Full Code Here

Examples of org.rhq.core.clientapi.server.discovery.InventoryReport

        assert (pluginEnvironment.getPluginName().equals(PLUGIN_NAME));
    }

    @Test(dependsOnMethods = "testPluginLoad")
    public void testServerDiscovery() throws Exception {
        InventoryReport report = PluginContainer.getInstance().getInventoryManager().executeServerScanImmediately();
        assert report != null;
        System.out.println("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");

        Set<Resource> pgServers = getDiscoveredServers();

        //assert pgSer vers.size() > 0;
        System.out.println("Found " + pgServers.size() + " postgres servers");
View Full Code Here

Examples of org.rhq.core.clientapi.server.discovery.InventoryReport

    }

    @Test(dependsOnMethods = "testServerDiscovery")
    public void testServiceDiscovery() throws Exception {
        try {
            InventoryReport report = PluginContainer.getInstance().getInventoryManager()
                .executeServiceScanImmediately();
        } catch (Exception e) {
            log.error("Failure to run discovery", e);
            throw e;
        }
View Full Code Here

Examples of org.rhq.core.clientapi.server.discovery.InventoryReport

        assert (pluginEnvironment.getPluginName().equals(PLUGIN_NAME));
    }

    @Test(dependsOnMethods = "pluginLoad", enabled = DiscoveryAndConfigurationTest.ENABLED)
    public void discoverResources() throws Exception {
        InventoryReport report = PluginContainer.getInstance().getInventoryManager().executeServerScanImmediately();
        Assert.assertNotNull(report);
        log.info("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");

        Thread.sleep(4000);

        report = PluginContainer.getInstance().getInventoryManager().executeServiceScanImmediately();
        Assert.assertNotNull(report);
        log.info("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");

        Set<String> ignoredResourceTypes = new HashSet<String>();
        ignoredResourceTypes.add("Cassandra Server JVM");

        Set<String> ignoredResourceNames = new HashSet<String>();
View Full Code Here

Examples of org.rhq.core.clientapi.server.discovery.InventoryReport

        assert (pluginEnvironment.getPluginName().equals(PLUGIN_NAME));
    }

    @Test(dependsOnMethods = "testPluginLoad")
    public void testServerDiscovery() throws Exception {
        InventoryReport report = PluginContainer.getInstance().getInventoryManager().executeServerScanImmediately();
        assert report != null;
        System.out.println("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");

        Resource platform = PluginContainer.getInstance().getInventoryManager().getPlatform();
        Set<Resource> servers = platform.getChildResources();

        // assert servers.size() != 0; Don't require a running app server for testing at this point
View Full Code Here

Examples of org.rhq.core.clientapi.server.discovery.InventoryReport

    }

    @Test(dependsOnMethods = "testServerDiscovery")
    public void testServiceDiscovery() throws Exception {
        try {
            InventoryReport report = PluginContainer.getInstance().getInventoryManager()
                .executeServiceScanImmediately();
            Resource platform = PluginContainer.getInstance().getInventoryManager().getPlatform();

            /*System.out.println("RUNTIME SERVERS: " + platform.getChildResources().size());
             * for (Resource server : platform.getChildResources()) { System.out.println("Server: " +
View Full Code Here

Examples of org.rhq.core.clientapi.server.discovery.InventoryReport

    @Test(dependsOnMethods = "testManualAdd")
    public void testServiceDiscovery() throws Exception {
        timedAssertion(new AssertUtils.BooleanCondition() {
            @Override
            public boolean eval() {
                InventoryReport report = getInventoryManager().executeServiceScanImmediately();
                LOG.info("Discovery took: " + (report.getEndTime() - report.getStartTime()) + " ms");

                Set<Resource> childResources = jmxServerResource.getChildResources();
                // Each JMX Server should have exactly six singleton child Resources with the following types:
                // Operating System, Threading, VM Class Loading System, VM Compilation System, VM Memory System, and
                // java.util.logging.
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.