Examples of InventoryReport


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

    }

    public void testServerDiscovery() throws Exception
    {
        LOG.info("########################  Running testServerDiscovery()");
        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;
        System.out.println("Found " + servers.size() + " servers");
View Full Code Here

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

   }

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

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

      Set<Resource> resources = findResource(PluginContainer.getInstance().getInventoryManager().getPlatform(), "Hibernate Statistics");
      System.out.println("Found " + resources.size() + " hibernate services");
   }
View Full Code Here

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

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

                explicitKey1ServerResource = findTestServerResource(Explicit, EXPLICIT_RESOURCE_KEY1);
                boolean foundExplicitKey1Server = explicitKey1ServerResource != null;
                LOG.info("foundExplicitKey1Server = " + foundExplicitKey1Server);
View Full Code Here

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

    @Test(dependsOnMethods = "testServerDiscovery")
    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");

                for (Resource jmxServer : jmxServers) {
                    Set<Resource> childResources = jmxServer.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
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
        System.out.println("Found " + servers.size() + " 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();
            Resource platform = PluginContainer.getInstance().getInventoryManager().getPlatform();

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

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

    protected Answer<MergeInventoryReportResults> mergeInventoryReport() {
        return new Answer<MergeInventoryReportResults>() {
            @Override
            public MergeInventoryReportResults answer(InvocationOnMock invocation) throws Throwable {
                InventoryReport inventoryReport = (InventoryReport) invocation.getArguments()[0];
                return simulateInventoryReportServerProcessing(inventoryReport);
            }
        };
    }
View Full Code Here

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

        return new CustomAction("updateServerSideInventory") {
            public Object invoke(Invocation invocation) throws Throwable {
                synchronized (FakeServerInventory.this) {
                    throwIfFailing();

                    InventoryReport inventoryReport = (InventoryReport) invocation.getParameter(0);

                    for (Resource res : inventoryReport.getAddedRoots()) {
                        Resource persisted = fakePersist(res, judge, new HashSet<String>());

                        if (res.getParentResource() == Resource.ROOT) {
                            platform = persisted;
                        }
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");
        Set<Resource> resources = findResource(PluginContainer.getInstance().getInventoryManager().getPlatform(),
            "Tomcat");
        log.info("Found " + resources.size() + " ews / apache tomcat instance(s).");
    }
View Full Code Here

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

    }

    @Test
    public void discoverStorageNode() {
        InventoryManager inventoryManager = PluginContainer.getInstance().getInventoryManager();
        InventoryReport inventoryReport = inventoryManager.executeServerScanImmediately();

        if (inventoryReport.getAddedRoots().isEmpty()) {
            // could be empty if the storage node is already in inventory from
            // a prior discovery scan.
            Resource platform = inventoryManager.getPlatform();
            storageNode = findCassandraNode(platform.getChildResources(), "127.0.0.1");
        } else {
            storageNode = findCassandraNode(inventoryReport.getAddedRoots(), "127.0.0.1");
        }

        assertNotNull(storageNode, "Failed to discover Storage Node instance");
        assertNodeIsUp("Expected " + storageNode + " to be UP after discovery");
    }
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.