Package org.rhq.core.clientapi.descriptor.plugin

Examples of org.rhq.core.clientapi.descriptor.plugin.PluginDescriptor


            "Expected resource configuration to contain a simple property named 'foo'.");
    }

    @Test
    void configurationDefinitionShouldHaveConfigurationFormatSetWhenSpecifiedInDescriptor() throws Exception {
        PluginDescriptor pluginDescriptor = toPluginDescriptor("" + //
            "<plugin name='TestServer' displayName='Test Server' package='org.rhq.plugins.test'" + //
            "    xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'" + //
            "    xmlns='urn:xmlns:rhq-plugin'" + //
            "    xmlns:c='urn:xmlns:rhq-configuration'>" + //
            "  <server name='testServer'" + //
View Full Code Here


            "Expected configurationFormat property to be set on resource configuration definition.");
    }

    @Test
    void configurationFormatShouldDefaultToStructuredWhenNotDeclaredInDescriptor() throws Exception {
        PluginDescriptor pluginDescriptor = toPluginDescriptor("" + //
            "<plugin name='TestServer' displayName='Test Server' package='org.rhq.plugins.test'" + //
            "    xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'" + //
            "    xmlns='urn:xmlns:rhq-plugin'" + //
            "    xmlns:c='urn:xmlns:rhq-configuration'>" + //
            "  <server name='testServer'" + //
View Full Code Here

            "The configurationFormat property of the configuration definition should default to stuctured when it is not declared in the plugin descriptor.");
    }

    @Test
    void rawResourceConfigurationShouldNotHaveToSpecifyAnyStructuredConfig() throws Exception {
        PluginDescriptor pluginDescriptor = toPluginDescriptor("" + //
            "<plugin name='TestServer' displayName='Test Server' package='org.rhq.plugins.test'" + //
            "    xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'" + //
            "    xmlns='urn:xmlns:rhq-plugin'" + //
            "    xmlns:c='urn:xmlns:rhq-configuration'>" + //
            "  <server name='testServer'" + //
View Full Code Here

        assert parser.getAllTypes().size() > 0;
    }

    @Test
    void createDriftDefinitionBasedir() throws Exception {
        PluginDescriptor descriptor = toPluginDescriptor("" + //
            "<plugin name='drift-test-plugin' displayName='Drift Test' package='org.rhq.plugins.test'" + //
            "    xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'" + //
            "    xmlns='urn:xmlns:rhq-plugin'>" + //
            "  <server name='TestServer'>" + //
            "    <drift-definition name='test1'>" + //
View Full Code Here

        }
    }

    @Test
    void createDriftDefinitionIntervalDefault() throws Exception {
        PluginDescriptor descriptor = toPluginDescriptor("" + //
            "<plugin name='drift-test-plugin' displayName='Drift Test' package='org.rhq.plugins.test'" + //
            "    xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'" + //
            "    xmlns='urn:xmlns:rhq-plugin'>" + //
            "  <server name='TestServer'>" + //
            "    <drift-definition name='test1'>" + //
View Full Code Here

        });
    }

    @Test
    void createDriftDefinitionIntervalDefaultWithSpecifiedValue() throws Exception {
        PluginDescriptor descriptor = toPluginDescriptor("" + //
            "<plugin name='drift-test-plugin' displayName='Drift Test' package='org.rhq.plugins.test'" + //
            "    xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'" + //
            "    xmlns='urn:xmlns:rhq-plugin'>" + //
            "  <server name='TestServer'>" + //
            "    <drift-definition name='test1'>" + //
View Full Code Here

    }

    @Test
    void createDriftDefinitionIncludesDefaultWithSpecifiedValue() throws Exception {
        PluginDescriptor descriptor = toPluginDescriptor("" + //
            "<plugin name='drift-test-plugin' displayName='Drift Test' package='org.rhq.plugins.test'" + //
            "    xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'" + //
            "    xmlns='urn:xmlns:rhq-plugin'>" + //
            "  <server name='TestServer'>" + //
            "    <drift-definition name='test1'>" + //
View Full Code Here

        });
    }

    @Test
    void createDriftDefinitionExcludesDefaultWithSpecifiedValue() throws Exception {
        PluginDescriptor descriptor = toPluginDescriptor("" + //
            "<plugin name='drift-test-plugin' displayName='Drift Test' package='org.rhq.plugins.test'" + //
            "    xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'" + //
            "    xmlns='urn:xmlns:rhq-plugin'>" + //
            "  <server name='TestServer'>" + //
            "    <drift-definition name='test1'>" + //
View Full Code Here

     *
     * @throws Exception
     */
    @Test
    void createDriftDefinitionMultipleAndTestDriftDefinition() throws Exception {
        PluginDescriptor descriptor = toPluginDescriptor("" + //
            "<plugin name='drift-test-plugin' displayName='Drift Test' package='org.rhq.plugins.test'" + //
            "    xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'" + //
            "    xmlns='urn:xmlns:rhq-plugin'>" + //
            "  <server name='TestServer'>" + //
            "    <drift-definition name='test1'>" + //
View Full Code Here

        return ret;
    }

    @SuppressWarnings({ "rawtypes", "unchecked" })
    public static Resource discoverPlatform() throws Exception {
        PluginDescriptor descriptor = AgentPluginDescriptorUtil.loadPluginDescriptorFromUrl(new URI(PluginLocation.PLATFORM_PLUGIN)
            .toURL());
        PluginMetadataParser parser = new PluginMetadataParser(descriptor,
            Collections.<String, PluginMetadataParser> emptyMap());

        List<ResourceType> platformTypes = parser.getAllTypes();
View Full Code Here

TOP

Related Classes of org.rhq.core.clientapi.descriptor.plugin.PluginDescriptor

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.