From 21e6fdea3e207ae7c690158ddc336bd7c0785b15 Mon Sep 17 00:00:00 2001 From: ramverma Date: Tue, 2 Apr 2019 17:58:10 +0000 Subject: Deleting pdp-common module from policy/common Change-Id: I1b599ce62a4fab852420089b5d1d8ae8f5cfe7ca Issue-ID: POLICY-1443 Signed-off-by: ramverma --- pdp-common/pom.xml | 51 ----------------- .../policy/pdp/common/enums/PdpHealthStatus.java | 44 --------------- .../policy/pdp/common/enums/PdpMessageType.java | 52 ----------------- .../policy/pdp/common/enums/PdpResponseStatus.java | 39 ------------- .../org/onap/policy/pdp/common/enums/PdpState.java | 57 ------------------- .../policy/pdp/common/models/PdpHealthCheck.java | 50 ---------------- .../onap/policy/pdp/common/models/PdpMessage.java | 58 ------------------- .../pdp/common/models/PdpResponseDetails.java | 43 -------------- .../policy/pdp/common/models/PdpStateChange.java | 52 ----------------- .../policy/pdp/common/models/PdpStatistics.java | 43 -------------- .../onap/policy/pdp/common/models/PdpStatus.java | 66 ---------------------- .../onap/policy/pdp/common/models/PdpUpdate.java | 55 ------------------ .../org/onap/policy/pdp/common/models/Policy.java | 44 --------------- .../onap/policy/pdp/common/models/TestModels.java | 47 --------------- pom.xml | 1 - 15 files changed, 702 deletions(-) delete mode 100644 pdp-common/pom.xml delete mode 100644 pdp-common/src/main/java/org/onap/policy/pdp/common/enums/PdpHealthStatus.java delete mode 100644 pdp-common/src/main/java/org/onap/policy/pdp/common/enums/PdpMessageType.java delete mode 100644 pdp-common/src/main/java/org/onap/policy/pdp/common/enums/PdpResponseStatus.java delete mode 100644 pdp-common/src/main/java/org/onap/policy/pdp/common/enums/PdpState.java delete mode 100644 pdp-common/src/main/java/org/onap/policy/pdp/common/models/PdpHealthCheck.java delete mode 100644 pdp-common/src/main/java/org/onap/policy/pdp/common/models/PdpMessage.java delete mode 100644 pdp-common/src/main/java/org/onap/policy/pdp/common/models/PdpResponseDetails.java delete mode 100644 pdp-common/src/main/java/org/onap/policy/pdp/common/models/PdpStateChange.java delete mode 100644 pdp-common/src/main/java/org/onap/policy/pdp/common/models/PdpStatistics.java delete mode 100644 pdp-common/src/main/java/org/onap/policy/pdp/common/models/PdpStatus.java delete mode 100644 pdp-common/src/main/java/org/onap/policy/pdp/common/models/PdpUpdate.java delete mode 100644 pdp-common/src/main/java/org/onap/policy/pdp/common/models/Policy.java delete mode 100644 pdp-common/src/test/java/org/onap/policy/pdp/common/models/TestModels.java diff --git a/pdp-common/pom.xml b/pdp-common/pom.xml deleted file mode 100644 index 4c1c989e..00000000 --- a/pdp-common/pom.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - 4.0.0 - - org.onap.policy.common - common-modules - 1.4.0-SNAPSHOT - - - pdp-common - ${project.artifactId} - This module contains the common code across all the PDP's in ONAP Policy Framework. - - - - org.projectlombok - lombok - provided - - - org.onap.policy.common - utils - ${project.version} - - - junit - junit - test - - - \ No newline at end of file diff --git a/pdp-common/src/main/java/org/onap/policy/pdp/common/enums/PdpHealthStatus.java b/pdp-common/src/main/java/org/onap/policy/pdp/common/enums/PdpHealthStatus.java deleted file mode 100644 index 5b2f58b9..00000000 --- a/pdp-common/src/main/java/org/onap/policy/pdp/common/enums/PdpHealthStatus.java +++ /dev/null @@ -1,44 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2019 Nordix Foundation. - * ================================================================================ - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.pdp.common.enums; - -/** - * Class to hold the possible values for health status of PDP. - * - * @author Ram Krishna Verma (ram.krishna.verma@est.tech) - */ -public enum PdpHealthStatus { - - /** - * PDP is healthy and working fine. - */ - HEALTHY, - - /** - * PDP is not healthy. - */ - NOT_HEALTHY, - - /** - * PDP is currently under test state and performing tests. - */ - TEST_IN_PROGRESS, -} diff --git a/pdp-common/src/main/java/org/onap/policy/pdp/common/enums/PdpMessageType.java b/pdp-common/src/main/java/org/onap/policy/pdp/common/enums/PdpMessageType.java deleted file mode 100644 index f59e84fb..00000000 --- a/pdp-common/src/main/java/org/onap/policy/pdp/common/enums/PdpMessageType.java +++ /dev/null @@ -1,52 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2019 Nordix Foundation. - * ================================================================================ - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.pdp.common.enums; - -/** - * Class to hold the possible values for the type of PDP messages. - * - * @author Ram Krishna Verma (ram.krishna.verma@est.tech) - */ -public enum PdpMessageType { - - /** - * Used by PDPs to report status to PAP. - */ - PDP_STATUS, - - /** - * Used by PAP to update the policies running on PDPs, triggers a PDP_STATUS message with the result of the - * PDP_UPDATE operation. - */ - PDP_UPDATE, - - /** - * Used by PAP to change the state of PDPs, triggers a PDP_STATUS message with the result of the PDP_STATE_CHANGE - * operation. - */ - PDP_STATE_CHANGE, - - /** - * Used by PAP to order a health check on PDPs, triggers a PDP_STATUS message with the result of the - * PDP_HEALTH_CHECK operation. - */ - PDP_HEALTH_CHECK, -} diff --git a/pdp-common/src/main/java/org/onap/policy/pdp/common/enums/PdpResponseStatus.java b/pdp-common/src/main/java/org/onap/policy/pdp/common/enums/PdpResponseStatus.java deleted file mode 100644 index 5bc994a6..00000000 --- a/pdp-common/src/main/java/org/onap/policy/pdp/common/enums/PdpResponseStatus.java +++ /dev/null @@ -1,39 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2019 Nordix Foundation. - * ================================================================================ - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.pdp.common.enums; - -/** - * Class to hold the possible values for PDP response status. - * - * @author Ram Krishna Verma (ram.krishna.verma@est.tech) - */ -public enum PdpResponseStatus { - - /** - * PDP operation was successful. - */ - SUCCESS, - - /** - * PDP operation failed. - */ - FAIL, -} diff --git a/pdp-common/src/main/java/org/onap/policy/pdp/common/enums/PdpState.java b/pdp-common/src/main/java/org/onap/policy/pdp/common/enums/PdpState.java deleted file mode 100644 index 88124157..00000000 --- a/pdp-common/src/main/java/org/onap/policy/pdp/common/enums/PdpState.java +++ /dev/null @@ -1,57 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2019 Nordix Foundation. - * ================================================================================ - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.pdp.common.enums; - -/** - * Class to hold the possible values for state of PDP. - * - * @author Ram Krishna Verma (ram.krishna.verma@est.tech) - */ -public enum PdpState { - - /** - * Policy execution is always rejected irrespective of PDP type. - */ - PASSIVE, - - /** - * Policy execution proceeds, but changes to domain state or context are not carried out. The PDP returns an - * indication that it is running in SAFE mode together with the action it would have performed if it was operating - * in ACTIVE mode. - */ - SAFE, - - /** - * Policy execution proceeds and changes to domain and state are carried out in a test environment. The PDP returns - * an indication that it is running in TEST mode together with the action it has performed on the test environment. - */ - TEST, - - /** - * Policy execution is executed in the live environment by the PDP. - */ - ACTIVE, - - /** - * Policy execution is terminated and not available. - */ - TERMINATED -} diff --git a/pdp-common/src/main/java/org/onap/policy/pdp/common/models/PdpHealthCheck.java b/pdp-common/src/main/java/org/onap/policy/pdp/common/models/PdpHealthCheck.java deleted file mode 100644 index 24fbbb9f..00000000 --- a/pdp-common/src/main/java/org/onap/policy/pdp/common/models/PdpHealthCheck.java +++ /dev/null @@ -1,50 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2019 Nordix Foundation. - * ================================================================================ - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.pdp.common.models; - -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import org.onap.policy.pdp.common.enums.PdpMessageType; - -/** - * Class to represent the PDP_HEALTH_CHECK message that PAP will send to either PDPGroup/Subgroup or a PDP. - * - * @author Ram Krishna Verma (ram.krishna.verma@est.tech) - */ -@Getter -@Setter -@ToString -public class PdpHealthCheck extends PdpMessage { - - private String name; - private String pdpGroup; - private String pdpSubgroup; - - /** - * Constructor for instantiating PdpHealthCheck class with message name. - * - */ - public PdpHealthCheck() { - super(PdpMessageType.PDP_HEALTH_CHECK); - } -} diff --git a/pdp-common/src/main/java/org/onap/policy/pdp/common/models/PdpMessage.java b/pdp-common/src/main/java/org/onap/policy/pdp/common/models/PdpMessage.java deleted file mode 100644 index 4fcd445f..00000000 --- a/pdp-common/src/main/java/org/onap/policy/pdp/common/models/PdpMessage.java +++ /dev/null @@ -1,58 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2019 Nordix Foundation. - * ================================================================================ - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.pdp.common.models; - -import lombok.AccessLevel; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import org.onap.policy.pdp.common.enums.PdpMessageType; - -/** - * Class to represent the base class for various messages that will ve exchanged between PAP and PDP. - * - * @author Ram Krishna Verma (ram.krishna.verma@est.tech) - */ -@Getter -@Setter -@ToString -public class PdpMessage { - - @Setter(AccessLevel.NONE) - private PdpMessageType messageName; - private String requestId; - - /** - * Time-stamp, in milliseconds, when the message was created. Defaults to the current - * time. - */ - private long timestampMs = System.currentTimeMillis(); - - /** - * Constructor for instantiating PdpMessage class with message name. - * - * @param messageName the message name - */ - public PdpMessage(final PdpMessageType messageName) { - this.messageName = messageName; - } -} diff --git a/pdp-common/src/main/java/org/onap/policy/pdp/common/models/PdpResponseDetails.java b/pdp-common/src/main/java/org/onap/policy/pdp/common/models/PdpResponseDetails.java deleted file mode 100644 index 5d1c472d..00000000 --- a/pdp-common/src/main/java/org/onap/policy/pdp/common/models/PdpResponseDetails.java +++ /dev/null @@ -1,43 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2019 Nordix Foundation. - * ================================================================================ - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.pdp.common.models; - -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import org.onap.policy.pdp.common.enums.PdpResponseStatus; - -/** - * Class to represent PDP response details. - * - * @author Ram Krishna Verma (ram.krishna.verma@est.tech) - */ -@Getter -@Setter -@ToString -public class PdpResponseDetails { - - // The responseTo field should match the original request id in the request. - private String responseTo; - private PdpResponseStatus responseStatus; - private String responseMessage; -} diff --git a/pdp-common/src/main/java/org/onap/policy/pdp/common/models/PdpStateChange.java b/pdp-common/src/main/java/org/onap/policy/pdp/common/models/PdpStateChange.java deleted file mode 100644 index e11e4a8b..00000000 --- a/pdp-common/src/main/java/org/onap/policy/pdp/common/models/PdpStateChange.java +++ /dev/null @@ -1,52 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2019 Nordix Foundation. - * ================================================================================ - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.pdp.common.models; - -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import org.onap.policy.pdp.common.enums.PdpMessageType; -import org.onap.policy.pdp.common.enums.PdpState; - -/** - * Class to represent the PDP_STATE_CHANGE message that PAP will send to either PDPGroup/Subgroup or a PDP. - * - * @author Ram Krishna Verma (ram.krishna.verma@est.tech) - */ -@Getter -@Setter -@ToString -public class PdpStateChange extends PdpMessage { - - private String name; - private PdpState state; - private String pdpGroup; - private String pdpSubgroup; - - /** - * Constructor for instantiating PdpStateChange class with message name. - * - */ - public PdpStateChange() { - super(PdpMessageType.PDP_STATE_CHANGE); - } -} diff --git a/pdp-common/src/main/java/org/onap/policy/pdp/common/models/PdpStatistics.java b/pdp-common/src/main/java/org/onap/policy/pdp/common/models/PdpStatistics.java deleted file mode 100644 index 40f34aa2..00000000 --- a/pdp-common/src/main/java/org/onap/policy/pdp/common/models/PdpStatistics.java +++ /dev/null @@ -1,43 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2019 Nordix Foundation. - * ================================================================================ - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.pdp.common.models; - -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -/** - * Class to represent statistics of a running PDP. - * - * @author Ram Krishna Verma (ram.krishna.verma@est.tech) - */ -@Getter -@Setter -@ToString -public class PdpStatistics { - - private long policyDownloadCount; - private long policyDownloadSuccessCount; - private long policyDownloadFailCount; - private long policyExecutedCount; - private long policyExecutedSuccessCount; - private long policyExecutedFailCount; -} diff --git a/pdp-common/src/main/java/org/onap/policy/pdp/common/models/PdpStatus.java b/pdp-common/src/main/java/org/onap/policy/pdp/common/models/PdpStatus.java deleted file mode 100644 index 5174cc9e..00000000 --- a/pdp-common/src/main/java/org/onap/policy/pdp/common/models/PdpStatus.java +++ /dev/null @@ -1,66 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2019 Nordix Foundation. - * ================================================================================ - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.pdp.common.models; - -import java.util.List; - -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import org.onap.policy.pdp.common.enums.PdpHealthStatus; -import org.onap.policy.pdp.common.enums.PdpMessageType; -import org.onap.policy.pdp.common.enums.PdpState; - -/** - * Class to represent the PDP_STATUS message that all the PDP's will send to PAP. - * - * @author Ram Krishna Verma (ram.krishna.verma@est.tech) - */ -@Getter -@Setter -@ToString -public class PdpStatus extends PdpMessage { - - private String name; - private String version; - private String pdpType; - private PdpState state; - private PdpHealthStatus healthy; - private String description; - private String pdpGroup; - private String pdpSubgroup; - private List supportedPolicyTypes; - private List policies; - private String instance; - private String deploymentInstanceInfo; - private String properties; - private PdpStatistics statistics; - private PdpResponseDetails response; - - /** - * Constructor for instantiating PdpStatus class with message name. - * - */ - public PdpStatus() { - super(PdpMessageType.PDP_STATUS); - } -} diff --git a/pdp-common/src/main/java/org/onap/policy/pdp/common/models/PdpUpdate.java b/pdp-common/src/main/java/org/onap/policy/pdp/common/models/PdpUpdate.java deleted file mode 100644 index 03559cc8..00000000 --- a/pdp-common/src/main/java/org/onap/policy/pdp/common/models/PdpUpdate.java +++ /dev/null @@ -1,55 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2019 Nordix Foundation. - * ================================================================================ - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.pdp.common.models; - -import java.util.List; - -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import org.onap.policy.pdp.common.enums.PdpMessageType; - -/** - * Class to represent the PDP_UPDATE message that PAP will send to a PDP. - * - * @author Ram Krishna Verma (ram.krishna.verma@est.tech) - */ -@Getter -@Setter -@ToString -public class PdpUpdate extends PdpMessage { - - private String name; - private String pdpType; - private String description; - private String pdpGroup; - private String pdpSubgroup; - private List policies; - - /** - * Constructor for instantiating PdpUpdate class with message name. - * - */ - public PdpUpdate() { - super(PdpMessageType.PDP_UPDATE); - } -} diff --git a/pdp-common/src/main/java/org/onap/policy/pdp/common/models/Policy.java b/pdp-common/src/main/java/org/onap/policy/pdp/common/models/Policy.java deleted file mode 100644 index b756386b..00000000 --- a/pdp-common/src/main/java/org/onap/policy/pdp/common/models/Policy.java +++ /dev/null @@ -1,44 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2019 Nordix Foundation. - * ================================================================================ - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.pdp.common.models; - -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -/** - * Class to represent a policy running in a PDP. - * - * @author Ram Krishna Verma (ram.krishna.verma@est.tech) - */ -@Getter -@Setter -@ToString -@EqualsAndHashCode -public class Policy { - - private String name; - private String policyVersion; - private String policyType; - private String policyTypeVersion; - private String properties; -} diff --git a/pdp-common/src/test/java/org/onap/policy/pdp/common/models/TestModels.java b/pdp-common/src/test/java/org/onap/policy/pdp/common/models/TestModels.java deleted file mode 100644 index 082a05ce..00000000 --- a/pdp-common/src/test/java/org/onap/policy/pdp/common/models/TestModels.java +++ /dev/null @@ -1,47 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2019 Nordix Foundation. - * ================================================================================ - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.pdp.common.models; - -import com.openpojo.reflection.filters.FilterPackageInfo; -import com.openpojo.validation.Validator; -import com.openpojo.validation.ValidatorBuilder; -import com.openpojo.validation.test.impl.GetterTester; -import com.openpojo.validation.test.impl.SetterTester; - -import org.junit.Test; -import org.onap.policy.common.utils.validation.ToStringTester; - -/** - * Class to perform unit testing of models. - * - * @author Ram Krishna Verma (ram.krishna.verma@est.tech) - */ -public class TestModels { - - private static final String MODELS_PACKAGE = "org.onap.policy.pdp.common.models"; - - @Test - public void testStatisticsReport() { - final Validator validator = ValidatorBuilder.create().with(new ToStringTester()).with(new SetterTester()) - .with(new GetterTester()).build(); - validator.validate(MODELS_PACKAGE, new FilterPackageInfo()); - } -} diff --git a/pom.xml b/pom.xml index 3b7d351e..0ff66762 100644 --- a/pom.xml +++ b/pom.xml @@ -72,7 +72,6 @@ integrity-audit integrity-monitor policy-endpoints - pdp-common -- cgit 1.2.3-korg