Package org.rhq.core.clientapi.agent.configuration

Examples of org.rhq.core.clientapi.agent.configuration.ConfigurationUpdateRequest


            fixture.configuration, fixture.subject.getName());

        final AgentClient agentClient = context.mock(AgentClient.class);
        final ConfigurationAgentService configAgentService = context.mock(ConfigurationAgentService.class);

        final ConfigurationUpdateRequest expectedUpdateRequest = new ConfigurationUpdateRequest(expectedUpdate.getId(),
            expectedUpdate.getConfiguration(), expectedUpdate.getResource().getId());

        final Query query = context.mock(Query.class);

        context.checking(new Expectations() {
View Full Code Here


            fixture.configuration, fixture.subject.getName());

        final AgentClient agentClient = context.mock(AgentClient.class);
        final ConfigurationAgentService configAgentService = context.mock(ConfigurationAgentService.class);

        final ConfigurationUpdateRequest expectedUpdateRequest = new ConfigurationUpdateRequest(expectedUpdate.getId(),
            expectedUpdate.getConfiguration(), expectedUpdate.getResource().getId());

        final Query query = context.mock(Query.class);

        context.checking(new Expectations() {
View Full Code Here

        expectedUpdate.setId(-1);

        final AgentClient agentClient = context.mock(AgentClient.class);
        final ConfigurationAgentService configAgentService = context.mock(ConfigurationAgentService.class);

        final ConfigurationUpdateRequest expectedUpdateRequest = new ConfigurationUpdateRequest(expectedUpdate.getId(),
            expectedUpdate.getConfiguration(), expectedUpdate.getResource().getId());

        final Sequence configUdpate = context.sequence("structured-config-update");

        context.checking(new Expectations() {
View Full Code Here

                for (Property p : config.getProperties()) {
                    if (newConfig.get(p.getName()) == null)
                        newConfig.put(p);
                }
            }
            ConfigurationUpdateRequest request = new ConfigurationUpdateRequest(1, newConfig, resourceId);
            cm.updateResourceConfiguration(request);
        }
    }
View Full Code Here

        expectedUpdate.setId(-1);

        final AgentClient agentClient = context.mock(AgentClient.class);
        final ConfigurationAgentService configAgentService = context.mock(ConfigurationAgentService.class);

        final ConfigurationUpdateRequest expectedUpdateRequest = new ConfigurationUpdateRequest(expectedUpdate.getId(),
            expectedUpdate.getConfiguration(), expectedUpdate.getResource().getId());

        final Sequence configUdpate = context.sequence("raw-config-update");

        context.checking(new Expectations() {
View Full Code Here

        if (resource.getResourceType().getResourceConfigurationDefinition() != null
            && resource.getResourceType().getResourceConfigurationDefinition().getPropertyDefinitions().size() != 0) {
            try {
                Configuration configUnderTest = configManager.loadResourceConfiguration(resource.getId());

                ConfigurationUpdateRequest updateRequest = new ConfigurationUpdateRequest(1, configUnderTest,
                    resource.getId());
                ConfigurationUpdateResponse updateResponse = configManager
                    .executeUpdateResourceConfigurationImmediately(updateRequest);

                if (updateResponse == null) {
View Full Code Here

        // Change value
        PropertySimple propertySimple = configuration.getSimple("max-pool-size");
        Long currentMaxPoolSize = propertySimple.getLongValue();
        long newMaxPoolSize = currentMaxPoolSize == null ? 40 : currentMaxPoolSize + 1;
        propertySimple.setStringValue(String.valueOf(newMaxPoolSize));
        ConfigurationUpdateRequest configurationUpdateRequest = new ConfigurationUpdateRequest(-1, configuration,
            datasourceTestResource.getId());
        ConfigurationUpdateResponse configurationUpdateResponse = pluginContainer.getConfigurationManager()
            .executeUpdateResourceConfigurationImmediately(configurationUpdateRequest);
        assertSame(configurationUpdateResponse.getStatus(), ConfigurationUpdateStatus.SUCCESS);
        configuration = pluginContainer.getConfigurationManager().loadResourceConfiguration(
View Full Code Here

        PropertyList connectionPropertiesListWrapper = configuration.getList("*1");
        assertNotNull(connectionPropertiesListWrapper, "Connection properties list wrapper is null");
        List<Property> connectionPropertiesList = connectionPropertiesListWrapper.getList();
        connectionPropertiesList.add(new PropertyMap("*:pname", new PropertySimple("pname", "pipo"),
            new PropertySimple("value", "molo")));
        ConfigurationUpdateRequest configurationUpdateRequest = new ConfigurationUpdateRequest(-1, configuration,
            datasourceTestResource.getId());
        ConfigurationUpdateResponse configurationUpdateResponse = pluginContainer.getConfigurationManager()
            .executeUpdateResourceConfigurationImmediately(configurationUpdateRequest);
        assertSame(configurationUpdateResponse.getStatus(), ConfigurationUpdateStatus.SUCCESS);
        configuration = pluginContainer.getConfigurationManager().loadResourceConfiguration(
View Full Code Here

        PropertyMap newProp = new PropertyMap("*:name");
        newProp.put(new PropertySimple("name", "Hulla"));
        newProp.put(new PropertySimple("value", "Hopp"));
        starList.add(newProp);

        ConfigurationUpdateRequest request = new ConfigurationUpdateRequest(1, config, getServerResource().getId());
        ConfigurationUpdateResponse response = pluginContainer.getConfigurationManager()
            .executeUpdateResourceConfigurationImmediately(request);
        assert response != null;
        assert response.getErrorMessage() == null : "Adding a property resulted in this error: "
            + response.getErrorMessage();
View Full Code Here

        map.put(ps);
        PropertyList pl = (PropertyList) configuration.get("*");
        int count = pl.getList().size();
        pl.add(map);

        ConfigurationUpdateRequest request = new ConfigurationUpdateRequest(1, configuration, getResource().getId());
        ConfigurationUpdateResponse response = pluginContainer.getConfigurationManager()
            .executeUpdateResourceConfigurationImmediately(request);
        assert response != null;
        assert response.getErrorMessage() == null : "Config add resulted in this error: " + response.getErrorMessage();
        assert response.getConfigurationUpdateId() == 1;
View Full Code Here

TOP

Related Classes of org.rhq.core.clientapi.agent.configuration.ConfigurationUpdateRequest

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.