aboutsummaryrefslogtreecommitdiffstats
path: root/resource-assignment/provider
diff options
context:
space:
mode:
authorSandeep J <sandeejh@in.ibm.com>2019-01-09 17:25:25 +0530
committerSandeep J <sandeejh@in.ibm.com>2019-01-09 17:25:34 +0530
commit8f446067f20b96fefb507b877b17f0bd453c49be (patch)
treee40669d906fd0d300848684f9aa2e6389188626e /resource-assignment/provider
parent75da5d3681c44326e4766ce9e3a110f11ee108d4 (diff)
fixed sonar issues in ResourceAllocator.java
fixed sonar issues Issue-ID: CCSDK-525 Change-Id: Ifb2155d46aa1d1552c2ce1a9b0660b5b787e2f92 Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
Diffstat (limited to 'resource-assignment/provider')
-rw-r--r--resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/ra/ResourceAllocator.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/ra/ResourceAllocator.java b/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/ra/ResourceAllocator.java
index c0cf774a..c0220d6b 100644
--- a/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/ra/ResourceAllocator.java
+++ b/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/ra/ResourceAllocator.java
@@ -51,6 +51,9 @@ public class ResourceAllocator implements SvcLogicResource {
private static final String[] INPUT_PREFIX = {"ra-input.", "tmp.resource-allocator."};
private static final String START_RELEASE = "Starting release for: {}";
private static final String START_RELEASE_FOR_TARGET = "Starting release for: {} on target: {}";
+ private static final String RESOURCE_ENTITY_ID= "resource-entity-id";
+ private static final String SERVICE_INSTANCE_ID="service-instance-id";
+ private static final String RESERVATION_ENTITY_ID= "reservation-entity-id";
private ResourceManager resourceManager;
private EndPointAllocator endPointAllocator;
@@ -101,7 +104,7 @@ public class ResourceAllocator implements SvcLogicResource {
String orderBy, SvcLogicContext ctx) throws SvcLogicException {
String resourceEntityId = getParam(ctx,
- new String[] {"service-instance-id", "reservation-entity-id", "resource-entity-id"}, false, null);
+ new String[] {SERVICE_INSTANCE_ID, RESERVATION_ENTITY_ID, RESOURCE_ENTITY_ID}, false, null);
String resourceEntityType =
getParam(ctx, new String[] {"reservation-entity-type", "resource-entity-type"}, false, null);
String resourceEntityVersion =
@@ -198,7 +201,7 @@ public class ResourceAllocator implements SvcLogicResource {
@Override
public QueryStatus release(String resource, String key, SvcLogicContext ctx) throws SvcLogicException {
String resourceEntityId = getParam(ctx,
- new String[] {"service-instance-id", "reservation-entity-id", "resource-entity-id"}, true, null);
+ new String[] {SERVICE_INSTANCE_ID, RESERVATION_ENTITY_ID, RESOURCE_ENTITY_ID}, true, null);
String resourceEntityType =
getParam(ctx, new String[] {"reservation-entity-type", "resource-entity-type"}, true, null);
String resourceEntityVersion =
@@ -386,7 +389,7 @@ public class ResourceAllocator implements SvcLogicResource {
private ResourceEntity getResourceEntityData(SvcLogicContext ctx) throws SvcLogicException {
ResourceEntity sd = new ResourceEntity();
sd.resourceEntityId = getParam(ctx,
- new String[] {"service-instance-id", "reservation-entity-id", "resource-entity-id"}, true, null);
+ new String[] {SERVICE_INSTANCE_ID, RESERVATION_ENTITY_ID, RESOURCE_ENTITY_ID}, true, null);
sd.resourceEntityType =
getParam(ctx, new String[] {"reservation-entity-type", "resource-entity-type"}, true, null);
sd.resourceEntityVersion =