Package org.rhq.core.pc.inventory

Examples of org.rhq.core.pc.inventory.InventoryManager


        assertNotNull(availability, "Unable to determine availability for " + storageNode);
        assertEquals(availability.getAvailabilityType(), AvailabilityType.DOWN, msg);
    }

    private Availability getAvailability() {
        InventoryManager inventoryManager = PluginContainer.getInstance().getInventoryManager();
        return new Availability(storageNode, inventoryManager.getCurrentAvailability(storageNode, false).forResource(storageNode.getId()));
    }
View Full Code Here


        InventoryManager inventoryManager = PluginContainer.getInstance().getInventoryManager();
        return new Availability(storageNode, inventoryManager.getCurrentAvailability(storageNode, false).forResource(storageNode.getId()));
    }

    private void executeAvailabilityScan() {
        InventoryManager inventoryManager = PluginContainer.getInstance().getInventoryManager();
        inventoryManager.executeAvailabilityScanImmediately(false, true);
    }
View Full Code Here

                tweakDefaultPluginConfig(defaultPluginConfig);
                resetConfigFiles(defaultPluginConfig, deleteRoot);
                deleteRoot = false;
            }

            InventoryManager inventoryManager = PluginContainer.getInstance().getInventoryManager();
            System.out.println("Executing server discovery scan...");
            inventoryManager.executeServerScanImmediately();
            System.out.println("Executing service discovery scan...");
            inventoryManager.executeServiceScanImmediately();
        } catch (Exception e) {
            e.printStackTrace();
            fail("Failed to initialize the plugin container.", e);
        }
    }
View Full Code Here

    protected final ResourceType getResourceType() {
        return getResourceType(getResourceTypeName(), getPluginName());
    }

    protected Set<Resource> getResources() {
        InventoryManager inventoryManager = PluginContainer.getInstance().getInventoryManager();
        ResourceType resourceType = getResourceType();
        Set<Resource> resources = inventoryManager.getResourcesWithType(resourceType);
        return resources;
    }
View Full Code Here

        System.out.println("---------- Finished " + getClass().getSimpleName() + ". testShutdownAndStartOperations...");
    }

    private void restartServerResourceComponent() throws PluginContainerException {
        InventoryManager inventoryManager = this.pluginContainer.getInventoryManager();
        inventoryManager.deactivateResource(getServerResource());
        ResourceContainer serverContainer = inventoryManager.getResourceContainer(getServerResource());
        inventoryManager.activateResource(getServerResource(), serverContainer, true);
    }
View Full Code Here

        catch (PluginContainerException e)
        {
            fail();
        }

        InventoryManager inventoryManager = pc.getInventoryManager();
        assert inventoryManager.getResourceComponent(deleteMe) == null : "Resource component was not deleted from inventory manager";

        Resource deleteMe2 = findService(dsName, SERVER_NAME, platform);

        assert deleteMe2 == null : "found datasource that was supposed to be deleted";
    }
View Full Code Here

    }

    @Override
    protected Set<Resource> getResources() {
        //let's pick the "another-crontab" file
        InventoryManager inventoryManager = PluginContainer.getInstance().getInventoryManager();
        ResourceType resourceType = getResourceType();
        Set<Resource> resources = inventoryManager.getResourcesWithType(resourceType);
       
        for(Resource res : resources) {
            if ("/etc/cron.d/another-crontab".equals(res.getResourceKey())) {
                return Collections.singleton(res);
            }
View Full Code Here

import org.rhq.core.pluginapi.measurement.MeasurementFacet;

public class TestHelper {

  public static Set<Resource> getResources(ResourceType resourceType) {
    InventoryManager inventoryManager = PluginContainer.getInstance()
        .getInventoryManager();
    Set<Resource> resources = inventoryManager
        .getResourcesWithType(resourceType);
    return resources;
  }
View Full Code Here

    PluginMetadataManager pluginMetadataManager = PluginContainer
        .getInstance().getPluginManager().getMetadataManager();
    ResourceType appServerResourceType = pluginMetadataManager.getType(
        APPLICATION_SERVER_RESOURCE_NAME, PLUGIN_NAME);

    InventoryManager inventoryManager = PluginContainer.getInstance()
        .getInventoryManager();

    Set<Resource> appServers = inventoryManager
        .getResourcesWithType(appServerResourceType);

    if (appServers.size() != 1) {
      throw new IllegalStateException(
          "Expected to find exactly 1 AS5 server, but found "
View Full Code Here

TOP

Related Classes of org.rhq.core.pc.inventory.InventoryManager

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.