aboutsummaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actor.sdnc/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'models-interactions/model-actors/actor.sdnc/src/main/java')
-rw-r--r--models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/BandwidthOnDemandOperation.java8
-rw-r--r--models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/RerouteOperation.java4
-rw-r--r--models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/SdncOperation.java25
3 files changed, 6 insertions, 31 deletions
diff --git a/models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/BandwidthOnDemandOperation.java b/models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/BandwidthOnDemandOperation.java
index d2a153641..2946a2055 100644
--- a/models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/BandwidthOnDemandOperation.java
+++ b/models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/BandwidthOnDemandOperation.java
@@ -66,18 +66,18 @@ public class BandwidthOnDemandOperation extends SdncOperation {
@Override
protected SdncRequest makeRequest(int attempt) {
- String serviceInstance = getOptProperty(OperationProperties.ENRICHMENT_SERVICE_ID, SERVICE_ID_KEY);
+ String serviceInstance = getProperty(OperationProperties.ENRICHMENT_SERVICE_ID);
if (StringUtils.isBlank(serviceInstance)) {
throw new IllegalArgumentException("missing enrichment data, " + SERVICE_ID_KEY);
}
SdncHealVfModuleParameter bandwidth = new SdncHealVfModuleParameter();
bandwidth.setName(BANDWIDTH);
- bandwidth.setValue(getOptProperty(OperationProperties.ENRICHMENT_BANDWIDTH, BANDWIDTH));
+ bandwidth.setValue(getProperty(OperationProperties.ENRICHMENT_BANDWIDTH));
SdncHealVfModuleParameter timeStamp = new SdncHealVfModuleParameter();
timeStamp.setName(BANDWIDTH_CHANGE_TIME);
- timeStamp.setValue(getOptProperty(OperationProperties.ENRICHMENT_BANDWIDTH_CHANGE_TIME, BANDWIDTH_CHANGE_TIME));
+ timeStamp.setValue(getProperty(OperationProperties.ENRICHMENT_BANDWIDTH_CHANGE_TIME));
SdncHealVfModuleParametersInfo vfParametersInfo = new SdncHealVfModuleParametersInfo();
vfParametersInfo.addParameters(bandwidth);
@@ -102,7 +102,7 @@ public class BandwidthOnDemandOperation extends SdncOperation {
request.setUrl("/" + getPath());
SdncHealVnfInfo vnfInfo = new SdncHealVnfInfo();
- vnfInfo.setVnfId(getOptProperty(OperationProperties.ENRICHMENT_VNF_ID, VNF_ID));
+ vnfInfo.setVnfId(getProperty(OperationProperties.ENRICHMENT_VNF_ID));
SdncHealVfModuleInfo vfModuleInfo = new SdncHealVfModuleInfo();
vfModuleInfo.setVfModuleId("");
diff --git a/models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/RerouteOperation.java b/models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/RerouteOperation.java
index 105a27601..02209bbd2 100644
--- a/models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/RerouteOperation.java
+++ b/models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/RerouteOperation.java
@@ -57,14 +57,14 @@ public class RerouteOperation extends SdncOperation {
@Override
protected SdncRequest makeRequest(int attempt) {
- String serviceInstance = getOptProperty(OperationProperties.ENRICHMENT_SERVICE_ID, SERVICE_ID_KEY);
+ String serviceInstance = getProperty(OperationProperties.ENRICHMENT_SERVICE_ID);
if (StringUtils.isBlank(serviceInstance)) {
throw new IllegalArgumentException("missing enrichment data, " + SERVICE_ID_KEY);
}
SdncHealServiceInfo serviceInfo = new SdncHealServiceInfo();
serviceInfo.setServiceInstanceId(serviceInstance);
- String networkId = getOptProperty(OperationProperties.ENRICHMENT_NETWORK_ID, NETWORK_ID_KEY);
+ String networkId = getProperty(OperationProperties.ENRICHMENT_NETWORK_ID);
if (StringUtils.isBlank(networkId)) {
throw new IllegalArgumentException("missing enrichment data, " + NETWORK_ID_KEY);
}
diff --git a/models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/SdncOperation.java b/models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/SdncOperation.java
index defbcfbc9..d235fb2c8 100644
--- a/models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/SdncOperation.java
+++ b/models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/SdncOperation.java
@@ -51,14 +51,6 @@ public abstract class SdncOperation extends HttpOperation<SdncResponse> {
super(params, config, SdncResponse.class, propertyNames);
}
- /**
- * Starts the GUARD.
- */
- @Override
- protected CompletableFuture<OperationOutcome> startPreprocessorAsync() {
- return startGuardAsync();
- }
-
@Override
protected CompletableFuture<OperationOutcome> startOperationAsync(int attempt, OperationOutcome outcome) {
@@ -96,21 +88,4 @@ public abstract class SdncOperation extends HttpOperation<SdncResponse> {
protected boolean isSuccess(Response rawResponse, SdncResponse response) {
return response.getResponseOutput() != null && "200".equals(response.getResponseOutput().getResponseCode());
}
-
- /**
- * Gets an optional property, first checking the properties, then checking the
- * enrichment data.
- *
- * @param propName property name
- * @param enrichmentName property name within the enrichment data
- * @return the property's value, or {@code null} if it is not found
- */
- protected String getOptProperty(String propName, String enrichmentName) {
- if (containsProperty(propName)) {
- // return the value, even if it's null
- return getProperty(propName);
- }
-
- return params.getContext().getEnrichment().get(enrichmentName);
- }
}