From d614f2f3871ea6b46b0e8b0bbd8be70414710164 Mon Sep 17 00:00:00 2001 From: ramverma Date: Wed, 20 Mar 2019 13:36:35 +0000 Subject: Adding classes to models-pap Change-Id: I59acfeeef5e2b93d7d16dbf5c26811a037e255c1 Issue-ID: POLICY-1541 Signed-off-by: ramverma --- .../onap/policy/models/pap/concepts/PdpGroup.java | 2 +- .../pap/concepts/PdpGroupStateChangeResponse.java | 35 ++++++++++++++++++ .../models/pap/concepts/PdpInstanceDetails.java | 2 +- .../policy/models/pap/concepts/PdpPolicies.java | 2 +- .../policy/models/pap/concepts/PdpSubGroup.java | 2 -- .../onap/policy/models/pap/concepts/Policy.java | 42 ++++++++++++++++++++++ 6 files changed, 80 insertions(+), 5 deletions(-) create mode 100644 models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpGroupStateChangeResponse.java create mode 100644 models-pap/src/main/java/org/onap/policy/models/pap/concepts/Policy.java (limited to 'models-pap') diff --git a/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpGroup.java b/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpGroup.java index 6da5a10d1..148168d89 100644 --- a/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpGroup.java +++ b/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpGroup.java @@ -41,7 +41,7 @@ public class PdpGroup { private String name; private String version; - private PdpState state; + private PdpState pdpGroupstate; private String description; private Map properties; private List pdpSubgroups; diff --git a/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpGroupStateChangeResponse.java b/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpGroupStateChangeResponse.java new file mode 100644 index 000000000..1c013012a --- /dev/null +++ b/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpGroupStateChangeResponse.java @@ -0,0 +1,35 @@ +/*- + * ============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.models.pap.concepts; + +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; + +/** + * Response to PDP Group State Change REST API. + */ +@Getter +@Setter +@ToString +public class PdpGroupStateChangeResponse extends SimpleResponse { + +} diff --git a/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpInstanceDetails.java b/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpInstanceDetails.java index 44645fcc0..168c20e38 100644 --- a/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpInstanceDetails.java +++ b/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpInstanceDetails.java @@ -38,7 +38,7 @@ import org.onap.policy.pdp.common.enums.PdpState; public class PdpInstanceDetails { private String instanceId; - private PdpState state; + private PdpState pdpState; private PdpHealthStatus healthy; private String message; } diff --git a/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpPolicies.java b/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpPolicies.java index f20255858..e5ae24d0f 100644 --- a/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpPolicies.java +++ b/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpPolicies.java @@ -21,10 +21,10 @@ package org.onap.policy.models.pap.concepts; import java.util.List; + import lombok.Getter; import lombok.Setter; import lombok.ToString; -import org.onap.policy.pdp.common.models.Policy; /** * Request deploy or update a set of policies using the simple PDP Group deployment diff --git a/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpSubGroup.java b/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpSubGroup.java index 248c82979..ebb476d92 100644 --- a/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpSubGroup.java +++ b/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpSubGroup.java @@ -27,8 +27,6 @@ import lombok.Getter; import lombok.Setter; import lombok.ToString; -import org.onap.policy.pdp.common.models.Policy; - /** * Class to represent a group of all PDP's of the same pdp type running for a particular domain. * diff --git a/models-pap/src/main/java/org/onap/policy/models/pap/concepts/Policy.java b/models-pap/src/main/java/org/onap/policy/models/pap/concepts/Policy.java new file mode 100644 index 000000000..e1281fc51 --- /dev/null +++ b/models-pap/src/main/java/org/onap/policy/models/pap/concepts/Policy.java @@ -0,0 +1,42 @@ +/*- + * ============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.models.pap.concepts; + +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 +public class Policy { + + private String name; + private String policyVersion; + private String policyType; + private String policyTypeVersion; + private String policyTypeImpl; +} -- cgit 1.2.3-korg