All Downloads are FREE. Search and download functionalities are using the official Maven repository.

OSGI-INF.blueprint.blueprint.xml Maven / Gradle / Ivy

<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
           xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0
                http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
                http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0
                http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd">

    <!-- CONFIG -->

    <!-- SecureCredentialsVault backed ConfigStore -->
    <!-- uncomment this section to use SecureCredentialsVault as config store
    <reference id="secureCredentialsVault" interface="org.opennms.integration.api.v1.scv.SecureCredentialsVault" availability="mandatory"/>
    <bean id="configStore" class="org.opennms.plugins.cloud.config.ScvConfigStore" >
        <argument ref="secureCredentialsVault"/>
    </bean>
    -->

    <!-- KeyValue store backed ConfigStore -->
    <reference id="keyValueStore" interface="org.opennms.integration.api.v1.distributed.KeyValueStore" availability="mandatory"/>
    <bean id="configStore" class="org.opennms.plugins.cloud.config.KvConfigStore" >
        <argument ref="keyValueStore"/>
    </bean>

    <service ref="configStore" interface="org.opennms.plugins.cloud.config.ConfigStore" />

    <reference id="runtimeInfo" interface="org.opennms.integration.api.v1.runtime.RuntimeInfo" availability="mandatory"/>
    <!-- Configuration stored in $OPENNMS_HOME/etc/org.opennms.plugins.cloud.cfg file -->
    <cm:property-placeholder id="tsaas-pocPluginProperties" persistent-id="org.opennms.plugins.cloud"
                             update-strategy="reload">
        <cm:default-properties>
            <cm:property name="pas.tls.host" value="access.onms-dp-prod.production.prod.dataservice.opennms.com"/>
            <cm:property name="pas.tls.port" value="443"/>
            <cm:property name="pas.tls.security" value ="TLS" />
            <cm:property name="pas.mtls.host" value="auth.access.onms-dp-prod.production.prod.dataservice.opennms.com"/>
            <cm:property name="pas.mtls.port" value="443"/>
            <cm:property name="pas.mtls.security" value ="MTLS" />
            <cm:property name="grpc.truststore" value="" />
            <cm:property name="tsaas.batchSize" value="1000"/>
            <cm:property name="tsaas.maxBatchWaitTimeInMilliSeconds" value="5000" />
        </cm:default-properties>
    </cm:property-placeholder>

    <!-- Config for the AuthenticateKey call -->
    <bean id="pasConfigTls" class="org.opennms.plugins.cloud.grpc.GrpcConnectionConfig" >
        <argument value="${pas.tls.host}"/>
        <argument value="${pas.tls.port}"/>
        <argument value="${pas.tls.security}"/>
        <argument value="${grpc.truststore}" />
    </bean>

    <!-- Config for all other calls to PAS -->
    <bean id="pasConfigMtls" class="org.opennms.plugins.cloud.grpc.GrpcConnectionConfig" >
        <argument value="${pas.mtls.host}"/>
        <argument value="${pas.mtls.port}"/>
        <argument value="${pas.mtls.security}"/>
        <argument value="${grpc.truststore}" />
    </bean>

    <bean id="tsaasConfig" class="org.opennms.plugins.cloud.srv.tsaas.TsaasConfig" >
        <argument value="${tsaas.batchSize}"/>
        <argument value="${tsaas.maxBatchWaitTimeInMilliSeconds}"/>
    </bean>

    <bean id="cloudConfigManager" class="org.opennms.plugins.cloud.config.ConfigurationManager">
        <argument ref="configStore" />
        <argument ref="pasConfigTls"/>
        <argument ref="pasConfigMtls"/>
        <argument ref="registrationManager" />
        <argument ref="runtimeInfo" />
        <argument>
            <list>
                <ref component-id="timeSeriesStorage" />
                <ref component-id="faas" />
            </list>
        </argument>
    </bean>
    <service ref="cloudConfigManager" interface="org.opennms.plugins.cloud.config.ConfigurationManager">
        <service-properties><!-- needed by opennms-plugin-core-fragment -->
            <entry key="registration.export" value="true" />
        </service-properties>
    </service>

    <bean id="houseKeeper" class="org.opennms.plugins.cloud.config.Housekeeper"
          destroy-method="destroy" init-method="init">
        <argument ref="cloudConfigManager"/>
        <argument ref="configStore"/>
        <argument ref="runtimeInfo"/>
    </bean>

    <!-- HEALTH -->
    <bean id="cloudHealthCheck" class="org.opennms.plugins.cloud.srv.tsaas.CloudHealthCheck">
        <argument ref="cloudConfigManager"/>
        <argument ref="timeSeriesStorage"/>
    </bean>
    <service ref="cloudHealthCheck" interface="org.opennms.integration.api.v1.health.HealthCheck">
        <service-properties>
            <entry key="registration.export" value="true" />
        </service-properties>
    </service>

    <!-- SERVICES -->
    <bean id="registrationManager" class="org.opennms.plugins.cloud.srv.RegistrationManager" destroy-method="destroy">
        <argument ref="blueprintBundleContext"/>
        <argument ref="timeSeriesStorage"/>
    </bean>
    <service ref="registrationManager" interface="org.opennms.plugins.cloud.srv.RegistrationManager" />

    <!-- SERVICE: FAAS -->
    <bean id="faas" class="org.opennms.plugins.cloud.srv.faas.Faas" >
    </bean>

    <!-- SERVICE: TSAAS -->
    <bean id="timeSeriesStorage" class="org.opennms.plugins.cloud.srv.tsaas.TsaasStorage" destroy-method="destroy">
        <argument ref="tsaasConfig"/>
    </bean>
    <service ref="timeSeriesStorage" interface="org.opennms.plugins.cloud.srv.tsaas.TsaasStorage" />
</blueprint>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy