diff options
Diffstat (limited to 'controlloop/common/model-impl/so')
42 files changed, 357 insertions, 371 deletions
diff --git a/controlloop/common/model-impl/so/checkstyle-suppressions.xml b/controlloop/common/model-impl/so/checkstyle-suppressions.xml deleted file mode 100644 index 01bb15f8a..000000000 --- a/controlloop/common/model-impl/so/checkstyle-suppressions.xml +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0"?> -<!-- - ============LICENSE_START======================================================= - Copyright (C) 2018 AT&T Technologies. 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. - See the License for the specific language governing permissions and - limitations under the License. - - SPDX-License-Identifier: Apache-2.0 - ============LICENSE_END========================================================= ---> - -<!DOCTYPE suppressions PUBLIC - "-//Puppy Crawl//DTD Suppressions 1.0//EN" - "http://www.puppycrawl.com/dtds/suppressions_1_0.dtd"> - -<suppressions> - <suppress checks="AbbreviationAsWordInName" - files="SORequest.java|SORequestDetails.java|SORequestReference.java|SORequestInfo.java|SORequestError.java|SORequestParameters.java|SOResponse.java|SOResponseWrapper.java|SOServiceExceptionHolder.java|SOSubscriberInfo.java|SOManager.java|SOCloudConfiguration.java|SOAsyncRequestStatus.java|SOInstanceReferences.java|SOModelInfo.java|SORelatedInstance.java|SORelatedInstanceList.java|SORequestStatus.java|SORequestReferences.java|SOPolicyExceptionHolder.java|SORelatedInstanceListElement.java" - lines="1-9999"/> -</suppressions> diff --git a/controlloop/common/model-impl/so/pom.xml b/controlloop/common/model-impl/so/pom.xml index 0b57f069d..7ddaf2e79 100644 --- a/controlloop/common/model-impl/so/pom.xml +++ b/controlloop/common/model-impl/so/pom.xml @@ -2,7 +2,7 @@ ============LICENSE_START======================================================= Drools PDP Application Models ================================================================================ - Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. + Copyright (C) 2017-2019 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. @@ -93,7 +93,6 @@ <includeTestResources>true</includeTestResources> <excludes> </excludes> - <suppressionsLocation>${project.basedir}/checkstyle-suppressions.xml</suppressionsLocation> <consoleOutput>true</consoleOutput> <failsOnViolation>true</failsOnViolation> <violationSeverity>warning</violationSeverity> diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOAsyncRequestStatus.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SoAsyncRequestStatus.java index 5bb03de06..a596b1b07 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOAsyncRequestStatus.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SoAsyncRequestStatus.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * so * ================================================================================ - * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2019 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. @@ -25,7 +25,7 @@ import com.google.gson.annotations.SerializedName; import java.io.Serializable; import java.time.LocalDateTime; -public class SOAsyncRequestStatus implements Serializable { +public class SoAsyncRequestStatus implements Serializable { private static final long serialVersionUID = -3283942659786236032L; @@ -36,7 +36,7 @@ public class SOAsyncRequestStatus implements Serializable { private String requestId; @SerializedName("instanceReferences") - private SOInstanceReferences instanceReferences; + private SoInstanceReferences instanceReferences; @SerializedName("startTime") private LocalDateTime startTime; @@ -51,9 +51,9 @@ public class SOAsyncRequestStatus implements Serializable { private String requestType; @SerializedName("requestStatus") - private SORequestStatus requestStatus; + private SoRequestStatus requestStatus; - public SOAsyncRequestStatus() { + public SoAsyncRequestStatus() { // required by author } @@ -66,7 +66,7 @@ public class SOAsyncRequestStatus implements Serializable { return finishTime; } - public SOInstanceReferences getInstanceReferences() { + public SoInstanceReferences getInstanceReferences() { return instanceReferences; } @@ -78,7 +78,7 @@ public class SOAsyncRequestStatus implements Serializable { return requestScope; } - public SORequestStatus getRequestStatus() { + public SoRequestStatus getRequestStatus() { return requestStatus; } @@ -98,7 +98,7 @@ public class SOAsyncRequestStatus implements Serializable { this.finishTime = finishTime; } - public void setInstanceReferences(SOInstanceReferences instanceReferences) { + public void setInstanceReferences(SoInstanceReferences instanceReferences) { this.instanceReferences = instanceReferences; } @@ -110,7 +110,7 @@ public class SOAsyncRequestStatus implements Serializable { this.requestScope = requestScope; } - public void setRequestStatus(SORequestStatus requestStatus) { + public void setRequestStatus(SoRequestStatus requestStatus) { this.requestStatus = requestStatus; } diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOCloudConfiguration.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SoCloudConfiguration.java index b52fe2b7c..48a2489ab 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOCloudConfiguration.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SoCloudConfiguration.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * so * ================================================================================ - * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2019 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. @@ -24,7 +24,7 @@ import com.google.gson.annotations.SerializedName; import java.io.Serializable; -public class SOCloudConfiguration implements Serializable { +public class SoCloudConfiguration implements Serializable { private static final long serialVersionUID = -3283942659786236032L; @@ -34,7 +34,7 @@ public class SOCloudConfiguration implements Serializable { @SerializedName("tenantId") private String tenantId; - public SOCloudConfiguration() { + public SoCloudConfiguration() { //required by author } diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOInstanceReferences.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SoInstanceReferences.java index 645e7f711..f4065e613 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOInstanceReferences.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SoInstanceReferences.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * so * ================================================================================ - * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2019 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. @@ -24,7 +24,7 @@ import com.google.gson.annotations.SerializedName; import java.io.Serializable; -public class SOInstanceReferences implements Serializable { +public class SoInstanceReferences implements Serializable { private static final long serialVersionUID = -3283942659786236032L; @@ -34,7 +34,7 @@ public class SOInstanceReferences implements Serializable { @SerializedName("instanceId") private String instanceId; - public SOInstanceReferences() { + public SoInstanceReferences() { //requried by author } diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOManager.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SoManager.java index 6557be45e..632c48933 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOManager.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SoManager.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * so * ================================================================================ - * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2019 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. @@ -43,8 +43,8 @@ import org.slf4j.LoggerFactory; * http://onap.readthedocs.io/en/latest/submodules/so.git/docs/SO_R1_Interface.html#get-orchestration-request * */ -public final class SOManager { - private static final Logger logger = LoggerFactory.getLogger(SOManager.class); +public final class SoManager { + private static final Logger logger = LoggerFactory.getLogger(SoManager.class); private static final Logger netLogger = LoggerFactory.getLogger(org.onap.policy.common.endpoints.event.comm.Topic.NETWORK_LOGGER); private static ExecutorService executors = Executors.newCachedThreadPool(); @@ -65,7 +65,7 @@ public final class SOManager { /** * Default constructor. */ - public SOManager() { + public SoManager() { restManager = new RESTManager(); } @@ -79,8 +79,8 @@ public final class SOManager { * @param request the request to issue to SO * @return the SO Response object */ - public SOResponse createModuleInstance(final String url, final String urlBase, final String username, - final String password, final SORequest request) { + public SoResponse createModuleInstance(final String url, final String urlBase, final String username, + final String password, final SoRequest request) { // Issue the HTTP POST request to SO to create the service instance String requestJson = Serialization.gsonPretty.toJson(request); netLogger.info("[OUT|{}|{}|{}|{}|{}|{}|]{}{}", "SO", url, username, password, createSimpleHeaders(), MEDIA_TYPE, @@ -89,7 +89,7 @@ public final class SOManager { restManager.post(url, username, password, createSimpleHeaders(), MEDIA_TYPE, requestJson); // Process the response from SO - SOResponse response = waitForSoOperationCompletion(urlBase, username, password, url, httpResponse); + SoResponse response = waitForSoOperationCompletion(urlBase, username, password, url, httpResponse); if (SO_RESPONSE_ERROR != response.getHttpResponseCode()) { return response; } else { @@ -102,10 +102,10 @@ public final class SOManager { * except the vfModuleInstanceId is always null. * */ - public Future<SOResponse> asyncSORestCall(final String requestId, final WorkingMemory wm, + public Future<SoResponse> asyncSoRestCall(final String requestId, final WorkingMemory wm, final String serviceInstanceId, final String vnfInstanceId, - final SORequest request) { - return asyncSORestCall(requestId, wm, serviceInstanceId, vnfInstanceId, null, request); + final SoRequest request) { + return asyncSoRestCall(requestId, wm, serviceInstanceId, vnfInstanceId, null, request); } /** @@ -121,11 +121,11 @@ public final class SOManager { * @param request the SO request * @return a concurrent Future for the thread that handles the request */ - public Future<SOResponse> asyncSORestCall(final String requestId, + public Future<SoResponse> asyncSoRestCall(final String requestId, final WorkingMemory wm, final String serviceInstanceId, final String vnfInstanceId, - final String vfModuleInstanceId, final SORequest request) { + final String vfModuleInstanceId, final SoRequest request) { return executors.submit(new AsyncSoRestCallThread(requestId, wm, serviceInstanceId, vnfInstanceId, vfModuleInstanceId, request)); } @@ -133,13 +133,13 @@ public final class SOManager { /** * This class handles an asynchronous request to SO as a thread. */ - private class AsyncSoRestCallThread implements Callable<SOResponse> { + private class AsyncSoRestCallThread implements Callable<SoResponse> { final String requestId; final WorkingMemory wm; final String serviceInstanceId; final String vnfInstanceId; final String vfModuleInstanceId; - final SORequest request; + final SoRequest request; /** * Constructor, sets the context of the request. @@ -154,7 +154,7 @@ public final class SOManager { private AsyncSoRestCallThread(final String requestId, final WorkingMemory wm, final String serviceInstanceId, final String vnfInstanceId, final String vfModuleInstanceId, - final SORequest request) { + final SoRequest request) { this.requestId = requestId; this.wm = wm; this.serviceInstanceId = serviceInstanceId; @@ -167,7 +167,7 @@ public final class SOManager { * Process the asynchronous SO request. */ @Override - public SOResponse call() { + public SoResponse call() { String urlBase = PolicyEngine.manager.getEnvironmentProperty("so.url"); String username = PolicyEngine.manager.getEnvironmentProperty("so.username"); String password = PolicyEngine.manager.getEnvironmentProperty("so.password"); @@ -194,10 +194,10 @@ public final class SOManager { } // Process the response from SO - SOResponse response = waitForSoOperationCompletion(urlBase, username, password, url, httpResponse); + SoResponse response = waitForSoOperationCompletion(urlBase, username, password, url, httpResponse); // Return the response to Drools in its working memory - SOResponseWrapper soWrapper = new SOResponseWrapper(response, requestId); + SoResponseWrapper soWrapper = new SoResponseWrapper(response, requestId); wm.insert(soWrapper); return response; @@ -207,27 +207,27 @@ public final class SOManager { /** * Wait for the SO operation we have ordered to complete. * - * @param urlBaseSO The base URL for SO + * @param urlBaseSo The base URL for SO * @param username user name on SO * @param password password on SO - * @param initialRequestURL The URL of the initial HTTP request - * @param initialHTTPResponse The initial HTTP message returned from SO + * @param initialRequestUrl The URL of the initial HTTP request + * @param initialHttpResponse The initial HTTP message returned from SO * @return The parsed final response of SO to the request */ - private SOResponse waitForSoOperationCompletion(final String urlBaseSO, final String username, - final String password, final String initialRequestURL, - final Pair<Integer, String> initialHTTPResponse) { + private SoResponse waitForSoOperationCompletion(final String urlBaseSo, final String username, + final String password, final String initialRequestUrl, + final Pair<Integer, String> initialHttpResponse) { // Process the initial response from SO, the response to a post - SOResponse response = processSoResponse(initialRequestURL, initialHTTPResponse); + SoResponse response = processSoResponse(initialRequestUrl, initialHttpResponse); if (SO_RESPONSE_ERROR == response.getHttpResponseCode()) { return response; } // The SO URL to use to get the status of orchestration requests - String urlGet = urlBaseSO + "/orchestrationRequests/v5/" + response.getRequestReferences().getRequestId(); + String urlGet = urlBaseSo + "/orchestrationRequests/v5/" + response.getRequestReferences().getRequestId(); // The HTTP status code of the latest response - Pair<Integer, String> latestHttpResponse = initialHTTPResponse; + Pair<Integer, String> latestHttpResponse = initialHttpResponse; // Wait for the response from SO for (int attemptsLeft = GET_REQUESTS_BEFORE_TIMEOUT; attemptsLeft >= 0; attemptsLeft--) { @@ -276,8 +276,8 @@ public final class SOManager { * @param httpResponse The HTTP message returned from SO * @return The parsed response */ - private SOResponse processSoResponse(final String requestUrl, final Pair<Integer, String> httpResponse) { - SOResponse response = new SOResponse(); + private SoResponse processSoResponse(final String requestUrl, final Pair<Integer, String> httpResponse) { + SoResponse response = new SoResponse(); // A null httpDetails indicates a HTTP problem, a valid response from SO must be // either 200 @@ -290,7 +290,7 @@ public final class SOManager { // Parse the JSON of the response into our POJO try { - response = Serialization.gsonPretty.fromJson(httpResponse.second, SOResponse.class); + response = Serialization.gsonPretty.fromJson(httpResponse.second, SoResponse.class); } catch (JsonSyntaxException e) { logger.error("Failed to deserialize HTTP response into SOResponse: ", e); response.setHttpResponseCode(SO_RESPONSE_ERROR); @@ -327,7 +327,7 @@ public final class SOManager { * @param response The response to check * @return true if the request for the response is defined */ - private boolean isRequestStateDefined(final SOResponse response) { + private boolean isRequestStateDefined(final SoResponse response) { return response != null && response.getRequest() != null && response.getRequest().getRequestStatus() != null && response.getRequest().getRequestStatus().getRequestState() != null; } @@ -339,7 +339,7 @@ public final class SOManager { * @param response The response to check * @return true if the request for the response is finished */ - private boolean isRequestStateFinished(final Pair<Integer, String> latestHttpDetails, final SOResponse response) { + private boolean isRequestStateFinished(final Pair<Integer, String> latestHttpDetails, final SoResponse response) { if (latestHttpDetails != null && 200 == latestHttpDetails.first && isRequestStateDefined(response)) { String requestState = response.getRequest().getRequestStatus().getRequestState(); return "COMPLETE".equalsIgnoreCase(requestState) || "FAILED".equalsIgnoreCase(requestState); diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOModelInfo.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SoModelInfo.java index 15cbd23d0..8ab13201c 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOModelInfo.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SoModelInfo.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * so * ================================================================================ - * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2019 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. @@ -24,7 +24,7 @@ import com.google.gson.annotations.SerializedName; import java.io.Serializable; -public class SOModelInfo implements Serializable { +public class SoModelInfo implements Serializable { private static final long serialVersionUID = -3283942659786236032L; @@ -49,7 +49,7 @@ public class SOModelInfo implements Serializable { @SerializedName("modelCustomizationId") private String modelCustomizationId; - public SOModelInfo() { + public SoModelInfo() { //required by author } diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOPolicyExceptionHolder.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SoPolicyExceptionHolder.java index 4c4fed1f2..0553eac76 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOPolicyExceptionHolder.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SoPolicyExceptionHolder.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * so * ================================================================================ - * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2019 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. @@ -24,7 +24,7 @@ import com.google.gson.annotations.SerializedName; import java.io.Serializable; -public class SOPolicyExceptionHolder implements Serializable { +public class SoPolicyExceptionHolder implements Serializable { private static final long serialVersionUID = -3283942659786236032L; @@ -34,7 +34,7 @@ public class SOPolicyExceptionHolder implements Serializable { @SerializedName("text") private String text; - public SOPolicyExceptionHolder() { + public SoPolicyExceptionHolder() { //required by author } diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORelatedInstance.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SoRelatedInstance.java index 90fe339ee..f4e329643 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORelatedInstance.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SoRelatedInstance.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * so * ================================================================================ - * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2019 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. @@ -24,7 +24,7 @@ import com.google.gson.annotations.SerializedName; import java.io.Serializable; -public class SORelatedInstance implements Serializable { +public class SoRelatedInstance implements Serializable { private static final long serialVersionUID = -3283942659786236032L; @@ -35,9 +35,9 @@ public class SORelatedInstance implements Serializable { private String instanceName; @SerializedName("modelInfo") - private SOModelInfo modelInfo; + private SoModelInfo modelInfo; - public SORelatedInstance() { + public SoRelatedInstance() { //required by author } @@ -50,7 +50,7 @@ public class SORelatedInstance implements Serializable { return instanceName; } - public SOModelInfo getModelInfo() { + public SoModelInfo getModelInfo() { return modelInfo; } @@ -63,7 +63,7 @@ public class SORelatedInstance implements Serializable { } - public void setModelInfo(SOModelInfo modelInfo) { + public void setModelInfo(SoModelInfo modelInfo) { this.modelInfo = modelInfo; } diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORelatedInstanceListElement.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SoRelatedInstanceListElement.java index 4d3d27346..d4bf98680 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORelatedInstanceListElement.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SoRelatedInstanceListElement.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * so * ================================================================================ - * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2019 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. @@ -24,22 +24,22 @@ import com.google.gson.annotations.SerializedName; import java.io.Serializable; -public class SORelatedInstanceListElement implements Serializable { +public class SoRelatedInstanceListElement implements Serializable { private static final long serialVersionUID = -3283942659786236032L; @SerializedName("relatedInstance") - private SORelatedInstance relatedInstance; + private SoRelatedInstance relatedInstance; - public SORelatedInstanceListElement() { + public SoRelatedInstanceListElement() { //required by author } - public SORelatedInstance getRelatedInstance() { + public SoRelatedInstance getRelatedInstance() { return relatedInstance; } - public void setRelatedInstance(SORelatedInstance relatedInstance) { + public void setRelatedInstance(SoRelatedInstance relatedInstance) { this.relatedInstance = relatedInstance; } diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequest.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SoRequest.java index 8bcbacf73..255c5b79e 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequest.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SoRequest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * so * ================================================================================ - * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2019 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. @@ -26,7 +26,7 @@ import java.io.Serializable; import java.time.LocalDateTime; import java.util.UUID; -public class SORequest implements Serializable { +public class SoRequest implements Serializable { private static final long serialVersionUID = -3283942659786236032L; @@ -46,14 +46,14 @@ public class SORequest implements Serializable { private String requestType; @SerializedName("requestDetails") - private SORequestDetails requestDetails; + private SoRequestDetails requestDetails; @SerializedName("requestStatus") - private SORequestStatus requestStatus; + private SoRequestStatus requestStatus; private transient SoOperationType operationType; - public SORequest() { + public SoRequest() { // required by author } @@ -61,7 +61,7 @@ public class SORequest implements Serializable { return finishTime; } - public SORequestDetails getRequestDetails() { + public SoRequestDetails getRequestDetails() { return requestDetails; } @@ -73,7 +73,7 @@ public class SORequest implements Serializable { return requestScope; } - public SORequestStatus getRequestStatus() { + public SoRequestStatus getRequestStatus() { return requestStatus; } @@ -89,7 +89,7 @@ public class SORequest implements Serializable { this.finishTime = finishTime; } - public void setRequestDetails(SORequestDetails requestDetails) { + public void setRequestDetails(SoRequestDetails requestDetails) { this.requestDetails = requestDetails; } @@ -101,7 +101,7 @@ public class SORequest implements Serializable { this.requestScope = requestScope; } - public void setRequestStatus(SORequestStatus requestStatus) { + public void setRequestStatus(SoRequestStatus requestStatus) { this.requestStatus = requestStatus; } diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestDetails.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SoRequestDetails.java index 465895117..0ea1a272d 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestDetails.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SoRequestDetails.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * so * ================================================================================ - * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2019 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. @@ -27,32 +27,32 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; -public class SORequestDetails implements Serializable { +public class SoRequestDetails implements Serializable { private static final long serialVersionUID = -3283942659786236032L; @SerializedName("modelInfo") - private SOModelInfo modelInfo; + private SoModelInfo modelInfo; @SerializedName("cloudConfiguration") - private SOCloudConfiguration cloudConfiguration; + private SoCloudConfiguration cloudConfiguration; @SerializedName("requestInfo") - private SORequestInfo requestInfo; + private SoRequestInfo requestInfo; @SerializedName("subscriberInfo") - private SOSubscriberInfo subscriberInfo; + private SoSubscriberInfo subscriberInfo; @SerializedName("relatedInstanceList") - private List<SORelatedInstanceListElement> relatedInstanceList = new LinkedList<>(); + private List<SoRelatedInstanceListElement> relatedInstanceList = new LinkedList<>(); @SerializedName("requestParameters") - private SORequestParameters requestParameters; + private SoRequestParameters requestParameters; @SerializedName("configurationParameters") private List<Map<String, String>> configurationParameters = new LinkedList<>(); - public SORequestDetails() { + public SoRequestDetails() { } @@ -61,7 +61,7 @@ public class SORequestDetails implements Serializable { * * @param soRequestDetails copy object */ - public SORequestDetails(SORequestDetails soRequestDetails) { + public SoRequestDetails(SoRequestDetails soRequestDetails) { this.modelInfo = soRequestDetails.modelInfo; this.cloudConfiguration = soRequestDetails.cloudConfiguration; this.requestInfo = soRequestDetails.requestInfo; @@ -81,7 +81,7 @@ public class SORequestDetails implements Serializable { if (getClass() != obj.getClass()) { return false; } - SORequestDetails other = (SORequestDetails) obj; + SoRequestDetails other = (SoRequestDetails) obj; if (cloudConfiguration == null) { if (other.cloudConfiguration != null) { return false; @@ -134,23 +134,23 @@ public class SORequestDetails implements Serializable { return true; } - public SOCloudConfiguration getCloudConfiguration() { + public SoCloudConfiguration getCloudConfiguration() { return cloudConfiguration; } - public SOModelInfo getModelInfo() { + public SoModelInfo getModelInfo() { return modelInfo; } - public List<SORelatedInstanceListElement> getRelatedInstanceList() { + public List<SoRelatedInstanceListElement> getRelatedInstanceList() { return relatedInstanceList; } - public SORequestInfo getRequestInfo() { + public SoRequestInfo getRequestInfo() { return requestInfo; } - public SORequestParameters getRequestParameters() { + public SoRequestParameters getRequestParameters() { return requestParameters; } @@ -158,7 +158,7 @@ public class SORequestDetails implements Serializable { return configurationParameters; } - public SOSubscriberInfo getSubscriberInfo() { + public SoSubscriberInfo getSubscriberInfo() { return subscriberInfo; } @@ -176,19 +176,19 @@ public class SORequestDetails implements Serializable { return result; } - public void setCloudConfiguration(SOCloudConfiguration cloudConfiguration) { + public void setCloudConfiguration(SoCloudConfiguration cloudConfiguration) { this.cloudConfiguration = cloudConfiguration; } - public void setModelInfo(SOModelInfo modelInfo) { + public void setModelInfo(SoModelInfo modelInfo) { this.modelInfo = modelInfo; } - public void setRequestInfo(SORequestInfo requestInfo) { + public void setRequestInfo(SoRequestInfo requestInfo) { this.requestInfo = requestInfo; } - public void setRequestParameters(SORequestParameters requestParameters) { + public void setRequestParameters(SoRequestParameters requestParameters) { this.requestParameters = requestParameters; } @@ -196,11 +196,11 @@ public class SORequestDetails implements Serializable { this.configurationParameters = configurationParameters; } - public void setSubscriberInfo(SOSubscriberInfo subscriberInfo) { + public void setSubscriberInfo(SoSubscriberInfo subscriberInfo) { this.subscriberInfo = subscriberInfo; } - public void setRelatedInstanceList(List<SORelatedInstanceListElement> relatedInstanceList) { + public void setRelatedInstanceList(List<SoRelatedInstanceListElement> relatedInstanceList) { this.relatedInstanceList = relatedInstanceList; } diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestError.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SoRequestError.java index 7594ef95c..1214a6c8c 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestError.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SoRequestError.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * so * ================================================================================ - * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2019 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. @@ -24,33 +24,33 @@ import com.google.gson.annotations.SerializedName; import java.io.Serializable; -public class SORequestError implements Serializable { +public class SoRequestError implements Serializable { private static final long serialVersionUID = -3283942659786236032L; @SerializedName("policyException") - private SOPolicyExceptionHolder policyException; + private SoPolicyExceptionHolder policyException; @SerializedName("serviceException") - private SOServiceExceptionHolder serviceException; + private SoServiceExceptionHolder serviceException; - public SORequestError() { + public SoRequestError() { // required by author } - public SOPolicyExceptionHolder getPolicyException() { + public SoPolicyExceptionHolder getPolicyException() { return policyException; } - public SOServiceExceptionHolder getServiceException() { + public SoServiceExceptionHolder getServiceException() { return serviceException; } - public void setPolicyException(SOPolicyExceptionHolder policyException) { + public void setPolicyException(SoPolicyExceptionHolder policyException) { this.policyException = policyException; } - public void setServiceException(SOServiceExceptionHolder serviceException) { + public void setServiceException(SoServiceExceptionHolder serviceException) { this.serviceException = serviceException; } diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestInfo.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SoRequestInfo.java index c30e50c17..ae0b57bc2 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestInfo.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SoRequestInfo.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * so * ================================================================================ - * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2019 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. @@ -24,7 +24,7 @@ import com.google.gson.annotations.SerializedName; import java.io.Serializable; -public class SORequestInfo implements Serializable { +public class SoRequestInfo implements Serializable { private static final long serialVersionUID = -3283942659786236032L; @@ -58,7 +58,7 @@ public class SORequestInfo implements Serializable { @SerializedName("requestorId") private String requestorId; - public SORequestInfo() { + public SoRequestInfo() { // required by author } diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestParameters.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SoRequestParameters.java index 69faded76..bc545455b 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestParameters.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SoRequestParameters.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * so * ================================================================================ - * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2019 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. @@ -27,7 +27,7 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; -public class SORequestParameters implements Serializable { +public class SoRequestParameters implements Serializable { private static final long serialVersionUID = -3283942659786236033L; @@ -40,7 +40,7 @@ public class SORequestParameters implements Serializable { @SerializedName("userParams") private List<Map<String, String>> userParams = new LinkedList<>(); - public SORequestParameters() { + public SoRequestParameters() { // required by author } diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestReferences.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SoRequestReferences.java index 71b1cccfe..8006142ed 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestReferences.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SoRequestReferences.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * so * ================================================================================ - * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2019 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. @@ -24,7 +24,7 @@ import com.google.gson.annotations.SerializedName; import java.io.Serializable; -public class SORequestReferences implements Serializable { +public class SoRequestReferences implements Serializable { private static final long serialVersionUID = -3283942659786236032L; diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestStatus.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SoRequestStatus.java index 79406574d..2d2e5bf24 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestStatus.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SoRequestStatus.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * so * ================================================================================ - * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2019 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. @@ -24,7 +24,7 @@ import com.google.gson.annotations.SerializedName; import java.io.Serializable; -public class SORequestStatus implements Serializable { +public class SoRequestStatus implements Serializable { private static final long serialVersionUID = -3283942659786236032L; @@ -40,7 +40,7 @@ public class SORequestStatus implements Serializable { @SerializedName("wasRolledBack") private boolean wasRolledBack; - public SORequestStatus() { + public SoRequestStatus() { //required by author } diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOResponse.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SoResponse.java index e9350838a..08b01c9f8 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOResponse.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SoResponse.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * so * ================================================================================ - * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2019 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. @@ -24,22 +24,22 @@ import com.google.gson.annotations.SerializedName; import java.io.Serializable; -public class SOResponse implements Serializable { +public class SoResponse implements Serializable { private static final long serialVersionUID = -3283942659786236032L; @SerializedName("requestReferences") - private SORequestReferences requestReferences; + private SoRequestReferences requestReferences; @SerializedName("requestError") - private SORequestError requestError; + private SoRequestError requestError; @SerializedName("request") - private SORequest request; + private SoRequest request; private int httpResponseCode; - public SOResponse() { + public SoResponse() { // required by author } @@ -47,15 +47,15 @@ public class SOResponse implements Serializable { return httpResponseCode; } - public SORequest getRequest() { + public SoRequest getRequest() { return request; } - public SORequestError getRequestError() { + public SoRequestError getRequestError() { return requestError; } - public SORequestReferences getRequestReferences() { + public SoRequestReferences getRequestReferences() { return requestReferences; } @@ -63,15 +63,15 @@ public class SOResponse implements Serializable { this.httpResponseCode = httpResponseCode; } - public void setRequest(SORequest request) { + public void setRequest(SoRequest request) { this.request = request; } - public void setRequestError(SORequestError requestError) { + public void setRequestError(SoRequestError requestError) { this.requestError = requestError; } - public void setRequestReferences(SORequestReferences requestReferences) { + public void setRequestReferences(SoRequestReferences requestReferences) { this.requestReferences = requestReferences; } diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOResponseWrapper.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SoResponseWrapper.java index dcf640d83..4a53ee232 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOResponseWrapper.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SoResponseWrapper.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * so * ================================================================================ - * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2019 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. @@ -24,18 +24,18 @@ import com.google.gson.annotations.SerializedName; import java.io.Serializable; -public class SOResponseWrapper implements Serializable { +public class SoResponseWrapper implements Serializable { private static final long serialVersionUID = 7673023687132889069L; @SerializedName("SoResponse") - private SOResponse soResponse; + private SoResponse soResponse; - private transient String requestID; + private transient String requestId; - public SOResponseWrapper(SOResponse response, String reqID) { + public SoResponseWrapper(SoResponse response, String reqId) { this.soResponse = response; - this.requestID = reqID; + this.requestId = reqId; } @Override @@ -49,7 +49,7 @@ public class SOResponseWrapper implements Serializable { if (getClass() != obj.getClass()) { return false; } - SOResponseWrapper other = (SOResponseWrapper) obj; + SoResponseWrapper other = (SoResponseWrapper) obj; if (soResponse == null) { if (other.soResponse != null) { return false; @@ -58,22 +58,22 @@ public class SOResponseWrapper implements Serializable { else if (!soResponse.equals(other.soResponse)) { return false; } - if (requestID == null) { - if (other.requestID != null) { + if (requestId == null) { + if (other.requestId != null) { return false; } } - else if (!requestID.equals(other.requestID)) { + else if (!requestId.equals(other.requestId)) { return false; } return true; } - public String getRequestID() { - return requestID; + public String getRequestId() { + return requestId; } - public SOResponse getSoResponse() { + public SoResponse getSoResponse() { return soResponse; } @@ -82,21 +82,21 @@ public class SOResponseWrapper implements Serializable { final int prime = 31; int result = super.hashCode(); result = prime * result + ((soResponse == null) ? 0 : soResponse.hashCode()); - result = prime * result + ((requestID == null) ? 0 : requestID.hashCode()); + result = prime * result + ((requestId == null) ? 0 : requestId.hashCode()); return result; } - public void setRequestID(String requestId) { - this.requestID = requestId; + public void setRequestId(String requestId) { + this.requestId = requestId; } - public void setSoResponse(SOResponse response) { + public void setSoResponse(SoResponse response) { soResponse = response; } @Override public String toString() { - return "SOResponseWrapper [SOResponse=" + soResponse + ", RequestID=" + requestID + "]"; + return "SOResponseWrapper [SOResponse=" + soResponse + ", RequestID=" + requestId + "]"; } } diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOServiceExceptionHolder.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SoServiceExceptionHolder.java index 65ba446e3..5dd87e539 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOServiceExceptionHolder.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SoServiceExceptionHolder.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * so * ================================================================================ - * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2019 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. @@ -26,7 +26,7 @@ import java.io.Serializable; import java.util.LinkedList; import java.util.List; -public class SOServiceExceptionHolder implements Serializable { +public class SoServiceExceptionHolder implements Serializable { private static final long serialVersionUID = -3283942659786236032L; @@ -39,7 +39,7 @@ public class SOServiceExceptionHolder implements Serializable { @SerializedName("variables") private List<String> variables = new LinkedList<>(); - public SOServiceExceptionHolder() { + public SoServiceExceptionHolder() { // required by author } diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOSubscriberInfo.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SoSubscriberInfo.java index f7a4982a1..208cff23d 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOSubscriberInfo.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SoSubscriberInfo.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * so * ================================================================================ - * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2019 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. @@ -24,7 +24,7 @@ import com.google.gson.annotations.SerializedName; import java.io.Serializable; -public class SOSubscriberInfo implements Serializable { +public class SoSubscriberInfo implements Serializable { private static final long serialVersionUID = -3283942659786236032L; @@ -37,7 +37,7 @@ public class SOSubscriberInfo implements Serializable { @SerializedName("subscriberName") private String subscriberName; - public SOSubscriberInfo() { + public SoSubscriberInfo() { //required by author } diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/DemoTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/DemoTest.java index 43cce61e1..2db347846 100644 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/DemoTest.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/DemoTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * mso * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017, 2019 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. @@ -24,14 +24,14 @@ import java.util.HashMap; import java.util.Map; import org.junit.Test; -import org.onap.policy.so.SOCloudConfiguration; -import org.onap.policy.so.SOModelInfo; -import org.onap.policy.so.SORelatedInstance; -import org.onap.policy.so.SORelatedInstanceListElement; -import org.onap.policy.so.SORequest; -import org.onap.policy.so.SORequestDetails; -import org.onap.policy.so.SORequestInfo; -import org.onap.policy.so.SORequestParameters; +import org.onap.policy.so.SoCloudConfiguration; +import org.onap.policy.so.SoModelInfo; +import org.onap.policy.so.SoRelatedInstance; +import org.onap.policy.so.SoRelatedInstanceListElement; +import org.onap.policy.so.SoRequest; +import org.onap.policy.so.SoRequestDetails; +import org.onap.policy.so.SoRequestInfo; +import org.onap.policy.so.SoRequestParameters; import org.onap.policy.so.util.Serialization; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -42,12 +42,12 @@ public class DemoTest { @Test public void test() { - SORequest request = new SORequest(); - request.setRequestDetails(new SORequestDetails()); - request.getRequestDetails().setModelInfo(new SOModelInfo()); - request.getRequestDetails().setCloudConfiguration(new SOCloudConfiguration()); - request.getRequestDetails().setRequestInfo(new SORequestInfo()); - request.getRequestDetails().setRequestParameters(new SORequestParameters()); + SoRequest request = new SoRequest(); + request.setRequestDetails(new SoRequestDetails()); + request.getRequestDetails().setModelInfo(new SoModelInfo()); + request.getRequestDetails().setCloudConfiguration(new SoCloudConfiguration()); + request.getRequestDetails().setRequestInfo(new SoRequestInfo()); + request.getRequestDetails().setRequestParameters(new SoRequestParameters()); request.getRequestDetails().getModelInfo().setModelType("vfModule"); request.getRequestDetails().getModelInfo().setModelInvariantId("ff5256d2-5a33-55df-13ab-12abad84e7ff"); @@ -62,25 +62,25 @@ public class DemoTest { request.getRequestDetails().getRequestInfo().setSource("VID"); request.getRequestDetails().getRequestInfo().setSuppressRollback(true); - SORelatedInstanceListElement relatedInstanceListElement1 = - new SORelatedInstanceListElement(); - SORelatedInstanceListElement relatedInstanceListElement2 = - new SORelatedInstanceListElement(); - SORelatedInstanceListElement relatedInstanceListElement3 = - new SORelatedInstanceListElement(); - relatedInstanceListElement1.setRelatedInstance(new SORelatedInstance()); - relatedInstanceListElement2.setRelatedInstance(new SORelatedInstance()); - relatedInstanceListElement3.setRelatedInstance(new SORelatedInstance()); + SoRelatedInstanceListElement relatedInstanceListElement1 = + new SoRelatedInstanceListElement(); + SoRelatedInstanceListElement relatedInstanceListElement2 = + new SoRelatedInstanceListElement(); + SoRelatedInstanceListElement relatedInstanceListElement3 = + new SoRelatedInstanceListElement(); + relatedInstanceListElement1.setRelatedInstance(new SoRelatedInstance()); + relatedInstanceListElement2.setRelatedInstance(new SoRelatedInstance()); + relatedInstanceListElement3.setRelatedInstance(new SoRelatedInstance()); relatedInstanceListElement1.getRelatedInstance().setInstanceId( "17ef4658-bd1f-4ef0-9ca0-ea76e2bf122c"); relatedInstanceListElement1.getRelatedInstance().setInstanceName( "SOTESTVOL103a-vSAMP12_base_module-0_vol"); - relatedInstanceListElement1.getRelatedInstance().setModelInfo(new SOModelInfo()); + relatedInstanceListElement1.getRelatedInstance().setModelInfo(new SoModelInfo()); relatedInstanceListElement1.getRelatedInstance().getModelInfo().setModelType("volumeGroup"); relatedInstanceListElement2.getRelatedInstance().setInstanceId("serviceInstanceId"); - relatedInstanceListElement2.getRelatedInstance().setModelInfo(new SOModelInfo()); + relatedInstanceListElement2.getRelatedInstance().setModelInfo(new SoModelInfo()); relatedInstanceListElement2.getRelatedInstance().getModelInfo().setModelType("service"); relatedInstanceListElement2.getRelatedInstance().getModelInfo().setModelInvariantId( "ff3514e3-5a33-55df-13ab-12abad84e7ff"); @@ -91,7 +91,7 @@ public class DemoTest { relatedInstanceListElement2.getRelatedInstance().getModelInfo().setModelVersion("1.0"); relatedInstanceListElement3.getRelatedInstance().setInstanceId("vnfInstanceId"); - relatedInstanceListElement3.getRelatedInstance().setModelInfo(new SOModelInfo()); + relatedInstanceListElement3.getRelatedInstance().setModelInfo(new SoModelInfo()); relatedInstanceListElement3.getRelatedInstance().getModelInfo().setModelType("vnf"); relatedInstanceListElement3.getRelatedInstance().getModelInfo().setModelInvariantId( "ff5256d1-5a33-55df-13ab-12abad84e7ff"); @@ -123,13 +123,13 @@ public class DemoTest { logger.debug("** HACK **"); - SORequest request = new SORequest(); + SoRequest request = new SoRequest(); - request.setRequestDetails(new SORequestDetails()); - request.getRequestDetails().setModelInfo(new SOModelInfo()); - request.getRequestDetails().setCloudConfiguration(new SOCloudConfiguration()); - request.getRequestDetails().setRequestInfo(new SORequestInfo()); - request.getRequestDetails().setRequestParameters(new SORequestParameters()); + request.setRequestDetails(new SoRequestDetails()); + request.getRequestDetails().setModelInfo(new SoModelInfo()); + request.getRequestDetails().setCloudConfiguration(new SoCloudConfiguration()); + request.getRequestDetails().setRequestInfo(new SoRequestInfo()); + request.getRequestDetails().setRequestParameters(new SoRequestParameters()); request.getRequestDetails().getRequestParameters().setUserParams(null); request.getRequestDetails().getModelInfo().setModelType("vfModule"); @@ -146,16 +146,16 @@ public class DemoTest { request.getRequestDetails().getRequestInfo().setSource("POLICY"); request.getRequestDetails().getRequestInfo().setSuppressRollback(false); - SORelatedInstanceListElement relatedInstanceListElement1 = - new SORelatedInstanceListElement(); - SORelatedInstanceListElement relatedInstanceListElement2 = - new SORelatedInstanceListElement(); - relatedInstanceListElement1.setRelatedInstance(new SORelatedInstance()); - relatedInstanceListElement2.setRelatedInstance(new SORelatedInstance()); + SoRelatedInstanceListElement relatedInstanceListElement1 = + new SoRelatedInstanceListElement(); + SoRelatedInstanceListElement relatedInstanceListElement2 = + new SoRelatedInstanceListElement(); + relatedInstanceListElement1.setRelatedInstance(new SoRelatedInstance()); + relatedInstanceListElement2.setRelatedInstance(new SoRelatedInstance()); String serviceInstanceId = "98af39ce-6408-466b-921f-c2c7a8f59ed6"; relatedInstanceListElement1.getRelatedInstance().setInstanceId(serviceInstanceId); - relatedInstanceListElement1.getRelatedInstance().setModelInfo(new SOModelInfo()); + relatedInstanceListElement1.getRelatedInstance().setModelInfo(new SoModelInfo()); relatedInstanceListElement1.getRelatedInstance().getModelInfo().setModelType("service"); relatedInstanceListElement1.getRelatedInstance().getModelInfo().setModelInvariantId( "24329a0c-1d57-4210-b1af-a65df64e9d59"); @@ -166,7 +166,7 @@ public class DemoTest { String vnfInstanceId = "8eb411b8-a936-412f-b01f-9a9a435c0e93"; relatedInstanceListElement2.getRelatedInstance().setInstanceId(vnfInstanceId); - relatedInstanceListElement2.getRelatedInstance().setModelInfo(new SOModelInfo()); + relatedInstanceListElement2.getRelatedInstance().setModelInfo(new SoModelInfo()); relatedInstanceListElement2.getRelatedInstance().getModelInfo().setModelType("vnf"); relatedInstanceListElement2.getRelatedInstance().getModelInfo().setModelInvariantId( "09fd971e-db5f-475d-997c-cf6704b6b8fe"); diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoAsyncRequestStatusTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoAsyncRequestStatusTest.java index d6fd0ad25..64467b299 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoAsyncRequestStatusTest.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoAsyncRequestStatusTest.java @@ -3,6 +3,7 @@ * so * ================================================================================ * + * Modifications Copyright (C) 2019 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. @@ -31,7 +32,7 @@ public class SoAsyncRequestStatusTest { @Test public void testConstructor() { - SOAsyncRequestStatus obj = new SOAsyncRequestStatus(); + SoAsyncRequestStatus obj = new SoAsyncRequestStatus(); assertTrue(obj.getCorrelator() == null); assertTrue(obj.getFinishTime() == null); @@ -44,7 +45,7 @@ public class SoAsyncRequestStatusTest { @Test public void testSetGet() { - SOAsyncRequestStatus obj = new SOAsyncRequestStatus(); + SoAsyncRequestStatus obj = new SoAsyncRequestStatus(); obj.setCorrelator("correlator"); assertEquals("correlator", obj.getCorrelator()); @@ -53,7 +54,7 @@ public class SoAsyncRequestStatusTest { obj.setFinishTime(finishTime); assertEquals(finishTime, obj.getFinishTime()); - SOInstanceReferences instanceReferences = new SOInstanceReferences(); + SoInstanceReferences instanceReferences = new SoInstanceReferences(); obj.setInstanceReferences(instanceReferences); assertEquals(instanceReferences, obj.getInstanceReferences()); @@ -63,7 +64,7 @@ public class SoAsyncRequestStatusTest { obj.setRequestScope("requestScope"); assertEquals("requestScope", obj.getRequestScope()); - SORequestStatus requestStatus = new SORequestStatus(); + SoRequestStatus requestStatus = new SoRequestStatus(); obj.setRequestStatus(requestStatus); assertEquals(requestStatus, obj.getRequestStatus()); diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoCloudConfigurationTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoCloudConfigurationTest.java index 8b52ae9a2..0b6521be1 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoCloudConfigurationTest.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoCloudConfigurationTest.java @@ -3,6 +3,7 @@ * so * ================================================================================ * + * Modifications Copyright (C) 2019 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. @@ -29,7 +30,7 @@ public class SoCloudConfigurationTest { @Test public void testConstructor() { - SOCloudConfiguration obj = new SOCloudConfiguration(); + SoCloudConfiguration obj = new SoCloudConfiguration(); assertTrue(obj.getLcpCloudRegionId() == null); assertTrue(obj.getTenantId() == null); @@ -37,7 +38,7 @@ public class SoCloudConfigurationTest { @Test public void testSetGet() { - SOCloudConfiguration obj = new SOCloudConfiguration(); + SoCloudConfiguration obj = new SoCloudConfiguration(); obj.setLcpCloudRegionId("lcpCloudRegionId"); assertEquals("lcpCloudRegionId", obj.getLcpCloudRegionId()); diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoDummyServerTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoDummyServerTest.java index 17f92bcb9..5c302474a 100644 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoDummyServerTest.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoDummyServerTest.java @@ -4,7 +4,7 @@ * ================================================================================ * Copyright (C) 2018 Ericsson. All rights reserved. * ================================================================================ - * Modifications Copyright (C) 2018 AT&T. All rights reserved. + * Modifications Copyright (C) 2018-2019 AT&T. 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. @@ -41,7 +41,7 @@ public class SoDummyServerTest { private static int getMessagesReceived = 0; private static int deleteMessagesReceived = 0; - private static Map<String, SOResponse> ongoingRequestMap = new ConcurrentHashMap<>(); + private static Map<String, SoResponse> ongoingRequestMap = new ConcurrentHashMap<>(); /** * Stats method. @@ -110,12 +110,12 @@ public class SoDummyServerTest { @Path("/orchestrationRequests/v5/{nsInstanceId}") public Response soRequestStatus(@PathParam("nsInstanceId") final String nsInstanceId) { - SOResponse response = ongoingRequestMap.get(nsInstanceId); + SoResponse response = ongoingRequestMap.get(nsInstanceId); int iterationsLeft = Integer.valueOf(response.getRequest().getRequestScope()); if (--iterationsLeft > 0) { response.getRequest().setRequestScope(new Integer(iterationsLeft).toString()); - String responseString = new Gson().toJson(response, SOResponse.class); + String responseString = new Gson().toJson(response, SoResponse.class); return Response.status(response.getHttpResponseCode()).entity(responseString).build(); } @@ -128,7 +128,7 @@ public class SoDummyServerTest { response.getRequest().getRequestStatus().setRequestState("COMPLETE"); response.getRequest().setRequestScope("0"); response.setHttpResponseCode(200); - String responseString = new Gson().toJson(response, SOResponse.class); + String responseString = new Gson().toJson(response, SoResponse.class); return Response.status(response.getHttpResponseCode()).entity(responseString).build(); } @@ -157,9 +157,9 @@ public class SoDummyServerTest { return Response.status(400).build(); } - SORequest request = null; + SoRequest request = null; try { - request = new Gson().fromJson(jsonString, SORequest.class); + request = new Gson().fromJson(jsonString, SoRequest.class); } catch (Exception e) { return Response.status(400).build(); } @@ -179,15 +179,15 @@ public class SoDummyServerTest { + ",\"DELETE\": " + deleteMessagesReceived + "}").build(); } - SOResponse response = new SOResponse(); + SoResponse response = new SoResponse(); response.setRequest(request); - response.setRequestReferences(new SORequestReferences()); + response.setRequestReferences(new SoRequestReferences()); response.getRequestReferences().setRequestId(request.getRequestId().toString()); if ("ReturnCompleted".equals(request.getRequestType())) { response.getRequest().getRequestStatus().setRequestState("COMPLETE"); response.setHttpResponseCode(200); - String responseString = new Gson().toJson(response, SOResponse.class); + String responseString = new Gson().toJson(response, SoResponse.class); return Response.status(response.getHttpResponseCode()) .entity(responseString) .build(); @@ -196,7 +196,7 @@ public class SoDummyServerTest { if ("ReturnFailed".equals(request.getRequestType())) { response.getRequest().getRequestStatus().setRequestState("FAILED"); response.setHttpResponseCode(200); - String responseString = new Gson().toJson(response, SOResponse.class); + String responseString = new Gson().toJson(response, SoResponse.class); return Response.status(response.getHttpResponseCode()) .entity(responseString) .build(); @@ -207,7 +207,7 @@ public class SoDummyServerTest { response.getRequest().getRequestStatus().setRequestState("ONGOING"); response.setHttpResponseCode(202); - String responseString = new Gson().toJson(response, SOResponse.class); + String responseString = new Gson().toJson(response, SoResponse.class); return Response.status(response.getHttpResponseCode()) .entity(responseString) .build(); @@ -218,7 +218,7 @@ public class SoDummyServerTest { response.getRequest().getRequestStatus().setRequestState("ONGOING"); response.setHttpResponseCode(200); - String responseString = new Gson().toJson(response, SOResponse.class); + String responseString = new Gson().toJson(response, SoResponse.class); return Response.status(response.getHttpResponseCode()) .entity(responseString) .build(); @@ -229,7 +229,7 @@ public class SoDummyServerTest { response.getRequest().getRequestStatus().setRequestState("ONGOING"); response.setHttpResponseCode(200); - String responseString = new Gson().toJson(response, SOResponse.class); + String responseString = new Gson().toJson(response, SoResponse.class); return Response.status(response.getHttpResponseCode()) .entity(responseString) .build(); diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoInstanceReferencesTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoInstanceReferencesTest.java index 39e37f0cb..13d7dd83b 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoInstanceReferencesTest.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoInstanceReferencesTest.java @@ -3,6 +3,7 @@ * so * ================================================================================ * + * Modifications Copyright (C) 2019 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. @@ -29,7 +30,7 @@ public class SoInstanceReferencesTest { @Test public void testConstructor() { - SOInstanceReferences obj = new SOInstanceReferences(); + SoInstanceReferences obj = new SoInstanceReferences(); assertTrue(obj.getInstanceId() == null); assertTrue(obj.getRequestId() == null); @@ -37,7 +38,7 @@ public class SoInstanceReferencesTest { @Test public void testSetGet() { - SOInstanceReferences obj = new SOInstanceReferences(); + SoInstanceReferences obj = new SoInstanceReferences(); obj.setInstanceId("instanceId"); assertEquals("instanceId", obj.getInstanceId()); diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoManagerTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoManagerTest.java index c090513f6..e2482569d 100644 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoManagerTest.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoManagerTest.java @@ -3,7 +3,8 @@ * TestSOManager * ================================================================================ * Copyright (C) 2018 Ericsson. All rights reserved. - * Modifications Copyright (C) 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Modifications Copyright (C) 2018-2019 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. @@ -83,11 +84,11 @@ public class SoManagerTest { @Test public void testServiceInstantiation() throws IOException { - SOManager manager = new SOManager(); + SoManager manager = new SoManager(); assertNotNull(manager); manager.setRestGetTimeout(100); - SOResponse response = manager.createModuleInstance("http:/localhost:99999999", BASE_SO_URI, "sean", + SoResponse response = manager.createModuleInstance("http:/localhost:99999999", BASE_SO_URI, "sean", "citizen", null); assertNull(response); @@ -96,15 +97,15 @@ public class SoManagerTest { assertNull(response); response = manager.createModuleInstance(BASE_SO_URI + "/serviceInstantiation/v7", BASE_SO_URI, "sean", - "citizen", new SORequest()); + "citizen", new SoRequest()); assertNull(response); - SORequest request = new SORequest(); + SoRequest request = new SoRequest(); request.setRequestId(UUID.randomUUID()); request.setRequestScope("Test"); request.setRequestType("ReturnBadJson"); request.setStartTime("2018-03-23 16:31"); - request.setRequestStatus(new SORequestStatus()); + request.setRequestStatus(new SoRequestStatus()); request.getRequestStatus().setRequestState("ONGOING"); response = manager.createModuleInstance(BASE_SO_URI + "/serviceInstantiation/v7", BASE_SO_URI, "sean", @@ -158,7 +159,7 @@ public class SoManagerTest { @Test public void testVfModuleCreation() throws IOException { - SOManager manager = new SOManager(); + SoManager manager = new SoManager(); assertNotNull(manager); manager.setRestGetTimeout(100); @@ -167,41 +168,41 @@ public class SoManagerTest { WorkingMemory wm = new DummyWorkingMemory(); - SORequest soRequest = new SORequest(); + SoRequest soRequest = new SoRequest(); soRequest.setOperationType(SoOperationType.SCALE_OUT); PolicyEngine.manager.setEnvironmentProperty("so.url", "http:/localhost:99999999"); - Future<SOResponse> asyncRestCallFuture = manager.asyncSORestCall(UUID.randomUUID().toString(), wm, + Future<SoResponse> asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(), UUID.randomUUID().toString(), soRequest); try { - SOResponse response = asyncRestCallFuture.get(); + SoResponse response = asyncRestCallFuture.get(); assertEquals(999, response.getHttpResponseCode()); } catch (Exception e) { fail("test should not throw an exception"); } PolicyEngine.manager.setEnvironmentProperty("so.url", BASE_SO_URI); - asyncRestCallFuture = manager.asyncSORestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(), + asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(), UUID.randomUUID().toString(), soRequest); try { - SOResponse response = asyncRestCallFuture.get(); + SoResponse response = asyncRestCallFuture.get(); assertEquals(999, response.getHttpResponseCode()); } catch (Exception e) { fail("test should not throw an exception"); } - SORequest request = new SORequest(); + SoRequest request = new SoRequest(); request.setRequestId(UUID.randomUUID()); request.setRequestScope("Test"); request.setRequestType("ReturnBadJson"); request.setStartTime("2018-03-23 16:31"); - request.setRequestStatus(new SORequestStatus()); + request.setRequestStatus(new SoRequestStatus()); request.getRequestStatus().setRequestState("ONGOING"); request.setOperationType(SoOperationType.SCALE_OUT); - asyncRestCallFuture = manager.asyncSORestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(), + asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(), UUID.randomUUID().toString(), request); try { - SOResponse response = asyncRestCallFuture.get(); + SoResponse response = asyncRestCallFuture.get(); assertEquals(999, response.getHttpResponseCode()); } catch (Exception e) { fail("test should not throw an exception"); @@ -209,20 +210,20 @@ public class SoManagerTest { request.setRequestType("ReturnCompleted"); - asyncRestCallFuture = manager.asyncSORestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(), + asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(), UUID.randomUUID().toString(), request); try { - SOResponse response = asyncRestCallFuture.get(); + SoResponse response = asyncRestCallFuture.get(); assertEquals("COMPLETE", response.getRequest().getRequestStatus().getRequestState()); } catch (Exception e) { fail("test should not throw an exception"); } request.setRequestType("ReturnFailed"); - asyncRestCallFuture = manager.asyncSORestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(), + asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(), UUID.randomUUID().toString(), request); try { - SOResponse response = asyncRestCallFuture.get(); + SoResponse response = asyncRestCallFuture.get(); assertEquals("FAILED", response.getRequest().getRequestStatus().getRequestState()); } catch (Exception e) { fail("test should not throw an exception"); @@ -232,10 +233,10 @@ public class SoManagerTest { request.setRequestType("ReturnOnging200"); request.setRequestScope(new Integer(10).toString()); - asyncRestCallFuture = manager.asyncSORestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(), + asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(), UUID.randomUUID().toString(), request); try { - SOResponse response = asyncRestCallFuture.get(); + SoResponse response = asyncRestCallFuture.get(); assertNotNull(response.getRequest()); assertEquals("COMPLETE", response.getRequest().getRequestStatus().getRequestState()); } catch (Exception e) { @@ -244,10 +245,10 @@ public class SoManagerTest { request.setRequestType("ReturnOnging202"); request.setRequestScope(new Integer(20).toString()); - asyncRestCallFuture = manager.asyncSORestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(), + asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(), UUID.randomUUID().toString(), request); try { - SOResponse response = asyncRestCallFuture.get(); + SoResponse response = asyncRestCallFuture.get(); assertNotNull(response.getRequest()); assertEquals("COMPLETE", response.getRequest().getRequestStatus().getRequestState()); } catch (Exception e) { @@ -257,10 +258,10 @@ public class SoManagerTest { // Test timeout after 20 attempts for a response request.setRequestType("ReturnOnging202"); request.setRequestScope(new Integer(21).toString()); - asyncRestCallFuture = manager.asyncSORestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(), + asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(), UUID.randomUUID().toString(), request); try { - SOResponse response = asyncRestCallFuture.get(); + SoResponse response = asyncRestCallFuture.get(); assertEquals(999, response.getHttpResponseCode()); } catch (Exception e) { fail("test should not throw an exception"); @@ -269,10 +270,10 @@ public class SoManagerTest { // Test bad response after 3 attempts for a response request.setRequestType("ReturnBadAfterWait"); request.setRequestScope(new Integer(3).toString()); - asyncRestCallFuture = manager.asyncSORestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(), + asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(), UUID.randomUUID().toString(), request); try { - SOResponse response = asyncRestCallFuture.get(); + SoResponse response = asyncRestCallFuture.get(); assertEquals(999, response.getHttpResponseCode()); } catch (Exception e) { fail("test should not throw an exception"); @@ -281,7 +282,7 @@ public class SoManagerTest { @Test public void testVfModuleDeletion() { - SOManager manager = new SOManager(); + SoManager manager = new SoManager(); assertNotNull(manager); manager.setRestGetTimeout(100); @@ -290,41 +291,41 @@ public class SoManagerTest { WorkingMemory wm = new DummyWorkingMemory(); - SORequest soRequest = new SORequest(); + SoRequest soRequest = new SoRequest(); soRequest.setOperationType(SoOperationType.DELETE_VF_MODULE); PolicyEngine.manager.setEnvironmentProperty("so.url", "http:/localhost:99999999"); - Future<SOResponse> asyncRestCallFuture = manager.asyncSORestCall(UUID.randomUUID().toString(), wm, + Future<SoResponse> asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(), UUID.randomUUID().toString(), UUID.randomUUID().toString(), soRequest); try { - SOResponse response = asyncRestCallFuture.get(); + SoResponse response = asyncRestCallFuture.get(); assertEquals(999, response.getHttpResponseCode()); } catch (Exception e) { fail("test should not throw an exception"); } PolicyEngine.manager.setEnvironmentProperty("so.url", BASE_SO_URI); - asyncRestCallFuture = manager.asyncSORestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(), + asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(), UUID.randomUUID().toString(), UUID.randomUUID().toString(), soRequest); try { - SOResponse response = asyncRestCallFuture.get(); + SoResponse response = asyncRestCallFuture.get(); assertEquals(999, response.getHttpResponseCode()); } catch (Exception e) { fail("test should not throw an exception"); } - SORequest request = new SORequest(); + SoRequest request = new SoRequest(); request.setRequestId(UUID.randomUUID()); request.setRequestScope("Test"); request.setRequestType("ReturnBadJson"); request.setStartTime("2018-03-23 16:31"); - request.setRequestStatus(new SORequestStatus()); + request.setRequestStatus(new SoRequestStatus()); request.getRequestStatus().setRequestState("ONGOING"); request.setOperationType(SoOperationType.DELETE_VF_MODULE); - asyncRestCallFuture = manager.asyncSORestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(), + asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(), UUID.randomUUID().toString(), UUID.randomUUID().toString(), request); try { - SOResponse response = asyncRestCallFuture.get(); + SoResponse response = asyncRestCallFuture.get(); assertEquals(999, response.getHttpResponseCode()); } catch (Exception e) { fail("test should not throw an exception"); @@ -332,20 +333,20 @@ public class SoManagerTest { request.setRequestType("ReturnCompleted"); - asyncRestCallFuture = manager.asyncSORestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(), + asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(), UUID.randomUUID().toString(), UUID.randomUUID().toString(), request); try { - SOResponse response = asyncRestCallFuture.get(); + SoResponse response = asyncRestCallFuture.get(); assertEquals("COMPLETE", response.getRequest().getRequestStatus().getRequestState()); } catch (Exception e) { fail("test should not throw an exception"); } request.setRequestType("ReturnFailed"); - asyncRestCallFuture = manager.asyncSORestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(), + asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(), UUID.randomUUID().toString(), UUID.randomUUID().toString(), request); try { - SOResponse response = asyncRestCallFuture.get(); + SoResponse response = asyncRestCallFuture.get(); assertEquals("FAILED", response.getRequest().getRequestStatus().getRequestState()); } catch (Exception e) { fail("test should not throw an exception"); @@ -355,10 +356,10 @@ public class SoManagerTest { request.setRequestType("ReturnOnging200"); request.setRequestScope(new Integer(10).toString()); - asyncRestCallFuture = manager.asyncSORestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(), + asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(), UUID.randomUUID().toString(), UUID.randomUUID().toString(), request); try { - SOResponse response = asyncRestCallFuture.get(); + SoResponse response = asyncRestCallFuture.get(); assertNotNull(response.getRequest()); assertEquals("COMPLETE", response.getRequest().getRequestStatus().getRequestState()); } catch (Exception e) { @@ -367,10 +368,10 @@ public class SoManagerTest { request.setRequestType("ReturnOnging202"); request.setRequestScope(new Integer(20).toString()); - asyncRestCallFuture = manager.asyncSORestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(), + asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(), UUID.randomUUID().toString(), UUID.randomUUID().toString(), request); try { - SOResponse response = asyncRestCallFuture.get(); + SoResponse response = asyncRestCallFuture.get(); assertNotNull(response.getRequest()); assertEquals("COMPLETE", response.getRequest().getRequestStatus().getRequestState()); } catch (Exception e) { @@ -380,10 +381,10 @@ public class SoManagerTest { // Test timeout after 20 attempts for a response request.setRequestType("ReturnOnging202"); request.setRequestScope(new Integer(21).toString()); - asyncRestCallFuture = manager.asyncSORestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(), + asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(), UUID.randomUUID().toString(), UUID.randomUUID().toString(), request); try { - SOResponse response = asyncRestCallFuture.get(); + SoResponse response = asyncRestCallFuture.get(); assertEquals(999, response.getHttpResponseCode()); } catch (Exception e) { fail("test should not throw an exception"); @@ -392,10 +393,10 @@ public class SoManagerTest { // Test bad response after 3 attempts for a response request.setRequestType("ReturnBadAfterWait"); request.setRequestScope(new Integer(3).toString()); - asyncRestCallFuture = manager.asyncSORestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(), + asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(), UUID.randomUUID().toString(), UUID.randomUUID().toString(), request); try { - SOResponse response = asyncRestCallFuture.get(); + SoResponse response = asyncRestCallFuture.get(); assertEquals(999, response.getHttpResponseCode()); } catch (Exception e) { fail("test should not throw an exception"); diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoModelInfoTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoModelInfoTest.java index 5898f04f0..3cc415cdd 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoModelInfoTest.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoModelInfoTest.java @@ -3,6 +3,7 @@ * so * ================================================================================ * + * Modifications Copyright (C) 2019 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. @@ -29,7 +30,7 @@ public class SoModelInfoTest { @Test public void testConstructor() { - SOModelInfo obj = new SOModelInfo(); + SoModelInfo obj = new SoModelInfo(); assertTrue(obj.getModelCustomizationId() == null); assertTrue(obj.getModelCustomizationName() == null); @@ -42,7 +43,7 @@ public class SoModelInfoTest { @Test public void testSetGet() { - SOModelInfo obj = new SOModelInfo(); + SoModelInfo obj = new SoModelInfo(); obj.setModelCustomizationId("modelCustomizationId"); assertEquals("modelCustomizationId", obj.getModelCustomizationId()); diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoPolicyExceptionHolderTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoPolicyExceptionHolderTest.java index 2dea68d8f..00dfb8dc6 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoPolicyExceptionHolderTest.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoPolicyExceptionHolderTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * so * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017, 2019 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. @@ -29,7 +29,7 @@ public class SoPolicyExceptionHolderTest { @Test public void testConstructor() { - SOPolicyExceptionHolder obj = new SOPolicyExceptionHolder(); + SoPolicyExceptionHolder obj = new SoPolicyExceptionHolder(); assertTrue(obj.getMessageId() == null); assertTrue(obj.getText() == null); @@ -37,7 +37,7 @@ public class SoPolicyExceptionHolderTest { @Test public void testSetGet() { - SOPolicyExceptionHolder obj = new SOPolicyExceptionHolder(); + SoPolicyExceptionHolder obj = new SoPolicyExceptionHolder(); obj.setMessageId("messageId"); assertEquals("messageId", obj.getMessageId()); diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRelatedInstanceListElementTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRelatedInstanceListElementTest.java index 4c549361a..c73a0ea05 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRelatedInstanceListElementTest.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRelatedInstanceListElementTest.java @@ -3,6 +3,7 @@ * so * ================================================================================ * + * Modifications Copyright (C) 2019 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. @@ -29,16 +30,16 @@ public class SoRelatedInstanceListElementTest { @Test public void testConstructor() { - SORelatedInstanceListElement obj = new SORelatedInstanceListElement(); + SoRelatedInstanceListElement obj = new SoRelatedInstanceListElement(); assertTrue(obj.getRelatedInstance() == null); } @Test public void testSetGet() { - SORelatedInstanceListElement obj = new SORelatedInstanceListElement(); + SoRelatedInstanceListElement obj = new SoRelatedInstanceListElement(); - SORelatedInstance relatedInstance = new SORelatedInstance(); + SoRelatedInstance relatedInstance = new SoRelatedInstance(); obj.setRelatedInstance(relatedInstance); assertEquals(relatedInstance, obj.getRelatedInstance()); } diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRelatedInstanceTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRelatedInstanceTest.java index aa137e19f..70f585efe 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRelatedInstanceTest.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRelatedInstanceTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * so * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017, 2019 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. @@ -29,7 +29,7 @@ public class SoRelatedInstanceTest { @Test public void testConstructor() { - SORelatedInstance obj = new SORelatedInstance(); + SoRelatedInstance obj = new SoRelatedInstance(); assertTrue(obj.getInstanceId() == null); assertTrue(obj.getInstanceName() == null); @@ -38,7 +38,7 @@ public class SoRelatedInstanceTest { @Test public void testSetGet() { - SORelatedInstance obj = new SORelatedInstance(); + SoRelatedInstance obj = new SoRelatedInstance(); obj.setInstanceId("instanceId"); assertEquals("instanceId", obj.getInstanceId()); @@ -46,7 +46,7 @@ public class SoRelatedInstanceTest { obj.setInstanceName("instanceName"); assertEquals("instanceName", obj.getInstanceName()); - SOModelInfo modelInfo = new SOModelInfo(); + SoModelInfo modelInfo = new SoModelInfo(); obj.setModelInfo(modelInfo); assertEquals(modelInfo, obj.getModelInfo()); } diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestDetailsTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestDetailsTest.java index 71ae7ca66..7233482f6 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestDetailsTest.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestDetailsTest.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2018 Ericsson. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2019 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 @@ -35,7 +37,7 @@ public class SoRequestDetailsTest { @Test public void testConstructor() { - SORequestDetails obj = new SORequestDetails(); + SoRequestDetails obj = new SoRequestDetails(); assertTrue(obj.getCloudConfiguration() == null); assertTrue(obj.getModelInfo() == null); @@ -49,68 +51,68 @@ public class SoRequestDetailsTest { @Test public void testSetGet() { - SORequestDetails obj = new SORequestDetails(); + SoRequestDetails obj = new SoRequestDetails(); - SOCloudConfiguration cloudConfiguration = new SOCloudConfiguration(); + SoCloudConfiguration cloudConfiguration = new SoCloudConfiguration(); obj.setCloudConfiguration(cloudConfiguration); assertEquals(cloudConfiguration, obj.getCloudConfiguration()); - SOModelInfo modelInfo = new SOModelInfo(); + SoModelInfo modelInfo = new SoModelInfo(); obj.setModelInfo(modelInfo); assertEquals(modelInfo, obj.getModelInfo()); - SORequestInfo requestInfo = new SORequestInfo(); + SoRequestInfo requestInfo = new SoRequestInfo(); obj.setRequestInfo(requestInfo); assertEquals(requestInfo, obj.getRequestInfo()); - SORequestParameters requestParameters = new SORequestParameters(); + SoRequestParameters requestParameters = new SoRequestParameters(); obj.setRequestParameters(requestParameters); assertEquals(requestParameters, obj.getRequestParameters()); - SOSubscriberInfo subscriberInfo = new SOSubscriberInfo(); + SoSubscriberInfo subscriberInfo = new SoSubscriberInfo(); obj.setSubscriberInfo(subscriberInfo); assertEquals(subscriberInfo, obj.getSubscriberInfo()); } @Test public void testSoMRequestDetailsMethods() { - SORequestDetails details = new SORequestDetails(); + SoRequestDetails details = new SoRequestDetails(); assertNotNull(details); assertNotEquals(0, details.hashCode()); - SOCloudConfiguration cloudConfiguration = new SOCloudConfiguration(); + SoCloudConfiguration cloudConfiguration = new SoCloudConfiguration(); details.setCloudConfiguration(cloudConfiguration); assertEquals(cloudConfiguration, details.getCloudConfiguration()); assertNotEquals(0, details.hashCode()); - SOModelInfo modelInfo = new SOModelInfo(); + SoModelInfo modelInfo = new SoModelInfo(); details.setModelInfo(modelInfo); assertEquals(modelInfo, details.getModelInfo()); assertNotEquals(0, details.hashCode()); - List<SORelatedInstanceListElement> relatedInstanceList = new ArrayList<>(); + List<SoRelatedInstanceListElement> relatedInstanceList = new ArrayList<>(); details.setRelatedInstanceList(relatedInstanceList); assertEquals(relatedInstanceList, details.getRelatedInstanceList()); assertNotEquals(0, details.hashCode()); - SORequestInfo requestInfo = new SORequestInfo(); + SoRequestInfo requestInfo = new SoRequestInfo(); details.setRequestInfo(requestInfo); assertEquals(requestInfo, details.getRequestInfo()); assertNotEquals(0, details.hashCode()); - SORequestParameters requestParameters = new SORequestParameters(); + SoRequestParameters requestParameters = new SoRequestParameters(); details.setRequestParameters(requestParameters); assertEquals(requestParameters, details.getRequestParameters()); assertNotEquals(0, details.hashCode()); - SOSubscriberInfo subscriberInfo = new SOSubscriberInfo(); + SoSubscriberInfo subscriberInfo = new SoSubscriberInfo(); details.setSubscriberInfo(subscriberInfo); assertEquals(subscriberInfo, details.getSubscriberInfo()); assertNotEquals(0, details.hashCode()); assertEquals("SORequestDetails [modelInfo=org.onap.policy.so", details.toString().substring(0, 46)); - SORequestDetails copiedDetails = new SORequestDetails(details); + SoRequestDetails copiedDetails = new SoRequestDetails(details); assertTrue(details.equals(details)); assertTrue(details.equals(copiedDetails)); diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestErrorTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestErrorTest.java index f700fbc70..b870dbd99 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestErrorTest.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestErrorTest.java @@ -3,6 +3,7 @@ * so * ================================================================================ * + * Modifications Copyright (C) 2019 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. @@ -29,7 +30,7 @@ public class SoRequestErrorTest { @Test public void testConstructor() { - SORequestError obj = new SORequestError(); + SoRequestError obj = new SoRequestError(); assertTrue(obj.getPolicyException() == null); assertTrue(obj.getServiceException() == null); @@ -37,13 +38,13 @@ public class SoRequestErrorTest { @Test public void testSetGet() { - SORequestError obj = new SORequestError(); + SoRequestError obj = new SoRequestError(); - SOPolicyExceptionHolder policyException = new SOPolicyExceptionHolder(); + SoPolicyExceptionHolder policyException = new SoPolicyExceptionHolder(); obj.setPolicyException(policyException); assertEquals(policyException, obj.getPolicyException()); - SOServiceExceptionHolder serviceException = new SOServiceExceptionHolder(); + SoServiceExceptionHolder serviceException = new SoServiceExceptionHolder(); obj.setServiceException(serviceException); assertEquals(serviceException, obj.getServiceException()); } diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestInfoTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestInfoTest.java index c09da54dc..0e518018b 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestInfoTest.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestInfoTest.java @@ -3,6 +3,7 @@ * so * ================================================================================ * + * Modifications Copyright (C) 2019 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. @@ -29,7 +30,7 @@ public class SoRequestInfoTest { @Test public void testConstructor() { - SORequestInfo obj = new SORequestInfo(); + SoRequestInfo obj = new SoRequestInfo(); assertTrue(obj.getBillingAccountNumber() == null); assertTrue(obj.getCallbackUrl() == null); @@ -45,7 +46,7 @@ public class SoRequestInfoTest { @Test public void testSetGet() { - SORequestInfo obj = new SORequestInfo(); + SoRequestInfo obj = new SoRequestInfo(); obj.setBillingAccountNumber("billingAccountNumber"); assertEquals("billingAccountNumber", obj.getBillingAccountNumber()); diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestParametersTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestParametersTest.java index db93988c9..7d671f5e1 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestParametersTest.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestParametersTest.java @@ -3,6 +3,7 @@ * so * ================================================================================ * + * Modifications Copyright (C) 2019 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. @@ -29,7 +30,7 @@ public class SoRequestParametersTest { @Test public void testConstructor() { - SORequestParameters obj = new SORequestParameters(); + SoRequestParameters obj = new SoRequestParameters(); assertTrue(obj.getSubscriptionServiceType() == null); assertTrue(obj.getUserParams() != null); @@ -38,7 +39,7 @@ public class SoRequestParametersTest { @Test public void testSetGet() { - SORequestParameters obj = new SORequestParameters(); + SoRequestParameters obj = new SoRequestParameters(); obj.setSubscriptionServiceType("subscriptionServiceType"); assertEquals("subscriptionServiceType", obj.getSubscriptionServiceType()); diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestReferencesTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestReferencesTest.java index 5d6ff2090..549147e4b 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestReferencesTest.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestReferencesTest.java @@ -3,6 +3,7 @@ * so * ================================================================================ * + * Modifications Copyright (C) 2019 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. @@ -29,7 +30,7 @@ public class SoRequestReferencesTest { @Test public void testConstructor() { - SORequestReferences obj = new SORequestReferences(); + SoRequestReferences obj = new SoRequestReferences(); assertTrue(obj.getInstanceId() == null); assertTrue(obj.getRequestId() == null); @@ -37,7 +38,7 @@ public class SoRequestReferencesTest { @Test public void testSetGet() { - SORequestReferences obj = new SORequestReferences(); + SoRequestReferences obj = new SoRequestReferences(); obj.setInstanceId("instanceId"); assertEquals("instanceId", obj.getInstanceId()); diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestStatusTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestStatusTest.java index cd3e1b58a..39a3241a3 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestStatusTest.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestStatusTest.java @@ -3,6 +3,7 @@ * so * ================================================================================ * + * Modifications Copyright (C) 2019 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. @@ -30,7 +31,7 @@ public class SoRequestStatusTest { @Test public void testConstructor() { - SORequestStatus obj = new SORequestStatus(); + SoRequestStatus obj = new SoRequestStatus(); assertEquals(0, obj.getPercentProgress()); assertTrue(obj.getRequestState() == null); @@ -40,7 +41,7 @@ public class SoRequestStatusTest { @Test public void testSetGet() { - SORequestStatus obj = new SORequestStatus(); + SoRequestStatus obj = new SoRequestStatus(); obj.setPercentProgress(2008); assertEquals(2008, obj.getPercentProgress()); diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestTest.java index c09c58471..971b1d190 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestTest.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestTest.java @@ -3,6 +3,7 @@ * so * ================================================================================ * + * Modifications Copyright (C) 2019 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. @@ -32,7 +33,7 @@ public class SoRequestTest { @Test public void testConstructor() { - SORequest obj = new SORequest(); + SoRequest obj = new SoRequest(); assertTrue(obj.getFinishTime() == null); assertTrue(obj.getRequestDetails() == null); @@ -45,7 +46,7 @@ public class SoRequestTest { @Test public void testSetGet() { - SORequest obj = new SORequest(); + SoRequest obj = new SoRequest(); LocalDateTime finishTime = LocalDateTime.now(); obj.setFinishTime(finishTime); @@ -58,7 +59,7 @@ public class SoRequestTest { obj.setRequestScope("requestScope"); assertEquals("requestScope", obj.getRequestScope()); - SORequestStatus requestStatus = new SORequestStatus(); + SoRequestStatus requestStatus = new SoRequestStatus(); obj.setRequestStatus(requestStatus); assertEquals(requestStatus, obj.getRequestStatus()); diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoResponseTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoResponseTest.java index cf396561b..c932ac969 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoResponseTest.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoResponseTest.java @@ -3,6 +3,7 @@ * so * ================================================================================ * + * Modifications Copyright (C) 2019 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. @@ -29,7 +30,7 @@ public class SoResponseTest { @Test public void testConstructor() { - SOResponse obj = new SOResponse(); + SoResponse obj = new SoResponse(); assertEquals(0, obj.getHttpResponseCode()); assertTrue(obj.getRequest() == null); @@ -39,20 +40,20 @@ public class SoResponseTest { @Test public void testSetGet() { - SOResponse obj = new SOResponse(); + SoResponse obj = new SoResponse(); obj.setHttpResponseCode(2008); assertEquals(2008, obj.getHttpResponseCode()); - SORequest request = new SORequest(); + SoRequest request = new SoRequest(); obj.setRequest(request); assertEquals(request, obj.getRequest()); - SORequestError requestError = new SORequestError(); + SoRequestError requestError = new SoRequestError(); obj.setRequestError(requestError); assertEquals(requestError, obj.getRequestError()); - SORequestReferences requestReferences = new SORequestReferences(); + SoRequestReferences requestReferences = new SoRequestReferences(); obj.setRequestReferences(requestReferences); assertEquals(requestReferences, obj.getRequestReferences()); } diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoResponseWrapperTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoResponseWrapperTest.java index 181fe2138..26bd75d2a 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoResponseWrapperTest.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoResponseWrapperTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * so * ================================================================================ - * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2018-2019 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. @@ -33,33 +33,33 @@ public class SoResponseWrapperTest { @Test public void testConstructor() { - SOResponse response = new SOResponse(); - SOResponseWrapper obj = new SOResponseWrapper(response, "reqID"); + SoResponse response = new SoResponse(); + SoResponseWrapper obj = new SoResponseWrapper(response, "reqID"); assertEquals(response, obj.getSoResponse()); - assertEquals("reqID", obj.getRequestID()); + assertEquals("reqID", obj.getRequestId()); } @Test public void testSetGet() { - SOResponse response = new SOResponse(); - SOResponseWrapper obj = new SOResponseWrapper(response, "reqID"); + SoResponse response = new SoResponse(); + SoResponseWrapper obj = new SoResponseWrapper(response, "reqID"); - SOResponse response2 = new SOResponse(); + SoResponse response2 = new SoResponse(); response2.setHttpResponseCode(2008); obj.setSoResponse(response2); assertEquals(response2, obj.getSoResponse()); - obj.setRequestID("id2"); - assertEquals("id2", obj.getRequestID()); + obj.setRequestId("id2"); + assertEquals("id2", obj.getRequestId()); } @Test public void testSoResponseWrapperMethods() { String requestId = UUID.randomUUID().toString(); - SOResponse response = new SOResponse(); + SoResponse response = new SoResponse(); - SOResponseWrapper responseWrapper = new SOResponseWrapper(response, requestId); + SoResponseWrapper responseWrapper = new SoResponseWrapper(response, requestId); assertNotNull(responseWrapper); assertNotEquals(0, responseWrapper.hashCode()); @@ -69,7 +69,7 @@ public class SoResponseWrapperTest { assertEquals("SOResponseWrapper [SOResponse=org.onap.policy.", responseWrapper.toString().substring(0, 46)); - SOResponseWrapper identicalResponseWrapper = new SOResponseWrapper(response, requestId); + SoResponseWrapper identicalResponseWrapper = new SoResponseWrapper(response, requestId); assertEquals(responseWrapper, responseWrapper); assertEquals(responseWrapper, identicalResponseWrapper); @@ -78,28 +78,28 @@ public class SoResponseWrapperTest { assertFalse(responseWrapper.equals(null)); assertFalse(responseWrapper.equals("AString")); - assertEquals(new SOResponseWrapper(null, null), new SOResponseWrapper(null, null)); - assertNotEquals(new SOResponseWrapper(null, null), identicalResponseWrapper); + assertEquals(new SoResponseWrapper(null, null), new SoResponseWrapper(null, null)); + assertNotEquals(new SoResponseWrapper(null, null), identicalResponseWrapper); - assertNotEquals(0, new SOResponseWrapper(null, null).hashCode()); + assertNotEquals(0, new SoResponseWrapper(null, null).hashCode()); - identicalResponseWrapper.setSoResponse(new SOResponse()); + identicalResponseWrapper.setSoResponse(new SoResponse()); assertNotEquals(responseWrapper, identicalResponseWrapper); identicalResponseWrapper.setSoResponse(response); assertEquals(responseWrapper, identicalResponseWrapper); - identicalResponseWrapper.setRequestID(UUID.randomUUID().toString()); + identicalResponseWrapper.setRequestId(UUID.randomUUID().toString()); assertNotEquals(responseWrapper, identicalResponseWrapper); - identicalResponseWrapper.setRequestID(requestId); + identicalResponseWrapper.setRequestId(requestId); assertEquals(responseWrapper, identicalResponseWrapper); - responseWrapper.setRequestID(null); + responseWrapper.setRequestId(null); assertNotEquals(responseWrapper, identicalResponseWrapper); - identicalResponseWrapper.setRequestID(null); + identicalResponseWrapper.setRequestId(null); assertEquals(responseWrapper, identicalResponseWrapper); - responseWrapper.setRequestID(requestId); + responseWrapper.setRequestId(requestId); assertNotEquals(responseWrapper, identicalResponseWrapper); - identicalResponseWrapper.setRequestID(requestId); + identicalResponseWrapper.setRequestId(requestId); assertEquals(responseWrapper, identicalResponseWrapper); } } diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoServiceExceptionHolderTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoServiceExceptionHolderTest.java index b0ce56652..8c9d3a730 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoServiceExceptionHolderTest.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoServiceExceptionHolderTest.java @@ -3,6 +3,7 @@ * so * ================================================================================ * + * Modifications Copyright (C) 2019 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. @@ -29,7 +30,7 @@ public class SoServiceExceptionHolderTest { @Test public void testConstructor() { - SOServiceExceptionHolder obj = new SOServiceExceptionHolder(); + SoServiceExceptionHolder obj = new SoServiceExceptionHolder(); assertTrue(obj.getMessageId() == null); assertTrue(obj.getText() == null); @@ -39,7 +40,7 @@ public class SoServiceExceptionHolderTest { @Test public void testSetGet() { - SOServiceExceptionHolder obj = new SOServiceExceptionHolder(); + SoServiceExceptionHolder obj = new SoServiceExceptionHolder(); obj.setMessageId("messageId"); assertEquals("messageId", obj.getMessageId()); diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoSubscriberInfoTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoSubscriberInfoTest.java index ea38bd597..e68e74e3f 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoSubscriberInfoTest.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoSubscriberInfoTest.java @@ -3,6 +3,7 @@ * so * ================================================================================ * + * Modifications Copyright (C) 2019 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. @@ -29,7 +30,7 @@ public class SoSubscriberInfoTest { @Test public void testConstructor() { - SOSubscriberInfo obj = new SOSubscriberInfo(); + SoSubscriberInfo obj = new SoSubscriberInfo(); assertTrue(obj.getGlobalSubscriberId() == null); assertTrue(obj.getSubscriberCommonSiteId() == null); @@ -38,7 +39,7 @@ public class SoSubscriberInfoTest { @Test public void testSetGet() { - SOSubscriberInfo obj = new SOSubscriberInfo(); + SoSubscriberInfo obj = new SoSubscriberInfo(); obj.setGlobalSubscriberId("globalSubscriberId"); assertEquals("globalSubscriberId", obj.getGlobalSubscriberId()); |