diff options
author | Pamela Dragosh <pdragosh@research.att.com> | 2018-08-28 15:22:22 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-08-28 15:22:22 +0000 |
commit | 9b1c49dafdb5f5a87ab91bf97e75e57cfd3825ab (patch) | |
tree | 167e1235a9cd0d552635bae909f83c4e450fdbe7 /controlloop/common/simulators/src/main | |
parent | acfe06391a8ec90636c33f7f5c830a3d33f2aeb7 (diff) | |
parent | f43b3e32fdf4cdb3361c584491730af18ef46baf (diff) |
Merge "use new SO API for scale-out"
Diffstat (limited to 'controlloop/common/simulators/src/main')
-rw-r--r-- | controlloop/common/simulators/src/main/java/org/onap/policy/simulators/SoSimulatorJaxRs.java | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/controlloop/common/simulators/src/main/java/org/onap/policy/simulators/SoSimulatorJaxRs.java b/controlloop/common/simulators/src/main/java/org/onap/policy/simulators/SoSimulatorJaxRs.java index 0d08aa216..35abf55b0 100644 --- a/controlloop/common/simulators/src/main/java/org/onap/policy/simulators/SoSimulatorJaxRs.java +++ b/controlloop/common/simulators/src/main/java/org/onap/policy/simulators/SoSimulatorJaxRs.java @@ -7,9 +7,9 @@ * 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. @@ -21,50 +21,47 @@ package org.onap.policy.simulators; import java.util.UUID; - import javax.ws.rs.Consumes; import javax.ws.rs.POST; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; - import org.onap.policy.so.SORequest; import org.onap.policy.so.SORequestReferences; import org.onap.policy.so.SORequestStatus; import org.onap.policy.so.SOResponse; - import com.att.aft.dme2.internal.gson.Gson; -@Path("/serviceInstances") +@Path("/serviceInstantiation") public class SoSimulatorJaxRs { - - /** + + /** * SO post query. - * + * * @param serviceInstanceId the service instance Id * @param vnfInstanceId the VNF Id * @return the response */ @POST - @Path("/v5/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules") + @Path("/v7/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules/scaleOut") @Consumes(MediaType.APPLICATION_JSON) @Produces("application/json") - public String soPostQuery(@PathParam("serviceInstanceId") final String serviceInstanceId, @PathParam("vnfInstanceId") final String vnfInstanceId) - { + public String soPostQuery(@PathParam("serviceInstanceId") final String serviceInstanceId, + @PathParam("vnfInstanceId") final String vnfInstanceId) { final SORequest request = new SORequest(); final SORequestStatus requestStatus = new SORequestStatus(); requestStatus.setRequestState("COMPLETE"); request.setRequestStatus(requestStatus); request.setRequestId(UUID.randomUUID()); - + final SOResponse response = new SOResponse(); - + final SORequestReferences requestReferences = new SORequestReferences(); final String requestId = UUID.randomUUID().toString(); requestReferences.setRequestId(requestId); response.setRequestReferences(requestReferences); - + response.setRequest(request); return new Gson().toJson(response); |