Modify dependencies to avoid enabled features fail 79/85279/1
authorjhh <jorge.hernandez-herrero@att.com>
Mon, 15 Apr 2019 02:41:14 +0000 (21:41 -0500)
committerjhh <jorge.hernandez-herrero@att.com>
Mon, 15 Apr 2019 02:41:14 +0000 (21:41 -0500)
The drl change is only partial just to recognize Tosca
policies.

Change-Id: I5d3b8071394a9ea14638170e04d74e4c6b4ad028
Issue-ID: POLICY-1642
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
controlloop/common/feature-controlloop-management/pom.xml
controlloop/common/feature-controlloop-trans/pom.xml
controlloop/templates/archetype-cl-usecases/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl

index 40e37be..84fbe48 100644 (file)
@@ -87,7 +87,9 @@
                             <addParentPoms>false</addParentPoms>
                             <copyPom>false</copyPom>
                             <includeScope>runtime</includeScope>
+                            <excludeScope>provided</excludeScope>
                             <excludeTransitive>false</excludeTransitive>
+                            <excludeGroupIds>org.glassfish.hk2.external,org.glassfish.hk2</excludeGroupIds>
                         </configuration>
                     </execution>
                 </executions>
             <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
             <artifactId>aai</artifactId>
             <version>${policy.models.version}</version>
+            <exclusions>
+                <exclusion>
+                    <artifactId>commons-lang3</artifactId>
+                    <groupId>org.apache.commons</groupId>
+                </exclusion>
+                <exclusion>
+                    <artifactId>jcl-over-slf4j</artifactId>
+                    <groupId>org.slf4j</groupId>
+                </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
             <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
                     <artifactId>guava</artifactId>
                     <groupId>com.google.guava</groupId>
                 </exclusion>
+                <exclusion>
+                    <artifactId>commons-lang3</artifactId>
+                    <groupId>org.apache.commons</groupId>
+                </exclusion>
             </exclusions>
         </dependency>
         <dependency>
index 4d90806..915636e 100644 (file)
                             <excludes>
                             </excludes>
                             <consoleOutput>true</consoleOutput>
-                            <failsOnViolation>true</failsOnViolation>
                             <violationSeverity>warning</violationSeverity>
                         </configuration>
                     </execution>
             <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
             <artifactId>events</artifactId>
             <version>${policy.models.version}</version>
+            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.onap.policy.common</groupId>
index 77edee1..8dcc798 100644 (file)
@@ -64,6 +64,7 @@ import org.onap.policy.guard.PolicyGuardRequest;
 import org.onap.policy.guard.PolicyGuardResponse;
 import org.onap.policy.guard.PolicyGuardXacmlRequestAttributes;
 import org.onap.policy.guard.PolicyGuardXacmlHelper;
+import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicy;
 
 import org.yaml.snakeyaml.Yaml;
 import org.yaml.snakeyaml.constructor.Constructor;
@@ -108,6 +109,22 @@ rule "INSERT.PARAMS"
         + drools.getRule().getName(), $params.getControlLoopYaml());
 end
 
+/*
+*
+* Called when a Tosca Policy fact is present.
+*
+*/
+rule "NEW TOSCA POLICY"
+    when
+        $policy : ToscaPolicy()
+    then
+
+    Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage());
+    logger.info("{}:{}: [{}|{}|{}|{}]: CONTENT: {}", drools.getRule().getName(),
+                $policy.getType(), $policy.getTypeVersion(), $policy.getName(), $policy.getVersion(),
+                $policy);
+end
+
 /*
 *
 * This rule responds to DCAE Events where there is no manager yet. Either it is