diff options
Diffstat (limited to 'controlloop')
84 files changed, 5964 insertions, 5925 deletions
diff --git a/controlloop/common/actors/actor.appc/pom.xml b/controlloop/common/actors/actor.appc/pom.xml index eea703b53..46418aeb3 100644 --- a/controlloop/common/actors/actor.appc/pom.xml +++ b/controlloop/common/actors/actor.appc/pom.xml @@ -2,61 +2,64 @@ <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>actors</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> - <artifactId>actor.appc</artifactId> - <dependencies> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>actorServiceProvider</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>appc</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>trafficgenerator</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>events</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>com.google.code.gson</groupId> - <artifactId>gson</artifactId> - <version>2.5</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>simulators</artifactId> - <version>${project.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-pdp</groupId> - <artifactId>policy-management</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - </dependencies> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId> + <artifactId>actors</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> + + <artifactId>actor.appc</artifactId> + + <dependencies> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId> + <artifactId>actorServiceProvider</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>appc</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>trafficgenerator</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>events</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>2.5</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common</groupId> + <artifactId>simulators</artifactId> + <version>${project.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-pdp</groupId> + <artifactId>policy-management</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + </dependencies> </project> diff --git a/controlloop/common/actors/actor.appclcm/pom.xml b/controlloop/common/actors/actor.appclcm/pom.xml index be561bd8f..c0f397388 100644 --- a/controlloop/common/actors/actor.appclcm/pom.xml +++ b/controlloop/common/actors/actor.appclcm/pom.xml @@ -2,61 +2,64 @@ <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>actors</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> - <artifactId>actor.appclcm</artifactId> - <dependencies> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>actorServiceProvider</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>appclcm</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>aai</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>com.google.code.gson</groupId> - <artifactId>gson</artifactId> - <version>2.5</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>events</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-pdp</groupId> - <artifactId>policy-management</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>simulators</artifactId> - <version>${project.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> - <scope>test</scope> - </dependency> - </dependencies> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId> + <artifactId>actors</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> + + <artifactId>actor.appclcm</artifactId> + + <dependencies> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId> + <artifactId>actorServiceProvider</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>appclcm</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>aai</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>2.5</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>events</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-pdp</groupId> + <artifactId>policy-management</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common</groupId> + <artifactId>simulators</artifactId> + <version>${project.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + </dependencies> </project> diff --git a/controlloop/common/actors/actor.so/pom.xml b/controlloop/common/actors/actor.so/pom.xml index 3246e8929..3a8ae1c9c 100644 --- a/controlloop/common/actors/actor.so/pom.xml +++ b/controlloop/common/actors/actor.so/pom.xml @@ -1,67 +1,70 @@ <?xml version="1.0"?> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>actors</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> - <artifactId>actor.so</artifactId> - <dependencies> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>actorServiceProvider</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>aai</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>events</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>so</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.drools</groupId> - <artifactId>drools-core</artifactId> - <version>6.5.0.Final</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>com.google.code.gson</groupId> - <artifactId>gson</artifactId> - <version>2.5</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-pdp</groupId> - <artifactId>policy-management</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>simulators</artifactId> - <version>${project.version}</version> - <scope>test</scope> - </dependency> - </dependencies> + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId> + <artifactId>actors</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> + + <artifactId>actor.so</artifactId> + + <dependencies> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId> + <artifactId>actorServiceProvider</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>aai</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>events</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>so</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.drools</groupId> + <artifactId>drools-core</artifactId> + <version>6.5.0.Final</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>2.5</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-pdp</groupId> + <artifactId>policy-management</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common</groupId> + <artifactId>simulators</artifactId> + <version>${project.version}</version> + <scope>test</scope> + </dependency> + </dependencies> </project> diff --git a/controlloop/common/actors/actor.test/pom.xml b/controlloop/common/actors/actor.test/pom.xml index 27cb0290d..429e095b0 100644 --- a/controlloop/common/actors/actor.test/pom.xml +++ b/controlloop/common/actors/actor.test/pom.xml @@ -1,64 +1,67 @@ <?xml version="1.0"?> <project - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" - xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>actors</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> - <artifactId>actor.test</artifactId> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - </plugin> - </plugins> - </build> - <dependencies> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>actorServiceProvider</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>aai</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>actor.appc</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>actor.so</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>actor.appclcm</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>actor.vfc</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> - <scope>test</scope> - </dependency> - </dependencies> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" + xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId> + <artifactId>actors</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> + + <artifactId>actor.test</artifactId> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + </plugin> + </plugins> + </build> + <dependencies> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId> + <artifactId>actorServiceProvider</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>aai</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId> + <artifactId>actor.appc</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId> + <artifactId>actor.so</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId> + <artifactId>actor.appclcm</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId> + <artifactId>actor.vfc</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + </dependencies> </project> diff --git a/controlloop/common/actors/actor.vfc/pom.xml b/controlloop/common/actors/actor.vfc/pom.xml index 45d1e899e..62d11ac4b 100644 --- a/controlloop/common/actors/actor.vfc/pom.xml +++ b/controlloop/common/actors/actor.vfc/pom.xml @@ -1,55 +1,58 @@ <?xml version="1.0"?> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>actors</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> - <artifactId>actor.vfc</artifactId> - <dependencies> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>actorServiceProvider</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>vfc</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>events</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>aai</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-pdp</groupId> - <artifactId>policy-management</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>simulators</artifactId> - <version>${project.version}</version> - <scope>test</scope> - </dependency> - </dependencies> + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId> + <artifactId>actors</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> + + <artifactId>actor.vfc</artifactId> + + <dependencies> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId> + <artifactId>actorServiceProvider</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>vfc</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>events</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>aai</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-pdp</groupId> + <artifactId>policy-management</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common</groupId> + <artifactId>simulators</artifactId> + <version>${project.version}</version> + <scope>test</scope> + </dependency> + </dependencies> </project> diff --git a/controlloop/common/actors/actorServiceProvider/pom.xml b/controlloop/common/actors/actorServiceProvider/pom.xml index 05f486e0d..52177ea2c 100644 --- a/controlloop/common/actors/actorServiceProvider/pom.xml +++ b/controlloop/common/actors/actorServiceProvider/pom.xml @@ -1,20 +1,22 @@ <?xml version="1.0"?> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>actors</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> - <artifactId>actorServiceProvider</artifactId> + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <modelVersion>4.0.0</modelVersion> - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> - <scope>test</scope> - </dependency> - </dependencies> + <parent> + <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId> + <artifactId>actors</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> + + <artifactId>actorServiceProvider</artifactId> + + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + </dependencies> </project> diff --git a/controlloop/common/actors/pom.xml b/controlloop/common/actors/pom.xml index b7691f8e6..3263eec1e 100644 --- a/controlloop/common/actors/pom.xml +++ b/controlloop/common/actors/pom.xml @@ -1,34 +1,35 @@ <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <artifactId>actors</artifactId> - <packaging>pom</packaging> + <modelVersion>4.0.0</modelVersion> + <packaging>pom</packaging> + + <parent> + <groupId>org.onap.policy.drools-applications.controlloop.common</groupId> + <artifactId>common</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> + + <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId> + <artifactId>actors</artifactId> - <parent> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>common</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> - - <modules> - <module>actorServiceProvider</module> - <module>actor.appc</module> - <module>actor.vfc</module> - <module>actor.appclcm</module> - <module>actor.so</module> - <module>actor.test</module> - </modules> - <dependencies> - <dependency> - <groupId>com.google.guava</groupId> - <artifactId>guava</artifactId> - <version>19.0</version> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>policy-yaml</artifactId> - <version>${project.version}</version> - </dependency> - </dependencies> + <modules> + <module>actorServiceProvider</module> + <module>actor.appc</module> + <module>actor.vfc</module> + <module>actor.appclcm</module> + <module>actor.so</module> + <module>actor.test</module> + </modules> + <dependencies> + <dependency> + <groupId>com.google.guava</groupId> + <artifactId>guava</artifactId> + <version>19.0</version> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common</groupId> + <artifactId>policy-yaml</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> </project> diff --git a/controlloop/common/eventmanager/pom.xml b/controlloop/common/eventmanager/pom.xml index e6d090de9..d0ce65138 100644 --- a/controlloop/common/eventmanager/pom.xml +++ b/controlloop/common/eventmanager/pom.xml @@ -19,146 +19,149 @@ --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>common</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> - <artifactId>eventmanager</artifactId> - <dependencies> - <dependency> - <groupId>org.eclipse.persistence</groupId> - <artifactId>org.eclipse.persistence.jpa</artifactId> - <version>2.7.0</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>commons-io</groupId> - <artifactId>commons-io</artifactId> - <version>2.5</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>com.att.research.xacml</groupId> - <artifactId>xacml</artifactId> - <version>1.0.1</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>actorServiceProvider</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>actor.appc</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>actor.so</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>actor.vfc</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>actor.appclcm</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>guard</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>events</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>appc</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>vfc</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>appclcm</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>trafficgenerator</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>com.google.code.gson</groupId> - <artifactId>gson</artifactId> - <version>2.5</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>sdc</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>aai</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>so</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.apache.httpcomponents</groupId> - <artifactId>httpclient</artifactId> - <version>4.5.5</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-pdp</groupId> - <artifactId>policy-management</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>simulators</artifactId> - <version>${project.version}</version> - <scope>test</scope> - </dependency> - </dependencies> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.onap.policy.drools-applications.controlloop.common</groupId> + <artifactId>common</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> + + <artifactId>eventmanager</artifactId> + + <dependencies> + <dependency> + <groupId>org.eclipse.persistence</groupId> + <artifactId>org.eclipse.persistence.jpa</artifactId> + <version>2.7.0</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>commons-io</groupId> + <artifactId>commons-io</artifactId> + <version>2.5</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>com.att.research.xacml</groupId> + <artifactId>xacml</artifactId> + <version>1.0.1</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId> + <artifactId>actorServiceProvider</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId> + <artifactId>actor.appc</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId> + <artifactId>actor.so</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId> + <artifactId>actor.vfc</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId> + <artifactId>actor.appclcm</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common</groupId> + <artifactId>guard</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>events</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>appc</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>vfc</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>appclcm</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>trafficgenerator</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>2.5</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>sdc</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>aai</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>so</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.apache.httpcomponents</groupId> + <artifactId>httpclient</artifactId> + <version>4.5.5</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-pdp</groupId> + <artifactId>policy-management</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common</groupId> + <artifactId>simulators</artifactId> + <version>${project.version}</version> + <scope>test</scope> + </dependency> + </dependencies> </project> diff --git a/controlloop/common/feature-controlloop-utils/pom.xml b/controlloop/common/feature-controlloop-utils/pom.xml index 5cec48a7b..4af489de2 100644 --- a/controlloop/common/feature-controlloop-utils/pom.xml +++ b/controlloop/common/feature-controlloop-utils/pom.xml @@ -19,116 +19,119 @@ --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>common</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> - <artifactId>feature-controlloop-utils</artifactId> - <description> - Loadable PDP-D feature module to enable simulator usage in a non-junit - lab environments. In a pdp-d lab environment this capability can be - enabled with the "feature" mechanisms. - </description> - - <properties> - <maven.compiler.source>1.8</maven.compiler.source> - <maven.compiler.target>1.8</maven.compiler.target> - </properties> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> - <build> - <plugins> - <plugin> - <artifactId>maven-assembly-plugin</artifactId> - <version>2.6</version> - <executions> - <execution> - <id>zipfile</id> - <goals> - <goal>single</goal> - </goals> - <phase>package</phase> - <configuration> - <attach>true</attach> - <finalName>${project.artifactId}-${project.version}</finalName> - <descriptors> - <descriptor>src/assembly/assemble_zip.xml</descriptor> - </descriptors> - <appendAssemblyId>false</appendAssemblyId> - </configuration> - </execution> - </executions> - </plugin> - - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <version>2.8</version> - <executions> - <execution> - <id>copy-dependencies</id> - <goals> - <goal>copy-dependencies</goal> - </goals> - <phase>prepare-package</phase> - <configuration> - <transitive>false</transitive> - <outputDirectory>${project.build.directory}/assembly/lib</outputDirectory> - <overWriteReleases>false</overWriteReleases> - <overWriteSnapshots>true</overWriteSnapshots> - <overWriteIfNewer>true</overWriteIfNewer> - <useRepositoryLayout>false</useRepositoryLayout> - <addParentPoms>false</addParentPoms> - <copyPom>false</copyPom> - <includeScope>runtime</includeScope> - <excludeTransitive>true</excludeTransitive> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> - - <dependencies> - <dependency> - <groupId>org.onap.policy.drools-pdp</groupId> - <artifactId>policy-management</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-pdp</groupId> - <artifactId>policy-endpoints</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>simulators</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>aai</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>so</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>rest</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> - <scope>test</scope> - </dependency> - </dependencies> + <parent> + <groupId>org.onap.policy.drools-applications.controlloop.common</groupId> + <artifactId>common</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> + + <artifactId>feature-controlloop-utils</artifactId> + + <description> + Loadable PDP-D feature module to enable simulator usage in a non-junit + lab environments. In a pdp-d lab environment this capability can be + enabled with the "feature" mechanisms. + </description> + + <properties> + <maven.compiler.source>1.8</maven.compiler.source> + <maven.compiler.target>1.8</maven.compiler.target> + </properties> + + <build> + <plugins> + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <version>2.6</version> + <executions> + <execution> + <id>zipfile</id> + <goals> + <goal>single</goal> + </goals> + <phase>package</phase> + <configuration> + <attach>true</attach> + <finalName>${project.artifactId}-${project.version}</finalName> + <descriptors> + <descriptor>src/assembly/assemble_zip.xml</descriptor> + </descriptors> + <appendAssemblyId>false</appendAssemblyId> + </configuration> + </execution> + </executions> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <version>2.8</version> + <executions> + <execution> + <id>copy-dependencies</id> + <goals> + <goal>copy-dependencies</goal> + </goals> + <phase>prepare-package</phase> + <configuration> + <transitive>false</transitive> + <outputDirectory>${project.build.directory}/assembly/lib</outputDirectory> + <overWriteReleases>false</overWriteReleases> + <overWriteSnapshots>true</overWriteSnapshots> + <overWriteIfNewer>true</overWriteIfNewer> + <useRepositoryLayout>false</useRepositoryLayout> + <addParentPoms>false</addParentPoms> + <copyPom>false</copyPom> + <includeScope>runtime</includeScope> + <excludeTransitive>true</excludeTransitive> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + + <dependencies> + <dependency> + <groupId>org.onap.policy.drools-pdp</groupId> + <artifactId>policy-management</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-pdp</groupId> + <artifactId>policy-endpoints</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common</groupId> + <artifactId>simulators</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>aai</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>so</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>rest</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + </dependencies> </project> diff --git a/controlloop/common/guard/pom.xml b/controlloop/common/guard/pom.xml index fa31577f2..36c7e1918 100644 --- a/controlloop/common/guard/pom.xml +++ b/controlloop/common/guard/pom.xml @@ -1,76 +1,79 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>common</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> + + <parent> + <groupId>org.onap.policy.drools-applications.controlloop.common</groupId> + <artifactId>common</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> + <artifactId>guard</artifactId> + <dependencies> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>policy-yaml</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>com.att.research.xacml</groupId> - <artifactId>xacml-pdp</artifactId> - <version>1.0.1</version> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>commons-io</groupId> - <artifactId>commons-io</artifactId> - <version>2.5</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.apache.httpcomponents</groupId> - <artifactId>httpclient</artifactId> - <version>4.5.5</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.drools</groupId> - <artifactId>drools-core</artifactId> - <version>6.5.0.Final</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.eclipse.persistence</groupId> - <artifactId>org.eclipse.persistence.jpa</artifactId> - <version>2.7.0</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-pdp</groupId> - <artifactId>policy-management</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>simulators</artifactId> - <version>${project.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.mockito</groupId> - <artifactId>mockito-core</artifactId> - <version>2.13.0</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>com.h2database</groupId> - <artifactId>h2</artifactId> - <version>[1.4.186,)</version> - <scope>test</scope> - </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common</groupId> + <artifactId>policy-yaml</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>com.att.research.xacml</groupId> + <artifactId>xacml-pdp</artifactId> + <version>1.0.1</version> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>commons-io</groupId> + <artifactId>commons-io</artifactId> + <version>2.5</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.apache.httpcomponents</groupId> + <artifactId>httpclient</artifactId> + <version>4.5.5</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.drools</groupId> + <artifactId>drools-core</artifactId> + <version>6.5.0.Final</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.eclipse.persistence</groupId> + <artifactId>org.eclipse.persistence.jpa</artifactId> + <version>2.7.0</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-pdp</groupId> + <artifactId>policy-management</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common</groupId> + <artifactId>simulators</artifactId> + <version>${project.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-core</artifactId> + <version>2.13.0</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.h2database</groupId> + <artifactId>h2</artifactId> + <version>[1.4.186,)</version> + <scope>test</scope> + </dependency> </dependencies> </project> diff --git a/controlloop/common/model-impl/aai/pom.xml b/controlloop/common/model-impl/aai/pom.xml index 19341af8e..5d527819b 100644 --- a/controlloop/common/model-impl/aai/pom.xml +++ b/controlloop/common/model-impl/aai/pom.xml @@ -1,50 +1,50 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> - <artifactId>aai</artifactId> + <parent> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>model-impl</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> - <parent> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>model-impl</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> + <artifactId>aai</artifactId> - <dependencies> - <dependency> - <groupId>com.google.code.gson</groupId> - <artifactId>gson</artifactId> - <version>2.5</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>rest</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.mockito</groupId> - <artifactId>mockito-core</artifactId> - <version>2.13.0</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.powermock</groupId> - <artifactId>powermock-core</artifactId> - <version>1.7.3</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-pdp</groupId> - <artifactId>policy-endpoints</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - </dependencies> + <dependencies> + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>2.5</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>rest</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-core</artifactId> + <version>2.13.0</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.powermock</groupId> + <artifactId>powermock-core</artifactId> + <version>1.7.3</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-pdp</groupId> + <artifactId>policy-endpoints</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + </dependencies> </project> diff --git a/controlloop/common/model-impl/appc/pom.xml b/controlloop/common/model-impl/appc/pom.xml index ce43e153b..d69f1eda8 100644 --- a/controlloop/common/model-impl/appc/pom.xml +++ b/controlloop/common/model-impl/appc/pom.xml @@ -20,26 +20,27 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> - <artifactId>appc</artifactId> - <parent> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>model-impl</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> + <parent> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>model-impl</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> + + <artifactId>appc</artifactId> <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>com.google.code.gson</groupId> - <artifactId>gson</artifactId> - <version>2.5</version> - <scope>provided</scope> - </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>2.5</version> + <scope>provided</scope> + </dependency> </dependencies> </project> diff --git a/controlloop/common/model-impl/appclcm/pom.xml b/controlloop/common/model-impl/appclcm/pom.xml index 73ff74f70..26368ee9a 100644 --- a/controlloop/common/model-impl/appclcm/pom.xml +++ b/controlloop/common/model-impl/appclcm/pom.xml @@ -20,26 +20,27 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> - <artifactId>appclcm</artifactId> - <parent> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>model-impl</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> + <parent> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>model-impl</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> + + <artifactId>appclcm</artifactId> <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>com.google.code.gson</groupId> - <artifactId>gson</artifactId> - <version>2.5</version> - <scope>provided</scope> - </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>2.5</version> + <scope>provided</scope> + </dependency> </dependencies> </project> diff --git a/controlloop/common/model-impl/events/pom.xml b/controlloop/common/model-impl/events/pom.xml index e95afc855..f3d56f67b 100644 --- a/controlloop/common/model-impl/events/pom.xml +++ b/controlloop/common/model-impl/events/pom.xml @@ -20,24 +20,27 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>model-impl</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> + + <parent> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>model-impl</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> + <artifactId>events</artifactId> + <dependencies> - <dependency> - <groupId>com.google.code.gson</groupId> - <artifactId>gson</artifactId> - <version>2.5</version> - <scope>provided</scope> - </dependency> <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> - <scope>test</scope> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>2.5</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> </dependency> </dependencies> </project> diff --git a/controlloop/common/model-impl/pom.xml b/controlloop/common/model-impl/pom.xml index 78ddad704..2d61479bf 100644 --- a/controlloop/common/model-impl/pom.xml +++ b/controlloop/common/model-impl/pom.xml @@ -19,30 +19,30 @@ --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - - <modelVersion>4.0.0</modelVersion> - - <artifactId>model-impl</artifactId> - <packaging>pom</packaging> - - <parent> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>common</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <packaging>pom</packaging> + + <parent> + <groupId>org.onap.policy.drools-applications.controlloop.common</groupId> + <artifactId>common</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> + + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>model-impl</artifactId> - <modules> - <module>aai</module> - <module>appc</module> - <module>appclcm</module> - <module>events</module> - <module>so</module> - <module>rest</module> - <module>sdc</module> - <module>trafficgenerator</module> - <module>vfc</module> - </modules> + <modules> + <module>aai</module> + <module>appc</module> + <module>appclcm</module> + <module>events</module> + <module>so</module> + <module>rest</module> + <module>sdc</module> + <module>trafficgenerator</module> + <module>vfc</module> + </modules> </project> diff --git a/controlloop/common/model-impl/rest/pom.xml b/controlloop/common/model-impl/rest/pom.xml index 2e1303eae..06fd30da7 100644 --- a/controlloop/common/model-impl/rest/pom.xml +++ b/controlloop/common/model-impl/rest/pom.xml @@ -21,32 +21,32 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> - <artifactId>rest</artifactId> + <parent> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>model-impl</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> - <parent> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>model-impl</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> + <artifactId>rest</artifactId> <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>com.google.code.gson</groupId> - <artifactId>gson</artifactId> - <version>2.5</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.apache.httpcomponents</groupId> - <artifactId>httpclient</artifactId> - <version>4.5.5</version> - <scope>provided</scope> - </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>2.5</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.apache.httpcomponents</groupId> + <artifactId>httpclient</artifactId> + <version>4.5.5</version> + <scope>provided</scope> + </dependency> </dependencies> </project> diff --git a/controlloop/common/model-impl/rest/src/test/java/org/onap/policy/rest/TestGet.java b/controlloop/common/model-impl/rest/src/test/java/org/onap/policy/rest/TestGet.java index 96dec30db..0bf1da8d5 100755 --- a/controlloop/common/model-impl/rest/src/test/java/org/onap/policy/rest/TestGet.java +++ b/controlloop/common/model-impl/rest/src/test/java/org/onap/policy/rest/TestGet.java @@ -1,52 +1,52 @@ -/*-
- * ============LICENSE_START=======================================================
- * rest
- * ================================================================================
- *
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.rest;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-import org.onap.policy.rest.RESTManager.Pair;
-
-public class TestGet {
-
- @Test(expected = NullPointerException.class)
- public void testUrlNull() {
- RESTManager mgr = new RESTManager();
- mgr.get(null, "user", null, null);
- }
-
- @Test(expected = IllegalArgumentException.class)
- public void testUsernameNull() {
- RESTManager mgr = new RESTManager();
- mgr.get("nothing", null, null, null);
- }
-
- @Test
- public void testUrlExampleOrg() {
- RESTManager mgr = new RESTManager();
-
- Pair<Integer, String> result = mgr.get("http://www.example.org", "user", null, null);
- assertEquals((Integer)200, result.a);
- assertTrue(result.b != null);
- assertTrue(result.b.length() > 0);
- }
+/*- + * ============LICENSE_START======================================================= + * rest + * ================================================================================ + * + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.rest; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; +import org.onap.policy.rest.RESTManager.Pair; + +public class TestGet { + + @Test(expected = NullPointerException.class) + public void testUrlNull() { + RESTManager mgr = new RESTManager(); + mgr.get(null, "user", null, null); + } + + @Test(expected = IllegalArgumentException.class) + public void testUsernameNull() { + RESTManager mgr = new RESTManager(); + mgr.get("nothing", null, null, null); + } + + @Test + public void testUrlExampleOrg() { + RESTManager mgr = new RESTManager(); + + Pair<Integer, String> result = mgr.get("http://www.example.org", "user", null, null); + assertEquals((Integer)200, result.a); + assertTrue(result.b != null); + assertTrue(result.b.length() > 0); + } }
\ No newline at end of file diff --git a/controlloop/common/model-impl/rest/src/test/java/org/onap/policy/rest/TestPair.java b/controlloop/common/model-impl/rest/src/test/java/org/onap/policy/rest/TestPair.java index 3ada0a74e..aea5a7387 100755 --- a/controlloop/common/model-impl/rest/src/test/java/org/onap/policy/rest/TestPair.java +++ b/controlloop/common/model-impl/rest/src/test/java/org/onap/policy/rest/TestPair.java @@ -1,42 +1,42 @@ -/*-
- * ============LICENSE_START=======================================================
- * rest
- * ================================================================================
- *
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.rest;
-
-import static org.junit.Assert.assertEquals;
-
-import org.junit.Test;
-import org.onap.policy.rest.RESTManager.Pair;
-
-public class TestPair {
-
- @Test
- public void testPair() {
- RESTManager mgr = new RESTManager();
-
- Pair<Integer, Integer> pii = mgr.new Pair<>(1, 2);
- assertEquals((Integer) 1, (Integer) pii.a);
- assertEquals((Integer) 2, (Integer) pii.b);
-
- Pair<Integer, String> pis = mgr.new Pair<>(1, "test");
- assertEquals((Integer) 1, (Integer) pis.a);
- assertEquals("test", pis.b);
- }
-}
+/*- + * ============LICENSE_START======================================================= + * rest + * ================================================================================ + * + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.rest; + +import static org.junit.Assert.assertEquals; + +import org.junit.Test; +import org.onap.policy.rest.RESTManager.Pair; + +public class TestPair { + + @Test + public void testPair() { + RESTManager mgr = new RESTManager(); + + Pair<Integer, Integer> pii = mgr.new Pair<>(1, 2); + assertEquals((Integer) 1, (Integer) pii.a); + assertEquals((Integer) 2, (Integer) pii.b); + + Pair<Integer, String> pis = mgr.new Pair<>(1, "test"); + assertEquals((Integer) 1, (Integer) pis.a); + assertEquals("test", pis.b); + } +} diff --git a/controlloop/common/model-impl/rest/src/test/java/org/onap/policy/rest/TestPost.java b/controlloop/common/model-impl/rest/src/test/java/org/onap/policy/rest/TestPost.java index 40f1b3089..1cdde22e8 100755 --- a/controlloop/common/model-impl/rest/src/test/java/org/onap/policy/rest/TestPost.java +++ b/controlloop/common/model-impl/rest/src/test/java/org/onap/policy/rest/TestPost.java @@ -1,42 +1,42 @@ -/*-
- * ============LICENSE_START=======================================================
- * rest
- * ================================================================================
- *
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.rest;
-
-import static org.junit.Assert.assertEquals;
-
-import org.junit.Test;
-import org.onap.policy.rest.RESTManager.Pair;
-
-public class TestPost {
-
- @Test(expected = IllegalArgumentException.class)
- public void testUsernameNull() {
- RESTManager mgr = new RESTManager();
- mgr.post("nothing", null, null, null, null, null);
- }
-
- @Test
- public void testBodyNull() {
- RESTManager mgr = new RESTManager();
- Pair<Integer, String> result = mgr.post("http://www.example.org", "user", null, null, null, null);
- assertEquals(null, result);
- }
-}
+/*- + * ============LICENSE_START======================================================= + * rest + * ================================================================================ + * + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.rest; + +import static org.junit.Assert.assertEquals; + +import org.junit.Test; +import org.onap.policy.rest.RESTManager.Pair; + +public class TestPost { + + @Test(expected = IllegalArgumentException.class) + public void testUsernameNull() { + RESTManager mgr = new RESTManager(); + mgr.post("nothing", null, null, null, null, null); + } + + @Test + public void testBodyNull() { + RESTManager mgr = new RESTManager(); + Pair<Integer, String> result = mgr.post("http://www.example.org", "user", null, null, null, null); + assertEquals(null, result); + } +} diff --git a/controlloop/common/model-impl/sdc/pom.xml b/controlloop/common/model-impl/sdc/pom.xml index 76c9de307..54724e678 100644 --- a/controlloop/common/model-impl/sdc/pom.xml +++ b/controlloop/common/model-impl/sdc/pom.xml @@ -1,19 +1,21 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>model-impl</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> - <artifactId>sdc</artifactId> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>model-impl</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> + + <artifactId>sdc</artifactId> <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> - <scope>test</scope> - </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> </dependencies> </project> diff --git a/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/TestResource.java b/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/TestResource.java index 58999f384..7e64787f8 100644 --- a/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/TestResource.java +++ b/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/TestResource.java @@ -1,152 +1,152 @@ -/*-
- * ============LICENSE_START=======================================================
- * sdc
- * ================================================================================
- *
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.sdc;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.util.UUID;
-
-import org.junit.Test;
-
-public class TestResource {
-
- @Test
- public void testConstructors() {
- Resource res = new Resource();
- assertEquals(null, res.getResourceUUID());
- assertEquals(null, res.getResourceInvariantUUID());
- assertEquals(null, res.getResourceName());
- assertEquals(null, res.getResourceType());
- assertEquals(null, res.getResourceVersion());
-
- UUID uuid = UUID.randomUUID();
- res = new Resource(uuid);
- assertEquals(uuid, res.getResourceUUID());
- assertEquals(null, res.getResourceInvariantUUID());
- assertEquals(null, res.getResourceName());
- assertEquals(null, res.getResourceType());
- assertEquals(null, res.getResourceVersion());
-
- String name = "constTest";
- res = new Resource(name, ResourceType.CP);
- assertEquals(null, res.getResourceUUID());
- assertEquals(name, res.getResourceName());
- assertEquals(ResourceType.CP, res.getResourceType());
- assertEquals(null, res.getResourceInvariantUUID());
- assertEquals(null, res.getResourceVersion());
-
- uuid = UUID.randomUUID();
- UUID uuidInvariant = UUID.randomUUID();
- name = "constTestUUID";
- String version = "0.0.1";
- res = new Resource(uuid, uuidInvariant, name, version, ResourceType.VF);
- assertEquals(uuid, res.getResourceUUID());
- assertEquals(uuidInvariant, res.getResourceInvariantUUID());
- assertEquals(name, res.getResourceName());
- assertEquals(ResourceType.VF, res.getResourceType());
- assertEquals(version, res.getResourceVersion());
-
- Resource r2 = new Resource(res);
- assertEquals(uuid, r2.getResourceUUID());
- assertEquals(uuidInvariant, r2.getResourceInvariantUUID());
- assertEquals(name, r2.getResourceName());
- assertEquals(ResourceType.VF, r2.getResourceType());
- assertEquals(version, r2.getResourceVersion());
- }
-
- @Test
- public void testUuid() {
- Resource res = new Resource();
- UUID uuid = UUID.randomUUID();
- res.setResourceUUID(uuid);
- assertEquals(uuid, res.getResourceUUID());
- }
-
- @Test
- public void testInvariantUuid() {
- Resource res = new Resource();
- UUID uuid = UUID.randomUUID();
- res.setResourceInvariantUUID(uuid);
- assertEquals(uuid, res.getResourceInvariantUUID());
- }
-
- @Test
- public void testName() {
- Resource res = new Resource();
- String name = "nameTest";
- res.setResourceName(name);
- assertEquals(name, res.getResourceName());
- }
-
- @Test
- public void testVersion() {
- Resource res = new Resource();
- String version = "versionTest";
- res.setResourceVersion(version);
- assertEquals(version, res.getResourceVersion());
- }
-
- @Test
- public void testType() {
- Resource res = new Resource();
- res.setResourceType(ResourceType.CP);
- assertEquals(ResourceType.CP, res.getResourceType());
- }
-
- @Test
- public void testEquals() {
- Resource r1 = new Resource();
- Resource r2 = new Resource(r1);
- assertTrue(r1.equals(r2));
- assertTrue(r2.equals(r1));
-
- r1 = new Resource(UUID.randomUUID(), UUID.randomUUID(), "equalsTest", "1.1.1",
- ResourceType.VFC);
- r2 = new Resource(r1);
- assertTrue(r1.equals(r2));
- assertTrue(r2.equals(r1));
- }
-
- @Test
- public void testToString() {
- Resource r1 = new Resource();
- Resource r2 = new Resource(r1);
- assertEquals(r1.toString(), r2.toString());
-
- r1 = new Resource(UUID.randomUUID(), UUID.randomUUID(), "equalsTest", "1.1.1",
- ResourceType.VFC);
- r2 = new Resource(r1);
- assertEquals(r1.toString(), r2.toString());
- }
-
- @Test
- public void testHashCode() {
- Resource r1 = new Resource();
- Resource r2 = new Resource(r1);
- assertEquals(r1.hashCode(), r2.hashCode());
-
- r1 = new Resource(UUID.randomUUID(), UUID.randomUUID(), "equalsTest", "1.1.1",
- ResourceType.VFC);
- r2 = new Resource(r1);
- assertEquals(r1.hashCode(), r2.hashCode());
- }
-}
+/*- + * ============LICENSE_START======================================================= + * sdc + * ================================================================================ + * + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.sdc; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import java.util.UUID; + +import org.junit.Test; + +public class TestResource { + + @Test + public void testConstructors() { + Resource res = new Resource(); + assertEquals(null, res.getResourceUUID()); + assertEquals(null, res.getResourceInvariantUUID()); + assertEquals(null, res.getResourceName()); + assertEquals(null, res.getResourceType()); + assertEquals(null, res.getResourceVersion()); + + UUID uuid = UUID.randomUUID(); + res = new Resource(uuid); + assertEquals(uuid, res.getResourceUUID()); + assertEquals(null, res.getResourceInvariantUUID()); + assertEquals(null, res.getResourceName()); + assertEquals(null, res.getResourceType()); + assertEquals(null, res.getResourceVersion()); + + String name = "constTest"; + res = new Resource(name, ResourceType.CP); + assertEquals(null, res.getResourceUUID()); + assertEquals(name, res.getResourceName()); + assertEquals(ResourceType.CP, res.getResourceType()); + assertEquals(null, res.getResourceInvariantUUID()); + assertEquals(null, res.getResourceVersion()); + + uuid = UUID.randomUUID(); + UUID uuidInvariant = UUID.randomUUID(); + name = "constTestUUID"; + String version = "0.0.1"; + res = new Resource(uuid, uuidInvariant, name, version, ResourceType.VF); + assertEquals(uuid, res.getResourceUUID()); + assertEquals(uuidInvariant, res.getResourceInvariantUUID()); + assertEquals(name, res.getResourceName()); + assertEquals(ResourceType.VF, res.getResourceType()); + assertEquals(version, res.getResourceVersion()); + + Resource r2 = new Resource(res); + assertEquals(uuid, r2.getResourceUUID()); + assertEquals(uuidInvariant, r2.getResourceInvariantUUID()); + assertEquals(name, r2.getResourceName()); + assertEquals(ResourceType.VF, r2.getResourceType()); + assertEquals(version, r2.getResourceVersion()); + } + + @Test + public void testUuid() { + Resource res = new Resource(); + UUID uuid = UUID.randomUUID(); + res.setResourceUUID(uuid); + assertEquals(uuid, res.getResourceUUID()); + } + + @Test + public void testInvariantUuid() { + Resource res = new Resource(); + UUID uuid = UUID.randomUUID(); + res.setResourceInvariantUUID(uuid); + assertEquals(uuid, res.getResourceInvariantUUID()); + } + + @Test + public void testName() { + Resource res = new Resource(); + String name = "nameTest"; + res.setResourceName(name); + assertEquals(name, res.getResourceName()); + } + + @Test + public void testVersion() { + Resource res = new Resource(); + String version = "versionTest"; + res.setResourceVersion(version); + assertEquals(version, res.getResourceVersion()); + } + + @Test + public void testType() { + Resource res = new Resource(); + res.setResourceType(ResourceType.CP); + assertEquals(ResourceType.CP, res.getResourceType()); + } + + @Test + public void testEquals() { + Resource r1 = new Resource(); + Resource r2 = new Resource(r1); + assertTrue(r1.equals(r2)); + assertTrue(r2.equals(r1)); + + r1 = new Resource(UUID.randomUUID(), UUID.randomUUID(), "equalsTest", "1.1.1", + ResourceType.VFC); + r2 = new Resource(r1); + assertTrue(r1.equals(r2)); + assertTrue(r2.equals(r1)); + } + + @Test + public void testToString() { + Resource r1 = new Resource(); + Resource r2 = new Resource(r1); + assertEquals(r1.toString(), r2.toString()); + + r1 = new Resource(UUID.randomUUID(), UUID.randomUUID(), "equalsTest", "1.1.1", + ResourceType.VFC); + r2 = new Resource(r1); + assertEquals(r1.toString(), r2.toString()); + } + + @Test + public void testHashCode() { + Resource r1 = new Resource(); + Resource r2 = new Resource(r1); + assertEquals(r1.hashCode(), r2.hashCode()); + + r1 = new Resource(UUID.randomUUID(), UUID.randomUUID(), "equalsTest", "1.1.1", + ResourceType.VFC); + r2 = new Resource(r1); + assertEquals(r1.hashCode(), r2.hashCode()); + } +} diff --git a/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/TestResourceInstance.java b/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/TestResourceInstance.java index ef5986f05..77847f167 100644 --- a/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/TestResourceInstance.java +++ b/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/TestResourceInstance.java @@ -1,155 +1,155 @@ -/*-
- * ============LICENSE_START=======================================================
- * sdc
- * ================================================================================
- *
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.sdc;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.util.UUID;
-
-import org.junit.Test;
-
-public class TestResourceInstance {
-
- @Test
- public void testConstructors() {
- ResourceInstance ri = new ResourceInstance();
- assertEquals(null, ri.getResourceInstanceName());
- assertEquals(null, ri.getResourceUUID());
- assertEquals(null, ri.getResourceInvariantUUID());
- assertEquals(null, ri.getResourceName());
- assertEquals(null, ri.getResourceType());
- assertEquals(null, ri.getResourceVersion());
-
- ResourceInstance ri2 = new ResourceInstance((ResourceInstance) null);
- assertEquals(null, ri2.getResourceInstanceName());
- assertEquals(null, ri2.getResourceUUID());
- assertEquals(null, ri2.getResourceInvariantUUID());
- assertEquals(null, ri2.getResourceName());
- assertEquals(null, ri2.getResourceType());
- assertEquals(null, ri2.getResourceVersion());
-
- ri2 = new ResourceInstance(ri);
- assertEquals(ri2.getResourceInstanceName(), ri.getResourceInstanceName());
- assertEquals(ri2.getResourceUUID(), ri.getResourceUUID());
- assertEquals(ri2.getResourceInvariantUUID(), ri.getResourceInvariantUUID());
- assertEquals(ri2.getResourceName(), ri.getResourceName());
- assertEquals(ri2.getResourceType(), ri.getResourceType());
- assertEquals(ri2.getResourceVersion(), ri.getResourceVersion());
- }
-
- @Test
- public void testInstanceName() {
- ResourceInstance ri = new ResourceInstance();
- String name = "nameTestInstance";
- ri.setResourceInstanceName(name);;
- assertEquals(name, ri.getResourceInstanceName());
- }
-
- @Test
- public void testUuid() {
- ResourceInstance ri = new ResourceInstance();
- UUID uuid = UUID.randomUUID();
- ri.setResourceUUID(uuid);
- assertEquals(uuid, ri.getResourceUUID());
- }
-
- @Test
- public void testInvariantUuid() {
- ResourceInstance ri = new ResourceInstance();
- UUID uuid = UUID.randomUUID();
- ri.setResourceInvariantUUID(uuid);
- assertEquals(uuid, ri.getResourceInvariantUUID());
- }
-
- @Test
- public void testName() {
- ResourceInstance ri = new ResourceInstance();
- String name = "nameTest";
- ri.setResourceName(name);
- assertEquals(name, ri.getResourceName());
- }
-
- @Test
- public void testVersion() {
- ResourceInstance ri = new ResourceInstance();
- String version = "versionTest";
- ri.setResourceVersion(version);
- assertEquals(version, ri.getResourceVersion());
- }
-
- @Test
- public void testType() {
- ResourceInstance ri = new ResourceInstance();
- ri.setResourceType(ResourceType.CP);
- assertEquals(ResourceType.CP, ri.getResourceType());
- }
-
- @Test
- public void testEquals() {
- ResourceInstance ri1 = new ResourceInstance();
- ResourceInstance ri2 = new ResourceInstance(ri1);
- assertTrue(ri1.equals(ri2));
- assertTrue(ri2.equals(ri1));
-
- ri1.setResourceInstanceName("instance");
- ri1.setResourceName("resource");
- ri1.setResourceInvariantUUID(UUID.randomUUID());
- ri1.setResourceInvariantUUID(UUID.randomUUID());
- ri1.setResourceVersion("0.0.0");
- ri1.setResourceType(ResourceType.VL);
- ri2 = new ResourceInstance(ri1);
- assertTrue(ri1.equals(ri2));
- assertTrue(ri2.equals(ri1));
- }
-
- @Test
- public void testToString() {
- ResourceInstance ri1 = new ResourceInstance();
- ResourceInstance ri2 = new ResourceInstance(ri1);
- assertEquals(ri1.toString(), ri2.toString());
-
- ri1.setResourceInstanceName("instance");
- ri1.setResourceName("resource");
- ri1.setResourceInvariantUUID(UUID.randomUUID());
- ri1.setResourceInvariantUUID(UUID.randomUUID());
- ri1.setResourceVersion("0.0.0");
- ri1.setResourceType(ResourceType.VL);
- ri2 = new ResourceInstance(ri1);
- assertEquals(ri1.toString(), ri2.toString());
- }
-
- @Test
- public void testHashCode() {
- ResourceInstance ri1 = new ResourceInstance();
- ResourceInstance ri2 = new ResourceInstance(ri1);
- assertEquals(ri1.hashCode(), ri2.hashCode());
-
- ri1.setResourceInstanceName("instance");
- ri1.setResourceName("resource");
- ri1.setResourceInvariantUUID(UUID.randomUUID());
- ri1.setResourceInvariantUUID(UUID.randomUUID());
- ri1.setResourceVersion("0.0.0");
- ri1.setResourceType(ResourceType.VL);
- ri2 = new ResourceInstance(ri1);
- assertEquals(ri1.hashCode(), ri2.hashCode());
- }
-}
+/*- + * ============LICENSE_START======================================================= + * sdc + * ================================================================================ + * + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.sdc; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import java.util.UUID; + +import org.junit.Test; + +public class TestResourceInstance { + + @Test + public void testConstructors() { + ResourceInstance ri = new ResourceInstance(); + assertEquals(null, ri.getResourceInstanceName()); + assertEquals(null, ri.getResourceUUID()); + assertEquals(null, ri.getResourceInvariantUUID()); + assertEquals(null, ri.getResourceName()); + assertEquals(null, ri.getResourceType()); + assertEquals(null, ri.getResourceVersion()); + + ResourceInstance ri2 = new ResourceInstance((ResourceInstance) null); + assertEquals(null, ri2.getResourceInstanceName()); + assertEquals(null, ri2.getResourceUUID()); + assertEquals(null, ri2.getResourceInvariantUUID()); + assertEquals(null, ri2.getResourceName()); + assertEquals(null, ri2.getResourceType()); + assertEquals(null, ri2.getResourceVersion()); + + ri2 = new ResourceInstance(ri); + assertEquals(ri2.getResourceInstanceName(), ri.getResourceInstanceName()); + assertEquals(ri2.getResourceUUID(), ri.getResourceUUID()); + assertEquals(ri2.getResourceInvariantUUID(), ri.getResourceInvariantUUID()); + assertEquals(ri2.getResourceName(), ri.getResourceName()); + assertEquals(ri2.getResourceType(), ri.getResourceType()); + assertEquals(ri2.getResourceVersion(), ri.getResourceVersion()); + } + + @Test + public void testInstanceName() { + ResourceInstance ri = new ResourceInstance(); + String name = "nameTestInstance"; + ri.setResourceInstanceName(name);; + assertEquals(name, ri.getResourceInstanceName()); + } + + @Test + public void testUuid() { + ResourceInstance ri = new ResourceInstance(); + UUID uuid = UUID.randomUUID(); + ri.setResourceUUID(uuid); + assertEquals(uuid, ri.getResourceUUID()); + } + + @Test + public void testInvariantUuid() { + ResourceInstance ri = new ResourceInstance(); + UUID uuid = UUID.randomUUID(); + ri.setResourceInvariantUUID(uuid); + assertEquals(uuid, ri.getResourceInvariantUUID()); + } + + @Test + public void testName() { + ResourceInstance ri = new ResourceInstance(); + String name = "nameTest"; + ri.setResourceName(name); + assertEquals(name, ri.getResourceName()); + } + + @Test + public void testVersion() { + ResourceInstance ri = new ResourceInstance(); + String version = "versionTest"; + ri.setResourceVersion(version); + assertEquals(version, ri.getResourceVersion()); + } + + @Test + public void testType() { + ResourceInstance ri = new ResourceInstance(); + ri.setResourceType(ResourceType.CP); + assertEquals(ResourceType.CP, ri.getResourceType()); + } + + @Test + public void testEquals() { + ResourceInstance ri1 = new ResourceInstance(); + ResourceInstance ri2 = new ResourceInstance(ri1); + assertTrue(ri1.equals(ri2)); + assertTrue(ri2.equals(ri1)); + + ri1.setResourceInstanceName("instance"); + ri1.setResourceName("resource"); + ri1.setResourceInvariantUUID(UUID.randomUUID()); + ri1.setResourceInvariantUUID(UUID.randomUUID()); + ri1.setResourceVersion("0.0.0"); + ri1.setResourceType(ResourceType.VL); + ri2 = new ResourceInstance(ri1); + assertTrue(ri1.equals(ri2)); + assertTrue(ri2.equals(ri1)); + } + + @Test + public void testToString() { + ResourceInstance ri1 = new ResourceInstance(); + ResourceInstance ri2 = new ResourceInstance(ri1); + assertEquals(ri1.toString(), ri2.toString()); + + ri1.setResourceInstanceName("instance"); + ri1.setResourceName("resource"); + ri1.setResourceInvariantUUID(UUID.randomUUID()); + ri1.setResourceInvariantUUID(UUID.randomUUID()); + ri1.setResourceVersion("0.0.0"); + ri1.setResourceType(ResourceType.VL); + ri2 = new ResourceInstance(ri1); + assertEquals(ri1.toString(), ri2.toString()); + } + + @Test + public void testHashCode() { + ResourceInstance ri1 = new ResourceInstance(); + ResourceInstance ri2 = new ResourceInstance(ri1); + assertEquals(ri1.hashCode(), ri2.hashCode()); + + ri1.setResourceInstanceName("instance"); + ri1.setResourceName("resource"); + ri1.setResourceInvariantUUID(UUID.randomUUID()); + ri1.setResourceInvariantUUID(UUID.randomUUID()); + ri1.setResourceVersion("0.0.0"); + ri1.setResourceType(ResourceType.VL); + ri2 = new ResourceInstance(ri1); + assertEquals(ri1.hashCode(), ri2.hashCode()); + } +} diff --git a/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/TestService.java b/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/TestService.java index 4d1fa99e6..e5760236b 100644 --- a/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/TestService.java +++ b/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/TestService.java @@ -1,137 +1,137 @@ -/*-
- * ============LICENSE_START=======================================================
- * sdc
- * ================================================================================
- *
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.sdc;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.util.UUID;
-
-import org.junit.Test;
-
-public class TestService {
-
- @Test
- public void testConstructors() {
- Service svc = new Service();
- assertEquals(null, svc.getServiceUUID());
- assertEquals(null, svc.getServiceInvariantUUID());
- assertEquals(null, svc.getServiceName());
- assertEquals(null, svc.getServiceVersion());
-
- UUID uuid = UUID.randomUUID();
- svc = new Service(uuid);
- assertEquals(uuid, svc.getServiceUUID());
- assertEquals(null, svc.getServiceInvariantUUID());
- assertEquals(null, svc.getServiceName());
- assertEquals(null, svc.getServiceVersion());
-
- String name = "constTest";
- svc = new Service(name);
- assertEquals(null, svc.getServiceUUID());
- assertEquals(name, svc.getServiceName());
- assertEquals(null, svc.getServiceInvariantUUID());
- assertEquals(null, svc.getServiceVersion());
-
- uuid = UUID.randomUUID();
- UUID uuidInvariant = UUID.randomUUID();
- name = "constTestUUID";
- String version = "0.0.1";
- svc = new Service(uuid, uuidInvariant, name, version);
- assertEquals(uuid, svc.getServiceUUID());
- assertEquals(uuidInvariant, svc.getServiceInvariantUUID());
- assertEquals(name, svc.getServiceName());
- assertEquals(version, svc.getServiceVersion());
-
- Service s2 = new Service(svc);
- assertEquals(uuid, s2.getServiceUUID());
- assertEquals(uuidInvariant, s2.getServiceInvariantUUID());
- assertEquals(name, s2.getServiceName());
- assertEquals(version, s2.getServiceVersion());
- }
-
- @Test
- public void testUuid() {
- Service svc = new Service();
- UUID uuid = UUID.randomUUID();
- svc.setServiceUUID(uuid);
- assertEquals(uuid, svc.getServiceUUID());
- }
-
- @Test
- public void testInvariantUuid() {
- Service svc = new Service();
- UUID uuid = UUID.randomUUID();
- svc.setServiceInvariantUUID(uuid);
- assertEquals(uuid, svc.getServiceInvariantUUID());
- }
-
- @Test
- public void testName() {
- Service svc = new Service();
- String name = "nameTest";
- svc.setServiceName(name);
- assertEquals(name, svc.getServiceName());
- }
-
- @Test
- public void testVersion() {
- Service svc = new Service();
- String version = "versionTest";
- svc.setServiceVersion(version);
- assertEquals(version, svc.getServiceVersion());
- }
-
- @Test
- public void testEquals() {
- Service s1 = new Service();
- Service s2 = new Service(s1);
- assertTrue(s1.equals(s2));
- assertTrue(s2.equals(s1));
-
- s1 = new Service(UUID.randomUUID(), UUID.randomUUID(), "equalsTest", "1.1.1");
- s2 = new Service(s1);
- assertTrue(s1.equals(s2));
- assertTrue(s2.equals(s1));
- }
-
- @Test
- public void testToString() {
- Service s1 = new Service();
- Service s2 = new Service(s1);
- assertEquals(s1.toString(), s2.toString());
-
- s1 = new Service(UUID.randomUUID(), UUID.randomUUID(), "equalsTest", "1.1.1");
- s2 = new Service(s1);
- assertEquals(s1.toString(), s2.toString());
- }
-
- @Test
- public void testHashCode() {
- Service s1 = new Service();
- Service s2 = new Service(s1);
- assertEquals(s1.hashCode(), s2.hashCode());
-
- s1 = new Service(UUID.randomUUID(), UUID.randomUUID(), "equalsTest", "1.1.1");
- s2 = new Service(s1);
- assertEquals(s1.hashCode(), s2.hashCode());
- }
-}
+/*- + * ============LICENSE_START======================================================= + * sdc + * ================================================================================ + * + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.sdc; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import java.util.UUID; + +import org.junit.Test; + +public class TestService { + + @Test + public void testConstructors() { + Service svc = new Service(); + assertEquals(null, svc.getServiceUUID()); + assertEquals(null, svc.getServiceInvariantUUID()); + assertEquals(null, svc.getServiceName()); + assertEquals(null, svc.getServiceVersion()); + + UUID uuid = UUID.randomUUID(); + svc = new Service(uuid); + assertEquals(uuid, svc.getServiceUUID()); + assertEquals(null, svc.getServiceInvariantUUID()); + assertEquals(null, svc.getServiceName()); + assertEquals(null, svc.getServiceVersion()); + + String name = "constTest"; + svc = new Service(name); + assertEquals(null, svc.getServiceUUID()); + assertEquals(name, svc.getServiceName()); + assertEquals(null, svc.getServiceInvariantUUID()); + assertEquals(null, svc.getServiceVersion()); + + uuid = UUID.randomUUID(); + UUID uuidInvariant = UUID.randomUUID(); + name = "constTestUUID"; + String version = "0.0.1"; + svc = new Service(uuid, uuidInvariant, name, version); + assertEquals(uuid, svc.getServiceUUID()); + assertEquals(uuidInvariant, svc.getServiceInvariantUUID()); + assertEquals(name, svc.getServiceName()); + assertEquals(version, svc.getServiceVersion()); + + Service s2 = new Service(svc); + assertEquals(uuid, s2.getServiceUUID()); + assertEquals(uuidInvariant, s2.getServiceInvariantUUID()); + assertEquals(name, s2.getServiceName()); + assertEquals(version, s2.getServiceVersion()); + } + + @Test + public void testUuid() { + Service svc = new Service(); + UUID uuid = UUID.randomUUID(); + svc.setServiceUUID(uuid); + assertEquals(uuid, svc.getServiceUUID()); + } + + @Test + public void testInvariantUuid() { + Service svc = new Service(); + UUID uuid = UUID.randomUUID(); + svc.setServiceInvariantUUID(uuid); + assertEquals(uuid, svc.getServiceInvariantUUID()); + } + + @Test + public void testName() { + Service svc = new Service(); + String name = "nameTest"; + svc.setServiceName(name); + assertEquals(name, svc.getServiceName()); + } + + @Test + public void testVersion() { + Service svc = new Service(); + String version = "versionTest"; + svc.setServiceVersion(version); + assertEquals(version, svc.getServiceVersion()); + } + + @Test + public void testEquals() { + Service s1 = new Service(); + Service s2 = new Service(s1); + assertTrue(s1.equals(s2)); + assertTrue(s2.equals(s1)); + + s1 = new Service(UUID.randomUUID(), UUID.randomUUID(), "equalsTest", "1.1.1"); + s2 = new Service(s1); + assertTrue(s1.equals(s2)); + assertTrue(s2.equals(s1)); + } + + @Test + public void testToString() { + Service s1 = new Service(); + Service s2 = new Service(s1); + assertEquals(s1.toString(), s2.toString()); + + s1 = new Service(UUID.randomUUID(), UUID.randomUUID(), "equalsTest", "1.1.1"); + s2 = new Service(s1); + assertEquals(s1.toString(), s2.toString()); + } + + @Test + public void testHashCode() { + Service s1 = new Service(); + Service s2 = new Service(s1); + assertEquals(s1.hashCode(), s2.hashCode()); + + s1 = new Service(UUID.randomUUID(), UUID.randomUUID(), "equalsTest", "1.1.1"); + s2 = new Service(s1); + assertEquals(s1.hashCode(), s2.hashCode()); + } +} diff --git a/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/TestServiceInstance.java b/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/TestServiceInstance.java index 06004456b..5ee4a9de8 100644 --- a/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/TestServiceInstance.java +++ b/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/TestServiceInstance.java @@ -1,170 +1,170 @@ -/*-
- * ============LICENSE_START=======================================================
- * sdc
- * ================================================================================
- *
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.sdc;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.util.UUID;
-
-import org.junit.Test;
-
-public class TestServiceInstance {
-
- @Test
- public void testConstructors() {
- ServiceInstance si = new ServiceInstance();
- assertEquals(null, si.getServiceInstanceName());
- assertEquals(null, si.getServiceUUID());
- assertEquals(null, si.getServiceInstanceUUID());
- assertEquals(null, si.getServiceName());
- assertEquals(null, si.getPersonaModelUUID());
- assertEquals(null, si.getWidgetModelUUID());
- assertEquals(null, si.getWidgetModelVersion());
-
- ServiceInstance si2 = new ServiceInstance((ServiceInstance) null);
- assertEquals(null, si2.getServiceInstanceName());
- assertEquals(null, si2.getServiceUUID());
- assertEquals(null, si2.getServiceInstanceUUID());
- assertEquals(null, si2.getServiceName());
- assertEquals(null, si2.getPersonaModelUUID());
- assertEquals(null, si2.getWidgetModelUUID());
- assertEquals(null, si2.getWidgetModelVersion());
-
- si2 = new ServiceInstance(si);
- assertEquals(si2.getServiceInstanceName(), si.getServiceInstanceName());
- assertEquals(si2.getServiceUUID(), si.getServiceUUID());
- assertEquals(si2.getServiceInstanceUUID(), si.getServiceInstanceUUID());
- assertEquals(si2.getServiceName(), si.getServiceName());
- assertEquals(si2.getPersonaModelUUID(), si.getPersonaModelUUID());
- assertEquals(si2.getWidgetModelUUID(), si.getWidgetModelUUID());
- assertEquals(si2.getWidgetModelVersion(), si.getWidgetModelVersion());
- }
-
- @Test
- public void testInstanceName() {
- ServiceInstance si = new ServiceInstance();
- String name = "nameTestInstance";
- si.setServiceInstanceName(name);;
- assertEquals(name, si.getServiceInstanceName());
- }
-
- @Test
- public void testUuid() {
- ServiceInstance si = new ServiceInstance();
- UUID uuid = UUID.randomUUID();
- si.setServiceUUID(uuid);
- assertEquals(uuid, si.getServiceUUID());
- }
-
- @Test
- public void testInstanceUuid() {
- ServiceInstance si = new ServiceInstance();
- UUID uuid = UUID.randomUUID();
- si.setServiceInstanceUUID(uuid);
- assertEquals(uuid, si.getServiceInstanceUUID());
- }
-
- @Test
- public void testName() {
- ServiceInstance si = new ServiceInstance();
- String name = "nameTest";
- si.setServiceName(name);
- assertEquals(name, si.getServiceName());
- }
-
- @Test
- public void testPersonaModelUuid() {
- ServiceInstance si = new ServiceInstance();
- UUID uuid = UUID.randomUUID();
- si.setPersonaModelUUID(uuid);
- assertEquals(uuid, si.getPersonaModelUUID());
- }
-
- @Test
- public void testWidgetModelUuid() {
- ServiceInstance si = new ServiceInstance();
- UUID uuid = UUID.randomUUID();
- si.setWidgetModelUUID(uuid);
- assertEquals(uuid, si.getWidgetModelUUID());
- }
-
- @Test
- public void testWidgetModelVersion() {
- ServiceInstance si = new ServiceInstance();
- String version = "2.2.2";
- si.setWidgetModelVersion(version);;
- assertEquals(version, si.getWidgetModelVersion());
- }
-
- @Test
- public void testEquals() {
- ServiceInstance si1 = new ServiceInstance();
- ServiceInstance si2 = new ServiceInstance(si1);
- assertTrue(si1.equals(si2));
- assertTrue(si2.equals(si1));
-
- si1.setServiceInstanceName("instance");
- si1.setServiceName("service");
- si1.setServiceInstanceUUID(UUID.randomUUID());
- si1.setServiceUUID(UUID.randomUUID());
- si1.setPersonaModelUUID(UUID.randomUUID());
- si1.setWidgetModelUUID(UUID.randomUUID());
- si1.setWidgetModelVersion("3.3.3");
- si2 = new ServiceInstance(si1);
- assertTrue(si1.equals(si2));
- assertTrue(si2.equals(si1));
- }
-
- @Test
- public void testToString() {
- ServiceInstance si1 = new ServiceInstance();
- ServiceInstance si2 = new ServiceInstance(si1);
- assertEquals(si1.toString(), si2.toString());
-
- si1.setServiceInstanceName("instance");
- si1.setServiceName("service");
- si1.setServiceInstanceUUID(UUID.randomUUID());
- si1.setServiceUUID(UUID.randomUUID());
- si1.setPersonaModelUUID(UUID.randomUUID());
- si1.setWidgetModelUUID(UUID.randomUUID());
- si1.setWidgetModelVersion("3.3.3");
- si2 = new ServiceInstance(si1);
- assertEquals(si1.toString(), si2.toString());
- }
-
- @Test
- public void testHashCode() {
- ServiceInstance si1 = new ServiceInstance();
- ServiceInstance si2 = new ServiceInstance(si1);
- assertEquals(si1.hashCode(), si2.hashCode());
-
- si1.setServiceInstanceName("instance");
- si1.setServiceName("service");
- si1.setServiceInstanceUUID(UUID.randomUUID());
- si1.setServiceUUID(UUID.randomUUID());
- si1.setPersonaModelUUID(UUID.randomUUID());
- si1.setWidgetModelUUID(UUID.randomUUID());
- si1.setWidgetModelVersion("3.3.3");
- si2 = new ServiceInstance(si1);
- assertEquals(si1.hashCode(), si2.hashCode());
- }
-}
+/*- + * ============LICENSE_START======================================================= + * sdc + * ================================================================================ + * + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.sdc; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import java.util.UUID; + +import org.junit.Test; + +public class TestServiceInstance { + + @Test + public void testConstructors() { + ServiceInstance si = new ServiceInstance(); + assertEquals(null, si.getServiceInstanceName()); + assertEquals(null, si.getServiceUUID()); + assertEquals(null, si.getServiceInstanceUUID()); + assertEquals(null, si.getServiceName()); + assertEquals(null, si.getPersonaModelUUID()); + assertEquals(null, si.getWidgetModelUUID()); + assertEquals(null, si.getWidgetModelVersion()); + + ServiceInstance si2 = new ServiceInstance((ServiceInstance) null); + assertEquals(null, si2.getServiceInstanceName()); + assertEquals(null, si2.getServiceUUID()); + assertEquals(null, si2.getServiceInstanceUUID()); + assertEquals(null, si2.getServiceName()); + assertEquals(null, si2.getPersonaModelUUID()); + assertEquals(null, si2.getWidgetModelUUID()); + assertEquals(null, si2.getWidgetModelVersion()); + + si2 = new ServiceInstance(si); + assertEquals(si2.getServiceInstanceName(), si.getServiceInstanceName()); + assertEquals(si2.getServiceUUID(), si.getServiceUUID()); + assertEquals(si2.getServiceInstanceUUID(), si.getServiceInstanceUUID()); + assertEquals(si2.getServiceName(), si.getServiceName()); + assertEquals(si2.getPersonaModelUUID(), si.getPersonaModelUUID()); + assertEquals(si2.getWidgetModelUUID(), si.getWidgetModelUUID()); + assertEquals(si2.getWidgetModelVersion(), si.getWidgetModelVersion()); + } + + @Test + public void testInstanceName() { + ServiceInstance si = new ServiceInstance(); + String name = "nameTestInstance"; + si.setServiceInstanceName(name);; + assertEquals(name, si.getServiceInstanceName()); + } + + @Test + public void testUuid() { + ServiceInstance si = new ServiceInstance(); + UUID uuid = UUID.randomUUID(); + si.setServiceUUID(uuid); + assertEquals(uuid, si.getServiceUUID()); + } + + @Test + public void testInstanceUuid() { + ServiceInstance si = new ServiceInstance(); + UUID uuid = UUID.randomUUID(); + si.setServiceInstanceUUID(uuid); + assertEquals(uuid, si.getServiceInstanceUUID()); + } + + @Test + public void testName() { + ServiceInstance si = new ServiceInstance(); + String name = "nameTest"; + si.setServiceName(name); + assertEquals(name, si.getServiceName()); + } + + @Test + public void testPersonaModelUuid() { + ServiceInstance si = new ServiceInstance(); + UUID uuid = UUID.randomUUID(); + si.setPersonaModelUUID(uuid); + assertEquals(uuid, si.getPersonaModelUUID()); + } + + @Test + public void testWidgetModelUuid() { + ServiceInstance si = new ServiceInstance(); + UUID uuid = UUID.randomUUID(); + si.setWidgetModelUUID(uuid); + assertEquals(uuid, si.getWidgetModelUUID()); + } + + @Test + public void testWidgetModelVersion() { + ServiceInstance si = new ServiceInstance(); + String version = "2.2.2"; + si.setWidgetModelVersion(version);; + assertEquals(version, si.getWidgetModelVersion()); + } + + @Test + public void testEquals() { + ServiceInstance si1 = new ServiceInstance(); + ServiceInstance si2 = new ServiceInstance(si1); + assertTrue(si1.equals(si2)); + assertTrue(si2.equals(si1)); + + si1.setServiceInstanceName("instance"); + si1.setServiceName("service"); + si1.setServiceInstanceUUID(UUID.randomUUID()); + si1.setServiceUUID(UUID.randomUUID()); + si1.setPersonaModelUUID(UUID.randomUUID()); + si1.setWidgetModelUUID(UUID.randomUUID()); + si1.setWidgetModelVersion("3.3.3"); + si2 = new ServiceInstance(si1); + assertTrue(si1.equals(si2)); + assertTrue(si2.equals(si1)); + } + + @Test + public void testToString() { + ServiceInstance si1 = new ServiceInstance(); + ServiceInstance si2 = new ServiceInstance(si1); + assertEquals(si1.toString(), si2.toString()); + + si1.setServiceInstanceName("instance"); + si1.setServiceName("service"); + si1.setServiceInstanceUUID(UUID.randomUUID()); + si1.setServiceUUID(UUID.randomUUID()); + si1.setPersonaModelUUID(UUID.randomUUID()); + si1.setWidgetModelUUID(UUID.randomUUID()); + si1.setWidgetModelVersion("3.3.3"); + si2 = new ServiceInstance(si1); + assertEquals(si1.toString(), si2.toString()); + } + + @Test + public void testHashCode() { + ServiceInstance si1 = new ServiceInstance(); + ServiceInstance si2 = new ServiceInstance(si1); + assertEquals(si1.hashCode(), si2.hashCode()); + + si1.setServiceInstanceName("instance"); + si1.setServiceName("service"); + si1.setServiceInstanceUUID(UUID.randomUUID()); + si1.setServiceUUID(UUID.randomUUID()); + si1.setPersonaModelUUID(UUID.randomUUID()); + si1.setWidgetModelUUID(UUID.randomUUID()); + si1.setWidgetModelVersion("3.3.3"); + si2 = new ServiceInstance(si1); + assertEquals(si1.hashCode(), si2.hashCode()); + } +} diff --git a/controlloop/common/model-impl/so/pom.xml b/controlloop/common/model-impl/so/pom.xml index 718a82eef..a026236a6 100644 --- a/controlloop/common/model-impl/so/pom.xml +++ b/controlloop/common/model-impl/so/pom.xml @@ -19,51 +19,51 @@ --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> + <modelVersion>4.0.0</modelVersion> - <artifactId>so</artifactId> + <parent> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>model-impl</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> - <parent> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>model-impl</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> + <artifactId>so</artifactId> - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>com.google.code.gson</groupId> - <artifactId>gson</artifactId> - <version>2.5</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.drools</groupId> - <artifactId>drools-core</artifactId> - <version>6.5.0.Final</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>rest</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-pdp</groupId> - <artifactId>policy-management</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.mockito</groupId> - <artifactId>mockito-core</artifactId> - <version>2.13.0</version> - <scope>test</scope> - </dependency> - </dependencies> + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>2.5</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.drools</groupId> + <artifactId>drools-core</artifactId> + <version>6.5.0.Final</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>rest</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-pdp</groupId> + <artifactId>policy-management</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-core</artifactId> + <version>2.13.0</version> + <scope>test</scope> + </dependency> + </dependencies> </project> diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOAsyncRequestStatus.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOAsyncRequestStatus.java index 2cc22f379..ea1257d4d 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOAsyncRequestStatus.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOAsyncRequestStatus.java @@ -1,125 +1,125 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.so;
-
-import java.io.Serializable;
-import java.time.LocalDateTime;
-
-import com.google.gson.annotations.SerializedName;
-
-public class SOAsyncRequestStatus implements Serializable {
-
- private static final long serialVersionUID = -3283942659786236032L;
-
- @SerializedName("correlator")
- private String correlator;
-
- @SerializedName("requestId")
- private String requestId;
-
- @SerializedName("instanceReferences")
- private SOInstanceReferences instanceReferences;
-
- @SerializedName("startTime")
- private LocalDateTime startTime;
-
- @SerializedName("finishTime")
- private LocalDateTime finishTime;
-
- @SerializedName("requestScope")
- private String requestScope;
-
- @SerializedName("requestType")
- private String requestType;
-
- @SerializedName("requestStatus")
- private SORequestStatus requestStatus;
-
- public SOAsyncRequestStatus() {
- // required by author
- }
-
- public String getCorrelator() {
- return correlator;
- }
-
-
- public LocalDateTime getFinishTime() {
- return finishTime;
- }
-
- public SOInstanceReferences getInstanceReferences() {
- return instanceReferences;
- }
-
- public String getRequestId() {
- return requestId;
- }
-
- public String getRequestScope() {
- return requestScope;
- }
-
- public SORequestStatus getRequestStatus() {
- return requestStatus;
- }
-
- public String getRequestType() {
- return requestType;
- }
-
- public LocalDateTime getStartTime() {
- return startTime;
- }
-
- public void setCorrelator(String correlator) {
- this.correlator = correlator;
- }
-
- public void setFinishTime(LocalDateTime finishTime) {
- this.finishTime = finishTime;
- }
-
- public void setInstanceReferences(SOInstanceReferences instanceReferences) {
- this.instanceReferences = instanceReferences;
- }
-
- public void setRequestId(String requestId) {
- this.requestId = requestId;
- }
-
- public void setRequestScope(String requestScope) {
- this.requestScope = requestScope;
- }
-
- public void setRequestStatus(SORequestStatus requestStatus) {
- this.requestStatus = requestStatus;
- }
-
- public void setRequestType(String requestType) {
- this.requestType = requestType;
- }
-
- public void setStartTime(LocalDateTime startTime) {
- this.startTime = startTime;
- }
-
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.so; + +import java.io.Serializable; +import java.time.LocalDateTime; + +import com.google.gson.annotations.SerializedName; + +public class SOAsyncRequestStatus implements Serializable { + + private static final long serialVersionUID = -3283942659786236032L; + + @SerializedName("correlator") + private String correlator; + + @SerializedName("requestId") + private String requestId; + + @SerializedName("instanceReferences") + private SOInstanceReferences instanceReferences; + + @SerializedName("startTime") + private LocalDateTime startTime; + + @SerializedName("finishTime") + private LocalDateTime finishTime; + + @SerializedName("requestScope") + private String requestScope; + + @SerializedName("requestType") + private String requestType; + + @SerializedName("requestStatus") + private SORequestStatus requestStatus; + + public SOAsyncRequestStatus() { + // required by author + } + + public String getCorrelator() { + return correlator; + } + + + public LocalDateTime getFinishTime() { + return finishTime; + } + + public SOInstanceReferences getInstanceReferences() { + return instanceReferences; + } + + public String getRequestId() { + return requestId; + } + + public String getRequestScope() { + return requestScope; + } + + public SORequestStatus getRequestStatus() { + return requestStatus; + } + + public String getRequestType() { + return requestType; + } + + public LocalDateTime getStartTime() { + return startTime; + } + + public void setCorrelator(String correlator) { + this.correlator = correlator; + } + + public void setFinishTime(LocalDateTime finishTime) { + this.finishTime = finishTime; + } + + public void setInstanceReferences(SOInstanceReferences instanceReferences) { + this.instanceReferences = instanceReferences; + } + + public void setRequestId(String requestId) { + this.requestId = requestId; + } + + public void setRequestScope(String requestScope) { + this.requestScope = requestScope; + } + + public void setRequestStatus(SORequestStatus requestStatus) { + this.requestStatus = requestStatus; + } + + public void setRequestType(String requestType) { + this.requestType = requestType; + } + + public void setStartTime(LocalDateTime startTime) { + this.startTime = startTime; + } + +} diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOCloudConfiguration.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOCloudConfiguration.java index a1233bff1..7ad497a9f 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOCloudConfiguration.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOCloudConfiguration.java @@ -1,57 +1,57 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.so;
-
-import java.io.Serializable;
-
-import com.google.gson.annotations.SerializedName;
-
-public class SOCloudConfiguration implements Serializable {
-
- private static final long serialVersionUID = -3283942659786236032L;
-
- @SerializedName("lcpCloudRegionId")
- private String lcpCloudRegionId;
-
- @SerializedName("tenantId")
- private String tenantId;
-
- public SOCloudConfiguration() {
- //required by author
- }
-
- public String getLcpCloudRegionId() {
- return lcpCloudRegionId;
- }
-
- public String getTenantId() {
- return tenantId;
- }
-
- public void setLcpCloudRegionId(String lcpCloudRegionId) {
- this.lcpCloudRegionId = lcpCloudRegionId;
- }
-
- public void setTenantId(String tenantId) {
- this.tenantId = tenantId;
- }
-
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.so; + +import java.io.Serializable; + +import com.google.gson.annotations.SerializedName; + +public class SOCloudConfiguration implements Serializable { + + private static final long serialVersionUID = -3283942659786236032L; + + @SerializedName("lcpCloudRegionId") + private String lcpCloudRegionId; + + @SerializedName("tenantId") + private String tenantId; + + public SOCloudConfiguration() { + //required by author + } + + public String getLcpCloudRegionId() { + return lcpCloudRegionId; + } + + public String getTenantId() { + return tenantId; + } + + public void setLcpCloudRegionId(String lcpCloudRegionId) { + this.lcpCloudRegionId = lcpCloudRegionId; + } + + public void setTenantId(String tenantId) { + this.tenantId = tenantId; + } + +} diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOInstanceReferences.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOInstanceReferences.java index f2155082d..307e0514f 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOInstanceReferences.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOInstanceReferences.java @@ -1,57 +1,57 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.so;
-
-import java.io.Serializable;
-
-import com.google.gson.annotations.SerializedName;
-
-public class SOInstanceReferences implements Serializable {
-
- private static final long serialVersionUID = -3283942659786236032L;
-
- @SerializedName("requestId")
- private String requestId;
-
- @SerializedName("instanceId")
- private String instanceId;
-
- public SOInstanceReferences() {
- //requried by author
- }
-
- public String getInstanceId() {
- return instanceId;
- }
-
- public String getRequestId() {
- return requestId;
- }
-
- public void setInstanceId(String instanceId) {
- this.instanceId = instanceId;
- }
-
- public void setRequestId(String requestId) {
- this.requestId = requestId;
- }
-
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.so; + +import java.io.Serializable; + +import com.google.gson.annotations.SerializedName; + +public class SOInstanceReferences implements Serializable { + + private static final long serialVersionUID = -3283942659786236032L; + + @SerializedName("requestId") + private String requestId; + + @SerializedName("instanceId") + private String instanceId; + + public SOInstanceReferences() { + //requried by author + } + + public String getInstanceId() { + return instanceId; + } + + public String getRequestId() { + return requestId; + } + + public void setInstanceId(String instanceId) { + this.instanceId = instanceId; + } + + public void setRequestId(String requestId) { + this.requestId = requestId; + } + +} diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOPolicyExceptionHolder.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOPolicyExceptionHolder.java index cab396d01..975a21cbc 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOPolicyExceptionHolder.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOPolicyExceptionHolder.java @@ -1,57 +1,57 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.so;
-
-import java.io.Serializable;
-
-import com.google.gson.annotations.SerializedName;
-
-public class SOPolicyExceptionHolder implements Serializable {
-
- private static final long serialVersionUID = -3283942659786236032L;
-
- @SerializedName("messageId")
- private String messageId;
-
- @SerializedName("text")
- private String text;
-
- public SOPolicyExceptionHolder() {
- //required by author
- }
-
- public String getMessageId() {
- return messageId;
- }
-
- public String getText() {
- return text;
- }
-
- public void setMessageId(String messageId) {
- this.messageId = messageId;
- }
-
- public void setText(String text) {
- this.text = text;
- }
-
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.so; + +import java.io.Serializable; + +import com.google.gson.annotations.SerializedName; + +public class SOPolicyExceptionHolder implements Serializable { + + private static final long serialVersionUID = -3283942659786236032L; + + @SerializedName("messageId") + private String messageId; + + @SerializedName("text") + private String text; + + public SOPolicyExceptionHolder() { + //required by author + } + + public String getMessageId() { + return messageId; + } + + public String getText() { + return text; + } + + public void setMessageId(String messageId) { + this.messageId = messageId; + } + + public void setText(String text) { + this.text = text; + } + +} diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORelatedInstance.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORelatedInstance.java index 2bd46e04c..e7f3efc57 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORelatedInstance.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORelatedInstance.java @@ -1,70 +1,70 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.so;
-
-import java.io.Serializable;
-
-import com.google.gson.annotations.SerializedName;
-
-public class SORelatedInstance implements Serializable {
-
- private static final long serialVersionUID = -3283942659786236032L;
-
- @SerializedName("instanceId")
- private String instanceId;
-
- @SerializedName("instanceName")
- private String instanceName;
-
- @SerializedName("modelInfo")
- private SOModelInfo modelInfo;
-
- public SORelatedInstance() {
- //required by author
- }
-
- public String getInstanceId() {
- return instanceId;
- }
-
-
- public String getInstanceName() {
- return instanceName;
- }
-
- public SOModelInfo getModelInfo() {
- return modelInfo;
- }
-
- public void setInstanceId(String instanceId) {
- this.instanceId = instanceId;
- }
-
- public void setInstanceName(String instanceName) {
- this.instanceName = instanceName;
- }
-
-
- public void setModelInfo(SOModelInfo modelInfo) {
- this.modelInfo = modelInfo;
- }
-
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.so; + +import java.io.Serializable; + +import com.google.gson.annotations.SerializedName; + +public class SORelatedInstance implements Serializable { + + private static final long serialVersionUID = -3283942659786236032L; + + @SerializedName("instanceId") + private String instanceId; + + @SerializedName("instanceName") + private String instanceName; + + @SerializedName("modelInfo") + private SOModelInfo modelInfo; + + public SORelatedInstance() { + //required by author + } + + public String getInstanceId() { + return instanceId; + } + + + public String getInstanceName() { + return instanceName; + } + + public SOModelInfo getModelInfo() { + return modelInfo; + } + + public void setInstanceId(String instanceId) { + this.instanceId = instanceId; + } + + public void setInstanceName(String instanceName) { + this.instanceName = instanceName; + } + + + public void setModelInfo(SOModelInfo modelInfo) { + this.modelInfo = modelInfo; + } + +} diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORelatedInstanceListElement.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORelatedInstanceListElement.java index 71fb11949..1148ef1e0 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORelatedInstanceListElement.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORelatedInstanceListElement.java @@ -1,46 +1,46 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.so;
-
-import java.io.Serializable;
-
-import com.google.gson.annotations.SerializedName;
-
-public class SORelatedInstanceListElement implements Serializable {
-
- private static final long serialVersionUID = -3283942659786236032L;
-
- @SerializedName("relatedInstance")
- private SORelatedInstance relatedInstance;
-
- public SORelatedInstanceListElement() {
- //required by author
- }
-
- public SORelatedInstance getRelatedInstance() {
- return relatedInstance;
- }
-
- public void setRelatedInstance(SORelatedInstance relatedInstance) {
- this.relatedInstance = relatedInstance;
- }
-
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.so; + +import java.io.Serializable; + +import com.google.gson.annotations.SerializedName; + +public class SORelatedInstanceListElement implements Serializable { + + private static final long serialVersionUID = -3283942659786236032L; + + @SerializedName("relatedInstance") + private SORelatedInstance relatedInstance; + + public SORelatedInstanceListElement() { + //required by author + } + + public SORelatedInstance getRelatedInstance() { + return relatedInstance; + } + + public void setRelatedInstance(SORelatedInstance relatedInstance) { + this.relatedInstance = relatedInstance; + } + +} diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequest.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequest.java index be5ef139a..73ebba260 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequest.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequest.java @@ -1,114 +1,114 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.so;
-
-import java.io.Serializable;
-import java.time.LocalDateTime;
-import java.util.UUID;
-
-import com.google.gson.annotations.SerializedName;
-
-public class SORequest implements Serializable {
-
- private static final long serialVersionUID = -3283942659786236032L;
-
- @SerializedName("requestId")
- private UUID requestId;
-
- @SerializedName("startTime")
- private String startTime;
-
- @SerializedName("finishTime")
- private LocalDateTime finishTime;
-
- @SerializedName("requestScope")
- private String requestScope;
-
- @SerializedName("requestType")
- private String requestType;
-
- @SerializedName("requestDetails")
- private SORequestDetails requestDetails;
-
- @SerializedName("requestStatus")
- private SORequestStatus requestStatus;
-
- public SORequest() {
- // required by author
- }
-
- public LocalDateTime getFinishTime() {
- return finishTime;
- }
-
- public SORequestDetails getRequestDetails() {
- return requestDetails;
- }
-
- public UUID getRequestId() {
- return requestId;
- }
-
- public String getRequestScope() {
- return requestScope;
- }
-
- public SORequestStatus getRequestStatus() {
- return requestStatus;
- }
-
- public String getRequestType() {
- return requestType;
- }
-
- public String getStartTime() {
- return startTime;
- }
-
- public void setFinishTime(LocalDateTime finishTime) {
- this.finishTime = finishTime;
- }
-
- public void setRequestDetails(SORequestDetails requestDetails) {
- this.requestDetails = requestDetails;
- }
-
- public void setRequestId(UUID requestId) {
- this.requestId = requestId;
- }
-
- public void setRequestScope(String requestScope) {
- this.requestScope = requestScope;
- }
-
- public void setRequestStatus(SORequestStatus requestStatus) {
- this.requestStatus = requestStatus;
- }
-
- public void setRequestType(String requestType) {
- this.requestType = requestType;
- }
-
- public void setStartTime(String startTime) {
- this.startTime = startTime;
- }
-
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.so; + +import java.io.Serializable; +import java.time.LocalDateTime; +import java.util.UUID; + +import com.google.gson.annotations.SerializedName; + +public class SORequest implements Serializable { + + private static final long serialVersionUID = -3283942659786236032L; + + @SerializedName("requestId") + private UUID requestId; + + @SerializedName("startTime") + private String startTime; + + @SerializedName("finishTime") + private LocalDateTime finishTime; + + @SerializedName("requestScope") + private String requestScope; + + @SerializedName("requestType") + private String requestType; + + @SerializedName("requestDetails") + private SORequestDetails requestDetails; + + @SerializedName("requestStatus") + private SORequestStatus requestStatus; + + public SORequest() { + // required by author + } + + public LocalDateTime getFinishTime() { + return finishTime; + } + + public SORequestDetails getRequestDetails() { + return requestDetails; + } + + public UUID getRequestId() { + return requestId; + } + + public String getRequestScope() { + return requestScope; + } + + public SORequestStatus getRequestStatus() { + return requestStatus; + } + + public String getRequestType() { + return requestType; + } + + public String getStartTime() { + return startTime; + } + + public void setFinishTime(LocalDateTime finishTime) { + this.finishTime = finishTime; + } + + public void setRequestDetails(SORequestDetails requestDetails) { + this.requestDetails = requestDetails; + } + + public void setRequestId(UUID requestId) { + this.requestId = requestId; + } + + public void setRequestScope(String requestScope) { + this.requestScope = requestScope; + } + + public void setRequestStatus(SORequestStatus requestStatus) { + this.requestStatus = requestStatus; + } + + public void setRequestType(String requestType) { + this.requestType = requestType; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + +} diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestError.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestError.java index 49860417c..763210831 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestError.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestError.java @@ -1,57 +1,57 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.so;
-
-import java.io.Serializable;
-
-import com.google.gson.annotations.SerializedName;
-
-public class SORequestError implements Serializable {
-
- private static final long serialVersionUID = -3283942659786236032L;
-
- @SerializedName("policyException")
- private SOPolicyExceptionHolder policyException;
-
- @SerializedName("serviceException")
- private SOServiceExceptionHolder serviceException;
-
- public SORequestError() {
- // required by author
- }
-
- public SOPolicyExceptionHolder getPolicyException() {
- return policyException;
- }
-
- public SOServiceExceptionHolder getServiceException() {
- return serviceException;
- }
-
- public void setPolicyException(SOPolicyExceptionHolder policyException) {
- this.policyException = policyException;
- }
-
- public void setServiceException(SOServiceExceptionHolder serviceException) {
- this.serviceException = serviceException;
- }
-
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.so; + +import java.io.Serializable; + +import com.google.gson.annotations.SerializedName; + +public class SORequestError implements Serializable { + + private static final long serialVersionUID = -3283942659786236032L; + + @SerializedName("policyException") + private SOPolicyExceptionHolder policyException; + + @SerializedName("serviceException") + private SOServiceExceptionHolder serviceException; + + public SORequestError() { + // required by author + } + + public SOPolicyExceptionHolder getPolicyException() { + return policyException; + } + + public SOServiceExceptionHolder getServiceException() { + return serviceException; + } + + public void setPolicyException(SOPolicyExceptionHolder policyException) { + this.policyException = policyException; + } + + public void setServiceException(SOServiceExceptionHolder serviceException) { + this.serviceException = serviceException; + } + +} diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestInfo.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestInfo.java index 28bc0b87e..fd92e3284 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestInfo.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestInfo.java @@ -1,145 +1,145 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.so;
-
-import java.io.Serializable;
-
-import com.google.gson.annotations.SerializedName;
-
-public class SORequestInfo implements Serializable {
-
- private static final long serialVersionUID = -3283942659786236032L;
-
- @SerializedName("instanceName")
- private String instanceName;
-
- @SerializedName("source")
- private String source;
-
- @SerializedName("productFamilyId")
- private String productFamilyId;
-
- @SerializedName("suppressRollback")
- private boolean suppressRollback;
-
- @SerializedName("billingAccountNumber")
- private String billingAccountNumber;
-
- @SerializedName("callbackUrl")
- private String callbackUrl;
-
- @SerializedName("correlator")
- private String correlator;
-
- @SerializedName("orderNumber")
- private String orderNumber;
-
- @SerializedName("orderVersion")
- private Integer orderVersion;
-
- @SerializedName("requestorId")
- private String requestorId;
-
- public SORequestInfo() {
- // required by author
- }
-
- public String getBillingAccountNumber() {
- return billingAccountNumber;
- }
-
- public String getCallbackUrl() {
- return callbackUrl;
- }
-
- public String getCorrelator() {
- return correlator;
- }
-
- public String getInstanceName() {
- return instanceName;
- }
-
- public String getOrderNumber() {
- return orderNumber;
- }
-
- public Integer getOrderVersion() {
- return orderVersion;
- }
-
- public String getProductFamilyId() {
- return productFamilyId;
- }
-
- public String getRequestorId() {
- return requestorId;
- }
-
- public String getSource() {
- return source;
- }
-
- public boolean isSuppressRollback() {
- return suppressRollback;
- }
-
- public void setBillingAccountNumber(String billingAccountNumber) {
- this.billingAccountNumber = billingAccountNumber;
- }
-
- public void setCallbackUrl(String callbackUrl) {
- this.callbackUrl = callbackUrl;
- }
-
- public void setCorrelator(String correlator) {
- this.correlator = correlator;
- }
-
- public void setInstanceName(String instanceName) {
- this.instanceName = instanceName;
- }
-
- public void setOrderNumber(String orderNumber) {
- this.orderNumber = orderNumber;
- }
-
- public void setOrderVersion(Integer orderVersion) {
- this.orderVersion = orderVersion;
- }
-
- public void setProductFamilyId(String productFamilyId) {
- this.productFamilyId = productFamilyId;
- }
-
- public void setRequestorId(String requestorId) {
- this.requestorId = requestorId;
- }
-
- public void setSource(String source) {
- this.source = source;
- }
-
- public void setSuppressRollback(boolean suppressRollback) {
- this.suppressRollback = suppressRollback;
- }
-
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.so; + +import java.io.Serializable; + +import com.google.gson.annotations.SerializedName; + +public class SORequestInfo implements Serializable { + + private static final long serialVersionUID = -3283942659786236032L; + + @SerializedName("instanceName") + private String instanceName; + + @SerializedName("source") + private String source; + + @SerializedName("productFamilyId") + private String productFamilyId; + + @SerializedName("suppressRollback") + private boolean suppressRollback; + + @SerializedName("billingAccountNumber") + private String billingAccountNumber; + + @SerializedName("callbackUrl") + private String callbackUrl; + + @SerializedName("correlator") + private String correlator; + + @SerializedName("orderNumber") + private String orderNumber; + + @SerializedName("orderVersion") + private Integer orderVersion; + + @SerializedName("requestorId") + private String requestorId; + + public SORequestInfo() { + // required by author + } + + public String getBillingAccountNumber() { + return billingAccountNumber; + } + + public String getCallbackUrl() { + return callbackUrl; + } + + public String getCorrelator() { + return correlator; + } + + public String getInstanceName() { + return instanceName; + } + + public String getOrderNumber() { + return orderNumber; + } + + public Integer getOrderVersion() { + return orderVersion; + } + + public String getProductFamilyId() { + return productFamilyId; + } + + public String getRequestorId() { + return requestorId; + } + + public String getSource() { + return source; + } + + public boolean isSuppressRollback() { + return suppressRollback; + } + + public void setBillingAccountNumber(String billingAccountNumber) { + this.billingAccountNumber = billingAccountNumber; + } + + public void setCallbackUrl(String callbackUrl) { + this.callbackUrl = callbackUrl; + } + + public void setCorrelator(String correlator) { + this.correlator = correlator; + } + + public void setInstanceName(String instanceName) { + this.instanceName = instanceName; + } + + public void setOrderNumber(String orderNumber) { + this.orderNumber = orderNumber; + } + + public void setOrderVersion(Integer orderVersion) { + this.orderVersion = orderVersion; + } + + public void setProductFamilyId(String productFamilyId) { + this.productFamilyId = productFamilyId; + } + + public void setRequestorId(String requestorId) { + this.requestorId = requestorId; + } + + public void setSource(String source) { + this.source = source; + } + + public void setSuppressRollback(boolean suppressRollback) { + this.suppressRollback = suppressRollback; + } + +} diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestParameters.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestParameters.java index c1a6c7d85..169752057 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestParameters.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestParameters.java @@ -1,60 +1,60 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.so;
-
-import java.io.Serializable;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-import com.google.gson.annotations.SerializedName;
-
-public class SORequestParameters implements Serializable {
-
- private static final long serialVersionUID = -3283942659786236032L;
-
- @SerializedName("subscriptionServiceType")
- private String subscriptionServiceType;
-
- @SerializedName("userParams")
- private List<Map<String, String>> userParams = new LinkedList<>();
-
- public SORequestParameters() {
- // required by author
- }
-
- public String getSubscriptionServiceType() {
- return subscriptionServiceType;
- }
-
- public List<Map<String, String>> getUserParams() {
- return userParams;
- }
-
- public void setSubscriptionServiceType(String subscriptionServiceType) {
- this.subscriptionServiceType = subscriptionServiceType;
- }
-
- public void setUserParams(List<Map<String, String>> userParams) {
- this.userParams = userParams;
- }
-
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.so; + +import java.io.Serializable; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +import com.google.gson.annotations.SerializedName; + +public class SORequestParameters implements Serializable { + + private static final long serialVersionUID = -3283942659786236032L; + + @SerializedName("subscriptionServiceType") + private String subscriptionServiceType; + + @SerializedName("userParams") + private List<Map<String, String>> userParams = new LinkedList<>(); + + public SORequestParameters() { + // required by author + } + + public String getSubscriptionServiceType() { + return subscriptionServiceType; + } + + public List<Map<String, String>> getUserParams() { + return userParams; + } + + public void setSubscriptionServiceType(String subscriptionServiceType) { + this.subscriptionServiceType = subscriptionServiceType; + } + + public void setUserParams(List<Map<String, String>> userParams) { + this.userParams = userParams; + } + +} diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestReferences.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestReferences.java index 913402db3..ed14f6b58 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestReferences.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestReferences.java @@ -1,53 +1,53 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.so;
-
-import java.io.Serializable;
-
-import com.google.gson.annotations.SerializedName;
-
-public class SORequestReferences implements Serializable {
-
- private static final long serialVersionUID = -3283942659786236032L;
-
- @SerializedName("instanceId")
- private String instanceId;
-
- @SerializedName("requestId")
- private String requestId;
-
- public String getInstanceId() {
- return instanceId;
- }
-
- public String getRequestId() {
- return requestId;
- }
-
- public void setInstanceId(String instanceId) {
- this.instanceId = instanceId;
- }
-
- public void setRequestId(String requestId) {
- this.requestId = requestId;
- }
-
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.so; + +import java.io.Serializable; + +import com.google.gson.annotations.SerializedName; + +public class SORequestReferences implements Serializable { + + private static final long serialVersionUID = -3283942659786236032L; + + @SerializedName("instanceId") + private String instanceId; + + @SerializedName("requestId") + private String requestId; + + public String getInstanceId() { + return instanceId; + } + + public String getRequestId() { + return requestId; + } + + public void setInstanceId(String instanceId) { + this.instanceId = instanceId; + } + + public void setRequestId(String requestId) { + this.requestId = requestId; + } + +} diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestStatus.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestStatus.java index 8c5e7848c..2e77c157b 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestStatus.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestStatus.java @@ -1,82 +1,82 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.so;
-
-import java.io.Serializable;
-
-import com.google.gson.annotations.SerializedName;
-
-public class SORequestStatus implements Serializable {
-
- /**
- *
- */
- private static final long serialVersionUID = -3283942659786236032L;
-
- @SerializedName("percentProgress")
- private int percentProgress;
-
- @SerializedName("requestState")
- private String requestState;
-
- @SerializedName("timestamp")
- private String timestamp;
-
- @SerializedName("wasRolledBack")
- private boolean wasRolledBack;
-
- public SORequestStatus() {
- //required by author
- }
-
- public int getPercentProgress() {
- return percentProgress;
- }
-
- public String getRequestState() {
- return requestState;
- }
-
- public String getTimestamp() {
- return timestamp;
- }
-
- public boolean isWasRolledBack() {
- return wasRolledBack;
- }
-
- public void setPercentProgress(int percentProgress) {
- this.percentProgress = percentProgress;
- }
-
- public void setRequestState(String requestState) {
- this.requestState = requestState;
- }
-
- public void setTimestamp(String timestamp) {
- this.timestamp = timestamp;
- }
-
- public void setWasRolledBack(boolean wasRolledBack) {
- this.wasRolledBack = wasRolledBack;
- }
-
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.so; + +import java.io.Serializable; + +import com.google.gson.annotations.SerializedName; + +public class SORequestStatus implements Serializable { + + /** + * + */ + private static final long serialVersionUID = -3283942659786236032L; + + @SerializedName("percentProgress") + private int percentProgress; + + @SerializedName("requestState") + private String requestState; + + @SerializedName("timestamp") + private String timestamp; + + @SerializedName("wasRolledBack") + private boolean wasRolledBack; + + public SORequestStatus() { + //required by author + } + + public int getPercentProgress() { + return percentProgress; + } + + public String getRequestState() { + return requestState; + } + + public String getTimestamp() { + return timestamp; + } + + public boolean isWasRolledBack() { + return wasRolledBack; + } + + public void setPercentProgress(int percentProgress) { + this.percentProgress = percentProgress; + } + + public void setRequestState(String requestState) { + this.requestState = requestState; + } + + public void setTimestamp(String timestamp) { + this.timestamp = timestamp; + } + + public void setWasRolledBack(boolean wasRolledBack) { + this.wasRolledBack = wasRolledBack; + } + +} diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOServiceExceptionHolder.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOServiceExceptionHolder.java index 61366d3c5..703e13be5 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOServiceExceptionHolder.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOServiceExceptionHolder.java @@ -1,66 +1,66 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.so;
-
-import java.io.Serializable;
-import java.util.LinkedList;
-import java.util.List;
-
-import com.google.gson.annotations.SerializedName;
-
-public class SOServiceExceptionHolder implements Serializable {
-
- private static final long serialVersionUID = -3283942659786236032L;
-
- @SerializedName("messageId")
- private String messageId;
-
- @SerializedName("text")
- private String text;
-
- @SerializedName("variables")
- private List<String> variables = new LinkedList<>();
-
- public SOServiceExceptionHolder() {
- // required by author
- }
-
- public String getMessageId() {
- return messageId;
- }
-
- public String getText() {
- return text;
- }
-
- public List<String> getVariables() {
- return variables;
- }
-
- public void setMessageId(String messageId) {
- this.messageId = messageId;
- }
-
- public void setText(String text) {
- this.text = text;
- }
-
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.so; + +import java.io.Serializable; +import java.util.LinkedList; +import java.util.List; + +import com.google.gson.annotations.SerializedName; + +public class SOServiceExceptionHolder implements Serializable { + + private static final long serialVersionUID = -3283942659786236032L; + + @SerializedName("messageId") + private String messageId; + + @SerializedName("text") + private String text; + + @SerializedName("variables") + private List<String> variables = new LinkedList<>(); + + public SOServiceExceptionHolder() { + // required by author + } + + public String getMessageId() { + return messageId; + } + + public String getText() { + return text; + } + + public List<String> getVariables() { + return variables; + } + + public void setMessageId(String messageId) { + this.messageId = messageId; + } + + public void setText(String text) { + this.text = text; + } + +} diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOSubscriberInfo.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOSubscriberInfo.java index 14c46b0c1..618e9ec1e 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOSubscriberInfo.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOSubscriberInfo.java @@ -1,68 +1,68 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.so;
-
-import java.io.Serializable;
-
-import com.google.gson.annotations.SerializedName;
-
-public class SOSubscriberInfo implements Serializable {
-
- private static final long serialVersionUID = -3283942659786236032L;
-
- @SerializedName("globalSubscriberId")
- private String globalSubscriberId;
-
- @SerializedName("subscriberCommonSiteId")
- private String subscriberCommonSiteId;
-
- @SerializedName("subscriberName")
- private String subscriberName;
-
- public SOSubscriberInfo() {
- //required by author
- }
-
- public String getGlobalSubscriberId() {
- return globalSubscriberId;
- }
-
- public String getSubscriberCommonSiteId() {
- return subscriberCommonSiteId;
- }
-
- public String getSubscriberName() {
- return subscriberName;
- }
-
- public void setGlobalSubscriberId(String globalSubscriberId) {
- this.globalSubscriberId = globalSubscriberId;
- }
-
- public void setSubscriberCommonSiteId(String subscriberCommonSiteId) {
- this.subscriberCommonSiteId = subscriberCommonSiteId;
- }
-
- public void setSubscriberName(String subscriberName) {
- this.subscriberName = subscriberName;
- }
-
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.so; + +import java.io.Serializable; + +import com.google.gson.annotations.SerializedName; + +public class SOSubscriberInfo implements Serializable { + + private static final long serialVersionUID = -3283942659786236032L; + + @SerializedName("globalSubscriberId") + private String globalSubscriberId; + + @SerializedName("subscriberCommonSiteId") + private String subscriberCommonSiteId; + + @SerializedName("subscriberName") + private String subscriberName; + + public SOSubscriberInfo() { + //required by author + } + + public String getGlobalSubscriberId() { + return globalSubscriberId; + } + + public String getSubscriberCommonSiteId() { + return subscriberCommonSiteId; + } + + public String getSubscriberName() { + return subscriberName; + } + + public void setGlobalSubscriberId(String globalSubscriberId) { + this.globalSubscriberId = globalSubscriberId; + } + + public void setSubscriberCommonSiteId(String subscriberCommonSiteId) { + this.subscriberCommonSiteId = subscriberCommonSiteId; + } + + public void setSubscriberName(String subscriberName) { + this.subscriberName = subscriberName; + } + +} diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoAsyncRequestStatus.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoAsyncRequestStatus.java index 119c29121..7c50ea097 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoAsyncRequestStatus.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoAsyncRequestStatus.java @@ -1,78 +1,78 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- *
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.so;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.time.LocalDateTime;
-
-import org.junit.Test;
-
-public class TestSoAsyncRequestStatus {
-
- @Test
- public void testConstructor() {
- SOAsyncRequestStatus obj = new SOAsyncRequestStatus();
-
- assertTrue(obj.getCorrelator() == null);
- assertTrue(obj.getFinishTime() == null);
- assertTrue(obj.getInstanceReferences() == null);
- assertTrue(obj.getRequestId() == null);
- assertTrue(obj.getRequestScope() == null);
- assertTrue(obj.getRequestStatus() == null);
- assertTrue(obj.getStartTime() == null);
- }
-
- @Test
- public void testSetGet() {
- SOAsyncRequestStatus obj = new SOAsyncRequestStatus();
-
- obj.setCorrelator("correlator");
- assertEquals("correlator", obj.getCorrelator());
-
- LocalDateTime finishTime = LocalDateTime.now();
- obj.setFinishTime(finishTime);
- assertEquals(finishTime, obj.getFinishTime());
-
- SOInstanceReferences instanceReferences = new SOInstanceReferences();
- obj.setInstanceReferences(instanceReferences);
- assertEquals(instanceReferences, obj.getInstanceReferences());
-
- obj.setRequestId("requestId");
- assertEquals("requestId", obj.getRequestId());
-
- obj.setRequestScope("requestScope");
- assertEquals("requestScope", obj.getRequestScope());
-
- SORequestStatus requestStatus = new SORequestStatus();
- obj.setRequestStatus(requestStatus);
- assertEquals(requestStatus, obj.getRequestStatus());
-
- obj.setRequestType("requestType");
- assertEquals("requestType", obj.getRequestType());
-
- LocalDateTime startTime = LocalDateTime.now();
- obj.setStartTime(startTime);
- assertEquals(startTime, obj.getStartTime());
-
- }
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.so; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import java.time.LocalDateTime; + +import org.junit.Test; + +public class TestSoAsyncRequestStatus { + + @Test + public void testConstructor() { + SOAsyncRequestStatus obj = new SOAsyncRequestStatus(); + + assertTrue(obj.getCorrelator() == null); + assertTrue(obj.getFinishTime() == null); + assertTrue(obj.getInstanceReferences() == null); + assertTrue(obj.getRequestId() == null); + assertTrue(obj.getRequestScope() == null); + assertTrue(obj.getRequestStatus() == null); + assertTrue(obj.getStartTime() == null); + } + + @Test + public void testSetGet() { + SOAsyncRequestStatus obj = new SOAsyncRequestStatus(); + + obj.setCorrelator("correlator"); + assertEquals("correlator", obj.getCorrelator()); + + LocalDateTime finishTime = LocalDateTime.now(); + obj.setFinishTime(finishTime); + assertEquals(finishTime, obj.getFinishTime()); + + SOInstanceReferences instanceReferences = new SOInstanceReferences(); + obj.setInstanceReferences(instanceReferences); + assertEquals(instanceReferences, obj.getInstanceReferences()); + + obj.setRequestId("requestId"); + assertEquals("requestId", obj.getRequestId()); + + obj.setRequestScope("requestScope"); + assertEquals("requestScope", obj.getRequestScope()); + + SORequestStatus requestStatus = new SORequestStatus(); + obj.setRequestStatus(requestStatus); + assertEquals(requestStatus, obj.getRequestStatus()); + + obj.setRequestType("requestType"); + assertEquals("requestType", obj.getRequestType()); + + LocalDateTime startTime = LocalDateTime.now(); + obj.setStartTime(startTime); + assertEquals(startTime, obj.getStartTime()); + + } +} diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoCloudConfiguration.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoCloudConfiguration.java index f05912985..bab8970bb 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoCloudConfiguration.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoCloudConfiguration.java @@ -1,48 +1,48 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- *
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.so;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-public class TestSoCloudConfiguration {
-
- @Test
- public void testConstructor() {
- SOCloudConfiguration obj = new SOCloudConfiguration();
-
- assertTrue(obj.getLcpCloudRegionId() == null);
- assertTrue(obj.getTenantId() == null);
- }
-
- @Test
- public void testSetGet() {
- SOCloudConfiguration obj = new SOCloudConfiguration();
-
- obj.setLcpCloudRegionId("lcpCloudRegionId");
- assertEquals("lcpCloudRegionId", obj.getLcpCloudRegionId());
-
- obj.setTenantId("tenantId");
- assertEquals("tenantId", obj.getTenantId());
- }
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.so; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +public class TestSoCloudConfiguration { + + @Test + public void testConstructor() { + SOCloudConfiguration obj = new SOCloudConfiguration(); + + assertTrue(obj.getLcpCloudRegionId() == null); + assertTrue(obj.getTenantId() == null); + } + + @Test + public void testSetGet() { + SOCloudConfiguration obj = new SOCloudConfiguration(); + + obj.setLcpCloudRegionId("lcpCloudRegionId"); + assertEquals("lcpCloudRegionId", obj.getLcpCloudRegionId()); + + obj.setTenantId("tenantId"); + assertEquals("tenantId", obj.getTenantId()); + } +} diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoInstanceReferences.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoInstanceReferences.java index 8c63e9c65..ee083ae08 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoInstanceReferences.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoInstanceReferences.java @@ -1,48 +1,48 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- *
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.so;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-public class TestSoInstanceReferences {
-
- @Test
- public void testConstructor() {
- SOInstanceReferences obj = new SOInstanceReferences();
-
- assertTrue(obj.getInstanceId() == null);
- assertTrue(obj.getRequestId() == null);
- }
-
- @Test
- public void testSetGet() {
- SOInstanceReferences obj = new SOInstanceReferences();
-
- obj.setInstanceId("instanceId");
- assertEquals("instanceId", obj.getInstanceId());
-
- obj.setRequestId("requestId");
- assertEquals("requestId", obj.getRequestId());
- }
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.so; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +public class TestSoInstanceReferences { + + @Test + public void testConstructor() { + SOInstanceReferences obj = new SOInstanceReferences(); + + assertTrue(obj.getInstanceId() == null); + assertTrue(obj.getRequestId() == null); + } + + @Test + public void testSetGet() { + SOInstanceReferences obj = new SOInstanceReferences(); + + obj.setInstanceId("instanceId"); + assertEquals("instanceId", obj.getInstanceId()); + + obj.setRequestId("requestId"); + assertEquals("requestId", obj.getRequestId()); + } +} diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoModelInfo.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoModelInfo.java index 99f829fc7..037e82e4c 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoModelInfo.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoModelInfo.java @@ -1,69 +1,69 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- *
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.so;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-public class TestSoModelInfo {
-
- @Test
- public void testConstructor() {
- SOModelInfo obj = new SOModelInfo();
-
- assertTrue(obj.getModelCustomizationId() == null);
- assertTrue(obj.getModelCustomizationName() == null);
- assertTrue(obj.getModelInvariantId() == null);
- assertTrue(obj.getModelName() == null);
- assertTrue(obj.getModelType() == null);
- assertTrue(obj.getModelVersion() == null);
- assertTrue(obj.getModelVersionId() == null);
- }
-
- @Test
- public void testSetGet() {
- SOModelInfo obj = new SOModelInfo();
-
- obj.setModelCustomizationId("modelCustomizationId");
- assertEquals("modelCustomizationId", obj.getModelCustomizationId());
-
- obj.setModelCustomizationName("modelCustomizationName");
- assertEquals("modelCustomizationName", obj.getModelCustomizationName());
-
- obj.setModelInvariantId("modelInvariantId");
- assertEquals("modelInvariantId", obj.getModelInvariantId());
-
- obj.setModelName("modelName");
- assertEquals("modelName", obj.getModelName());
-
- obj.setModelType("modelType");
- assertEquals("modelType", obj.getModelType());
-
- obj.setModelVersion("modelVersion");
- assertEquals("modelVersion", obj.getModelVersion());
-
- obj.setModelVersionId("modelVersionId");
- assertEquals("modelVersionId", obj.getModelVersionId());
-
- }
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.so; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +public class TestSoModelInfo { + + @Test + public void testConstructor() { + SOModelInfo obj = new SOModelInfo(); + + assertTrue(obj.getModelCustomizationId() == null); + assertTrue(obj.getModelCustomizationName() == null); + assertTrue(obj.getModelInvariantId() == null); + assertTrue(obj.getModelName() == null); + assertTrue(obj.getModelType() == null); + assertTrue(obj.getModelVersion() == null); + assertTrue(obj.getModelVersionId() == null); + } + + @Test + public void testSetGet() { + SOModelInfo obj = new SOModelInfo(); + + obj.setModelCustomizationId("modelCustomizationId"); + assertEquals("modelCustomizationId", obj.getModelCustomizationId()); + + obj.setModelCustomizationName("modelCustomizationName"); + assertEquals("modelCustomizationName", obj.getModelCustomizationName()); + + obj.setModelInvariantId("modelInvariantId"); + assertEquals("modelInvariantId", obj.getModelInvariantId()); + + obj.setModelName("modelName"); + assertEquals("modelName", obj.getModelName()); + + obj.setModelType("modelType"); + assertEquals("modelType", obj.getModelType()); + + obj.setModelVersion("modelVersion"); + assertEquals("modelVersion", obj.getModelVersion()); + + obj.setModelVersionId("modelVersionId"); + assertEquals("modelVersionId", obj.getModelVersionId()); + + } +} diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoPolicyExceptionHolder.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoPolicyExceptionHolder.java index 978ec8a59..1c619a8c6 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoPolicyExceptionHolder.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoPolicyExceptionHolder.java @@ -1,48 +1,48 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.so;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-public class TestSoPolicyExceptionHolder {
-
- @Test
- public void testConstructor() {
- SOPolicyExceptionHolder obj = new SOPolicyExceptionHolder();
-
- assertTrue(obj.getMessageId() == null);
- assertTrue(obj.getText() == null);
- }
-
- @Test
- public void testSetGet() {
- SOPolicyExceptionHolder obj = new SOPolicyExceptionHolder();
-
- obj.setMessageId("messageId");
- assertEquals("messageId", obj.getMessageId());
-
- obj.setText("text");
- assertEquals("text", obj.getText());
- }
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.so; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +public class TestSoPolicyExceptionHolder { + + @Test + public void testConstructor() { + SOPolicyExceptionHolder obj = new SOPolicyExceptionHolder(); + + assertTrue(obj.getMessageId() == null); + assertTrue(obj.getText() == null); + } + + @Test + public void testSetGet() { + SOPolicyExceptionHolder obj = new SOPolicyExceptionHolder(); + + obj.setMessageId("messageId"); + assertEquals("messageId", obj.getMessageId()); + + obj.setText("text"); + assertEquals("text", obj.getText()); + } +} diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRelatedInstance.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRelatedInstance.java index a8e94b8e2..048288377 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRelatedInstance.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRelatedInstance.java @@ -1,53 +1,53 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.so;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-public class TestSoRelatedInstance {
-
- @Test
- public void testConstructor() {
- SORelatedInstance obj = new SORelatedInstance();
-
- assertTrue(obj.getInstanceId() == null);
- assertTrue(obj.getInstanceName() == null);
- assertTrue(obj.getModelInfo() == null);
- }
-
- @Test
- public void testSetGet() {
- SORelatedInstance obj = new SORelatedInstance();
-
- obj.setInstanceId("instanceId");
- assertEquals("instanceId", obj.getInstanceId());
-
- obj.setInstanceName("instanceName");
- assertEquals("instanceName", obj.getInstanceName());
-
- SOModelInfo modelInfo = new SOModelInfo();
- obj.setModelInfo(modelInfo);
- assertEquals(modelInfo, obj.getModelInfo());
- }
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.so; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +public class TestSoRelatedInstance { + + @Test + public void testConstructor() { + SORelatedInstance obj = new SORelatedInstance(); + + assertTrue(obj.getInstanceId() == null); + assertTrue(obj.getInstanceName() == null); + assertTrue(obj.getModelInfo() == null); + } + + @Test + public void testSetGet() { + SORelatedInstance obj = new SORelatedInstance(); + + obj.setInstanceId("instanceId"); + assertEquals("instanceId", obj.getInstanceId()); + + obj.setInstanceName("instanceName"); + assertEquals("instanceName", obj.getInstanceName()); + + SOModelInfo modelInfo = new SOModelInfo(); + obj.setModelInfo(modelInfo); + assertEquals(modelInfo, obj.getModelInfo()); + } +} diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRelatedInstanceListElement.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRelatedInstanceListElement.java index 17abd06e3..83f1d5849 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRelatedInstanceListElement.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRelatedInstanceListElement.java @@ -1,45 +1,45 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- *
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.so;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-public class TestSoRelatedInstanceListElement {
-
- @Test
- public void testConstructor() {
- SORelatedInstanceListElement obj = new SORelatedInstanceListElement();
-
- assertTrue(obj.getRelatedInstance() == null);
- }
-
- @Test
- public void testSetGet() {
- SORelatedInstanceListElement obj = new SORelatedInstanceListElement();
-
- SORelatedInstance relatedInstance = new SORelatedInstance();
- obj.setRelatedInstance(relatedInstance);
- assertEquals(relatedInstance, obj.getRelatedInstance());
- }
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.so; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +public class TestSoRelatedInstanceListElement { + + @Test + public void testConstructor() { + SORelatedInstanceListElement obj = new SORelatedInstanceListElement(); + + assertTrue(obj.getRelatedInstance() == null); + } + + @Test + public void testSetGet() { + SORelatedInstanceListElement obj = new SORelatedInstanceListElement(); + + SORelatedInstance relatedInstance = new SORelatedInstance(); + obj.setRelatedInstance(relatedInstance); + assertEquals(relatedInstance, obj.getRelatedInstance()); + } +} diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequest.java index 229765a72..f58254184 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequest.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequest.java @@ -1,72 +1,72 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- *
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.so;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.time.LocalDateTime;
-import java.util.UUID;
-
-import org.junit.Test;
-
-public class TestSoRequest {
-
- @Test
- public void testConstructor() {
- SORequest obj = new SORequest();
-
- assertTrue(obj.getFinishTime() == null);
- assertTrue(obj.getRequestDetails() == null);
- assertTrue(obj.getRequestId() == null);
- assertTrue(obj.getRequestScope() == null);
- assertTrue(obj.getRequestStatus() == null);
- assertTrue(obj.getRequestType() == null);
- assertTrue(obj.getStartTime() == null);
- }
-
- @Test
- public void testSetGet() {
- SORequest obj = new SORequest();
-
- LocalDateTime finishTime = LocalDateTime.now();
- obj.setFinishTime(finishTime);
- assertEquals(finishTime, obj.getFinishTime());
-
- UUID uuid = UUID.randomUUID();
- obj.setRequestId(uuid);
- assertEquals(uuid, obj.getRequestId());
-
- obj.setRequestScope("requestScope");
- assertEquals("requestScope", obj.getRequestScope());
-
- SORequestStatus requestStatus = new SORequestStatus();
- obj.setRequestStatus(requestStatus);
- assertEquals(requestStatus, obj.getRequestStatus());
-
- obj.setRequestType("requestType");
- assertEquals("requestType", obj.getRequestType());
-
- LocalDateTime startTime = LocalDateTime.now();
- obj.setStartTime(startTime.toString());
- assertEquals(startTime.toString(), obj.getStartTime());
- }
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.so; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import java.time.LocalDateTime; +import java.util.UUID; + +import org.junit.Test; + +public class TestSoRequest { + + @Test + public void testConstructor() { + SORequest obj = new SORequest(); + + assertTrue(obj.getFinishTime() == null); + assertTrue(obj.getRequestDetails() == null); + assertTrue(obj.getRequestId() == null); + assertTrue(obj.getRequestScope() == null); + assertTrue(obj.getRequestStatus() == null); + assertTrue(obj.getRequestType() == null); + assertTrue(obj.getStartTime() == null); + } + + @Test + public void testSetGet() { + SORequest obj = new SORequest(); + + LocalDateTime finishTime = LocalDateTime.now(); + obj.setFinishTime(finishTime); + assertEquals(finishTime, obj.getFinishTime()); + + UUID uuid = UUID.randomUUID(); + obj.setRequestId(uuid); + assertEquals(uuid, obj.getRequestId()); + + obj.setRequestScope("requestScope"); + assertEquals("requestScope", obj.getRequestScope()); + + SORequestStatus requestStatus = new SORequestStatus(); + obj.setRequestStatus(requestStatus); + assertEquals(requestStatus, obj.getRequestStatus()); + + obj.setRequestType("requestType"); + assertEquals("requestType", obj.getRequestType()); + + LocalDateTime startTime = LocalDateTime.now(); + obj.setStartTime(startTime.toString()); + assertEquals(startTime.toString(), obj.getStartTime()); + } +} diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestDetails.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestDetails.java index 42dfe0805..6e9a2bade 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestDetails.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestDetails.java @@ -1,174 +1,174 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- *
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.so;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.junit.Test;
-
-public class TestSoRequestDetails {
-
- @Test
- public void testConstructor() {
- SORequestDetails obj = new SORequestDetails();
-
- assertTrue(obj.getCloudConfiguration() == null);
- assertTrue(obj.getModelInfo() == null);
- assertTrue(obj.getRequestInfo() == null);
- assertTrue(obj.getRequestParameters() == null);
- assertTrue(obj.getSubscriberInfo() == null);
-
- assertTrue(obj.getRelatedInstanceList() != null);
- assertEquals(0, obj.getRelatedInstanceList().size());
- }
-
- @Test
- public void testSetGet() {
- SORequestDetails obj = new SORequestDetails();
-
- SOCloudConfiguration cloudConfiguration = new SOCloudConfiguration();
- obj.setCloudConfiguration(cloudConfiguration);
- assertEquals(cloudConfiguration, obj.getCloudConfiguration());
-
- SOModelInfo modelInfo = new SOModelInfo();
- obj.setModelInfo(modelInfo);
- assertEquals(modelInfo, obj.getModelInfo());
-
- SORequestInfo requestInfo = new SORequestInfo();
- obj.setRequestInfo(requestInfo);
- assertEquals(requestInfo, obj.getRequestInfo());
-
- SORequestParameters requestParameters = new SORequestParameters();
- obj.setRequestParameters(requestParameters);
- assertEquals(requestParameters, obj.getRequestParameters());
-
- SOSubscriberInfo subscriberInfo = new SOSubscriberInfo();
- obj.setSubscriberInfo(subscriberInfo);
- assertEquals(subscriberInfo, obj.getSubscriberInfo());
- }
-
- @Test
- public void testSOMRequestDetailsMethods() {
- SORequestDetails details = new SORequestDetails();
- assertNotNull(details);
- assertNotEquals(0, details.hashCode());
-
- SOCloudConfiguration cloudConfiguration = new SOCloudConfiguration();
- details.setCloudConfiguration(cloudConfiguration);
- assertEquals(cloudConfiguration, details.getCloudConfiguration());
- assertNotEquals(0, details.hashCode());
-
- SOModelInfo modelInfo = new SOModelInfo();
- details.setModelInfo(modelInfo);
- assertEquals(modelInfo, details.getModelInfo());
- assertNotEquals(0, details.hashCode());
-
- List<SORelatedInstanceListElement> relatedInstanceList = new ArrayList<>();
- details.setRelatedInstanceList(relatedInstanceList);
- assertEquals(relatedInstanceList, details.getRelatedInstanceList());
- assertNotEquals(0, details.hashCode());
-
- SORequestInfo requestInfo = new SORequestInfo();
- details.setRequestInfo(requestInfo);
- assertEquals(requestInfo, details.getRequestInfo());
- assertNotEquals(0, details.hashCode());
-
- SORequestParameters requestParameters = new SORequestParameters();
- details.setRequestParameters(requestParameters);
- assertEquals(requestParameters, details.getRequestParameters());
- assertNotEquals(0, details.hashCode());
-
- SOSubscriberInfo subscriberInfo = new SOSubscriberInfo();
- details.setSubscriberInfo(subscriberInfo);
- assertEquals(subscriberInfo, details.getSubscriberInfo());
- assertNotEquals(0, details.hashCode());
-
- assertEquals("SORequestDetails [modelInfo=org.onap.policy.so", details.toString().substring(0, 46));
-
- SORequestDetails copiedDetails = new SORequestDetails(details);
-
- assertTrue(details.equals(details));
- assertTrue(details.equals(copiedDetails));
- assertFalse(details.equals(null));
- assertFalse(details.equals("Hello"));
-
- details.setCloudConfiguration(null);
- assertFalse(details.equals(copiedDetails));
- copiedDetails.setCloudConfiguration(null);
- assertTrue(details.equals(copiedDetails));
- details.setCloudConfiguration(cloudConfiguration);
- assertFalse(details.equals(copiedDetails));
- copiedDetails.setCloudConfiguration(cloudConfiguration);
- assertTrue(details.equals(copiedDetails));
-
- details.setModelInfo(null);
- assertFalse(details.equals(copiedDetails));
- copiedDetails.setModelInfo(null);
- assertTrue(details.equals(copiedDetails));
- details.setModelInfo(modelInfo);
- assertFalse(details.equals(copiedDetails));
- copiedDetails.setModelInfo(modelInfo);
- assertTrue(details.equals(copiedDetails));
-
- details.setRequestInfo(null);
- assertFalse(details.equals(copiedDetails));
- copiedDetails.setRequestInfo(null);
- assertTrue(details.equals(copiedDetails));
- details.setRequestInfo(requestInfo);
- assertFalse(details.equals(copiedDetails));
- copiedDetails.setRequestInfo(requestInfo);
- assertTrue(details.equals(copiedDetails));
-
- details.setRequestParameters(null);
- assertFalse(details.equals(copiedDetails));
- copiedDetails.setRequestParameters(null);
- assertTrue(details.equals(copiedDetails));
- details.setRequestParameters(requestParameters);
- assertFalse(details.equals(copiedDetails));
- copiedDetails.setRequestParameters(requestParameters);
- assertTrue(details.equals(copiedDetails));
-
- details.setSubscriberInfo(null);
- assertFalse(details.equals(copiedDetails));
- copiedDetails.setSubscriberInfo(null);
- assertTrue(details.equals(copiedDetails));
- details.setSubscriberInfo(subscriberInfo);
- assertFalse(details.equals(copiedDetails));
- copiedDetails.setSubscriberInfo(subscriberInfo);
- assertTrue(details.equals(copiedDetails));
-
- details.setRelatedInstanceList(null);
- assertFalse(details.equals(copiedDetails));
- copiedDetails.setRelatedInstanceList(null);
- assertTrue(details.equals(copiedDetails));
- details.setRelatedInstanceList(relatedInstanceList);
- assertFalse(details.equals(copiedDetails));
- copiedDetails.setRelatedInstanceList(relatedInstanceList);
- assertTrue(details.equals(copiedDetails));
- }
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.so; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import java.util.ArrayList; +import java.util.List; + +import org.junit.Test; + +public class TestSoRequestDetails { + + @Test + public void testConstructor() { + SORequestDetails obj = new SORequestDetails(); + + assertTrue(obj.getCloudConfiguration() == null); + assertTrue(obj.getModelInfo() == null); + assertTrue(obj.getRequestInfo() == null); + assertTrue(obj.getRequestParameters() == null); + assertTrue(obj.getSubscriberInfo() == null); + + assertTrue(obj.getRelatedInstanceList() != null); + assertEquals(0, obj.getRelatedInstanceList().size()); + } + + @Test + public void testSetGet() { + SORequestDetails obj = new SORequestDetails(); + + SOCloudConfiguration cloudConfiguration = new SOCloudConfiguration(); + obj.setCloudConfiguration(cloudConfiguration); + assertEquals(cloudConfiguration, obj.getCloudConfiguration()); + + SOModelInfo modelInfo = new SOModelInfo(); + obj.setModelInfo(modelInfo); + assertEquals(modelInfo, obj.getModelInfo()); + + SORequestInfo requestInfo = new SORequestInfo(); + obj.setRequestInfo(requestInfo); + assertEquals(requestInfo, obj.getRequestInfo()); + + SORequestParameters requestParameters = new SORequestParameters(); + obj.setRequestParameters(requestParameters); + assertEquals(requestParameters, obj.getRequestParameters()); + + SOSubscriberInfo subscriberInfo = new SOSubscriberInfo(); + obj.setSubscriberInfo(subscriberInfo); + assertEquals(subscriberInfo, obj.getSubscriberInfo()); + } + + @Test + public void testSOMRequestDetailsMethods() { + SORequestDetails details = new SORequestDetails(); + assertNotNull(details); + assertNotEquals(0, details.hashCode()); + + SOCloudConfiguration cloudConfiguration = new SOCloudConfiguration(); + details.setCloudConfiguration(cloudConfiguration); + assertEquals(cloudConfiguration, details.getCloudConfiguration()); + assertNotEquals(0, details.hashCode()); + + SOModelInfo modelInfo = new SOModelInfo(); + details.setModelInfo(modelInfo); + assertEquals(modelInfo, details.getModelInfo()); + assertNotEquals(0, details.hashCode()); + + List<SORelatedInstanceListElement> relatedInstanceList = new ArrayList<>(); + details.setRelatedInstanceList(relatedInstanceList); + assertEquals(relatedInstanceList, details.getRelatedInstanceList()); + assertNotEquals(0, details.hashCode()); + + SORequestInfo requestInfo = new SORequestInfo(); + details.setRequestInfo(requestInfo); + assertEquals(requestInfo, details.getRequestInfo()); + assertNotEquals(0, details.hashCode()); + + SORequestParameters requestParameters = new SORequestParameters(); + details.setRequestParameters(requestParameters); + assertEquals(requestParameters, details.getRequestParameters()); + assertNotEquals(0, details.hashCode()); + + SOSubscriberInfo subscriberInfo = new SOSubscriberInfo(); + details.setSubscriberInfo(subscriberInfo); + assertEquals(subscriberInfo, details.getSubscriberInfo()); + assertNotEquals(0, details.hashCode()); + + assertEquals("SORequestDetails [modelInfo=org.onap.policy.so", details.toString().substring(0, 46)); + + SORequestDetails copiedDetails = new SORequestDetails(details); + + assertTrue(details.equals(details)); + assertTrue(details.equals(copiedDetails)); + assertFalse(details.equals(null)); + assertFalse(details.equals("Hello")); + + details.setCloudConfiguration(null); + assertFalse(details.equals(copiedDetails)); + copiedDetails.setCloudConfiguration(null); + assertTrue(details.equals(copiedDetails)); + details.setCloudConfiguration(cloudConfiguration); + assertFalse(details.equals(copiedDetails)); + copiedDetails.setCloudConfiguration(cloudConfiguration); + assertTrue(details.equals(copiedDetails)); + + details.setModelInfo(null); + assertFalse(details.equals(copiedDetails)); + copiedDetails.setModelInfo(null); + assertTrue(details.equals(copiedDetails)); + details.setModelInfo(modelInfo); + assertFalse(details.equals(copiedDetails)); + copiedDetails.setModelInfo(modelInfo); + assertTrue(details.equals(copiedDetails)); + + details.setRequestInfo(null); + assertFalse(details.equals(copiedDetails)); + copiedDetails.setRequestInfo(null); + assertTrue(details.equals(copiedDetails)); + details.setRequestInfo(requestInfo); + assertFalse(details.equals(copiedDetails)); + copiedDetails.setRequestInfo(requestInfo); + assertTrue(details.equals(copiedDetails)); + + details.setRequestParameters(null); + assertFalse(details.equals(copiedDetails)); + copiedDetails.setRequestParameters(null); + assertTrue(details.equals(copiedDetails)); + details.setRequestParameters(requestParameters); + assertFalse(details.equals(copiedDetails)); + copiedDetails.setRequestParameters(requestParameters); + assertTrue(details.equals(copiedDetails)); + + details.setSubscriberInfo(null); + assertFalse(details.equals(copiedDetails)); + copiedDetails.setSubscriberInfo(null); + assertTrue(details.equals(copiedDetails)); + details.setSubscriberInfo(subscriberInfo); + assertFalse(details.equals(copiedDetails)); + copiedDetails.setSubscriberInfo(subscriberInfo); + assertTrue(details.equals(copiedDetails)); + + details.setRelatedInstanceList(null); + assertFalse(details.equals(copiedDetails)); + copiedDetails.setRelatedInstanceList(null); + assertTrue(details.equals(copiedDetails)); + details.setRelatedInstanceList(relatedInstanceList); + assertFalse(details.equals(copiedDetails)); + copiedDetails.setRelatedInstanceList(relatedInstanceList); + assertTrue(details.equals(copiedDetails)); + } +} diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestError.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestError.java index 1108daf3d..a3c19cf41 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestError.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestError.java @@ -1,50 +1,50 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- *
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.so;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-public class TestSoRequestError {
-
- @Test
- public void testConstructor() {
- SORequestError obj = new SORequestError();
-
- assertTrue(obj.getPolicyException() == null);
- assertTrue(obj.getServiceException() == null);
- }
-
- @Test
- public void testSetGet() {
- SORequestError obj = new SORequestError();
-
- SOPolicyExceptionHolder policyException = new SOPolicyExceptionHolder();
- obj.setPolicyException(policyException);
- assertEquals(policyException, obj.getPolicyException());
-
- SOServiceExceptionHolder serviceException = new SOServiceExceptionHolder();
- obj.setServiceException(serviceException);
- assertEquals(serviceException, obj.getServiceException());
- }
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.so; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +public class TestSoRequestError { + + @Test + public void testConstructor() { + SORequestError obj = new SORequestError(); + + assertTrue(obj.getPolicyException() == null); + assertTrue(obj.getServiceException() == null); + } + + @Test + public void testSetGet() { + SORequestError obj = new SORequestError(); + + SOPolicyExceptionHolder policyException = new SOPolicyExceptionHolder(); + obj.setPolicyException(policyException); + assertEquals(policyException, obj.getPolicyException()); + + SOServiceExceptionHolder serviceException = new SOServiceExceptionHolder(); + obj.setServiceException(serviceException); + assertEquals(serviceException, obj.getServiceException()); + } +} diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestInfo.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestInfo.java index d1b7f247c..a77fe8bf4 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestInfo.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestInfo.java @@ -1,81 +1,81 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- *
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.so;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-public class TestSoRequestInfo {
-
- @Test
- public void testConstructor() {
- SORequestInfo obj = new SORequestInfo();
-
- assertTrue(obj.getBillingAccountNumber() == null);
- assertTrue(obj.getCallbackUrl() == null);
- assertTrue(obj.getCorrelator() == null);
- assertTrue(obj.getInstanceName() == null);
- assertTrue(obj.getOrderNumber() == null);
- assertTrue(obj.getOrderVersion() == null);
- assertTrue(obj.getProductFamilyId() == null);
- assertTrue(obj.getRequestorId() == null);
- assertTrue(obj.getSource() == null);
- assertTrue(obj.isSuppressRollback() == false);
- }
-
- @Test
- public void testSetGet() {
- SORequestInfo obj = new SORequestInfo();
-
- obj.setBillingAccountNumber("billingAccountNumber");
- assertEquals("billingAccountNumber", obj.getBillingAccountNumber());
-
- obj.setCallbackUrl("callbackUrl");
- assertEquals("callbackUrl", obj.getCallbackUrl());
-
- obj.setCorrelator("correlator");
- assertEquals("correlator", obj.getCorrelator());
-
- obj.setInstanceName("instanceName");
- assertEquals("instanceName", obj.getInstanceName());
-
- obj.setOrderNumber("orderNumber");
- assertEquals("orderNumber", obj.getOrderNumber());
-
- int orderVersion = 2008;
- obj.setOrderVersion(orderVersion);
- assertEquals((Integer) orderVersion, obj.getOrderVersion());
-
- obj.setProductFamilyId("productFamilyId");
- assertEquals("productFamilyId", obj.getProductFamilyId());
-
- obj.setRequestorId("requestorId");
- assertEquals("requestorId", obj.getRequestorId());
-
- obj.setSource("source");
- assertEquals("source", obj.getSource());
-
- obj.setSuppressRollback(true);
- assertEquals(true, obj.isSuppressRollback());
- }
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.so; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +public class TestSoRequestInfo { + + @Test + public void testConstructor() { + SORequestInfo obj = new SORequestInfo(); + + assertTrue(obj.getBillingAccountNumber() == null); + assertTrue(obj.getCallbackUrl() == null); + assertTrue(obj.getCorrelator() == null); + assertTrue(obj.getInstanceName() == null); + assertTrue(obj.getOrderNumber() == null); + assertTrue(obj.getOrderVersion() == null); + assertTrue(obj.getProductFamilyId() == null); + assertTrue(obj.getRequestorId() == null); + assertTrue(obj.getSource() == null); + assertTrue(obj.isSuppressRollback() == false); + } + + @Test + public void testSetGet() { + SORequestInfo obj = new SORequestInfo(); + + obj.setBillingAccountNumber("billingAccountNumber"); + assertEquals("billingAccountNumber", obj.getBillingAccountNumber()); + + obj.setCallbackUrl("callbackUrl"); + assertEquals("callbackUrl", obj.getCallbackUrl()); + + obj.setCorrelator("correlator"); + assertEquals("correlator", obj.getCorrelator()); + + obj.setInstanceName("instanceName"); + assertEquals("instanceName", obj.getInstanceName()); + + obj.setOrderNumber("orderNumber"); + assertEquals("orderNumber", obj.getOrderNumber()); + + int orderVersion = 2008; + obj.setOrderVersion(orderVersion); + assertEquals((Integer) orderVersion, obj.getOrderVersion()); + + obj.setProductFamilyId("productFamilyId"); + assertEquals("productFamilyId", obj.getProductFamilyId()); + + obj.setRequestorId("requestorId"); + assertEquals("requestorId", obj.getRequestorId()); + + obj.setSource("source"); + assertEquals("source", obj.getSource()); + + obj.setSuppressRollback(true); + assertEquals(true, obj.isSuppressRollback()); + } +} diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestParameters.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestParameters.java index cb32be531..1ebf5d76f 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestParameters.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestParameters.java @@ -1,46 +1,46 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- *
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.so;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-public class TestSoRequestParameters {
-
- @Test
- public void testConstructor() {
- SORequestParameters obj = new SORequestParameters();
-
- assertTrue(obj.getSubscriptionServiceType() == null);
- assertTrue(obj.getUserParams() != null);
- assertEquals(0, obj.getUserParams().size());
- }
-
- @Test
- public void testSetGet() {
- SORequestParameters obj = new SORequestParameters();
-
- obj.setSubscriptionServiceType("subscriptionServiceType");
- assertEquals("subscriptionServiceType", obj.getSubscriptionServiceType());
- }
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.so; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +public class TestSoRequestParameters { + + @Test + public void testConstructor() { + SORequestParameters obj = new SORequestParameters(); + + assertTrue(obj.getSubscriptionServiceType() == null); + assertTrue(obj.getUserParams() != null); + assertEquals(0, obj.getUserParams().size()); + } + + @Test + public void testSetGet() { + SORequestParameters obj = new SORequestParameters(); + + obj.setSubscriptionServiceType("subscriptionServiceType"); + assertEquals("subscriptionServiceType", obj.getSubscriptionServiceType()); + } +} diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestReferences.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestReferences.java index e212ba1c3..498a2e00b 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestReferences.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestReferences.java @@ -1,48 +1,48 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- *
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.so;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-public class TestSoRequestReferences {
-
- @Test
- public void testConstructor() {
- SORequestReferences obj = new SORequestReferences();
-
- assertTrue(obj.getInstanceId() == null);
- assertTrue(obj.getRequestId() == null);
- }
-
- @Test
- public void testSetGet() {
- SORequestReferences obj = new SORequestReferences();
-
- obj.setInstanceId("instanceId");
- assertEquals("instanceId", obj.getInstanceId());
-
- obj.setRequestId("requestId");
- assertEquals("requestId", obj.getRequestId());
- }
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.so; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +public class TestSoRequestReferences { + + @Test + public void testConstructor() { + SORequestReferences obj = new SORequestReferences(); + + assertTrue(obj.getInstanceId() == null); + assertTrue(obj.getRequestId() == null); + } + + @Test + public void testSetGet() { + SORequestReferences obj = new SORequestReferences(); + + obj.setInstanceId("instanceId"); + assertEquals("instanceId", obj.getInstanceId()); + + obj.setRequestId("requestId"); + assertEquals("requestId", obj.getRequestId()); + } +} diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestStatus.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestStatus.java index 9fa0b9741..1b8d745fd 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestStatus.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestStatus.java @@ -1,57 +1,57 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- *
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.so;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-public class TestSoRequestStatus {
-
- @Test
- public void testConstructor() {
- SORequestStatus obj = new SORequestStatus();
-
- assertEquals(0, obj.getPercentProgress());
- assertTrue(obj.getRequestState() == null);
- assertTrue(obj.getTimestamp() == null);
- assertFalse(obj.isWasRolledBack());
- }
-
- @Test
- public void testSetGet() {
- SORequestStatus obj = new SORequestStatus();
-
- obj.setPercentProgress(2008);
- assertEquals(2008, obj.getPercentProgress());
-
- obj.setRequestState("requestState");
- assertEquals("requestState", obj.getRequestState());
-
- obj.setTimestamp("timestamp");
- assertEquals("timestamp", obj.getTimestamp());
-
- obj.setWasRolledBack(true);
- assertTrue(obj.isWasRolledBack());
- }
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.so; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +public class TestSoRequestStatus { + + @Test + public void testConstructor() { + SORequestStatus obj = new SORequestStatus(); + + assertEquals(0, obj.getPercentProgress()); + assertTrue(obj.getRequestState() == null); + assertTrue(obj.getTimestamp() == null); + assertFalse(obj.isWasRolledBack()); + } + + @Test + public void testSetGet() { + SORequestStatus obj = new SORequestStatus(); + + obj.setPercentProgress(2008); + assertEquals(2008, obj.getPercentProgress()); + + obj.setRequestState("requestState"); + assertEquals("requestState", obj.getRequestState()); + + obj.setTimestamp("timestamp"); + assertEquals("timestamp", obj.getTimestamp()); + + obj.setWasRolledBack(true); + assertTrue(obj.isWasRolledBack()); + } +} diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoResponse.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoResponse.java index edac2fa0d..cf9a85e83 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoResponse.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoResponse.java @@ -1,59 +1,59 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- *
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.so;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-public class TestSoResponse {
-
- @Test
- public void testConstructor() {
- SOResponse obj = new SOResponse();
-
- assertEquals(0, obj.getHttpResponseCode());
- assertTrue(obj.getRequest() == null);
- assertTrue(obj.getRequestError() == null);
- assertTrue(obj.getRequestReferences() == null);
- }
-
- @Test
- public void testSetGet() {
- SOResponse obj = new SOResponse();
-
- obj.setHttpResponseCode(2008);
- assertEquals(2008, obj.getHttpResponseCode());
-
- SORequest request = new SORequest();
- obj.setRequest(request);
- assertEquals(request, obj.getRequest());
-
- SORequestError requestError = new SORequestError();
- obj.setRequestError(requestError);
- assertEquals(requestError, obj.getRequestError());
-
- SORequestReferences requestReferences = new SORequestReferences();
- obj.setRequestReferences(requestReferences);
- assertEquals(requestReferences, obj.getRequestReferences());
- }
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.so; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +public class TestSoResponse { + + @Test + public void testConstructor() { + SOResponse obj = new SOResponse(); + + assertEquals(0, obj.getHttpResponseCode()); + assertTrue(obj.getRequest() == null); + assertTrue(obj.getRequestError() == null); + assertTrue(obj.getRequestReferences() == null); + } + + @Test + public void testSetGet() { + SOResponse obj = new SOResponse(); + + obj.setHttpResponseCode(2008); + assertEquals(2008, obj.getHttpResponseCode()); + + SORequest request = new SORequest(); + obj.setRequest(request); + assertEquals(request, obj.getRequest()); + + SORequestError requestError = new SORequestError(); + obj.setRequestError(requestError); + assertEquals(requestError, obj.getRequestError()); + + SORequestReferences requestReferences = new SORequestReferences(); + obj.setRequestReferences(requestReferences); + assertEquals(requestReferences, obj.getRequestReferences()); + } +} diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoResponseWrapper.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoResponseWrapper.java index 7b4830125..860761a39 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoResponseWrapper.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoResponseWrapper.java @@ -1,106 +1,106 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- *
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.so;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
-
-import java.util.UUID;
-
-import org.junit.Test;
-
-public class TestSoResponseWrapper {
-
- @Test
- public void testConstructor() {
- SOResponse response = new SOResponse();
- SOResponseWrapper obj = new SOResponseWrapper(response, "reqID");
-
- assertEquals(response, obj.getSoResponse());
- assertEquals("reqID", obj.getRequestID());
- }
-
- @Test
- public void testSetGet() {
- SOResponse response = new SOResponse();
- SOResponseWrapper obj = new SOResponseWrapper(response, "reqID");
-
- SOResponse response2 = new SOResponse();
- response2.setHttpResponseCode(2008);
- obj.setSoResponse(response2);
- assertEquals(response2, obj.getSoResponse());
-
- obj.setRequestID("id2");
- assertEquals("id2", obj.getRequestID());
- }
-
- @SuppressWarnings("unlikely-arg-type")
- @Test
- public void testSOResponseWrapperMethods() {
- String requestID = UUID.randomUUID().toString();
- SOResponse response = new SOResponse();
-
- SOResponseWrapper responseWrapper = new SOResponseWrapper(response, requestID);
- assertNotNull(responseWrapper);
- assertNotEquals(0, responseWrapper.hashCode());
-
- assertEquals(response, responseWrapper.getSoResponse());
-
- assertNotEquals(0, responseWrapper.hashCode());
-
- assertEquals("SOResponseWrapper [SOResponse=org.onap.policy.", responseWrapper.toString().substring(0, 46));
-
- SOResponseWrapper identicalResponseWrapper = new SOResponseWrapper(response, requestID);
-
- assertEquals(responseWrapper, responseWrapper);
- assertEquals(responseWrapper, identicalResponseWrapper);
- assertNotEquals(null, responseWrapper);
- assertNotEquals("Hello", responseWrapper);
- assertFalse(responseWrapper.equals(null));
- assertFalse(responseWrapper.equals("AString"));
-
- assertEquals(new SOResponseWrapper(null, null), new SOResponseWrapper(null, null));
- assertNotEquals(new SOResponseWrapper(null, null), identicalResponseWrapper);
-
- assertNotEquals(0, new SOResponseWrapper(null, null).hashCode());
-
- identicalResponseWrapper.setSoResponse(new SOResponse());
- assertNotEquals(responseWrapper, identicalResponseWrapper);
- identicalResponseWrapper.setSoResponse(response);
- assertEquals(responseWrapper, identicalResponseWrapper);
-
- identicalResponseWrapper.setRequestID(UUID.randomUUID().toString());
- assertNotEquals(responseWrapper, identicalResponseWrapper);
- identicalResponseWrapper.setRequestID(requestID);
- assertEquals(responseWrapper, identicalResponseWrapper);
-
- responseWrapper.setRequestID(null);
- assertNotEquals(responseWrapper, identicalResponseWrapper);
- identicalResponseWrapper.setRequestID(null);
- assertEquals(responseWrapper, identicalResponseWrapper);
- responseWrapper.setRequestID(requestID);
- assertNotEquals(responseWrapper, identicalResponseWrapper);
- identicalResponseWrapper.setRequestID(requestID);
- assertEquals(responseWrapper, identicalResponseWrapper);
- }
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.so; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotEquals; +import static org.junit.Assert.assertNotNull; + +import java.util.UUID; + +import org.junit.Test; + +public class TestSoResponseWrapper { + + @Test + public void testConstructor() { + SOResponse response = new SOResponse(); + SOResponseWrapper obj = new SOResponseWrapper(response, "reqID"); + + assertEquals(response, obj.getSoResponse()); + assertEquals("reqID", obj.getRequestID()); + } + + @Test + public void testSetGet() { + SOResponse response = new SOResponse(); + SOResponseWrapper obj = new SOResponseWrapper(response, "reqID"); + + SOResponse response2 = new SOResponse(); + response2.setHttpResponseCode(2008); + obj.setSoResponse(response2); + assertEquals(response2, obj.getSoResponse()); + + obj.setRequestID("id2"); + assertEquals("id2", obj.getRequestID()); + } + + @SuppressWarnings("unlikely-arg-type") + @Test + public void testSOResponseWrapperMethods() { + String requestID = UUID.randomUUID().toString(); + SOResponse response = new SOResponse(); + + SOResponseWrapper responseWrapper = new SOResponseWrapper(response, requestID); + assertNotNull(responseWrapper); + assertNotEquals(0, responseWrapper.hashCode()); + + assertEquals(response, responseWrapper.getSoResponse()); + + assertNotEquals(0, responseWrapper.hashCode()); + + assertEquals("SOResponseWrapper [SOResponse=org.onap.policy.", responseWrapper.toString().substring(0, 46)); + + SOResponseWrapper identicalResponseWrapper = new SOResponseWrapper(response, requestID); + + assertEquals(responseWrapper, responseWrapper); + assertEquals(responseWrapper, identicalResponseWrapper); + assertNotEquals(null, responseWrapper); + assertNotEquals("Hello", responseWrapper); + assertFalse(responseWrapper.equals(null)); + assertFalse(responseWrapper.equals("AString")); + + assertEquals(new SOResponseWrapper(null, null), new SOResponseWrapper(null, null)); + assertNotEquals(new SOResponseWrapper(null, null), identicalResponseWrapper); + + assertNotEquals(0, new SOResponseWrapper(null, null).hashCode()); + + identicalResponseWrapper.setSoResponse(new SOResponse()); + assertNotEquals(responseWrapper, identicalResponseWrapper); + identicalResponseWrapper.setSoResponse(response); + assertEquals(responseWrapper, identicalResponseWrapper); + + identicalResponseWrapper.setRequestID(UUID.randomUUID().toString()); + assertNotEquals(responseWrapper, identicalResponseWrapper); + identicalResponseWrapper.setRequestID(requestID); + assertEquals(responseWrapper, identicalResponseWrapper); + + responseWrapper.setRequestID(null); + assertNotEquals(responseWrapper, identicalResponseWrapper); + identicalResponseWrapper.setRequestID(null); + assertEquals(responseWrapper, identicalResponseWrapper); + responseWrapper.setRequestID(requestID); + assertNotEquals(responseWrapper, identicalResponseWrapper); + identicalResponseWrapper.setRequestID(requestID); + assertEquals(responseWrapper, identicalResponseWrapper); + } +} diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoServiceExceptionHolder.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoServiceExceptionHolder.java index 877ea7146..7c802efaf 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoServiceExceptionHolder.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoServiceExceptionHolder.java @@ -1,50 +1,50 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- *
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.so;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-public class TestSoServiceExceptionHolder {
-
- @Test
- public void testConstructor() {
- SOServiceExceptionHolder obj = new SOServiceExceptionHolder();
-
- assertTrue(obj.getMessageId() == null);
- assertTrue(obj.getText() == null);
- assertTrue(obj.getVariables() != null);
- assertEquals(0, obj.getVariables().size());
- }
-
- @Test
- public void testSetGet() {
- SOServiceExceptionHolder obj = new SOServiceExceptionHolder();
-
- obj.setMessageId("messageId");
- assertEquals("messageId", obj.getMessageId());
-
- obj.setText("text");
- assertEquals("text", obj.getText());
- }
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.so; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +public class TestSoServiceExceptionHolder { + + @Test + public void testConstructor() { + SOServiceExceptionHolder obj = new SOServiceExceptionHolder(); + + assertTrue(obj.getMessageId() == null); + assertTrue(obj.getText() == null); + assertTrue(obj.getVariables() != null); + assertEquals(0, obj.getVariables().size()); + } + + @Test + public void testSetGet() { + SOServiceExceptionHolder obj = new SOServiceExceptionHolder(); + + obj.setMessageId("messageId"); + assertEquals("messageId", obj.getMessageId()); + + obj.setText("text"); + assertEquals("text", obj.getText()); + } +} diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoSubscriberInfo.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoSubscriberInfo.java index 0bff38c5c..b0662fa30 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoSubscriberInfo.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoSubscriberInfo.java @@ -1,52 +1,52 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- *
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.so;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-public class TestSoSubscriberInfo {
-
- @Test
- public void testConstructor() {
- SOSubscriberInfo obj = new SOSubscriberInfo();
-
- assertTrue(obj.getGlobalSubscriberId() == null);
- assertTrue(obj.getSubscriberCommonSiteId() == null);
- assertTrue(obj.getSubscriberName() == null);
- }
-
- @Test
- public void testSetGet() {
- SOSubscriberInfo obj = new SOSubscriberInfo();
-
- obj.setGlobalSubscriberId("globalSubscriberId");
- assertEquals("globalSubscriberId", obj.getGlobalSubscriberId());
-
- obj.setSubscriberCommonSiteId("subscriberCommonSiteId");
- assertEquals("subscriberCommonSiteId", obj.getSubscriberCommonSiteId());
-
- obj.setSubscriberName("subscriberName");
- assertEquals("subscriberName", obj.getSubscriberName());
- }
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.so; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +public class TestSoSubscriberInfo { + + @Test + public void testConstructor() { + SOSubscriberInfo obj = new SOSubscriberInfo(); + + assertTrue(obj.getGlobalSubscriberId() == null); + assertTrue(obj.getSubscriberCommonSiteId() == null); + assertTrue(obj.getSubscriberName() == null); + } + + @Test + public void testSetGet() { + SOSubscriberInfo obj = new SOSubscriberInfo(); + + obj.setGlobalSubscriberId("globalSubscriberId"); + assertEquals("globalSubscriberId", obj.getGlobalSubscriberId()); + + obj.setSubscriberCommonSiteId("subscriberCommonSiteId"); + assertEquals("subscriberCommonSiteId", obj.getSubscriberCommonSiteId()); + + obj.setSubscriberName("subscriberName"); + assertEquals("subscriberName", obj.getSubscriberName()); + } +} diff --git a/controlloop/common/model-impl/trafficgenerator/pom.xml b/controlloop/common/model-impl/trafficgenerator/pom.xml index fcf9893bb..975614e15 100644 --- a/controlloop/common/model-impl/trafficgenerator/pom.xml +++ b/controlloop/common/model-impl/trafficgenerator/pom.xml @@ -21,26 +21,26 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> - <artifactId>trafficgenerator</artifactId> + <parent> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>model-impl</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> - <parent> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>model-impl</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> + <artifactId>trafficgenerator</artifactId> <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>com.google.code.gson</groupId> - <artifactId>gson</artifactId> - <version>2.5</version> - <scope>provided</scope> - </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>2.5</version> + <scope>provided</scope> + </dependency> </dependencies> </project> diff --git a/controlloop/common/model-impl/vfc/pom.xml b/controlloop/common/model-impl/vfc/pom.xml index ffd45cf9e..913fe7881 100644 --- a/controlloop/common/model-impl/vfc/pom.xml +++ b/controlloop/common/model-impl/vfc/pom.xml @@ -17,51 +17,51 @@ --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> + <modelVersion>4.0.0</modelVersion> - <artifactId>vfc</artifactId> + <parent> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>model-impl</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> - <parent> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>model-impl</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> + <artifactId>vfc</artifactId> - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.mockito</groupId> - <artifactId>mockito-core</artifactId> - <version>2.13.0</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>com.google.code.gson</groupId> - <artifactId>gson</artifactId> - <version>2.5</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>rest</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.drools</groupId> - <artifactId>drools-core</artifactId> - <version>6.5.0.Final</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-pdp</groupId> - <artifactId>policy-management</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - </dependencies> + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-core</artifactId> + <version>2.13.0</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>2.5</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>rest</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.drools</groupId> + <artifactId>drools-core</artifactId> + <version>6.5.0.Final</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-pdp</groupId> + <artifactId>policy-management</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + </dependencies> </project> diff --git a/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealActionVmInfo.java b/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealActionVmInfo.java index dd1ccfdd5..a8004203e 100644 --- a/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealActionVmInfo.java +++ b/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealActionVmInfo.java @@ -1,54 +1,54 @@ -/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2017 Intel Corp. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.vfc;
-
-import java.io.Serializable;
-
-import com.google.gson.annotations.SerializedName;
-
-public class VFCHealActionVmInfo implements Serializable {
-
+/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2017 Intel Corp. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.vfc; + +import java.io.Serializable; + +import com.google.gson.annotations.SerializedName; + +public class VFCHealActionVmInfo implements Serializable { + private static final long serialVersionUID = 3208673205100673119L; -
- @SerializedName("vmid")
- private String vmid;
-
- @SerializedName("vmname")
- private String vmname;
-
- public VFCHealActionVmInfo() {
- // Default constructor for VFCHealActionVmInfo
- }
-
- public String getVmid() {
- return vmid;
- }
-
- public void setVmid(String vmid) {
- this.vmid = vmid;
- }
-
- public String getVmname() {
- return vmname;
- }
-
- public void setVmname(String vmname) {
- this.vmname = vmname;
- }
-}
+ + @SerializedName("vmid") + private String vmid; + + @SerializedName("vmname") + private String vmname; + + public VFCHealActionVmInfo() { + // Default constructor for VFCHealActionVmInfo + } + + public String getVmid() { + return vmid; + } + + public void setVmid(String vmid) { + this.vmid = vmid; + } + + public String getVmname() { + return vmname; + } + + public void setVmname(String vmname) { + this.vmname = vmname; + } +} diff --git a/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealAdditionalParams.java b/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealAdditionalParams.java index 4ffdb5b31..5c7555383 100644 --- a/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealAdditionalParams.java +++ b/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealAdditionalParams.java @@ -1,54 +1,54 @@ -/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2017 Intel Corp. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.vfc;
-
-import java.io.Serializable;
-
-import com.google.gson.annotations.SerializedName;
-
-public class VFCHealAdditionalParams implements Serializable {
-
+/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2017 Intel Corp. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.vfc; + +import java.io.Serializable; + +import com.google.gson.annotations.SerializedName; + +public class VFCHealAdditionalParams implements Serializable { + private static final long serialVersionUID = 2656694137285096191L; -
- @SerializedName("action")
- private String action;
-
- @SerializedName("actionvminfo")
- private VFCHealActionVmInfo actionInfo;
-
- public VFCHealAdditionalParams() {
- // Default constructor for VFCHealAdditionalParams
- }
-
- public String getAction() {
- return action;
- }
-
- public void setAction(String action) {
- this.action = action;
- }
-
- public VFCHealActionVmInfo getActionInfo() {
- return actionInfo;
- }
-
- public void setActionInfo(VFCHealActionVmInfo actionInfo) {
- this.actionInfo = actionInfo;
- }
-}
+ + @SerializedName("action") + private String action; + + @SerializedName("actionvminfo") + private VFCHealActionVmInfo actionInfo; + + public VFCHealAdditionalParams() { + // Default constructor for VFCHealAdditionalParams + } + + public String getAction() { + return action; + } + + public void setAction(String action) { + this.action = action; + } + + public VFCHealActionVmInfo getActionInfo() { + return actionInfo; + } + + public void setActionInfo(VFCHealActionVmInfo actionInfo) { + this.actionInfo = actionInfo; + } +} diff --git a/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealRequest.java b/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealRequest.java index 787e341de..11ea495a8 100644 --- a/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealRequest.java +++ b/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealRequest.java @@ -1,65 +1,65 @@ -/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2017 Intel Corp. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.vfc;
-
-import java.io.Serializable;
-
-import com.google.gson.annotations.SerializedName;
-
-public class VFCHealRequest implements Serializable {
-
+/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2017 Intel Corp. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.vfc; + +import java.io.Serializable; + +import com.google.gson.annotations.SerializedName; + +public class VFCHealRequest implements Serializable { + private static final long serialVersionUID = -7341931593089709247L; -
- @SerializedName("vnfInstanceId")
- private String vnfInstanceId;
-
- @SerializedName("cause")
- private String cause;
-
- @SerializedName("additionalParams")
- private VFCHealAdditionalParams additionalParams;
-
- public VFCHealRequest() {
- // Default constructor for VFCHealRequest
- }
-
- public String getVnfInstanceId() {
- return vnfInstanceId;
- }
-
- public void setVnfInstanceId(String vnfInstanceId) {
- this.vnfInstanceId = vnfInstanceId;
- }
-
- public String getCause() {
- return cause;
- }
-
- public void setCause(String cause) {
- this.cause = cause;
- }
-
- public VFCHealAdditionalParams getAdditionalParams() {
- return additionalParams;
- }
-
- public void setAdditionalParams(VFCHealAdditionalParams additionalParams) {
- this.additionalParams = additionalParams;
- }
-}
+ + @SerializedName("vnfInstanceId") + private String vnfInstanceId; + + @SerializedName("cause") + private String cause; + + @SerializedName("additionalParams") + private VFCHealAdditionalParams additionalParams; + + public VFCHealRequest() { + // Default constructor for VFCHealRequest + } + + public String getVnfInstanceId() { + return vnfInstanceId; + } + + public void setVnfInstanceId(String vnfInstanceId) { + this.vnfInstanceId = vnfInstanceId; + } + + public String getCause() { + return cause; + } + + public void setCause(String cause) { + this.cause = cause; + } + + public VFCHealAdditionalParams getAdditionalParams() { + return additionalParams; + } + + public void setAdditionalParams(VFCHealAdditionalParams additionalParams) { + this.additionalParams = additionalParams; + } +} diff --git a/controlloop/common/msb/pom.xml b/controlloop/common/msb/pom.xml index a24f333b6..1a839263f 100644 --- a/controlloop/common/msb/pom.xml +++ b/controlloop/common/msb/pom.xml @@ -2,56 +2,58 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <parent> - <artifactId>common</artifactId> - <groupId>org.onap.policy.drools-applications</groupId> - <version>1.2.0-SNAPSHOT</version> - </parent> - <modelVersion>4.0.0</modelVersion> + <modelVersion>4.0.0</modelVersion> - <artifactId>msb</artifactId> - <dependencies> - <dependency> - <groupId>org.onap.msb.java-sdk</groupId> - <artifactId>msb-java-sdk</artifactId> - <version>1.0.0</version> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.powermock</groupId> - <artifactId>powermock-module-junit4</artifactId> - <version>1.6.5</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.powermock</groupId> - <artifactId>powermock-api-mockito</artifactId> - <version>1.6.5</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>ch.qos.logback</groupId> - <artifactId>logback-classic</artifactId> - <version>1.2.3</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>ch.qos.logback</groupId> - <artifactId>logback-core</artifactId> - <version>1.2.3</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.common</groupId> - <artifactId>utils-test</artifactId> - <version>${project.version}</version> - <scope>test</scope> - </dependency> - </dependencies> + <parent> + <groupId>org.onap.policy.drools-applications.controlloop.common</groupId> + <artifactId>common</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> + + <artifactId>msb</artifactId> + + <dependencies> + <dependency> + <groupId>org.onap.msb.java-sdk</groupId> + <artifactId>msb-java-sdk</artifactId> + <version>1.0.0</version> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.powermock</groupId> + <artifactId>powermock-module-junit4</artifactId> + <version>1.6.5</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.powermock</groupId> + <artifactId>powermock-api-mockito</artifactId> + <version>1.6.5</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-classic</artifactId> + <version>1.2.3</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-core</artifactId> + <version>1.2.3</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.common</groupId> + <artifactId>utils-test</artifactId> + <version>${project.version}</version> + <scope>test</scope> + </dependency> + </dependencies> </project> diff --git a/controlloop/common/policy-yaml/pom.xml b/controlloop/common/policy-yaml/pom.xml index d0451c443..6e4f5997c 100644 --- a/controlloop/common/policy-yaml/pom.xml +++ b/controlloop/common/policy-yaml/pom.xml @@ -1,64 +1,66 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>common</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> - <artifactId>policy-yaml</artifactId> - - <dependencies> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-api</artifactId> - <version>1.7.25</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>ch.qos.logback</groupId> - <artifactId>logback-classic</artifactId> - <version>1.2.3</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.yaml</groupId> - <artifactId>snakeyaml</artifactId> - <version>1.17</version> - </dependency> - <dependency> - <groupId>org.jgrapht</groupId> - <artifactId>jgrapht-core</artifactId> - <version>0.9.2</version> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>sdc</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>aai</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>com.google.guava</groupId> - <artifactId>guava</artifactId> - <version>19.0</version> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.common</groupId> - <artifactId>utils-test</artifactId> - <version>${project.version}</version> - <scope>test</scope> - </dependency> - </dependencies> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.onap.policy.drools-applications.controlloop.common</groupId> + <artifactId>common</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> + + <artifactId>policy-yaml</artifactId> + + <dependencies> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <version>1.7.25</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-classic</artifactId> + <version>1.2.3</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.yaml</groupId> + <artifactId>snakeyaml</artifactId> + <version>1.17</version> + </dependency> + <dependency> + <groupId>org.jgrapht</groupId> + <artifactId>jgrapht-core</artifactId> + <version>0.9.2</version> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>sdc</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>aai</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>com.google.guava</groupId> + <artifactId>guava</artifactId> + <version>19.0</version> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.common</groupId> + <artifactId>utils-test</artifactId> + <version>${project.version}</version> + <scope>test</scope> + </dependency> + </dependencies> </project> diff --git a/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/Constraint.java b/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/Constraint.java index 96c277b26..3ebf7013e 100644 --- a/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/Constraint.java +++ b/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/Constraint.java @@ -1,162 +1,162 @@ -/*-
- * ============LICENSE_START=======================================================
- * policy-yaml
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.controlloop.policy.guard;
-
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-public class Constraint {
-
- private Integer freqLimitPerTarget;
- private Map<String,String> timeWindow;
- private Map<String, String> activeTimeRange;
-
- private List<String> blacklist;
-
- public Constraint() {
- // Do Nothing empty constructor.
- }
-
- public Integer getFreq_limit_per_target() {
- return freqLimitPerTarget;
- }
-
-
- public void setFreq_limit_per_target(Integer freqLimitPerTarget) {
- this.freqLimitPerTarget = freqLimitPerTarget;
- }
-
-
- public Map<String, String> getTime_window() {
- return timeWindow;
- }
-
-
- public void setTime_window(Map<String, String> timeWindow) {
- this.timeWindow = timeWindow;
- }
-
-
- public Map<String, String> getActive_time_range() {
- return activeTimeRange;
- }
-
-
- public void setActive_time_range(Map<String, String> activeTimeRange) {
- this.activeTimeRange = activeTimeRange;
- }
-
-
- public List<String> getBlacklist() {
- return blacklist;
- }
-
- public void setBlacklist(List<String> blacklist) {
- this.blacklist = blacklist;
- }
-
- public Constraint(Integer freqLimitPerTarget, Map<String, String> timeWindow) {
- this.freqLimitPerTarget = freqLimitPerTarget;
- if(timeWindow!=null){
- this.timeWindow = Collections.unmodifiableMap(timeWindow);
- }
- }
-
- public Constraint(List<String> blacklist) {
- this.blacklist = new LinkedList<>(blacklist);
- }
-
- public Constraint(Integer freqLimitPerTarget, Map<String, String> timeWindow, List<String> blacklist) {
- this.freqLimitPerTarget = freqLimitPerTarget;
- this.timeWindow = Collections.unmodifiableMap(timeWindow);
- this.blacklist = new LinkedList<>(blacklist);
- }
-
- public Constraint(Integer freqLimitPerTarget, Map<String, String> timeWindow, Map<String, String> activeTimeRange) {
- this(freqLimitPerTarget, timeWindow);
- if (activeTimeRange != null) {
- this.activeTimeRange = Collections.unmodifiableMap(activeTimeRange);
- }
- }
-
- public Constraint(Integer freqLimitPerTarget, Map<String, String> timeWindow, Map<String, String> activeTimeRange, List<String> blacklist) {
- this(freqLimitPerTarget, timeWindow);
- if (activeTimeRange != null) {
- this.activeTimeRange = Collections.unmodifiableMap(activeTimeRange);
- }
- if(blacklist!=null){
- this.blacklist = new LinkedList<>(blacklist);
- }
- }
-
- public Constraint(Constraint constraint) {
- this.freqLimitPerTarget = constraint.freqLimitPerTarget;
- this.timeWindow = constraint.timeWindow;
- if (constraint.activeTimeRange != null) {
- this.activeTimeRange = Collections.unmodifiableMap(constraint.activeTimeRange);
- }
- this.blacklist = new LinkedList<>(constraint.blacklist);
- }
-
- public boolean isValid() {
- return ((freqLimitPerTarget == null && timeWindow != null)|| (timeWindow == null && freqLimitPerTarget != null))? false : true;
- }
-
- @Override
- public String toString() {
- return "Constraint [freq_limit_per_target=" + freqLimitPerTarget + ", time_window=" + timeWindow + ", active_time_range=" + activeTimeRange + ", blacklist=" + blacklist + "]";
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((freqLimitPerTarget == null) ? 0 : freqLimitPerTarget.hashCode());
- result = prime * result + ((timeWindow == null) ? 0 : timeWindow.hashCode());
- result = prime * result + ((activeTimeRange == null) ? 0 : activeTimeRange.hashCode());
- result = prime * result + ((blacklist == null) ? 0 : blacklist.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- Constraint other = (Constraint) obj;
- return equalsMayBeNull(freqLimitPerTarget, other.freqLimitPerTarget)
- && equalsMayBeNull(timeWindow, other.timeWindow)
- && equalsMayBeNull(activeTimeRange, other.activeTimeRange)
- && equalsMayBeNull(blacklist, other.blacklist);
- }
-
- private boolean equalsMayBeNull(final Object obj1, final Object obj2){
- if ( obj1 == null ) {
- return obj2 == null;
- }
- return obj1.equals(obj2);
- }
-}
+/*- + * ============LICENSE_START======================================================= + * policy-yaml + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.controlloop.policy.guard; + +import java.util.Collections; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +public class Constraint { + + private Integer freqLimitPerTarget; + private Map<String,String> timeWindow; + private Map<String, String> activeTimeRange; + + private List<String> blacklist; + + public Constraint() { + // Do Nothing empty constructor. + } + + public Integer getFreq_limit_per_target() { + return freqLimitPerTarget; + } + + + public void setFreq_limit_per_target(Integer freqLimitPerTarget) { + this.freqLimitPerTarget = freqLimitPerTarget; + } + + + public Map<String, String> getTime_window() { + return timeWindow; + } + + + public void setTime_window(Map<String, String> timeWindow) { + this.timeWindow = timeWindow; + } + + + public Map<String, String> getActive_time_range() { + return activeTimeRange; + } + + + public void setActive_time_range(Map<String, String> activeTimeRange) { + this.activeTimeRange = activeTimeRange; + } + + + public List<String> getBlacklist() { + return blacklist; + } + + public void setBlacklist(List<String> blacklist) { + this.blacklist = blacklist; + } + + public Constraint(Integer freqLimitPerTarget, Map<String, String> timeWindow) { + this.freqLimitPerTarget = freqLimitPerTarget; + if(timeWindow!=null){ + this.timeWindow = Collections.unmodifiableMap(timeWindow); + } + } + + public Constraint(List<String> blacklist) { + this.blacklist = new LinkedList<>(blacklist); + } + + public Constraint(Integer freqLimitPerTarget, Map<String, String> timeWindow, List<String> blacklist) { + this.freqLimitPerTarget = freqLimitPerTarget; + this.timeWindow = Collections.unmodifiableMap(timeWindow); + this.blacklist = new LinkedList<>(blacklist); + } + + public Constraint(Integer freqLimitPerTarget, Map<String, String> timeWindow, Map<String, String> activeTimeRange) { + this(freqLimitPerTarget, timeWindow); + if (activeTimeRange != null) { + this.activeTimeRange = Collections.unmodifiableMap(activeTimeRange); + } + } + + public Constraint(Integer freqLimitPerTarget, Map<String, String> timeWindow, Map<String, String> activeTimeRange, List<String> blacklist) { + this(freqLimitPerTarget, timeWindow); + if (activeTimeRange != null) { + this.activeTimeRange = Collections.unmodifiableMap(activeTimeRange); + } + if(blacklist!=null){ + this.blacklist = new LinkedList<>(blacklist); + } + } + + public Constraint(Constraint constraint) { + this.freqLimitPerTarget = constraint.freqLimitPerTarget; + this.timeWindow = constraint.timeWindow; + if (constraint.activeTimeRange != null) { + this.activeTimeRange = Collections.unmodifiableMap(constraint.activeTimeRange); + } + this.blacklist = new LinkedList<>(constraint.blacklist); + } + + public boolean isValid() { + return ((freqLimitPerTarget == null && timeWindow != null)|| (timeWindow == null && freqLimitPerTarget != null))? false : true; + } + + @Override + public String toString() { + return "Constraint [freq_limit_per_target=" + freqLimitPerTarget + ", time_window=" + timeWindow + ", active_time_range=" + activeTimeRange + ", blacklist=" + blacklist + "]"; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((freqLimitPerTarget == null) ? 0 : freqLimitPerTarget.hashCode()); + result = prime * result + ((timeWindow == null) ? 0 : timeWindow.hashCode()); + result = prime * result + ((activeTimeRange == null) ? 0 : activeTimeRange.hashCode()); + result = prime * result + ((blacklist == null) ? 0 : blacklist.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + Constraint other = (Constraint) obj; + return equalsMayBeNull(freqLimitPerTarget, other.freqLimitPerTarget) + && equalsMayBeNull(timeWindow, other.timeWindow) + && equalsMayBeNull(activeTimeRange, other.activeTimeRange) + && equalsMayBeNull(blacklist, other.blacklist); + } + + private boolean equalsMayBeNull(final Object obj1, final Object obj2){ + if ( obj1 == null ) { + return obj2 == null; + } + return obj1.equals(obj2); + } +} diff --git a/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/ControlLoopGuard.java b/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/ControlLoopGuard.java index 7c90801ec..6fb0ca9f0 100644 --- a/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/ControlLoopGuard.java +++ b/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/ControlLoopGuard.java @@ -1,93 +1,93 @@ -/*-
- * ============LICENSE_START=======================================================
- * policy-yaml
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.controlloop.policy.guard;
-
-import java.util.LinkedList;
-
-public class ControlLoopGuard {
-
- private Guard guard;
-
- private LinkedList<GuardPolicy> guards;
-
- public ControlLoopGuard() {
- //DO Nothing Empty Constructor
- }
-
- public Guard getGuard() {
- return guard;
- }
-
- public void setGuard(Guard guard) {
- this.guard = guard;
- }
-
- public LinkedList<GuardPolicy> getGuards() {
- return guards;
- }
-
- public void setGuards(LinkedList<GuardPolicy> guards) {
- this.guards = guards;
- }
-
- public ControlLoopGuard(ControlLoopGuard cLGuard) {
- this.guard = new Guard();
- this.guards = new LinkedList<>(cLGuard.guards);
- }
-
- @Override
- public String toString() {
- return "Guard [guard=" + guard + ", GuardPolicies=" + guards + "]";
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((guard == null) ? 0 : guard.hashCode());
- result = prime * result + ((guards == null) ? 0 : guards.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- ControlLoopGuard other = (ControlLoopGuard) obj;
- if (guard == null) {
- if (other.guard != null)
- return false;
- } else if (!guard.equals(other.guard))
- return false;
- if (guards == null) {
- if (other.guards != null)
- return false;
- } else if (!guards.equals(other.guards))
- return false;
- return true;
- }
-
-
-}
+/*- + * ============LICENSE_START======================================================= + * policy-yaml + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.controlloop.policy.guard; + +import java.util.LinkedList; + +public class ControlLoopGuard { + + private Guard guard; + + private LinkedList<GuardPolicy> guards; + + public ControlLoopGuard() { + //DO Nothing Empty Constructor + } + + public Guard getGuard() { + return guard; + } + + public void setGuard(Guard guard) { + this.guard = guard; + } + + public LinkedList<GuardPolicy> getGuards() { + return guards; + } + + public void setGuards(LinkedList<GuardPolicy> guards) { + this.guards = guards; + } + + public ControlLoopGuard(ControlLoopGuard cLGuard) { + this.guard = new Guard(); + this.guards = new LinkedList<>(cLGuard.guards); + } + + @Override + public String toString() { + return "Guard [guard=" + guard + ", GuardPolicies=" + guards + "]"; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((guard == null) ? 0 : guard.hashCode()); + result = prime * result + ((guards == null) ? 0 : guards.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + ControlLoopGuard other = (ControlLoopGuard) obj; + if (guard == null) { + if (other.guard != null) + return false; + } else if (!guard.equals(other.guard)) + return false; + if (guards == null) { + if (other.guards != null) + return false; + } else if (!guards.equals(other.guards)) + return false; + return true; + } + + +} diff --git a/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/Guard.java b/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/Guard.java index dedc9a076..291004611 100644 --- a/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/Guard.java +++ b/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/Guard.java @@ -1,68 +1,68 @@ -/*-
- * ============LICENSE_START=======================================================
- * policy-yaml
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.controlloop.policy.guard;
-
-public class Guard {
-
- private static final String DEFAULTVERSION = "2.0.0";
-
- private String version = DEFAULTVERSION;
-
- public Guard() {
- //DO Nothing empty Constructor.
- }
-
- public String getVersion() {
- return version;
- }
-
- public void setVersion(String version) {
- this.version = version;
- }
-
- @Override
- public String toString() {
- return "Guard [version=" + version + "]";
- }
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((version == null) ? 0 : version.hashCode());
- return result;
- }
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- Guard other = (Guard) obj;
- if (version == null) {
- if (other.version != null)
- return false;
- } else if (!version.equals(other.version))
- return false;
- return true;
- }
-}
+/*- + * ============LICENSE_START======================================================= + * policy-yaml + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.controlloop.policy.guard; + +public class Guard { + + private static final String DEFAULTVERSION = "2.0.0"; + + private String version = DEFAULTVERSION; + + public Guard() { + //DO Nothing empty Constructor. + } + + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + @Override + public String toString() { + return "Guard [version=" + version + "]"; + } + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((version == null) ? 0 : version.hashCode()); + return result; + } + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + Guard other = (Guard) obj; + if (version == null) { + if (other.version != null) + return false; + } else if (!version.equals(other.version)) + return false; + return true; + } +} diff --git a/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/GuardPolicy.java b/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/GuardPolicy.java index 16a384a56..c45014c3c 100644 --- a/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/GuardPolicy.java +++ b/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/GuardPolicy.java @@ -1,165 +1,165 @@ -/*-
- * ============LICENSE_START=======================================================
- * policy-yaml
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.controlloop.policy.guard;
-
-import java.util.LinkedList;
-import java.util.List;
-import java.util.UUID;
-
-public class GuardPolicy {
-
- private String id = UUID.randomUUID().toString();
- private String name;
- private String description;
- private MatchParameters matchParameters;
- private LinkedList<Constraint> limitConstraints;
-
- public GuardPolicy() {
- //Do Nothing Empty Constructor.
- }
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public MatchParameters getMatch_parameters() {
- return matchParameters;
- }
-
- public void setMatch_parameters(MatchParameters matchParameters) {
- this.matchParameters = matchParameters;
- }
-
- public LinkedList<Constraint> getLimit_constraints() {
- return limitConstraints;
- }
-
- public void setLimit_constraints(LinkedList<Constraint> limitConstraints) {
- this.limitConstraints = limitConstraints;
- }
-
- public GuardPolicy(String id) {
- this.id = id;
- }
-
- public GuardPolicy(String name, MatchParameters matchParameters) {
- this.name = name;
- this.matchParameters = matchParameters;
- }
-
- public GuardPolicy(String id, String name, String description, MatchParameters matchParameters) {
- this(name, matchParameters);
- this.id = id;
- this.description = description;
- }
-
- public GuardPolicy(String name, MatchParameters matchParameters, List<Constraint> limitConstraints) {
- this(name, matchParameters);
- if (limitConstraints != null) {
- this.limitConstraints = (LinkedList<Constraint>) limitConstraints;
- }
- }
-
- public GuardPolicy(String name, String description, MatchParameters matchParameters, List<Constraint> limitConstraints) {
- this(name, matchParameters, limitConstraints);
- this.description = description;
- }
-
- public GuardPolicy(String id, String name, String description, MatchParameters matchParameters, List<Constraint> limitConstraints) {
- this(name, description, matchParameters, limitConstraints);
- this.id = id;
- }
-
- public GuardPolicy(GuardPolicy policy) {
- this.id = policy.id;
- this.name = policy.name;
- this.description = policy.description;
- this.matchParameters = new MatchParameters(policy.matchParameters);
- if (policy.limitConstraints != null) {
- this.limitConstraints = policy.limitConstraints;
- }
- }
-
- public boolean isValid() {
- return (id==null || name ==null)? false : true;
- }
-
- @Override
- public String toString() {
- return "Policy [id=" + id + ", name=" + name + ", description=" + description + ", match_parameters="
- +matchParameters + ", limitConstraints=" + limitConstraints + "]";
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((description == null) ? 0 : description.hashCode());
- result = prime * result + ((id == null) ? 0 : id.hashCode());
- result = prime * result + ((name == null) ? 0 : name.hashCode());
- result = prime * result + ((limitConstraints == null) ? 0 : limitConstraints.hashCode());
- result = prime * result + ((matchParameters == null) ? 0 : matchParameters.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- GuardPolicy other = (GuardPolicy) obj;
- return equalsMayBeNull(description, other.description)
- && equalsMayBeNull(id, other.id)
- && equalsMayBeNull(name, other.name)
- && equalsMayBeNull(limitConstraints, other.limitConstraints)
- && equalsMayBeNull(matchParameters, other.matchParameters);
- }
-
- private boolean equalsMayBeNull(final Object obj1, final Object obj2){
- if ( obj1 == null ) {
- return obj2 == null;
- }
- return obj1.equals(obj2);
- }
-}
+/*- + * ============LICENSE_START======================================================= + * policy-yaml + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.controlloop.policy.guard; + +import java.util.LinkedList; +import java.util.List; +import java.util.UUID; + +public class GuardPolicy { + + private String id = UUID.randomUUID().toString(); + private String name; + private String description; + private MatchParameters matchParameters; + private LinkedList<Constraint> limitConstraints; + + public GuardPolicy() { + //Do Nothing Empty Constructor. + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public MatchParameters getMatch_parameters() { + return matchParameters; + } + + public void setMatch_parameters(MatchParameters matchParameters) { + this.matchParameters = matchParameters; + } + + public LinkedList<Constraint> getLimit_constraints() { + return limitConstraints; + } + + public void setLimit_constraints(LinkedList<Constraint> limitConstraints) { + this.limitConstraints = limitConstraints; + } + + public GuardPolicy(String id) { + this.id = id; + } + + public GuardPolicy(String name, MatchParameters matchParameters) { + this.name = name; + this.matchParameters = matchParameters; + } + + public GuardPolicy(String id, String name, String description, MatchParameters matchParameters) { + this(name, matchParameters); + this.id = id; + this.description = description; + } + + public GuardPolicy(String name, MatchParameters matchParameters, List<Constraint> limitConstraints) { + this(name, matchParameters); + if (limitConstraints != null) { + this.limitConstraints = (LinkedList<Constraint>) limitConstraints; + } + } + + public GuardPolicy(String name, String description, MatchParameters matchParameters, List<Constraint> limitConstraints) { + this(name, matchParameters, limitConstraints); + this.description = description; + } + + public GuardPolicy(String id, String name, String description, MatchParameters matchParameters, List<Constraint> limitConstraints) { + this(name, description, matchParameters, limitConstraints); + this.id = id; + } + + public GuardPolicy(GuardPolicy policy) { + this.id = policy.id; + this.name = policy.name; + this.description = policy.description; + this.matchParameters = new MatchParameters(policy.matchParameters); + if (policy.limitConstraints != null) { + this.limitConstraints = policy.limitConstraints; + } + } + + public boolean isValid() { + return (id==null || name ==null)? false : true; + } + + @Override + public String toString() { + return "Policy [id=" + id + ", name=" + name + ", description=" + description + ", match_parameters=" + +matchParameters + ", limitConstraints=" + limitConstraints + "]"; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((description == null) ? 0 : description.hashCode()); + result = prime * result + ((id == null) ? 0 : id.hashCode()); + result = prime * result + ((name == null) ? 0 : name.hashCode()); + result = prime * result + ((limitConstraints == null) ? 0 : limitConstraints.hashCode()); + result = prime * result + ((matchParameters == null) ? 0 : matchParameters.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + GuardPolicy other = (GuardPolicy) obj; + return equalsMayBeNull(description, other.description) + && equalsMayBeNull(id, other.id) + && equalsMayBeNull(name, other.name) + && equalsMayBeNull(limitConstraints, other.limitConstraints) + && equalsMayBeNull(matchParameters, other.matchParameters); + } + + private boolean equalsMayBeNull(final Object obj1, final Object obj2){ + if ( obj1 == null ) { + return obj2 == null; + } + return obj1.equals(obj2); + } +} diff --git a/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/MatchParameters.java b/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/MatchParameters.java index 8e5d0c09c..445e00f38 100644 --- a/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/MatchParameters.java +++ b/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/MatchParameters.java @@ -1,135 +1,135 @@ -/*-
- * ============LICENSE_START=======================================================
- * policy-yaml
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.controlloop.policy.guard;
-
-import java.util.LinkedList;
-import java.util.List;
-
-
-public class MatchParameters {
- private String controlLoopName;
- private String actor;
- private String recipe;
- private List<String> targets;
-
- public MatchParameters() {
- // Do Nothing Empty Constructor.
- }
-
- public String getControlLoopName() {
- return controlLoopName;
- }
-
- public void setControlLoopName(String controlLoopName) {
- this.controlLoopName = controlLoopName;
- }
-
- public String getActor() {
- return actor;
- }
-
- public void setActor(String actor) {
- this.actor = actor;
- }
-
- public String getRecipe() {
- return recipe;
- }
-
- public void setRecipe(String recipe) {
- this.recipe = recipe;
- }
-
- public List<String> getTargets() {
- return targets;
- }
-
- public void setTargets(List<String> targets) {
- this.targets = targets;
- }
-
- public MatchParameters(String actor, String recipe) {
- this.actor = actor;
- this.recipe = recipe;
- }
-
- public MatchParameters(String actor, String recipe, List<String> targets) {
- this(actor, recipe);
- if (targets != null) {
- this.targets = new LinkedList<>(targets);
- }
- }
-
- public MatchParameters(String controlLoopName, String actor, String recipe, List<String> targets) {
- this(actor, recipe, targets);
- this.controlLoopName = controlLoopName;
- }
-
- public MatchParameters(MatchParameters matchParameters) {
-
- this.controlLoopName = matchParameters.controlLoopName;
- this.actor = matchParameters.actor;
- this.recipe = matchParameters.recipe;
- if (matchParameters.targets != null) {
- this.targets = new LinkedList<>(matchParameters.targets);
- }
- }
-
- @Override
- public String toString() {
- return "MatchParameters [controlLoopName=" + controlLoopName + ", actor=" + actor + ", recipe=" + recipe
- + ", targets=" + targets + "]";
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((actor == null) ? 0 : actor.hashCode());
- result = prime * result + ((controlLoopName == null) ? 0 : controlLoopName.hashCode());
- result = prime * result + ((recipe == null) ? 0 : recipe.hashCode());
- result = prime * result + ((targets == null) ? 0 : targets.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- MatchParameters other = (MatchParameters) obj;
-
- return equalsMayBeNull(actor, other.actor)
- && equalsMayBeNull(controlLoopName, other.controlLoopName)
- && equalsMayBeNull(recipe, other.recipe)
- && equalsMayBeNull(targets, other.targets);
- }
-
- private boolean equalsMayBeNull(final Object obj1, final Object obj2){
- if ( obj1 == null ) {
- return obj2 == null;
- }
- return obj1.equals(obj2);
- }
-}
+/*- + * ============LICENSE_START======================================================= + * policy-yaml + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.controlloop.policy.guard; + +import java.util.LinkedList; +import java.util.List; + + +public class MatchParameters { + private String controlLoopName; + private String actor; + private String recipe; + private List<String> targets; + + public MatchParameters() { + // Do Nothing Empty Constructor. + } + + public String getControlLoopName() { + return controlLoopName; + } + + public void setControlLoopName(String controlLoopName) { + this.controlLoopName = controlLoopName; + } + + public String getActor() { + return actor; + } + + public void setActor(String actor) { + this.actor = actor; + } + + public String getRecipe() { + return recipe; + } + + public void setRecipe(String recipe) { + this.recipe = recipe; + } + + public List<String> getTargets() { + return targets; + } + + public void setTargets(List<String> targets) { + this.targets = targets; + } + + public MatchParameters(String actor, String recipe) { + this.actor = actor; + this.recipe = recipe; + } + + public MatchParameters(String actor, String recipe, List<String> targets) { + this(actor, recipe); + if (targets != null) { + this.targets = new LinkedList<>(targets); + } + } + + public MatchParameters(String controlLoopName, String actor, String recipe, List<String> targets) { + this(actor, recipe, targets); + this.controlLoopName = controlLoopName; + } + + public MatchParameters(MatchParameters matchParameters) { + + this.controlLoopName = matchParameters.controlLoopName; + this.actor = matchParameters.actor; + this.recipe = matchParameters.recipe; + if (matchParameters.targets != null) { + this.targets = new LinkedList<>(matchParameters.targets); + } + } + + @Override + public String toString() { + return "MatchParameters [controlLoopName=" + controlLoopName + ", actor=" + actor + ", recipe=" + recipe + + ", targets=" + targets + "]"; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((actor == null) ? 0 : actor.hashCode()); + result = prime * result + ((controlLoopName == null) ? 0 : controlLoopName.hashCode()); + result = prime * result + ((recipe == null) ? 0 : recipe.hashCode()); + result = prime * result + ((targets == null) ? 0 : targets.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + MatchParameters other = (MatchParameters) obj; + + return equalsMayBeNull(actor, other.actor) + && equalsMayBeNull(controlLoopName, other.controlLoopName) + && equalsMayBeNull(recipe, other.recipe) + && equalsMayBeNull(targets, other.targets); + } + + private boolean equalsMayBeNull(final Object obj1, final Object obj2){ + if ( obj1 == null ) { + return obj2 == null; + } + return obj1.equals(obj2); + } +} diff --git a/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/builder/impl/ControlLoopGuardBuilderImpl.java b/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/builder/impl/ControlLoopGuardBuilderImpl.java index 60716383d..a431a0bfe 100644 --- a/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/builder/impl/ControlLoopGuardBuilderImpl.java +++ b/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/builder/impl/ControlLoopGuardBuilderImpl.java @@ -1,247 +1,247 @@ -/*-
- * ============LICENSE_START=======================================================
- * policy-yaml
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.controlloop.policy.guard.builder.impl;
-
-import java.util.LinkedList;
-
-import org.onap.policy.controlloop.compiler.CompilerException;
-import org.onap.policy.controlloop.compiler.ControlLoopCompilerCallback;
-import org.onap.policy.controlloop.guard.compiler.ControlLoopGuardCompiler;
-import org.onap.policy.controlloop.policy.builder.BuilderException;
-import org.onap.policy.controlloop.policy.builder.MessageLevel;
-import org.onap.policy.controlloop.policy.builder.Results;
-import org.onap.policy.controlloop.policy.builder.impl.MessageImpl;
-import org.onap.policy.controlloop.policy.builder.impl.ResultsImpl;
-import org.onap.policy.controlloop.policy.guard.Constraint;
-import org.onap.policy.controlloop.policy.guard.ControlLoopGuard;
-import org.onap.policy.controlloop.policy.guard.Guard;
-import org.onap.policy.controlloop.policy.guard.GuardPolicy;
-import org.onap.policy.controlloop.policy.guard.builder.ControlLoopGuardBuilder;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.yaml.snakeyaml.DumperOptions;
-import org.yaml.snakeyaml.DumperOptions.FlowStyle;
-import org.yaml.snakeyaml.Yaml;
-
-public class ControlLoopGuardBuilderImpl implements ControlLoopGuardBuilder {
- private static final String NO_EXISTING_GUARD_POLICY_MATCHING_THE_ID = "No existing guard policy matching the id: ";
- private static final String THE_ID_OF_TARGET_GUARD_POLICY_MUST_NOT_BE_NULL = "The id of target guard policy must not be null";
- private static Logger logger = LoggerFactory.getLogger(ControlLoopGuardBuilderImpl.class.getName());
- private ControlLoopGuard cLGuard;
-
- public ControlLoopGuardBuilderImpl(Guard guard) {
- cLGuard = new ControlLoopGuard();
- cLGuard.setGuard(guard);
- }
-
- @Override
- public ControlLoopGuardBuilder addGuardPolicy(GuardPolicy... policies) throws BuilderException {
- if (policies == null) {
- throw new BuilderException("GuardPolicy must not be null");
- }
- for (GuardPolicy policy : policies) {
- if (!policy.isValid()) {
- throw new BuilderException("Invalid guard policy - some required fields are missing");
- }
- if (cLGuard.getGuards() == null) {
- cLGuard.setGuards(new LinkedList<>());
- }
- cLGuard.getGuards().add(policy);
- }
- return this;
- }
-
- @Override
- public ControlLoopGuardBuilder removeGuardPolicy(GuardPolicy... policies) throws BuilderException {
- if (policies == null) {
- throw new BuilderException("GuardPolicy must not be null");
- }
- if (cLGuard.getGuards() == null) {
- throw new BuilderException("No existing guard policies to remove");
- }
- for (GuardPolicy policy : policies) {
- if (!policy.isValid()) {
- throw new BuilderException("Invalid guard policy - some required fields are missing");
- }
- boolean removed = cLGuard.getGuards().remove(policy);
- if (!removed) {
- throw new BuilderException("Unknown guard policy: " + policy.getName());
- }
- }
- return this;
- }
-
- @Override
- public ControlLoopGuardBuilder removeAllGuardPolicies() throws BuilderException {
- cLGuard.getGuards().clear();
- return this;
- }
-
- @Override
- public ControlLoopGuardBuilder addLimitConstraint(String id, Constraint... constraints) throws BuilderException {
- if (id == null) {
- throw new BuilderException(THE_ID_OF_TARGET_GUARD_POLICY_MUST_NOT_BE_NULL);
- }
- if (constraints == null) {
- throw new BuilderException("Constraint much not be null");
- }
- if (!addLimitConstraints(id,constraints)) {
- throw new BuilderException(NO_EXISTING_GUARD_POLICY_MATCHING_THE_ID + id);
- }
- return this;
- }
-
- private boolean addLimitConstraints(String id, Constraint... constraints) throws BuilderException {
- boolean exist = false;
- for (GuardPolicy policy: cLGuard.getGuards()) {
- //
- // We could have only one guard policy matching the id
- //
- if (policy.getId().equals(id)) {
- exist = true;
- for (Constraint cons: constraints) {
- if (!cons.isValid()) {
- throw new BuilderException("Invalid guard constraint - some required fields are missing");
- }
- if (policy.getLimit_constraints() == null) {
- policy.setLimit_constraints(new LinkedList<>());
- }
- policy.getLimit_constraints().add(cons);
- }
- break;
- }
- }
- return exist;
- }
-
- @Override
- public ControlLoopGuardBuilder removeLimitConstraint(String id, Constraint... constraints) throws BuilderException {
- if (id == null) {
- throw new BuilderException(THE_ID_OF_TARGET_GUARD_POLICY_MUST_NOT_BE_NULL);
- }
- if (constraints == null) {
- throw new BuilderException("Constraint much not be null");
- }
- if (!removeConstraints(id, constraints)) {
- throw new BuilderException(NO_EXISTING_GUARD_POLICY_MATCHING_THE_ID + id);
- }
- return this;
- }
-
- private boolean removeConstraints(String id, Constraint... constraints) throws BuilderException {
- boolean exist = false;
- for (GuardPolicy policy: cLGuard.getGuards()) {
- //
- // We could have only one guard policy matching the id
- //
- if (policy.getId().equals(id)) {
- exist = true;
- for (Constraint cons: constraints) {
- if (!cons.isValid()) {
- throw new BuilderException("Invalid guard constraint - some required fields are missing");
- }
- boolean removed = policy.getLimit_constraints().remove(cons);
- if (!removed) {
- throw new BuilderException("Unknown guard constraint: " + cons);
- }
- }
- break;
- }
- }
- return exist;
- }
-
- @Override
- public ControlLoopGuardBuilder removeAllLimitConstraints(String id) throws BuilderException {
- if (cLGuard.getGuards() == null || cLGuard.getGuards().isEmpty()) {
- throw new BuilderException("No guard policies exist");
- }
- if (id == null) {
- throw new BuilderException(THE_ID_OF_TARGET_GUARD_POLICY_MUST_NOT_BE_NULL);
- }
- boolean exist = false;
- for (GuardPolicy policy: cLGuard.getGuards()) {
- if (policy.getId().equals(id)) {
- exist = true;
- policy.getLimit_constraints().clear();
- }
- }
- if (!exist) {
- throw new BuilderException(NO_EXISTING_GUARD_POLICY_MATCHING_THE_ID + id);
- }
- return this;
- }
-
-
- private class BuilderCompilerCallback implements ControlLoopCompilerCallback {
-
- private ResultsImpl results = new ResultsImpl();
-
- @Override
- public boolean onWarning(String message) {
- results.addMessage(new MessageImpl(message, MessageLevel.WARNING));
- return false;
- }
-
- @Override
- public boolean onError(String message) {
- results.addMessage(new MessageImpl(message, MessageLevel.ERROR));
- return false;
- }
- }
-
- @Override
- public ControlLoopGuard getControlLoopGuard() {
- return new ControlLoopGuard(this.cLGuard);
- }
-
-
- @Override
- public Results buildSpecification() {
- //
- // Dump the specification
- //
- DumperOptions options = new DumperOptions();
- options.setDefaultFlowStyle(FlowStyle.BLOCK);
- options.setPrettyFlow(true);
- Yaml yaml = new Yaml(options);
- String dumpedYaml = yaml.dump(cLGuard);
- //
- // This is our callback class for our compiler
- //
- BuilderCompilerCallback callback = new BuilderCompilerCallback();
- //
- // Compile it
- //
- try {
- ControlLoopGuardCompiler.compile(cLGuard, callback);
- } catch (CompilerException e) {
- logger.error(e.getMessage() + e);
- callback.results.addMessage(new MessageImpl(e.getMessage(), MessageLevel.EXCEPTION));
- }
- //
- // Save the spec
- //
- callback.results.setSpecification(dumpedYaml);
- return callback.results;
- }
-
-}
+/*- + * ============LICENSE_START======================================================= + * policy-yaml + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.controlloop.policy.guard.builder.impl; + +import java.util.LinkedList; + +import org.onap.policy.controlloop.compiler.CompilerException; +import org.onap.policy.controlloop.compiler.ControlLoopCompilerCallback; +import org.onap.policy.controlloop.guard.compiler.ControlLoopGuardCompiler; +import org.onap.policy.controlloop.policy.builder.BuilderException; +import org.onap.policy.controlloop.policy.builder.MessageLevel; +import org.onap.policy.controlloop.policy.builder.Results; +import org.onap.policy.controlloop.policy.builder.impl.MessageImpl; +import org.onap.policy.controlloop.policy.builder.impl.ResultsImpl; +import org.onap.policy.controlloop.policy.guard.Constraint; +import org.onap.policy.controlloop.policy.guard.ControlLoopGuard; +import org.onap.policy.controlloop.policy.guard.Guard; +import org.onap.policy.controlloop.policy.guard.GuardPolicy; +import org.onap.policy.controlloop.policy.guard.builder.ControlLoopGuardBuilder; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.yaml.snakeyaml.DumperOptions; +import org.yaml.snakeyaml.DumperOptions.FlowStyle; +import org.yaml.snakeyaml.Yaml; + +public class ControlLoopGuardBuilderImpl implements ControlLoopGuardBuilder { + private static final String NO_EXISTING_GUARD_POLICY_MATCHING_THE_ID = "No existing guard policy matching the id: "; + private static final String THE_ID_OF_TARGET_GUARD_POLICY_MUST_NOT_BE_NULL = "The id of target guard policy must not be null"; + private static Logger logger = LoggerFactory.getLogger(ControlLoopGuardBuilderImpl.class.getName()); + private ControlLoopGuard cLGuard; + + public ControlLoopGuardBuilderImpl(Guard guard) { + cLGuard = new ControlLoopGuard(); + cLGuard.setGuard(guard); + } + + @Override + public ControlLoopGuardBuilder addGuardPolicy(GuardPolicy... policies) throws BuilderException { + if (policies == null) { + throw new BuilderException("GuardPolicy must not be null"); + } + for (GuardPolicy policy : policies) { + if (!policy.isValid()) { + throw new BuilderException("Invalid guard policy - some required fields are missing"); + } + if (cLGuard.getGuards() == null) { + cLGuard.setGuards(new LinkedList<>()); + } + cLGuard.getGuards().add(policy); + } + return this; + } + + @Override + public ControlLoopGuardBuilder removeGuardPolicy(GuardPolicy... policies) throws BuilderException { + if (policies == null) { + throw new BuilderException("GuardPolicy must not be null"); + } + if (cLGuard.getGuards() == null) { + throw new BuilderException("No existing guard policies to remove"); + } + for (GuardPolicy policy : policies) { + if (!policy.isValid()) { + throw new BuilderException("Invalid guard policy - some required fields are missing"); + } + boolean removed = cLGuard.getGuards().remove(policy); + if (!removed) { + throw new BuilderException("Unknown guard policy: " + policy.getName()); + } + } + return this; + } + + @Override + public ControlLoopGuardBuilder removeAllGuardPolicies() throws BuilderException { + cLGuard.getGuards().clear(); + return this; + } + + @Override + public ControlLoopGuardBuilder addLimitConstraint(String id, Constraint... constraints) throws BuilderException { + if (id == null) { + throw new BuilderException(THE_ID_OF_TARGET_GUARD_POLICY_MUST_NOT_BE_NULL); + } + if (constraints == null) { + throw new BuilderException("Constraint much not be null"); + } + if (!addLimitConstraints(id,constraints)) { + throw new BuilderException(NO_EXISTING_GUARD_POLICY_MATCHING_THE_ID + id); + } + return this; + } + + private boolean addLimitConstraints(String id, Constraint... constraints) throws BuilderException { + boolean exist = false; + for (GuardPolicy policy: cLGuard.getGuards()) { + // + // We could have only one guard policy matching the id + // + if (policy.getId().equals(id)) { + exist = true; + for (Constraint cons: constraints) { + if (!cons.isValid()) { + throw new BuilderException("Invalid guard constraint - some required fields are missing"); + } + if (policy.getLimit_constraints() == null) { + policy.setLimit_constraints(new LinkedList<>()); + } + policy.getLimit_constraints().add(cons); + } + break; + } + } + return exist; + } + + @Override + public ControlLoopGuardBuilder removeLimitConstraint(String id, Constraint... constraints) throws BuilderException { + if (id == null) { + throw new BuilderException(THE_ID_OF_TARGET_GUARD_POLICY_MUST_NOT_BE_NULL); + } + if (constraints == null) { + throw new BuilderException("Constraint much not be null"); + } + if (!removeConstraints(id, constraints)) { + throw new BuilderException(NO_EXISTING_GUARD_POLICY_MATCHING_THE_ID + id); + } + return this; + } + + private boolean removeConstraints(String id, Constraint... constraints) throws BuilderException { + boolean exist = false; + for (GuardPolicy policy: cLGuard.getGuards()) { + // + // We could have only one guard policy matching the id + // + if (policy.getId().equals(id)) { + exist = true; + for (Constraint cons: constraints) { + if (!cons.isValid()) { + throw new BuilderException("Invalid guard constraint - some required fields are missing"); + } + boolean removed = policy.getLimit_constraints().remove(cons); + if (!removed) { + throw new BuilderException("Unknown guard constraint: " + cons); + } + } + break; + } + } + return exist; + } + + @Override + public ControlLoopGuardBuilder removeAllLimitConstraints(String id) throws BuilderException { + if (cLGuard.getGuards() == null || cLGuard.getGuards().isEmpty()) { + throw new BuilderException("No guard policies exist"); + } + if (id == null) { + throw new BuilderException(THE_ID_OF_TARGET_GUARD_POLICY_MUST_NOT_BE_NULL); + } + boolean exist = false; + for (GuardPolicy policy: cLGuard.getGuards()) { + if (policy.getId().equals(id)) { + exist = true; + policy.getLimit_constraints().clear(); + } + } + if (!exist) { + throw new BuilderException(NO_EXISTING_GUARD_POLICY_MATCHING_THE_ID + id); + } + return this; + } + + + private class BuilderCompilerCallback implements ControlLoopCompilerCallback { + + private ResultsImpl results = new ResultsImpl(); + + @Override + public boolean onWarning(String message) { + results.addMessage(new MessageImpl(message, MessageLevel.WARNING)); + return false; + } + + @Override + public boolean onError(String message) { + results.addMessage(new MessageImpl(message, MessageLevel.ERROR)); + return false; + } + } + + @Override + public ControlLoopGuard getControlLoopGuard() { + return new ControlLoopGuard(this.cLGuard); + } + + + @Override + public Results buildSpecification() { + // + // Dump the specification + // + DumperOptions options = new DumperOptions(); + options.setDefaultFlowStyle(FlowStyle.BLOCK); + options.setPrettyFlow(true); + Yaml yaml = new Yaml(options); + String dumpedYaml = yaml.dump(cLGuard); + // + // This is our callback class for our compiler + // + BuilderCompilerCallback callback = new BuilderCompilerCallback(); + // + // Compile it + // + try { + ControlLoopGuardCompiler.compile(cLGuard, callback); + } catch (CompilerException e) { + logger.error(e.getMessage() + e); + callback.results.addMessage(new MessageImpl(e.getMessage(), MessageLevel.EXCEPTION)); + } + // + // Save the spec + // + callback.results.setSpecification(dumpedYaml); + return callback.results; + } + +} diff --git a/controlloop/common/policy-yaml/src/test/resources/v2.0.0/policy_vService.yaml b/controlloop/common/policy-yaml/src/test/resources/v2.0.0/policy_vService.yaml index fc4763460..d679e0773 100644 --- a/controlloop/common/policy-yaml/src/test/resources/v2.0.0/policy_vService.yaml +++ b/controlloop/common/policy-yaml/src/test/resources/v2.0.0/policy_vService.yaml @@ -1,121 +1,121 @@ -controlLoop:
- version: 2.0.0
- controlLoopName: ControlLoop-GENERIC-64cdc9fa-6601-4989-9de7-8f47134aa043
- #
- # Example of how someone can fine-grain this
- # policy for a specific service and/or resources
- # contained within the service.
- #
- services:
- - serviceName: vFooService
-
- resources:
- - resourceName: vVNF1
- resourceType: VFC
- - resourceName: vVNF2
- resourceType: VFC
- - resourceName: vVNF3
- resourceType: VFC
- - resourceName: vVNF4
- resourceType: VFC
-
- trigger_policy: unique-policy-id-1-restart
- timeout: 1200
- #
- # Example of case where an abatement isn't possible
- # from DCAE to Policy. So Policy should NOT expect
- #
- abatement: false
-
-policies:
-
- - id: unique-policy-id-1-restart
- name: Restart Policy
- description:
- actor: APPC
- recipe: Restart
- target:
- type: VM
- retry: 2
- timeout: 300
- success: unique-policy-id-1-healthdiagnostic
- failure: unique-policy-id-2-rebuild
- failure_timeout: unique-policy-id-2-rebuild
- failure_retries: unique-policy-id-2-rebuild
- failure_exception: final_failure_exception
- failure_guard: unique-policy-id-2-rebuild
-
-
- - id: unique-policy-id-2-rebuild
- name: Rebuild Policy
- description:
- actor: APPC
- recipe: Rebuild
- target:
- type: VM
- retry: 0
- timeout: 600
- success: unique-policy-id-2-healthdiagnostic
- failure: unique-policy-id-3-migrate
- failure_timeout: unique-policy-id-3-migrate
- failure_retries: unique-policy-id-3-migrate
- failure_exception: final_failure_exception
- failure_guard: unique-policy-id-3-migrate
-
- - id: unique-policy-id-3-migrate
- name: Migrate Policy
- description:
- actor: APPC
- recipe: Migrate
- target:
- type: VM
- retry: 0
- timeout: 600
- success: final_success
- failure: final_failure
- failure_timeout: final_failure_timeout
- failure_retries: final_failure_retries
- failure_exception: final_failure_exception
- failure_guard: final_failure_guard
-
- - id: unique-policy-id-1-healthdiagnostic
- name: Do A Health Diagnostic
- description:
- actor: APPC
- recipe: health-diagnostic
- # Example of a payload
- payload:
- health-diagnostic-code: HC01234
- health-diagnostic-code-parameters: "{\"Junk\":\"--version\",\"Junk2\":\"--help\"}"
- target:
- type: VM
- retry: 0
- timeout: 600
- success: final_success
- failure: unique-policy-id-2-rebuild
- failure_timeout: unique-policy-id-2-rebuild
- failure_retries: unique-policy-id-2-rebuild
- failure_exception: final_failure_exception
- failure_guard: unique-policy-id-2-rebuild
-
-
- - id: unique-policy-id-2-healthdiagnostic
- name: Do Health Diagnostic
- description:
- actor: APPC
- recipe: health-diagnostic
- payload:
- health-diagnostic-code: HC01234
- health-diagnostic-code-parameters: "{\"Junk\":\"--version\",\"Junk2\":\"--help\"}"
- target:
- type: VM
- retry: 0
- timeout: 600
- success: final_success
- failure: final_failure
- failure_timeout: final_failure_timeout
- failure_retries: final_failure_retries
- failure_exception: final_failure_exception
- failure_guard: final_failure_guard
-
-
+controlLoop: + version: 2.0.0 + controlLoopName: ControlLoop-GENERIC-64cdc9fa-6601-4989-9de7-8f47134aa043 + # + # Example of how someone can fine-grain this + # policy for a specific service and/or resources + # contained within the service. + # + services: + - serviceName: vFooService + + resources: + - resourceName: vVNF1 + resourceType: VFC + - resourceName: vVNF2 + resourceType: VFC + - resourceName: vVNF3 + resourceType: VFC + - resourceName: vVNF4 + resourceType: VFC + + trigger_policy: unique-policy-id-1-restart + timeout: 1200 + # + # Example of case where an abatement isn't possible + # from DCAE to Policy. So Policy should NOT expect + # + abatement: false + +policies: + + - id: unique-policy-id-1-restart + name: Restart Policy + description: + actor: APPC + recipe: Restart + target: + type: VM + retry: 2 + timeout: 300 + success: unique-policy-id-1-healthdiagnostic + failure: unique-policy-id-2-rebuild + failure_timeout: unique-policy-id-2-rebuild + failure_retries: unique-policy-id-2-rebuild + failure_exception: final_failure_exception + failure_guard: unique-policy-id-2-rebuild + + + - id: unique-policy-id-2-rebuild + name: Rebuild Policy + description: + actor: APPC + recipe: Rebuild + target: + type: VM + retry: 0 + timeout: 600 + success: unique-policy-id-2-healthdiagnostic + failure: unique-policy-id-3-migrate + failure_timeout: unique-policy-id-3-migrate + failure_retries: unique-policy-id-3-migrate + failure_exception: final_failure_exception + failure_guard: unique-policy-id-3-migrate + + - id: unique-policy-id-3-migrate + name: Migrate Policy + description: + actor: APPC + recipe: Migrate + target: + type: VM + retry: 0 + timeout: 600 + success: final_success + failure: final_failure + failure_timeout: final_failure_timeout + failure_retries: final_failure_retries + failure_exception: final_failure_exception + failure_guard: final_failure_guard + + - id: unique-policy-id-1-healthdiagnostic + name: Do A Health Diagnostic + description: + actor: APPC + recipe: health-diagnostic + # Example of a payload + payload: + health-diagnostic-code: HC01234 + health-diagnostic-code-parameters: "{\"Junk\":\"--version\",\"Junk2\":\"--help\"}" + target: + type: VM + retry: 0 + timeout: 600 + success: final_success + failure: unique-policy-id-2-rebuild + failure_timeout: unique-policy-id-2-rebuild + failure_retries: unique-policy-id-2-rebuild + failure_exception: final_failure_exception + failure_guard: unique-policy-id-2-rebuild + + + - id: unique-policy-id-2-healthdiagnostic + name: Do Health Diagnostic + description: + actor: APPC + recipe: health-diagnostic + payload: + health-diagnostic-code: HC01234 + health-diagnostic-code-parameters: "{\"Junk\":\"--version\",\"Junk2\":\"--help\"}" + target: + type: VM + retry: 0 + timeout: 600 + success: final_success + failure: final_failure + failure_timeout: final_failure_timeout + failure_retries: final_failure_retries + failure_exception: final_failure_exception + failure_guard: final_failure_guard + + diff --git a/controlloop/common/pom.xml b/controlloop/common/pom.xml index 576d734e5..582183d66 100644 --- a/controlloop/common/pom.xml +++ b/controlloop/common/pom.xml @@ -1,47 +1,47 @@ <!-- - ============LICENSE_START======================================================= - Drools PDP Application Common Models - ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - ================================================================================ - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ============LICENSE_END========================================================= - --> + ============LICENSE_START======================================================= + Drools PDP Application Common Models + ================================================================================ + Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + ================================================================================ + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============LICENSE_END========================================================= +--> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - - <modelVersion>4.0.0</modelVersion> - - <artifactId>common</artifactId> - <packaging>pom</packaging> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <packaging>pom</packaging> + + <parent> + <groupId>org.onap.policy.drools-applications.controlloop</groupId> + <artifactId>controlloop</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> - <parent> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>controlloop</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> + <groupId>org.onap.policy.drools-applications.controlloop.common</groupId> + <artifactId>common</artifactId> - <modules> - <module>actors</module> - <module>guard</module> - <module>eventmanager</module> - <module>model-impl</module> - <module>policy-yaml</module> - <module>simulators</module> - <module>feature-controlloop-utils</module> - <module>msb</module> - </modules> + <modules> + <module>actors</module> + <module>guard</module> + <module>eventmanager</module> + <module>model-impl</module> + <module>policy-yaml</module> + <module>simulators</module> + <module>feature-controlloop-utils</module> + <module>msb</module> + </modules> </project> diff --git a/controlloop/common/simulators/pom.xml b/controlloop/common/simulators/pom.xml index 8f92694b8..c256d13ac 100644 --- a/controlloop/common/simulators/pom.xml +++ b/controlloop/common/simulators/pom.xml @@ -19,54 +19,57 @@ --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>common</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> - <artifactId>simulators</artifactId> - <dependencies> - <dependency> - <groupId>org.onap.policy.drools-pdp</groupId> - <artifactId>policy-endpoints</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>aai</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>so</artifactId> - <version>${project.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>vfc</artifactId> - <version>${project.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-pdp</groupId> - <artifactId>policy-management</artifactId> - <version>${project.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>com.google.code.gson</groupId> - <artifactId>gson</artifactId> - <version>2.5</version> - <scope>provided</scope> - </dependency> - </dependencies> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.onap.policy.drools-applications.controlloop.common</groupId> + <artifactId>common</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> + + <artifactId>simulators</artifactId> + + <dependencies> + <dependency> + <groupId>org.onap.policy.drools-pdp</groupId> + <artifactId>policy-endpoints</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>aai</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>so</artifactId> + <version>${project.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>vfc</artifactId> + <version>${project.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-pdp</groupId> + <artifactId>policy-management</artifactId> + <version>${project.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>2.5</version> + <scope>provided</scope> + </dependency> + </dependencies> </project> diff --git a/controlloop/packages/apps/pom.xml b/controlloop/packages/apps/pom.xml index 5be202356..1e5acf6a8 100644 --- a/controlloop/packages/apps/pom.xml +++ b/controlloop/packages/apps/pom.xml @@ -19,65 +19,64 @@ --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <packaging>pom</packaging> - <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.onap.policy.drools-applications.controlloop.packages</groupId> + <artifactId>packages</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> - <parent> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>packages</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> - - <artifactId>apps</artifactId> - <packaging>pom</packaging> + <artifactId>apps</artifactId> - <name>PDP-D APPS Installation Package</name> - <description>PDP-D APPS Installation Package</description> + <name>Drools Applications Installation Package</name> + <description>Drools Applications Installation Package</description> - <build> - <plugins> - <plugin> - <artifactId>maven-assembly-plugin</artifactId> - <executions> - <execution> - <goals> - <goal>single</goal> - </goals> - <phase>package</phase> - <configuration> - <descriptors> - <descriptor>src/assembly/zip.xml</descriptor> - </descriptors> - <appendAssemblyId>false</appendAssemblyId> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> + <build> + <plugins> + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>single</goal> + </goals> + <phase>package</phase> + <configuration> + <descriptors> + <descriptor>src/assembly/zip.xml</descriptor> + </descriptors> + <appendAssemblyId>false</appendAssemblyId> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> - <!-- List any dependencies here that should be included in the installer zip --> - <dependencies> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>basex</artifactId> - <version>${project.version}</version> - <type>tar.gz</type> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>artifacts</artifactId> - <version>${project.version}</version> - <type>zip</type> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>feature-controlloop-utils</artifactId> - <version>${project.version}</version> - <type>zip</type> - </dependency> - </dependencies> + <!-- List any dependencies here that should be included in the installer zip --> + <dependencies> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.packages</groupId> + <artifactId>basex</artifactId> + <version>${project.version}</version> + <type>tar.gz</type> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.packages</groupId> + <artifactId>artifacts</artifactId> + <version>${project.version}</version> + <type>zip</type> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common</groupId> + <artifactId>feature-controlloop-utils</artifactId> + <version>${project.version}</version> + <type>zip</type> + </dependency> + </dependencies> </project> diff --git a/controlloop/packages/apps/src/files/apps-installer b/controlloop/packages/apps/src/files/apps-installer index 545c3dc0b..d483707b9 100644 --- a/controlloop/packages/apps/src/files/apps-installer +++ b/controlloop/packages/apps/src/files/apps-installer @@ -38,21 +38,19 @@ source ${POLICY_HOME}/etc/build.info mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.2:get -Dartifact=com.att.research.xacml:xacml-pdp:1.0.0:jar -mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.2:get -Dartifact=org.onap.policy.drools-applications:archetype-cl-amsterdam:${version}:jar -Dtransitive=false -mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.2:get -Dartifact=org.onap.policy.drools-applications:events:${version}:jar -Dtransitive=false -mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.2:get -Dartifact=org.onap.policy.drools-applications:appc:${version}:jar -Dtransitive=false -mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.2:get -Dartifact=org.onap.policy.drools-applications:appclcm:${version}:jar -Dtransitive=false -mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.2:get -Dartifact=org.onap.policy.drools-applications:aai:${version}:jar -Dtransitive=false -mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.2:get -Dartifact=org.onap.policy.drools-applications:so:${version}:jar -Dtransitive=false -mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.2:get -Dartifact=org.onap.policy.drools-applications:trafficgenerator:${version}:jar -Dtransitive=false -mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.2:get -Dartifact=org.onap.policy.drools-applications:eventmanager:${version}:jar -Dtransitive=false -mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.2:get -Dartifact=org.onap.policy.drools-applications:guard:${version}:jar -Dtransitive=false -mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.2:get -Dartifact=org.onap.policy.drools-applications:actorserviceprovider:${version}:jar -Dtransitive=false -mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.2:get -Dartifact=org.onap.policy.drools-applications:actor.appc:${version}:jar -Dtransitive=false -mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.2:get -Dartifact=org.onap.policy.drools-applications:actor.appclcm:${version}:jar -Dtransitive=false -mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.2:get -Dartifact=org.onap.policy.drools-applications:actor.so:${version}:jar -Dtransitive=false -mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.2:get -Dartifact=org.onap.policy.drools-applications:actor.vfc:${version}:jar -Dtransitive=false -mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.2:get -Dartifact=org.onap.policy.drools-applications:policy-yaml:${version}:jar -Dtransitive=false -mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.2:get -Dartifact=org.onap.policy.drools-applications:demo:${version}:jar -Dtransitive=false -mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.2:get -Dartifact=org.onap.policy.drools-applications:template.demo:${version}:jar -Dtransitive=false -mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.2:get -Dartifact=org.onap.policy.drools-applications:guard:${version}:jar -Dtransitive=false +mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.2:get -Dartifact=org.onap.policy.drools-applications.controlloop.templates:archetype-cl-amsterdam:${version}:jar -Dtransitive=false +mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.2:get -Dartifact=org.onap.policy.drools-applications.controlloop.common.model-impl:events:${version}:jar -Dtransitive=false +mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.2:get -Dartifact=org.onap.policy.drools-applications.controlloop.common.model-impl:appc:${version}:jar -Dtransitive=false +mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.2:get -Dartifact=org.onap.policy.drools-applications.controlloop.common.model-impl:appclcm:${version}:jar -Dtransitive=false +mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.2:get -Dartifact=org.onap.policy.drools-applications.controlloop.common.model-impl:aai:${version}:jar -Dtransitive=false +mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.2:get -Dartifact=org.onap.policy.drools-applications.controlloop.common.model-impl:so:${version}:jar -Dtransitive=false +mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.2:get -Dartifact=org.onap.policy.drools-applications.controlloop.common.model-impl:trafficgenerator:${version}:jar -Dtransitive=false +mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.2:get -Dartifact=org.onap.policy.drools-applications:controlloop.common:eventmanager:${version}:jar -Dtransitive=false +mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.2:get -Dartifact=org.onap.policy.drools-applications.controlloop.common:guard:${version}:jar -Dtransitive=false +mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.2:get -Dartifact=org.onap.policy.drools-applications.controlloop.common.actors:actorserviceprovider:${version}:jar -Dtransitive=false +mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.2:get -Dartifact=org.onap.policy.drools-applications.controlloop.common.actors:actor.appc:${version}:jar -Dtransitive=false +mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.2:get -Dartifact=org.onap.policy.drools-applications.controlloop.common.actors:actor.appclcm:${version}:jar -Dtransitive=false +mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.2:get -Dartifact=org.onap.policy.drools-applications.controlloop.common.actors:actor.so:${version}:jar -Dtransitive=false +mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.2:get -Dartifact=org.onap.policy.drools-applications.controlloop.common.actors:actor.vfc:${version}:jar -Dtransitive=false +mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.2:get -Dartifact=org.onap.policy.drools-applications.controlloop.common.policy-yaml:${version}:jar -Dtransitive=false +mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.2:get -Dartifact=org.onap.policy.drools-applications.controlloop.templates:template.demo:${version}:jar -Dtransitive=false diff --git a/controlloop/packages/artifacts/pom.xml b/controlloop/packages/artifacts/pom.xml index 0a84e3217..0965fa034 100644 --- a/controlloop/packages/artifacts/pom.xml +++ b/controlloop/packages/artifacts/pom.xml @@ -19,178 +19,177 @@ --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <packaging>pom</packaging> - <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.onap.policy.drools-applications.controlloop.packages</groupId> + <artifactId>packages</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> - <parent> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>packages</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> + <artifactId>artifacts</artifactId> - <artifactId>artifacts</artifactId> - <packaging>pom</packaging> + <name>Artifacts for Drools Applications</name> + <description>Drools Application models, rules and tooling</description> - <name>Artifacts for PDP-D Applications</name> - <description>PDP-D models, rules and tooling</description> + <build> + <plugins> + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>single</goal> + </goals> + <phase>package</phase> + <configuration> + <descriptors> + <descriptor>src/assembly/zip.xml</descriptor> + </descriptors> + <appendAssemblyId>false</appendAssemblyId> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> - <build> - <plugins> - <plugin> - <artifactId>maven-assembly-plugin</artifactId> - <executions> - <execution> - <goals> - <goal>single</goal> - </goals> - <phase>package</phase> - <configuration> - <descriptors> - <descriptor>src/assembly/zip.xml</descriptor> - </descriptors> - <appendAssemblyId>false</appendAssemblyId> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> + <!-- The following are placed in the local or remote repository at installation --> + <dependencies> + <dependency> + <groupId>org.onap.policy.drools-applications</groupId> + <artifactId>drools-applications</artifactId> + <version>${project.version}</version> + <type>pom</type> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications</groupId> + <artifactId>controlloop</artifactId> + <version>${project.version}</version> + <type>pom</type> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop</groupId> + <artifactId>controlloop</artifactId> + <version>${project.version}</version> + <type>pom</type> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>model-impl</artifactId> + <version>${project.version}</version> + <type>pom</type> + </dependency> - <!-- The following are placed in the local or remote repository at installation --> - <dependencies> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>drools-pdp-apps</artifactId> - <version>${project.version}</version> - <type>pom</type> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>controlloop</artifactId> - <version>${project.version}</version> - <type>pom</type> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>common</artifactId> - <version>${project.version}</version> - <type>pom</type> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>model-impl</artifactId> - <version>${project.version}</version> - <type>pom</type> - </dependency> - - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>events</artifactId> - <version>${project.version}</version> - <type>jar</type> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>appc</artifactId> - <version>${project.version}</version> - <type>jar</type> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>appclcm</artifactId> - <version>${project.version}</version> - <type>jar</type> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>vfc</artifactId> - <version>${project.version}</version> - <type>jar</type> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>aai</artifactId> - <version>${project.version}</version> - <type>jar</type> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>so</artifactId> - <version>${project.version}</version> - <type>jar</type> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>sdc</artifactId> - <version>${project.version}</version> - <type>jar</type> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>trafficgenerator</artifactId> - <version>${project.version}</version> - <type>jar</type> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>eventmanager</artifactId> - <version>${project.version}</version> - <type>jar</type> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>guard</artifactId> - <version>${project.version}</version> - <type>jar</type> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>actorServiceProvider</artifactId> - <version>${project.version}</version> - <type>jar</type> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>actor.appc</artifactId> - <version>${project.version}</version> - <type>jar</type> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>actor.appclcm</artifactId> - <version>${project.version}</version> - <type>jar</type> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>actor.so</artifactId> - <version>${project.version}</version> - <type>jar</type> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>actor.vfc</artifactId> - <version>${project.version}</version> - <type>jar</type> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>policy-yaml</artifactId> - <version>${project.version}</version> - <type>jar</type> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>template.demo</artifactId> - <version>${project.version}</version> - <type>jar</type> - </dependency> - <dependency> - <groupId>com.att.research.xacml</groupId> - <artifactId>xacml-pdp</artifactId> - <version>1.0.1</version> - <type>jar</type> - </dependency> - </dependencies> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>events</artifactId> + <version>${project.version}</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>appc</artifactId> + <version>${project.version}</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>appclcm</artifactId> + <version>${project.version}</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>vfc</artifactId> + <version>${project.version}</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>aai</artifactId> + <version>${project.version}</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>so</artifactId> + <version>${project.version}</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>sdc</artifactId> + <version>${project.version}</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>trafficgenerator</artifactId> + <version>${project.version}</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common</groupId> + <artifactId>eventmanager</artifactId> + <version>${project.version}</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common</groupId> + <artifactId>guard</artifactId> + <version>${project.version}</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId> + <artifactId>actorServiceProvider</artifactId> + <version>${project.version}</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId> + <artifactId>actor.appc</artifactId> + <version>${project.version}</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId> + <artifactId>actor.appclcm</artifactId> + <version>${project.version}</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId> + <artifactId>actor.so</artifactId> + <version>${project.version}</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId> + <artifactId>actor.vfc</artifactId> + <version>${project.version}</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common</groupId> + <artifactId>policy-yaml</artifactId> + <version>${project.version}</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.templates</groupId> + <artifactId>template.demo</artifactId> + <version>${project.version}</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>com.att.research.xacml</groupId> + <artifactId>xacml-pdp</artifactId> + <version>1.0.1</version> + <type>jar</type> + </dependency> + </dependencies> </project> diff --git a/controlloop/packages/basex/pom.xml b/controlloop/packages/basex/pom.xml index b28f9a886..ed5016bcb 100644 --- a/controlloop/packages/basex/pom.xml +++ b/controlloop/packages/basex/pom.xml @@ -19,43 +19,42 @@ --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>packages</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> - - <artifactId>basex</artifactId> - <packaging>pom</packaging> - - <name>PDP-D APPS Base Package</name> - <description>PDP-D APPS Packaging</description> - - <build> - <plugins> - <plugin> - <artifactId>maven-assembly-plugin</artifactId> - <executions> - <execution> - <goals> - <goal>single</goal> - </goals> - <phase>package</phase> - <configuration> - <descriptors> - <descriptor>src/assembly/zip.xml</descriptor> - </descriptors> - <appendAssemblyId>false</appendAssemblyId> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <packaging>pom</packaging> + + <parent> + <groupId>org.onap.policy.drools-applications.controlloop.packages</groupId> + <artifactId>packages</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> + + <artifactId>basex</artifactId> + + <name>Drools ApplicationsBase Package</name> + <description>Drools Applications Packaging</description> + + <build> + <plugins> + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>single</goal> + </goals> + <phase>package</phase> + <configuration> + <descriptors> + <descriptor>src/assembly/zip.xml</descriptor> + </descriptors> + <appendAssemblyId>false</appendAssemblyId> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> </project> diff --git a/controlloop/packages/basex/src/files/bin/create-cl-amsterdam b/controlloop/packages/basex/src/files/bin/create-cl-amsterdam index fabf35d75..ad5585035 100644 --- a/controlloop/packages/basex/src/files/bin/create-cl-amsterdam +++ b/controlloop/packages/basex/src/files/bin/create-cl-amsterdam @@ -124,7 +124,7 @@ if [ ! -w "${DIR_TMP}" ]; then exit 1 fi -ARCHETYPE_GROUP_ID="org.onap.policy.drools-applications" +ARCHETYPE_GROUP_ID="org.onap.policy.drools-applications.controlloop.templates" ARCHETYPE_ARTIFACT_ID="archetype-cl-amsterdam" ARCHETYPE_VERSION="${VERSION}" diff --git a/controlloop/packages/pom.xml b/controlloop/packages/pom.xml index 5362fa581..99e4beaa0 100644 --- a/controlloop/packages/pom.xml +++ b/controlloop/packages/pom.xml @@ -19,25 +19,25 @@ --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <packaging>pom</packaging> - <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.onap.policy.drools-applications.controlloop</groupId> + <artifactId>controlloop</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> - <parent> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>controlloop</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> + <groupId>org.onap.policy.drools-applications.controlloop.packages</groupId> + <artifactId>packages</artifactId> - <artifactId>packages</artifactId> - <packaging>pom</packaging> + <name>PDP-D Application Installation Packages</name> + <description>PDP-D Installation</description> - <name>PDP-D Application Installation Packages</name> - <description>PDP-D Installation</description> - - <modules> - <module>basex</module> - <module>artifacts</module> - <module>apps</module> - </modules> + <modules> + <module>basex</module> + <module>artifacts</module> + <module>apps</module> + </modules> </project> diff --git a/controlloop/pom.xml b/controlloop/pom.xml index b36fe57b0..d44283c64 100644 --- a/controlloop/pom.xml +++ b/controlloop/pom.xml @@ -1,6 +1,6 @@ <!-- ============LICENSE_START======================================================= - drools-pdp-apps + drools-applications ================================================================================ Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. ================================================================================ @@ -19,24 +19,24 @@ --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <packaging>pom</packaging> - <modelVersion>4.0.0</modelVersion> - - <artifactId>controlloop</artifactId> - <packaging>pom</packaging> + <parent> + <groupId>org.onap.policy.drools-applications</groupId> + <artifactId>drools-applications</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> - <parent> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>drools-pdp-apps</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> + <groupId>org.onap.policy.drools-applications.controlloop</groupId> + <artifactId>controlloop</artifactId> - <modules> - <module>common</module> - <module>templates</module> - <module>packages</module> - </modules> + <modules> + <module>common</module> + <module>templates</module> + <module>packages</module> + </modules> </project> diff --git a/controlloop/templates/archetype-cl-amsterdam/pom.xml b/controlloop/templates/archetype-cl-amsterdam/pom.xml index ef553e0d2..c2f3a19ac 100644 --- a/controlloop/templates/archetype-cl-amsterdam/pom.xml +++ b/controlloop/templates/archetype-cl-amsterdam/pom.xml @@ -20,37 +20,37 @@ --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <packaging>maven-archetype</packaging> - <parent> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>templates</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> + <parent> + <groupId>org.onap.policy.drools-applications.controlloop.templates</groupId> + <artifactId>templates</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> - <artifactId>archetype-cl-amsterdam</artifactId> - <packaging>maven-archetype</packaging> + <artifactId>archetype-cl-amsterdam</artifactId> - <name>archetype-cl-amsterdam</name> - <description>Archetype to generate a yaml based control loop for ONAP Amsterdam release</description> + <name>${artifactId}</name> + <description>Archetype to generate a yaml based control loop for ONAP Amsterdam release</description> - <build> - <extensions> - <extension> - <groupId>org.apache.maven.archetype</groupId> - <artifactId>archetype-packaging</artifactId> - <version>3.0.1</version> - </extension> - </extensions> + <build> + <extensions> + <extension> + <groupId>org.apache.maven.archetype</groupId> + <artifactId>archetype-packaging</artifactId> + <version>3.0.1</version> + </extension> + </extensions> - <pluginManagement> - <plugins> - <plugin> - <artifactId>maven-archetype-plugin</artifactId> - <version>3.0.1</version> - </plugin> - </plugins> - </pluginManagement> - </build> + <pluginManagement> + <plugins> + <plugin> + <artifactId>maven-archetype-plugin</artifactId> + <version>3.0.1</version> + </plugin> + </plugins> + </pluginManagement> + </build> </project> diff --git a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/pom.xml b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/pom.xml index 4b83f8985..1cb159ad8 100644 --- a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/pom.xml +++ b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/pom.xml @@ -20,125 +20,125 @@ --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> - <groupId>${groupId}</groupId> - <artifactId>${artifactId}</artifactId> - <version>${version}</version> - <packaging>kjar</packaging> + <groupId>${groupId}</groupId> + <artifactId>${artifactId}</artifactId> + <version>${version}</version> + <packaging>kjar</packaging> - <name>${artifactId}</name> - <description>Control Loop Amsterdam Release Rules</description> + <name>${artifactId}</name> + <description>Control Loop Amsterdam Release Rules</description> - <properties> - <maven.compiler.source>1.8</maven.compiler.source> - <maven.compiler.target>1.8</maven.compiler.target> - </properties> + <properties> + <maven.compiler.source>1.8</maven.compiler.source> + <maven.compiler.target>1.8</maven.compiler.target> + </properties> - <build> - <plugins> - <plugin> - <groupId>org.kie</groupId> - <artifactId>kie-maven-plugin</artifactId> - <version>6.5.0.Final</version> - <extensions>true</extensions> - </plugin> - </plugins> - </build> + <build> + <plugins> + <plugin> + <groupId>org.kie</groupId> + <artifactId>kie-maven-plugin</artifactId> + <version>6.5.0.Final</version> + <extensions>true</extensions> + </plugin> + </plugins> + </build> - <dependencies> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>events</artifactId> - <version>${dependenciesVersion}</version> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>appc</artifactId> - <version>${dependenciesVersion}</version> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>appclcm</artifactId> - <version>${dependenciesVersion}</version> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>vfc</artifactId> - <version>${dependenciesVersion}</version> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>so</artifactId> - <version>${dependenciesVersion}</version> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>aai</artifactId> - <version>${dependenciesVersion}</version> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>sdc</artifactId> - <version>${dependenciesVersion}</version> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>trafficgenerator</artifactId> - <version>${dependenciesVersion}</version> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>eventmanager</artifactId> - <version>${dependenciesVersion}</version> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>guard</artifactId> - <version>${dependenciesVersion}</version> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>actorServiceProvider</artifactId> - <version>${dependenciesVersion}</version> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>actor.appc</artifactId> - <version>${dependenciesVersion}</version> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>actor.appclcm</artifactId> - <version>${dependenciesVersion}</version> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>actor.so</artifactId> - <version>${dependenciesVersion}</version> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>actor.vfc</artifactId> - <version>${dependenciesVersion}</version> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>policy-yaml</artifactId> - <version>${dependenciesVersion}</version> - </dependency> - <dependency> - <groupId>com.att.research.xacml</groupId> - <artifactId>xacml-pdp</artifactId> - <version>1.0.1</version> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-pdp</groupId> - <artifactId>policy-management</artifactId> - <version>${dependenciesVersion}</version> - <scope>provided</scope> - <optional>true</optional> - </dependency> - </dependencies> + <dependencies> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>events</artifactId> + <version>${dependenciesVersion}</version> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>appc</artifactId> + <version>${dependenciesVersion}</version> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>appclcm</artifactId> + <version>${dependenciesVersion}</version> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>vfc</artifactId> + <version>${dependenciesVersion}</version> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>so</artifactId> + <version>${dependenciesVersion}</version> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>aai</artifactId> + <version>${dependenciesVersion}</version> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>sdc</artifactId> + <version>${dependenciesVersion}</version> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>trafficgenerator</artifactId> + <version>${dependenciesVersion}</version> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common</groupId> + <artifactId>eventmanager</artifactId> + <version>${dependenciesVersion}</version> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common</groupId> + <artifactId>guard</artifactId> + <version>${dependenciesVersion}</version> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId> + <artifactId>actorServiceProvider</artifactId> + <version>${dependenciesVersion}</version> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId> + <artifactId>actor.appc</artifactId> + <version>${dependenciesVersion}</version> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId> + <artifactId>actor.appclcm</artifactId> + <version>${dependenciesVersion}</version> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId> + <artifactId>actor.so</artifactId> + <version>${dependenciesVersion}</version> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId> + <artifactId>actor.vfc</artifactId> + <version>${dependenciesVersion}</version> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common</groupId> + <artifactId>policy-yaml</artifactId> + <version>${dependenciesVersion}</version> + </dependency> + <dependency> + <groupId>com.att.research.xacml</groupId> + <artifactId>xacml-pdp</artifactId> + <version>1.0.1</version> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-pdp</groupId> + <artifactId>policy-management</artifactId> + <version>${dependenciesVersion}</version> + <scope>provided</scope> + <optional>true</optional> + </dependency> + </dependencies> </project> diff --git a/controlloop/templates/pom.xml b/controlloop/templates/pom.xml index b33553e6a..71541ab80 100644 --- a/controlloop/templates/pom.xml +++ b/controlloop/templates/pom.xml @@ -1,6 +1,6 @@ <!-- ============LICENSE_START======================================================= - drools-pdp-apps Control Loop Drools Templates + drools-applications Control Loop Drools Templates ================================================================================ Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. ================================================================================ @@ -19,23 +19,23 @@ --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <packaging>pom</packaging> - <modelVersion>4.0.0</modelVersion> - - <artifactId>templates</artifactId> - <packaging>pom</packaging> + <parent> + <groupId>org.onap.policy.drools-applications.controlloop</groupId> + <artifactId>controlloop</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> - <parent> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>controlloop</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> + <groupId>org.onap.policy.drools-applications.controlloop.templates</groupId> + <artifactId>templates</artifactId> - <modules> - <module>template.demo</module> - <module>archetype-cl-amsterdam</module> - </modules> + <modules> + <module>template.demo</module> + <module>archetype-cl-amsterdam</module> + </modules> </project> diff --git a/controlloop/templates/template.demo/pom.xml b/controlloop/templates/template.demo/pom.xml index c501bfd94..f2700e7d5 100644 --- a/controlloop/templates/template.demo/pom.xml +++ b/controlloop/templates/template.demo/pom.xml @@ -1,6 +1,6 @@ <!-- ============LICENSE_START======================================================= - drools-pdp-apps Control Loop Drools Templates + drools-applications Control Loop Drools Templates ================================================================================ Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. ================================================================================ @@ -18,184 +18,187 @@ ============LICENSE_END========================================================= --> - <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>templates</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> - <artifactId>template.demo</artifactId> - <dependencies> - <dependency> - <groupId>org.eclipse.persistence</groupId> - <artifactId>org.eclipse.persistence.jpa</artifactId> - <version>2.7.0</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>commons-io</groupId> - <artifactId>commons-io</artifactId> - <version>2.5</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.drools</groupId> - <artifactId>drools-core</artifactId> - <version>6.5.0.Final</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.drools</groupId> - <artifactId>drools-compiler</artifactId> - <version>6.5.0.Final</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>com.google.code.gson</groupId> - <artifactId>gson</artifactId> - <version>2.5</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>appc</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>appclcm</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>so</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>trafficgenerator</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>vfc</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>events</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>guard</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>aai</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>sdc</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>policy-yaml</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>eventmanager</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>com.att.research.xacml</groupId> - <artifactId>xacml</artifactId> - <version>1.0.1</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>com.att.research.xacml</groupId> - <artifactId>xacml-pdp</artifactId> - <version>1.0.1</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>javax.persistence</groupId> - <artifactId>persistence-api</artifactId> - <version>1.0.2</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>actorServiceProvider</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>actor.appc</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>actor.appclcm</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>actor.so</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>actor.vfc</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>com.h2database</groupId> - <artifactId>h2</artifactId> - <version>[1.4.186,)</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>simulators</artifactId> - <version>${project.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-pdp</groupId> - <artifactId>policy-management</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - </dependencies> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.onap.policy.drools-applications.controlloop.templates</groupId> + <artifactId>templates</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> + + <artifactId>template.demo</artifactId> + + <dependencies> + <dependency> + <groupId>org.eclipse.persistence</groupId> + <artifactId>org.eclipse.persistence.jpa</artifactId> + <version>2.7.0</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>commons-io</groupId> + <artifactId>commons-io</artifactId> + <version>2.5</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.drools</groupId> + <artifactId>drools-core</artifactId> + <version>6.5.0.Final</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.drools</groupId> + <artifactId>drools-compiler</artifactId> + <version>6.5.0.Final</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>2.5</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>appc</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>appclcm</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>so</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>trafficgenerator</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>vfc</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>events</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common</groupId> + <artifactId>guard</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>aai</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>sdc</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common</groupId> + <artifactId>policy-yaml</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common</groupId> + <artifactId>eventmanager</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>com.att.research.xacml</groupId> + <artifactId>xacml</artifactId> + <version>1.0.1</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.att.research.xacml</groupId> + <artifactId>xacml-pdp</artifactId> + <version>1.0.1</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>javax.persistence</groupId> + <artifactId>persistence-api</artifactId> + <version>1.0.2</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId> + <artifactId>actorServiceProvider</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId> + <artifactId>actor.appc</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId> + <artifactId>actor.appclcm</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId> + <artifactId>actor.so</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId> + <artifactId>actor.vfc</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.h2database</groupId> + <artifactId>h2</artifactId> + <version>[1.4.186,)</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common</groupId> + <artifactId>simulators</artifactId> + <version>${project.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-pdp</groupId> + <artifactId>policy-management</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + </dependencies> </project> + |