1 Reply Latest reply on May 14, 2014 11:38 AM by tsegismont

    Plugin configuration at the resource type level?

    genman

      I have a lot of classes where the plugin configuration really just consists of SQL queries or other queries that are fixed across multiple instances. For instance:

       

              <service name="Health Job Task" class="HealthJobTaskComponent" discovery="RowDiscovery" supportsManualAdd="false">
              
                  <plugin-configuration>
                      <c:simple-property name="discovery" description="SQL query to discovery tasks" default="
                        SELECT unique(task_list) FROM health_detail"/>
                  </plugin-configuration>
      

       

      The intent is that discovery will run this query to find the list of tasks.

       

      It isn't important to the component itself. But what RHQ will do is duplicate these 'discovery' configuration key to all resources of the same type, which is totally unnecessary. To me, that's a little odd. I was thinking of the following feature:

       

      1. Create a optional configuration block like <plugin-fixed-configuration> or <discovery-configuration>.
      2. Every resource type has another resource configuration as well as a default plugin configuration, that comes from the plugin descriptor.
      3. getDefaultPluginConfiguration would return either the merged configuration or the same as before.
      4. Ideally some UI to do an update, then update the agents with the new default configuration. Not sure how this might work, or if it is necessary.

       

      To me, there are really two use cases: Configuration keys for discovery, and configuration keys that really just contain 'constants'.