diff options
author | Rob Daugherty <rd472p@att.com> | 2018-10-31 10:21:22 -0400 |
---|---|---|
committer | Rob Daugherty <rd472p@att.com> | 2018-10-31 10:38:00 -0400 |
commit | 6b4910cc194286bccb2a63f63d12bfefcdb7fb3f (patch) | |
tree | f140576b3c42c0b575bfe5ab0cf11bffc23f708e /common/src/main/java/org | |
parent | 9390b58f5e502bfdf5d0127a4cc5b45e12f17cb6 (diff) | |
parent | a233b62a56517e06ce63b8d801bcdebd6df18af5 (diff) |
10/31: merge casablanca to master
Commit: 649c4e85cc991ffe9c13fd3fab4cc3a303faa656
Subject: Fix Error, Check that vimID is present
Issue: SO-1156
https://gerrit.onap.org/r/#/c/71247/
Commit: 959493d3274d2f2749586248cf31ee12b730e2af
Subject: Bug fixes October 26th
Issue: SO-1169
https://gerrit.onap.org/r/#/c/71343/
Commit: 373c057bfa82583f615ea46814ad3cdf9ea8d669
Subject: Resolve vf_module_id setting bug
Issue: SO-1165
https://gerrit.onap.org/r/#/c/71270/
Commit: 6c2c8a66fade016f74b51bdfea3ba04494530b97
Issue: SO-1102
Subject: Pnf Spring Environment correction
https://gerrit.onap.org/r/#/c/71137/
Change-Id: I22b4566050f627e1f1428aacdb52ec4d4fe75733
Issue-ID: SO-1173
Signed-off-by: Rob Daugherty <rd472p@att.com>
Diffstat (limited to 'common/src/main/java/org')
6 files changed, 32 insertions, 6 deletions
diff --git a/common/src/main/java/org/onap/so/client/aai/entities/uri/AAISimpleUri.java b/common/src/main/java/org/onap/so/client/aai/entities/uri/AAISimpleUri.java index 9b5acc5bee..76413c2594 100644 --- a/common/src/main/java/org/onap/so/client/aai/entities/uri/AAISimpleUri.java +++ b/common/src/main/java/org/onap/so/client/aai/entities/uri/AAISimpleUri.java @@ -34,6 +34,8 @@ import org.onap.so.client.graphinventory.entities.uri.SimpleUri; public class AAISimpleUri extends SimpleUri implements AAIResourceUri { + private static final long serialVersionUID = -6397024057188453229L; + protected AAISimpleUri(AAIObjectType type, Object... values) { super(type, values); diff --git a/common/src/main/java/org/onap/so/client/aai/entities/uri/AllottedResourceLookupUri.java b/common/src/main/java/org/onap/so/client/aai/entities/uri/AllottedResourceLookupUri.java index 091d0c9e97..329471243b 100644 --- a/common/src/main/java/org/onap/so/client/aai/entities/uri/AllottedResourceLookupUri.java +++ b/common/src/main/java/org/onap/so/client/aai/entities/uri/AllottedResourceLookupUri.java @@ -30,6 +30,7 @@ import org.onap.so.client.aai.AAIResourcesClient; public class AllottedResourceLookupUri extends HttpLookupUri { + private static final long serialVersionUID = -9212594383876793188L; protected AllottedResourceLookupUri(Object... values) { super(AAIObjectType.ALLOTTED_RESOURCE, values); } diff --git a/common/src/main/java/org/onap/so/client/aai/entities/uri/NodesUri.java b/common/src/main/java/org/onap/so/client/aai/entities/uri/NodesUri.java index 3c9ca0ed7f..6ffc6ecd9b 100644 --- a/common/src/main/java/org/onap/so/client/aai/entities/uri/NodesUri.java +++ b/common/src/main/java/org/onap/so/client/aai/entities/uri/NodesUri.java @@ -29,6 +29,8 @@ import org.onap.so.client.graphinventory.GraphInventoryObjectType; public class NodesUri extends AAISimpleUri { + private static final long serialVersionUID = 8818689895730182042L; + protected NodesUri(AAIObjectType type, Object... values) { super(type, values); } diff --git a/common/src/main/java/org/onap/so/client/aai/entities/uri/ServiceInstanceUri.java b/common/src/main/java/org/onap/so/client/aai/entities/uri/ServiceInstanceUri.java index 00a213b264..324193dc84 100644 --- a/common/src/main/java/org/onap/so/client/aai/entities/uri/ServiceInstanceUri.java +++ b/common/src/main/java/org/onap/so/client/aai/entities/uri/ServiceInstanceUri.java @@ -30,6 +30,7 @@ import org.onap.so.client.aai.AAIResourcesClient; public class ServiceInstanceUri extends HttpLookupUri { + private static final long serialVersionUID = 2248914170527514548L; protected ServiceInstanceUri(Object... values) { super(AAIObjectType.SERVICE_INSTANCE, values); } diff --git a/common/src/main/java/org/onap/so/client/graphinventory/entities/uri/SimpleUri.java b/common/src/main/java/org/onap/so/client/graphinventory/entities/uri/SimpleUri.java index 026f1c3929..874b06e192 100644 --- a/common/src/main/java/org/onap/so/client/graphinventory/entities/uri/SimpleUri.java +++ b/common/src/main/java/org/onap/so/client/graphinventory/entities/uri/SimpleUri.java @@ -20,6 +20,10 @@ package org.onap.so.client.graphinventory.entities.uri; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.io.Serializable; import java.io.UnsupportedEncodingException; import java.net.URI; import java.nio.charset.StandardCharsets; @@ -29,18 +33,19 @@ import java.util.Map; import javax.ws.rs.core.UriBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.onap.so.client.graphinventory.Format; import org.onap.so.client.aai.entities.uri.AAIUri; -import org.onap.so.client.graphinventory.entities.uri.Depth; -import org.onap.so.client.graphinventory.entities.uri.parsers.UriParser; -import org.onap.so.client.graphinventory.entities.uri.parsers.UriParserSpringImpl; +import org.onap.so.client.graphinventory.Format; import org.onap.so.client.graphinventory.GraphInventoryObjectPlurals; import org.onap.so.client.graphinventory.GraphInventoryObjectType; +import org.onap.so.client.graphinventory.entities.uri.parsers.UriParser; +import org.onap.so.client.graphinventory.entities.uri.parsers.UriParserSpringImpl; import org.springframework.web.util.UriUtils; -public class SimpleUri implements GraphInventoryResourceUri { +public class SimpleUri implements GraphInventoryResourceUri, Serializable { - protected UriBuilder internalURI; + private static final long serialVersionUID = -337701171277616439L; + + protected transient UriBuilder internalURI; protected final static String relationshipAPI = "/relationship-list/relationship"; protected final static String relatedTo = "/related-to"; protected final Object[] values; @@ -89,6 +94,9 @@ public class SimpleUri implements GraphInventoryResourceUri { this.values = childValues; } + protected void setInternalURI(UriBuilder builder) { + this.internalURI = builder; + } @Override public SimpleUri relationshipAPI() { this.internalURI = internalURI.path(relationshipAPI); @@ -236,4 +244,14 @@ public class SimpleUri implements GraphInventoryResourceUri { return type.uriTemplate(); } + private void writeObject(ObjectOutputStream oos) throws IOException { + oos.defaultWriteObject(); + oos.writeUTF(this.internalURI.toTemplate()); + } + + private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException { + ois.defaultReadObject(); + String uri = ois.readUTF(); + this.setInternalURI(UriBuilder.fromUri(uri)); + } } diff --git a/common/src/main/java/org/onap/so/client/sdno/SDNOValidatorImpl.java b/common/src/main/java/org/onap/so/client/sdno/SDNOValidatorImpl.java index be79c8b927..b11003ed1e 100644 --- a/common/src/main/java/org/onap/so/client/sdno/SDNOValidatorImpl.java +++ b/common/src/main/java/org/onap/so/client/sdno/SDNOValidatorImpl.java @@ -47,6 +47,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; public class SDNOValidatorImpl implements SDNOValidator { private final static String clientName = "MSO"; + private final static String HEALTH_DIAGNOSTIC_CODE_DEFAULT = "default"; @Override public boolean healthDiagnostic(String vnfId, UUID uuid, String requestingUserId) throws IOException, Exception { @@ -99,6 +100,7 @@ public class SDNOValidatorImpl implements SDNOValidator { request.setRequestNodeIp(vnf.getIpv4OamAddress()); //generic-vnf oam ip request.setRequestUserId(requestingUserId); //mech id? request.setRequestId(uuid.toString()); //something to identify this request by for polling + request.setHealthDiagnosticCode(HEALTH_DIAGNOSTIC_CODE_DEFAULT); input.setRequestHealthDiagnostic(request); |