summaryrefslogtreecommitdiffstats
path: root/controlloop/common/model-impl/vfc
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2019-01-10 09:57:51 -0500
committerJim Hahn <jrh3@att.com>2019-01-10 11:12:49 -0500
commit485559b57a49a449c6fc3baeda1b0ffd8b05cf6b (patch)
tree22dfb08b040c8485f589c59d9260597f773616ab /controlloop/common/model-impl/vfc
parentbdc051bb70262daca12cd0c2e5fcc6bcf795996c (diff)
Remove model-impl/vfc checkstyle suppressions
Entails renaming VFCxxx classes and updated drl files, as well. Change-Id: Ib31c61a35536df22772de6090761b22beb1b561b Issue-ID: POLICY-1145 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'controlloop/common/model-impl/vfc')
-rw-r--r--controlloop/common/model-impl/vfc/checkstyle-suppressions.xml30
-rw-r--r--controlloop/common/model-impl/vfc/pom.xml1
-rw-r--r--controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcHealActionVmInfo.java (renamed from controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealActionVmInfo.java)8
-rw-r--r--controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcHealAdditionalParams.java (renamed from controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealAdditionalParams.java)14
-rw-r--r--controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcHealRequest.java (renamed from controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealRequest.java)14
-rw-r--r--controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcManager.java (renamed from controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCManager.java)34
-rw-r--r--controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcRequest.java (renamed from controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCRequest.java)18
-rw-r--r--controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcResponse.java (renamed from controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCResponse.java)14
-rw-r--r--controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcResponseDescriptor.java (renamed from controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCResponseDescriptor.java)14
-rw-r--r--controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/DemoTest.java20
-rw-r--r--controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealActionVmInfoTest.java4
-rw-r--r--controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealAdditionalParamsTest.java6
-rw-r--r--controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealRequestTest.java6
-rw-r--r--controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcManagerTest.java46
-rw-r--r--controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcRequestTest.java10
-rw-r--r--controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcResponseDescriptorTest.java6
-rw-r--r--controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcResponseTest.java6
17 files changed, 110 insertions, 141 deletions
diff --git a/controlloop/common/model-impl/vfc/checkstyle-suppressions.xml b/controlloop/common/model-impl/vfc/checkstyle-suppressions.xml
deleted file mode 100644
index ea04e03f1..000000000
--- a/controlloop/common/model-impl/vfc/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="VFCManager.java|VFCHealActionVmInfo.java|VFCHealAdditionalParams.java|VFCHealRequest.java|VFCRequest.java|VFCResponseDescriptor.java|VFCResponse.java"
- lines="1-9999"/>
-</suppressions>
diff --git a/controlloop/common/model-impl/vfc/pom.xml b/controlloop/common/model-impl/vfc/pom.xml
index d5de89f6e..1df42831b 100644
--- a/controlloop/common/model-impl/vfc/pom.xml
+++ b/controlloop/common/model-impl/vfc/pom.xml
@@ -92,7 +92,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/vfc/src/main/java/org/onap/policy/vfc/VFCHealActionVmInfo.java b/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcHealActionVmInfo.java
index 0286a7d8b..c154f7226 100644
--- a/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealActionVmInfo.java
+++ b/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcHealActionVmInfo.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2017 Intel Corp. All rights reserved.
- * Modifications Copyright (C) 2018 AT&T Corporation. All rights reserved.
+ * Modifications Copyright (C) 2018-2019 AT&T Corporation. 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.
@@ -23,7 +23,7 @@ import com.google.gson.annotations.SerializedName;
import java.io.Serializable;
-public class VFCHealActionVmInfo implements Serializable {
+public class VfcHealActionVmInfo implements Serializable {
private static final long serialVersionUID = 3208673205100673119L;
@@ -33,8 +33,8 @@ public class VFCHealActionVmInfo implements Serializable {
@SerializedName("vmname")
private String vmname;
- public VFCHealActionVmInfo() {
- // Default constructor for VFCHealActionVmInfo
+ public VfcHealActionVmInfo() {
+ // Default constructor
}
public String getVmid() {
diff --git a/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealAdditionalParams.java b/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcHealAdditionalParams.java
index 393e3761f..2c5de3a22 100644
--- a/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealAdditionalParams.java
+++ b/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcHealAdditionalParams.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2017 Intel Corp. All rights reserved.
- * Modifications Copyright (C) 2018 AT&T Corporation. All rights reserved.
+ * Modifications Copyright (C) 2018-2019 AT&T Corporation. 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.
@@ -23,7 +23,7 @@ import com.google.gson.annotations.SerializedName;
import java.io.Serializable;
-public class VFCHealAdditionalParams implements Serializable {
+public class VfcHealAdditionalParams implements Serializable {
private static final long serialVersionUID = 2656694137285096191L;
@@ -31,10 +31,10 @@ public class VFCHealAdditionalParams implements Serializable {
private String action;
@SerializedName("actionvminfo")
- private VFCHealActionVmInfo actionInfo;
+ private VfcHealActionVmInfo actionInfo;
- public VFCHealAdditionalParams() {
- // Default constructor for VFCHealAdditionalParams
+ public VfcHealAdditionalParams() {
+ // Default constructor
}
public String getAction() {
@@ -45,11 +45,11 @@ public class VFCHealAdditionalParams implements Serializable {
this.action = action;
}
- public VFCHealActionVmInfo getActionInfo() {
+ public VfcHealActionVmInfo getActionInfo() {
return actionInfo;
}
- public void setActionInfo(VFCHealActionVmInfo actionInfo) {
+ public void setActionInfo(VfcHealActionVmInfo actionInfo) {
this.actionInfo = actionInfo;
}
}
diff --git a/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealRequest.java b/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcHealRequest.java
index 75b9566b1..55ca4ac5c 100644
--- a/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealRequest.java
+++ b/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcHealRequest.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2017 Intel Corp. All rights reserved.
- * Modifications Copyright (C) 2018 AT&T Corporation. All rights reserved.
+ * Modifications Copyright (C) 2018-2019 AT&T Corporation. 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.
@@ -23,7 +23,7 @@ import com.google.gson.annotations.SerializedName;
import java.io.Serializable;
-public class VFCHealRequest implements Serializable {
+public class VfcHealRequest implements Serializable {
private static final long serialVersionUID = -7341931593089709247L;
@@ -34,10 +34,10 @@ public class VFCHealRequest implements Serializable {
private String cause;
@SerializedName("additionalParams")
- private VFCHealAdditionalParams additionalParams;
+ private VfcHealAdditionalParams additionalParams;
- public VFCHealRequest() {
- // Default constructor for VFCHealRequest
+ public VfcHealRequest() {
+ // Default constructor
}
public String getVnfInstanceId() {
@@ -56,11 +56,11 @@ public class VFCHealRequest implements Serializable {
this.cause = cause;
}
- public VFCHealAdditionalParams getAdditionalParams() {
+ public VfcHealAdditionalParams getAdditionalParams() {
return additionalParams;
}
- public void setAdditionalParams(VFCHealAdditionalParams additionalParams) {
+ public void setAdditionalParams(VfcHealAdditionalParams additionalParams) {
this.additionalParams = additionalParams;
}
}
diff --git a/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCManager.java b/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcManager.java
index d84d0403f..2a004bd04 100644
--- a/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCManager.java
+++ b/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcManager.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2017-2018 Intel Corp, AT&T. All rights reserved.
- * Modifications Copyright (C) 2018 AT&T Corporation. All rights reserved.
+ * Modifications Copyright (C) 2018-2019 AT&T Corporation. 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,15 +32,15 @@ import org.onap.policy.vfc.util.Serialization;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public final class VFCManager implements Runnable {
+public final class VfcManager implements Runnable {
private static final String SYSTEM_LS = System.lineSeparator();
private String vfcUrlBase;
private String username;
private String password;
- private VFCRequest vfcRequest;
+ private VfcRequest vfcRequest;
private WorkingMemory workingMem;
- private static final Logger logger = LoggerFactory.getLogger(VFCManager.class);
+ private static final Logger logger = LoggerFactory.getLogger(VfcManager.class);
private static final Logger netLogger =
LoggerFactory.getLogger(org.onap.policy.common.endpoints.event.comm.Topic.NETWORK_LOGGER);
@@ -53,10 +53,10 @@ public final class VFCManager implements Runnable {
* @param wm Drools working memory
* @param request request
*/
- public VFCManager(WorkingMemory wm, VFCRequest request) {
+ public VfcManager(WorkingMemory wm, VfcRequest request) {
if (wm == null || request == null) {
throw new IllegalArgumentException(
- "the parameters \"wm\" and \"request\" on the VFCManager constructor may not be null");
+ "the parameters \"wm\" and \"request\" on the VfcManager constructor may not be null");
}
workingMem = wm;
vfcRequest = request;
@@ -64,7 +64,7 @@ public final class VFCManager implements Runnable {
restManager = new RESTManager();
// use getPEManagerEnvProperty() for required properties; others are optional
- setVFCParams(getPEManagerEnvProperty("vfc.url"), PolicyEngine.manager.getEnvironmentProperty("vfc.username"),
+ setVfcParams(getPeManagerEnvProperty("vfc.url"), PolicyEngine.manager.getEnvironmentProperty("vfc.username"),
PolicyEngine.manager.getEnvironmentProperty("vfc.password"));
}
@@ -75,7 +75,7 @@ public final class VFCManager implements Runnable {
* @param name username
* @param pwd password
*/
- public void setVFCParams(String baseUrl, String name, String pwd) {
+ public void setVfcParams(String baseUrl, String name, String pwd) {
vfcUrlBase = baseUrl + "/api/nslcm/v1";
username = name;
password = pwd;
@@ -86,12 +86,12 @@ public final class VFCManager implements Runnable {
Map<String, String> headers = new HashMap<>();
Pair<Integer, String> httpDetails;
- VFCResponse responseError = new VFCResponse();
- responseError.setResponseDescriptor(new VFCResponseDescriptor());
+ VfcResponse responseError = new VfcResponse();
+ responseError.setResponseDescriptor(new VfcResponseDescriptor());
responseError.getResponseDescriptor().setStatus("error");
headers.put("Accept", "application/json");
- String vfcUrl = vfcUrlBase + "/ns/" + vfcRequest.getNSInstanceId() + "/heal";
+ String vfcUrl = vfcUrlBase + "/ns/" + vfcRequest.getNsInstanceId() + "/heal";
try {
String vfcRequestJson = Serialization.gsonPretty.toJson(vfcRequest);
netLogger.info("[OUT|{}|{}|]{}{}", "VFC", vfcUrl, SYSTEM_LS, vfcRequestJson);
@@ -114,7 +114,7 @@ public final class VFCManager implements Runnable {
}
try {
- VFCResponse response = Serialization.gsonPretty.fromJson(httpDetails.second, VFCResponse.class);
+ VfcResponse response = Serialization.gsonPretty.fromJson(httpDetails.second, VfcResponse.class);
netLogger.info("[IN|{}|{}|]{}{}", "VFC", vfcUrl, SYSTEM_LS, httpDetails.second);
String body = Serialization.gsonPretty.toJson(response);
logger.debug("Response to VFC Heal post:");
@@ -124,12 +124,12 @@ public final class VFCManager implements Runnable {
int attemptsLeft = 20;
String urlGet = vfcUrlBase + "/jobs/" + jobId;
- VFCResponse responseGet = null;
+ VfcResponse responseGet = null;
while (attemptsLeft-- > 0) {
netLogger.info("[OUT|{}|{}|]", "VFC", urlGet);
Pair<Integer, String> httpDetailsGet = restManager.get(urlGet, username, password, headers);
- responseGet = Serialization.gsonPretty.fromJson(httpDetailsGet.second, VFCResponse.class);
+ responseGet = Serialization.gsonPretty.fromJson(httpDetailsGet.second, VfcResponse.class);
netLogger.info("[IN|{}|{}|]{}{}", "VFC", urlGet, SYSTEM_LS, httpDetailsGet.second);
responseGet.setRequestId(vfcRequest.getRequestId().toString());
body = Serialization.gsonPretty.toJson(responseGet);
@@ -152,12 +152,12 @@ public final class VFCManager implements Runnable {
workingMem.insert(responseGet);
}
} catch (JsonSyntaxException e) {
- logger.error("Failed to deserialize into VFCResponse {}", e.getLocalizedMessage(), e);
+ logger.error("Failed to deserialize into VfcResponse {}", e.getLocalizedMessage(), e);
} catch (InterruptedException e) {
logger.error("Interrupted exception: {}", e.getLocalizedMessage(), e);
Thread.currentThread().interrupt();
} catch (Exception e) {
- logger.error("Unknown error deserializing into VFCResponse {}", e.getLocalizedMessage(), e);
+ logger.error("Unknown error deserializing into VfcResponse {}", e.getLocalizedMessage(), e);
}
}
@@ -178,7 +178,7 @@ public final class VFCManager implements Runnable {
* @return the property value
*/
- private String getPEManagerEnvProperty(String enginePropertyName) {
+ private String getPeManagerEnvProperty(String enginePropertyName) {
String enginePropertyValue = PolicyEngine.manager.getEnvironmentProperty(enginePropertyName);
if (enginePropertyValue == null) {
throw new IllegalArgumentException("The value of policy engine manager environment property \""
diff --git a/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCRequest.java b/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcRequest.java
index cfcaf8039..c4473e7f1 100644
--- a/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCRequest.java
+++ b/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcRequest.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2017 Intel Corp. All rights reserved.
- * Modifications Copyright (C) 2018 AT&T Corporation. All rights reserved.
+ * Modifications Copyright (C) 2018-2019 AT&T Corporation. 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;
import java.util.UUID;
-public class VFCRequest implements Serializable {
+public class VfcRequest implements Serializable {
private static final long serialVersionUID = 3736300970326332512L;
// These fields are not serialized and not part of JSON
@@ -32,17 +32,17 @@ public class VFCRequest implements Serializable {
private transient UUID requestId;
@SerializedName("healVnfData")
- private VFCHealRequest healRequest;
+ private VfcHealRequest healRequest;
- public VFCRequest() {
- // Default constructor for VFCRequest
+ public VfcRequest() {
+ // Default constructor
}
- public String getNSInstanceId() {
+ public String getNsInstanceId() {
return nsInstanceId;
}
- public void setNSInstanceId(String nsInstanceId) {
+ public void setNsInstanceId(String nsInstanceId) {
this.nsInstanceId = nsInstanceId;
}
@@ -54,11 +54,11 @@ public class VFCRequest implements Serializable {
this.requestId = requestId;
}
- public VFCHealRequest getHealRequest() {
+ public VfcHealRequest getHealRequest() {
return healRequest;
}
- public void setHealRequest(VFCHealRequest healRequest) {
+ public void setHealRequest(VfcHealRequest healRequest) {
this.healRequest = healRequest;
}
}
diff --git a/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCResponse.java b/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcResponse.java
index 21e9472b7..2183be71b 100644
--- a/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCResponse.java
+++ b/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcResponse.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2017 Intel Corp. All rights reserved.
- * Modifications Copyright (C) 2018 AT&T Corporation. All rights reserved.
+ * Modifications Copyright (C) 2018-2019 AT&T Corporation. 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.
@@ -23,7 +23,7 @@ import com.google.gson.annotations.SerializedName;
import java.io.Serializable;
-public class VFCResponse implements Serializable {
+public class VfcResponse implements Serializable {
private static final long serialVersionUID = 9151443891238218455L;
@@ -31,12 +31,12 @@ public class VFCResponse implements Serializable {
private String jobId;
@SerializedName("responseDescriptor")
- private VFCResponseDescriptor responseDescriptor;
+ private VfcResponseDescriptor responseDescriptor;
private transient String requestId;
- public VFCResponse() {
- // Default constructor for VFCResponse
+ public VfcResponse() {
+ // Default constructor
}
public String getJobId() {
@@ -47,11 +47,11 @@ public class VFCResponse implements Serializable {
this.jobId = jobId;
}
- public VFCResponseDescriptor getResponseDescriptor() {
+ public VfcResponseDescriptor getResponseDescriptor() {
return responseDescriptor;
}
- public void setResponseDescriptor(VFCResponseDescriptor responseDescriptor) {
+ public void setResponseDescriptor(VfcResponseDescriptor responseDescriptor) {
this.responseDescriptor = responseDescriptor;
}
diff --git a/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCResponseDescriptor.java b/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcResponseDescriptor.java
index cdd4a39a9..147b937dc 100644
--- a/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCResponseDescriptor.java
+++ b/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcResponseDescriptor.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2017 Intel Corp. All rights reserved.
- * Modifications Copyright (C) 2018 AT&T Corporation. All rights reserved.
+ * Modifications Copyright (C) 2018-2019 AT&T Corporation. 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;
import java.util.List;
-public class VFCResponseDescriptor implements Serializable {
+public class VfcResponseDescriptor implements Serializable {
private static final long serialVersionUID = 6827782899144150158L;
@@ -44,10 +44,10 @@ public class VFCResponseDescriptor implements Serializable {
private String responseId;
@SerializedName("responseHistoryList")
- private List<VFCResponseDescriptor> responseHistoryList;
+ private List<VfcResponseDescriptor> responseHistoryList;
- public VFCResponseDescriptor() {
- // Default constructor for VFCResponseDescriptor
+ public VfcResponseDescriptor() {
+ // Default constructor
}
public String getStatus() {
@@ -86,11 +86,11 @@ public class VFCResponseDescriptor implements Serializable {
this.responseId = responseId;
}
- public List<VFCResponseDescriptor> getResponseHistoryList() {
+ public List<VfcResponseDescriptor> getResponseHistoryList() {
return responseHistoryList;
}
- public void setResponseHistoryList(List<VFCResponseDescriptor> responseHistoryList) {
+ public void setResponseHistoryList(List<VfcResponseDescriptor> responseHistoryList) {
this.responseHistoryList = responseHistoryList;
}
diff --git a/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/DemoTest.java b/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/DemoTest.java
index dae87b6a6..d334d232f 100644
--- a/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/DemoTest.java
+++ b/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/DemoTest.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2017 Intel Corp. All rights reserved.
- * Modifications Copyright (C) 2018 AT&T Corporation. All rights reserved.
+ * Modifications Copyright (C) 2018-2019 AT&T Corporation. 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.
@@ -28,30 +28,30 @@ public class DemoTest {
@Test
public void test() {
- VFCRequest request = new VFCRequest();
+ VfcRequest request = new VfcRequest();
- request.setNSInstanceId("100");
- request.setHealRequest(new VFCHealRequest());
+ request.setNsInstanceId("100");
+ request.setHealRequest(new VfcHealRequest());
request.getHealRequest().setVnfInstanceId("1");
request.getHealRequest().setCause("vm is down");
- request.getHealRequest().setAdditionalParams(new VFCHealAdditionalParams());
+ request.getHealRequest().setAdditionalParams(new VfcHealAdditionalParams());
request.getHealRequest().getAdditionalParams().setAction("restartvm");
- request.getHealRequest().getAdditionalParams().setActionInfo(new VFCHealActionVmInfo());
+ request.getHealRequest().getAdditionalParams().setActionInfo(new VfcHealActionVmInfo());
request.getHealRequest().getAdditionalParams().getActionInfo().setVmid("33");
request.getHealRequest().getAdditionalParams().getActionInfo().setVmname("xgw-smp11");
String body = Serialization.gsonPretty.toJson(request);
System.out.println(body);
- VFCResponse response = new VFCResponse();
+ VfcResponse response = new VfcResponse();
response.setJobId("1");
body = Serialization.gsonPretty.toJson(response);
System.out.println(body);
- response.setResponseDescriptor(new VFCResponseDescriptor());
+ response.setResponseDescriptor(new VfcResponseDescriptor());
response.getResponseDescriptor().setProgress("40");
response.getResponseDescriptor().setStatus("processing");
response.getResponseDescriptor().setStatusDescription("OMC VMs are decommissioned in VIM");
@@ -60,7 +60,7 @@ public class DemoTest {
body = Serialization.gsonPretty.toJson(response);
System.out.println(body);
- VFCResponseDescriptor responseDescriptor = new VFCResponseDescriptor();
+ VfcResponseDescriptor responseDescriptor = new VfcResponseDescriptor();
responseDescriptor.setProgress("20");
responseDescriptor.setStatus("processing");
responseDescriptor.setStatusDescription("OMC VMs are decommissioned in VIM");
@@ -73,7 +73,7 @@ public class DemoTest {
body = Serialization.gsonPretty.toJson(response);
System.out.println(body);
- response = Serialization.gsonPretty.fromJson(body, VFCResponse.class);
+ response = Serialization.gsonPretty.fromJson(body, VfcResponse.class);
body = Serialization.gsonPretty.toJson(response);
System.out.println(body);
diff --git a/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealActionVmInfoTest.java b/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealActionVmInfoTest.java
index 10964a909..8b5b118d2 100644
--- a/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealActionVmInfoTest.java
+++ b/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealActionVmInfoTest.java
@@ -3,7 +3,7 @@
* vfc
* ================================================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2018 AT&T Corporation. All rights reserved.
+ * Modifications Copyright (C) 2018-2019 AT&T Corporation. 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 +31,7 @@ public class VfcHealActionVmInfoTest {
@Test
public void testVfcHealActionVmInfo() {
- VFCHealActionVmInfo actionInfo = new VFCHealActionVmInfo();
+ VfcHealActionVmInfo actionInfo = new VfcHealActionVmInfo();
assertNotNull(actionInfo);
assertNotEquals(0, actionInfo.hashCode());
diff --git a/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealAdditionalParamsTest.java b/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealAdditionalParamsTest.java
index ca2d844c1..e7cb79fef 100644
--- a/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealAdditionalParamsTest.java
+++ b/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealAdditionalParamsTest.java
@@ -3,7 +3,7 @@
* vfc
* ================================================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2018 AT&T Corporation. All rights reserved.
+ * Modifications Copyright (C) 2018-2019 AT&T Corporation. 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 +31,7 @@ public class VfcHealAdditionalParamsTest {
@Test
public void testVfcHealAdditionalParameters() {
- VFCHealAdditionalParams additionalParams = new VFCHealAdditionalParams();
+ VfcHealAdditionalParams additionalParams = new VfcHealAdditionalParams();
assertNotNull(additionalParams);
assertNotEquals(0, additionalParams.hashCode());
@@ -39,7 +39,7 @@ public class VfcHealAdditionalParamsTest {
additionalParams.setAction(action);
assertEquals(action, additionalParams.getAction());
- VFCHealActionVmInfo actionInfo = new VFCHealActionVmInfo();
+ VfcHealActionVmInfo actionInfo = new VfcHealActionVmInfo();
additionalParams.setActionInfo(actionInfo );
assertEquals(actionInfo, additionalParams.getActionInfo());
diff --git a/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealRequestTest.java b/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealRequestTest.java
index 0a256a59b..b67b9ac07 100644
--- a/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealRequestTest.java
+++ b/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealRequestTest.java
@@ -3,7 +3,7 @@
* vfc
* ================================================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2018 AT&T Corporation. All rights reserved.
+ * Modifications Copyright (C) 2018-2019 AT&T Corporation. 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 +31,7 @@ public class VfcHealRequestTest {
@Test
public void testVfcHealRequest() {
- VFCHealRequest request = new VFCHealRequest();
+ VfcHealRequest request = new VfcHealRequest();
assertNotNull(request);
assertNotEquals(0, request.hashCode());
@@ -43,7 +43,7 @@ public class VfcHealRequestTest {
request.setCause(cause);
assertEquals(cause, request.getCause());
- VFCHealAdditionalParams additionalParams = new VFCHealAdditionalParams();
+ VfcHealAdditionalParams additionalParams = new VfcHealAdditionalParams();
request.setAdditionalParams(additionalParams);
assertEquals(additionalParams, request.getAdditionalParams());
diff --git a/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcManagerTest.java b/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcManagerTest.java
index ab8161164..f5d06de36 100644
--- a/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcManagerTest.java
+++ b/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcManagerTest.java
@@ -3,7 +3,7 @@
* vfc
* ================================================================================
* Copyright (C) 2018 Ericsson, AT&T. All rights reserved.
- * Modifications Copyright (C) 2018 AT&T Corporation. All rights reserved.
+ * Modifications Copyright (C) 2018-2019 AT&T Corporation. 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.
@@ -56,8 +56,8 @@ public class VfcManagerTest {
private Pair<Integer, String> httpResponseBadResponse;
private Pair<Integer, String> httpResponseErr;
- private VFCRequest request;
- private VFCResponse response;
+ private VfcRequest request;
+ private VfcResponse response;
@BeforeClass
public static void beforeTestVfcManager() {
@@ -82,28 +82,28 @@ public class VfcManagerTest {
*/
@Before
public void createRequestAndResponse() {
- VFCHealActionVmInfo actionInfo = new VFCHealActionVmInfo();
+ VfcHealActionVmInfo actionInfo = new VfcHealActionVmInfo();
actionInfo.setVmid("TheWizard");
actionInfo.setVmname("The Wizard of Oz");
- VFCHealAdditionalParams additionalParams = new VFCHealAdditionalParams();
+ VfcHealAdditionalParams additionalParams = new VfcHealAdditionalParams();
additionalParams.setAction("Go Home");
additionalParams.setActionInfo(actionInfo);
- VFCHealRequest healRequest = new VFCHealRequest();
+ VfcHealRequest healRequest = new VfcHealRequest();
healRequest.setAdditionalParams(additionalParams);
healRequest.setCause("WestWitch");
healRequest.setVnfInstanceId("EmeraldCity");
final UUID requestId = UUID.randomUUID();
- request = new VFCRequest();
+ request = new VfcRequest();
request.setHealRequest(healRequest);
- request.setNSInstanceId("Dorothy");
+ request.setNsInstanceId("Dorothy");
request.setRequestId(requestId);
- List<VFCResponseDescriptor> responseHistoryList = new ArrayList<>();;
+ List<VfcResponseDescriptor> responseHistoryList = new ArrayList<>();;
- VFCResponseDescriptor responseDescriptor = new VFCResponseDescriptor();
+ VfcResponseDescriptor responseDescriptor = new VfcResponseDescriptor();
responseDescriptor.setErrorCode("1234");
responseDescriptor.setProgress("Follow The Yellow Brick Road");
responseDescriptor.setResponseHistoryList(responseHistoryList);
@@ -111,7 +111,7 @@ public class VfcManagerTest {
responseDescriptor.setStatus("finished");
responseDescriptor.setStatusDescription("There's no place like home");
- response = new VFCResponse();
+ response = new VfcResponse();
response.setJobId("1234");
response.setRequestId(request.getRequestId().toString());
response.setResponseDescriptor(responseDescriptor);
@@ -130,25 +130,25 @@ public class VfcManagerTest {
@Test
public void testVfcInitiation() {
try {
- new VFCManager(null, null);
+ new VfcManager(null, null);
fail("test should throw an exception here");
}
catch (IllegalArgumentException e) {
- assertEquals("the parameters \"wm\" and \"request\" on the VFCManager constructor may not be null",
+ assertEquals("the parameters \"wm\" and \"request\" on the VfcManager constructor may not be null",
e.getMessage());
}
try {
- new VFCManager(mockedWorkingMemory, null);
+ new VfcManager(mockedWorkingMemory, null);
fail("test should throw an exception here");
}
catch (IllegalArgumentException e) {
- assertEquals("the parameters \"wm\" and \"request\" on the VFCManager constructor may not be null",
+ assertEquals("the parameters \"wm\" and \"request\" on the VfcManager constructor may not be null",
e.getMessage());
}
try {
- new VFCManager(mockedWorkingMemory, request);
+ new VfcManager(mockedWorkingMemory, request);
fail("test should throw an exception here");
}
catch (IllegalArgumentException e) {
@@ -158,14 +158,14 @@ public class VfcManagerTest {
// add url; username & password are not required
PolicyEngine.manager.getEnvironment().put("vfc.url", "http://somewhere.over.the.rainbow");
- new VFCManager(mockedWorkingMemory, request);
+ new VfcManager(mockedWorkingMemory, request);
// url & username, but no password
PolicyEngine.manager.getEnvironment().put("vfc.username", "Dorothy");
// url, username, and password
PolicyEngine.manager.getEnvironment().put("vfc.password", "Toto");
- new VFCManager(mockedWorkingMemory, request);
+ new VfcManager(mockedWorkingMemory, request);
}
@Test
@@ -174,7 +174,7 @@ public class VfcManagerTest {
PolicyEngine.manager.getEnvironment().put("vfc.username", "Dorothy");
PolicyEngine.manager.getEnvironment().put("vfc.password", "Exception");
- VFCManager manager = new VFCManager(mockedWorkingMemory, request);
+ VfcManager manager = new VfcManager(mockedWorkingMemory, request);
manager.setRestManager(mockedRestManager);
Thread managerThread = new Thread(manager);
@@ -202,7 +202,7 @@ public class VfcManagerTest {
PolicyEngine.manager.getEnvironment().put("vfc.username", "Dorothy");
PolicyEngine.manager.getEnvironment().put("vfc.password", "Null");
- VFCManager manager = new VFCManager(mockedWorkingMemory, request);
+ VfcManager manager = new VfcManager(mockedWorkingMemory, request);
manager.setRestManager(mockedRestManager);
Thread managerThread = new Thread(manager);
@@ -225,7 +225,7 @@ public class VfcManagerTest {
PolicyEngine.manager.getEnvironment().put("vfc.username", "Dorothy");
PolicyEngine.manager.getEnvironment().put("vfc.password", "Error0");
- VFCManager manager = new VFCManager(mockedWorkingMemory, request);
+ VfcManager manager = new VfcManager(mockedWorkingMemory, request);
manager.setRestManager(mockedRestManager);
Thread managerThread = new Thread(manager);
@@ -248,7 +248,7 @@ public class VfcManagerTest {
PolicyEngine.manager.getEnvironment().put("vfc.username", "Dorothy");
PolicyEngine.manager.getEnvironment().put("vfc.password", "BadResponse");
- VFCManager manager = new VFCManager(mockedWorkingMemory, request);
+ VfcManager manager = new VfcManager(mockedWorkingMemory, request);
manager.setRestManager(mockedRestManager);
Thread managerThread = new Thread(manager);
@@ -271,7 +271,7 @@ public class VfcManagerTest {
PolicyEngine.manager.getEnvironment().put("vfc.username", "Dorothy");
PolicyEngine.manager.getEnvironment().put("vfc.password", "OK");
- VFCManager manager = new VFCManager(mockedWorkingMemory, request);
+ VfcManager manager = new VfcManager(mockedWorkingMemory, request);
manager.setRestManager(mockedRestManager);
Thread managerThread = new Thread(manager);
diff --git a/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcRequestTest.java b/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcRequestTest.java
index 95589154f..7dede1b7b 100644
--- a/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcRequestTest.java
+++ b/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcRequestTest.java
@@ -3,7 +3,7 @@
* vfc
* ================================================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2018 AT&T Corporation. All rights reserved.
+ * Modifications Copyright (C) 2018-2019 AT&T Corporation. 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,19 +33,19 @@ public class VfcRequestTest {
@Test
public void testVfcRequest() {
- VFCRequest request = new VFCRequest();
+ VfcRequest request = new VfcRequest();
assertNotNull(request);
assertNotEquals(0, request.hashCode());
String nsInstanceId = "Dorothy";
- request.setNSInstanceId(nsInstanceId);
- assertEquals(nsInstanceId, request.getNSInstanceId());
+ request.setNsInstanceId(nsInstanceId);
+ assertEquals(nsInstanceId, request.getNsInstanceId());
UUID requestId = UUID.randomUUID();
request.setRequestId(requestId);
assertEquals(requestId, request.getRequestId());
- VFCHealRequest healRequest = new VFCHealRequest();
+ VfcHealRequest healRequest = new VfcHealRequest();
request.setHealRequest(healRequest);
assertEquals(healRequest, request.getHealRequest());
diff --git a/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcResponseDescriptorTest.java b/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcResponseDescriptorTest.java
index 9ab180767..b4dc81b44 100644
--- a/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcResponseDescriptorTest.java
+++ b/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcResponseDescriptorTest.java
@@ -3,7 +3,7 @@
* vfc
* ================================================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2018 AT&T Corporation. All rights reserved.
+ * Modifications Copyright (C) 2018-2019 AT&T Corporation. 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.
@@ -34,7 +34,7 @@ public class VfcResponseDescriptorTest {
@Test
public void testVfcResponseDescriptor() {
- VFCResponseDescriptor descriptor = new VFCResponseDescriptor();
+ VfcResponseDescriptor descriptor = new VfcResponseDescriptor();
assertNotNull(descriptor);
assertNotEquals(0, descriptor.hashCode());
@@ -46,7 +46,7 @@ public class VfcResponseDescriptorTest {
descriptor.setProgress(progress);
assertEquals(progress, descriptor.getProgress());
- List<VFCResponseDescriptor> responseHistoryList = new ArrayList<>();
+ List<VfcResponseDescriptor> responseHistoryList = new ArrayList<>();
descriptor.setResponseHistoryList(responseHistoryList);
assertEquals(responseHistoryList, descriptor.getResponseHistoryList());
diff --git a/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcResponseTest.java b/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcResponseTest.java
index f333c4165..15ba6f520 100644
--- a/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcResponseTest.java
+++ b/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcResponseTest.java
@@ -3,7 +3,7 @@
* vfc
* ================================================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2018 AT&T Corporation. All rights reserved.
+ * Modifications Copyright (C) 2018-2019 AT&T Corporation. 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 +31,7 @@ public class VfcResponseTest {
@Test
public void testVfcResponse() {
- VFCResponse response = new VFCResponse();
+ VfcResponse response = new VfcResponse();
assertNotNull(response);
assertNotEquals(0, response.hashCode());
@@ -43,7 +43,7 @@ public class VfcResponseTest {
response.setRequestId(requestId);
assertEquals(requestId, response.getRequestId());
- VFCResponseDescriptor responseDescriptor = new VFCResponseDescriptor();
+ VfcResponseDescriptor responseDescriptor = new VfcResponseDescriptor();
response.setResponseDescriptor(responseDescriptor);
assertEquals(responseDescriptor, response.getResponseDescriptor());