diff options
Diffstat (limited to 'mso-api-handlers/mso-api-handler-infra/src/main')
3 files changed, 8 insertions, 3 deletions
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/JerseyConfiguration.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/JerseyConfiguration.java index e6bbc4de4a..182e398461 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/JerseyConfiguration.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/JerseyConfiguration.java @@ -29,6 +29,7 @@ import org.onap.so.apihandler.filters.RequestUriFilter; import org.onap.so.apihandlerinfra.exceptions.ApiExceptionMapper; import org.onap.so.apihandlerinfra.tenantisolation.CloudOrchestration; import org.onap.so.apihandlerinfra.tenantisolation.CloudResourcesOrchestration; +import org.onap.so.apihandlerinfra.tenantisolation.ModelDistributionRequest; import org.onap.so.logging.jaxrs.filter.JaxRsFilterLogging; import org.onap.so.web.exceptions.RuntimeExceptionMapper; import org.springframework.context.annotation.Configuration; @@ -64,6 +65,7 @@ public class JerseyConfiguration extends ResourceConfig { // this registration seems to be needed to get predictable // execution behavior for the above JSON Exception Mappers register(com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider.class); + register(ModelDistributionRequest.class); property(ServletProperties.FILTER_FORWARD_ON_404, true); BeanConfig beanConfig = new BeanConfig(); beanConfig.setVersion("1.0.2"); diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/ModelDistributionRequest.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/ModelDistributionRequest.java index ace0fb664c..3ec3ade959 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/ModelDistributionRequest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/ModelDistributionRequest.java @@ -28,7 +28,7 @@ import java.util.List; import javax.inject.Provider; import javax.transaction.Transactional; import javax.ws.rs.Consumes; -import javax.ws.rs.POST; +import javax.ws.rs.PATCH; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; @@ -53,6 +53,7 @@ import org.onap.so.serviceinstancebeans.ServiceException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.core.JsonProcessingException; @@ -61,7 +62,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; - +@Component @Path("/onap/so/infra/modelDistributions") @Api(value="/onap/so/infra/modelDistributions",description="API Requests for Model Distributions") public class ModelDistributionRequest { @@ -70,7 +71,7 @@ public class ModelDistributionRequest { @Autowired private Provider<TenantIsolationRunnable> tenantIsolationRunnable; - @POST + @PATCH @Path("/{version:[vV][1]}/distributions/{distributionId}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/SDCClientHelper.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/SDCClientHelper.java index 9303e12071..31c65e1bd2 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/SDCClientHelper.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/SDCClientHelper.java @@ -82,6 +82,7 @@ public class SDCClientHelper { try { String urlString = this.buildUriBuilder(serviceModelVersionId, operationalEnvironmentId); + logger.debug("Url ASDC Activate request: {}", urlString); String jsonPayload = this.buildJsonWorkloadContext(workloadContext); String basicAuthCred = getBasicAuth(); @@ -157,6 +158,7 @@ public class SDCClientHelper { enhancedAsdcResponseJsonObj.put("statusCode", Integer.toString(statusCode)); enhancedAsdcResponseJsonObj.put("messageId", ""); enhancedAsdcResponseJsonObj.put("message", "Success"); + logger.debug("Url ASDC Activate response: {} {}", "distributionId ", sdcResponseJsonObj.get("distributionId")); } else { // error if (sdcResponseJsonObj.has("requestError") ) { |