diff options
3 files changed, 13 insertions, 6 deletions
diff --git a/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIRequest.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIRequest.java index baceffab3..82df69818 100755 --- a/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIRequest.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIRequest.java @@ -5,6 +5,8 @@ * Copyright (C) 2017 AT&T Intellectual Property. All rights * reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -292,7 +294,7 @@ public abstract class AAIRequest { // for group search add itself, but remove singular version of itself if(!uniqueResources.contains(resource)) { boolean replaced = false; - Set<String> tmpUniqueResources = new HashSet<String>(); + Set<String> tmpUniqueResources = new HashSet<>(); tmpUniqueResources.addAll(uniqueResources); for(String item : tmpUniqueResources){ String plural = item +"s"; diff --git a/mdsal-resource/provider/src/main/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/MdsalResourceActivator.java b/mdsal-resource/provider/src/main/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/MdsalResourceActivator.java index 004e68227..53ed65725 100644 --- a/mdsal-resource/provider/src/main/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/MdsalResourceActivator.java +++ b/mdsal-resource/provider/src/main/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/MdsalResourceActivator.java @@ -5,6 +5,8 @@ * Copyright (C) 2017 AT&T Intellectual Property. All rights * reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -20,7 +22,7 @@ */ package org.onap.ccsdk.sli.adaptors.resource.mdsal; - + import java.io.File; import java.io.FileInputStream; import java.util.LinkedList; @@ -40,7 +42,7 @@ public class MdsalResourceActivator implements BundleActivator { private static final String SDNC_CONFIG_DIR = "SDNC_CONFIG_DIR"; - public LinkedList<ServiceRegistration> registrations = new LinkedList<ServiceRegistration>(); + public LinkedList<ServiceRegistration> registrations = new LinkedList<>(); private static final Logger LOG = LoggerFactory .getLogger(MdsalResourceActivator.class); 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 c0cf774a8..c0220d6b3 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 = |