summaryrefslogtreecommitdiffstats
path: root/controlloop/common/model-impl/aai
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2018-08-27 15:32:14 -0400
committerJim Hahn <jrh3@att.com>2018-08-28 10:56:27 -0400
commitf43b3e32fdf4cdb3361c584491730af18ef46baf (patch)
treed3e6434d66c3e5e8d6371581d64039b79c6ad584 /controlloop/common/model-impl/aai
parent57ac9eac8ac0f8236ddb52e5226f475368d4de33 (diff)
use new SO API for scale-out
Updated licenses and serialization IDs. Moved hashCode() and equals() methods to be in same location as in the original code so it can be more easily compared. Changed vDNS yaml timeout and retry to 1200 and 0, respectively, to match the original values. Removed extra newline from yaml, to match original yaml. Reformatted source to wrap lines at 120 characters and removing trailing white space. Change-Id: I3f5e59a1f44750347de49164f587d4ffefdee8b4 Issue-ID: POLICY-962 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'controlloop/common/model-impl/aai')
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqGenericVnf.java18
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqVfModule.java20
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqGenericVnfTest.java7
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqVfModuleTest.java9
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));
}