diff options
author | Pamela Dragosh <pdragosh@research.att.com> | 2018-08-28 15:22:22 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-08-28 15:22:22 +0000 |
commit | 9b1c49dafdb5f5a87ab91bf97e75e57cfd3825ab (patch) | |
tree | 167e1235a9cd0d552635bae909f83c4e450fdbe7 /controlloop/common/model-impl/aai | |
parent | acfe06391a8ec90636c33f7f5c830a3d33f2aeb7 (diff) | |
parent | f43b3e32fdf4cdb3361c584491730af18ef46baf (diff) |
Merge "use new SO API for scale-out"
Diffstat (limited to 'controlloop/common/model-impl/aai')
4 files changed, 38 insertions, 16 deletions
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqGenericVnf.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqGenericVnf.java index 342fefbec..788d236e7 100644 --- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqGenericVnf.java +++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqGenericVnf.java @@ -7,9 +7,9 @@ * 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. @@ -21,12 +21,11 @@ package org.onap.policy.aai; import com.google.gson.annotations.SerializedName; - import java.io.Serializable; public class AaiNqGenericVnf implements Serializable { - private static final long serialVersionUID = 834322706248060559L; + private static final long serialVersionUID = 834322706248060560L; @SerializedName("vnf-id") private String vnfId; @@ -79,6 +78,9 @@ public class AaiNqGenericVnf implements Serializable { @SerializedName("model-version-id") private String modelVersionId; + @SerializedName("model-customization-id") + private String modelCustomizationId = null; + public String getVnfId() { return vnfId; } @@ -147,6 +149,10 @@ public class AaiNqGenericVnf implements Serializable { return modelVersionId; } + public String getModelCustomizationId() { + return modelCustomizationId; + } + public void setVnfId(String vnfId) { this.vnfId = vnfId; } @@ -214,4 +220,8 @@ public class AaiNqGenericVnf implements Serializable { public void setModelVersionId(String modelVersionId) { this.modelVersionId = modelVersionId; } + + public void setModelCustomizationId(String modelCustomizationId) { + this.modelCustomizationId = modelCustomizationId; + } } diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqVfModule.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqVfModule.java index 923092a25..d8021af28 100644 --- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqVfModule.java +++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqVfModule.java @@ -2,14 +2,14 @@ * ============LICENSE_START======================================================= * aai * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2018 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. @@ -21,11 +21,10 @@ package org.onap.policy.aai; import com.google.gson.annotations.SerializedName; - import java.io.Serializable; public class AaiNqVfModule implements Serializable { - private static final long serialVersionUID = 8019133081429638231L; + private static final long serialVersionUID = 8019133081429638232L; @SerializedName("vf-module-id") private String vfModuleId; @@ -66,6 +65,9 @@ public class AaiNqVfModule implements Serializable { @SerializedName("model-version-id") private String modelVersionId; + @SerializedName("model-customization-id") + private String modelCustomizationId = null; + public String getVfModuleId() { return vfModuleId; } @@ -118,6 +120,10 @@ public class AaiNqVfModule implements Serializable { return modelVersionId; } + public String getModelCustomizationId() { + return modelCustomizationId; + } + public void setVfModuleId(String vfModuleId) { this.vfModuleId = vfModuleId; } @@ -169,4 +175,8 @@ public class AaiNqVfModule implements Serializable { public void setModelVersionId(String modelVersionId) { this.modelVersionId = modelVersionId; } + + public void setModelCustomizationId(String modelCustomizationId) { + this.modelCustomizationId = modelCustomizationId; + } } diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqGenericVnfTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqGenericVnfTest.java index 680e66e7c..4ca91e73a 100644 --- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqGenericVnfTest.java +++ b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqGenericVnfTest.java @@ -7,9 +7,9 @@ * 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. @@ -22,7 +22,6 @@ package org.onap.policy.aai; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; - import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; @@ -45,6 +44,7 @@ public class AaiNqGenericVnfTest { aaiNqGenericVnf.setIsClosedLoopDisabled(false); aaiNqGenericVnf.setModelInvariantId("653d2caa-7e47-4614-95b3-26c8d82755b8"); aaiNqGenericVnf.setModelVersionId("98f410f6-4c63-447b-97d2-42508437cec0"); + aaiNqGenericVnf.setModelCustomizationId("SomeCustomizationId"); aaiNqGenericVnf.setOperationalState("active"); aaiNqGenericVnf.setPersonaModelId("653d2caa-7e47-4614-95b3-26c8d82755b8"); aaiNqGenericVnf.setPersonaModelVersion("98f410f6-4c63-447b-97d2-42508437cec0"); @@ -64,6 +64,7 @@ public class AaiNqGenericVnfTest { assertEquals(false, aaiNqGenericVnf.getIsClosedLoopDisabled()); assertEquals("653d2caa-7e47-4614-95b3-26c8d82755b8", aaiNqGenericVnf.getModelInvariantId()); assertEquals("98f410f6-4c63-447b-97d2-42508437cec0", aaiNqGenericVnf.getModelVersionId()); + assertEquals("SomeCustomizationId", aaiNqGenericVnf.getModelCustomizationId()); assertEquals("active", aaiNqGenericVnf.getOperationalState()); assertEquals("653d2caa-7e47-4614-95b3-26c8d82755b8", aaiNqGenericVnf.getPersonaModelId()); assertEquals("98f410f6-4c63-447b-97d2-42508437cec0", aaiNqGenericVnf.getPersonaModelVersion()); diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqVfModuleTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqVfModuleTest.java index 1bbb711a5..b4fbd7652 100644 --- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqVfModuleTest.java +++ b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqVfModuleTest.java @@ -7,9 +7,9 @@ * 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. @@ -22,7 +22,6 @@ package org.onap.policy.aai; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; - import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; @@ -56,6 +55,7 @@ public class AaiNqVfModuleTest { aaiNqVfModule.setContrailServiceInstanceFqdn("example-contrail-service-instance-fqdn-val-86796"); aaiNqVfModule.setModelInvariantId("SomeId"); aaiNqVfModule.setModelVersionId("SomeVersion"); + aaiNqVfModule.setModelCustomizationId("SomeCustomizationId"); assertNotNull(aaiNqVfModule); assertEquals("example-vf-module-id-val-49261", aaiNqVfModule.getVfModuleId()); assertEquals("example-vf-module-name-val-73074", aaiNqVfModule.getVfModuleName()); @@ -68,9 +68,10 @@ public class AaiNqVfModuleTest { assertEquals("example-widget-model-id-val-92571", aaiNqVfModule.getWidgetModelId()); assertEquals("example-widget-model-version-val-83317", aaiNqVfModule.getWidgetModelVersion()); assertEquals("example-contrail-service-instance-fqdn-val-86796", - aaiNqVfModule.getContrailServiceInstanceFqdn()); + aaiNqVfModule.getContrailServiceInstanceFqdn()); assertEquals("SomeId", aaiNqVfModule.getModelInvariantId()); assertEquals("SomeVersion", aaiNqVfModule.getModelVersionId()); + assertEquals("SomeCustomizationId", aaiNqVfModule.getModelCustomizationId()); logger.info(Serialization.gsonPretty.toJson(aaiNqVfModule)); } |