2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.openecomp.vid.controller.test;
23 import java.io.IOException;
24 import java.util.stream.Collectors;
26 import javax.servlet.http.HttpServletRequest;
27 import javax.servlet.http.HttpServletResponse;
29 import org.codehaus.jackson.map.ObjectMapper;
30 import org.openecomp.vid.model.ExceptionResponse;
31 import org.springframework.http.HttpStatus;
32 import org.springframework.http.ResponseEntity;
33 import org.springframework.web.bind.annotation.ExceptionHandler;
34 import org.springframework.web.bind.annotation.PathVariable;
35 import org.springframework.web.bind.annotation.RequestMapping;
36 import org.springframework.web.bind.annotation.RequestMethod;
37 import org.springframework.web.bind.annotation.RestController;
39 import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
42 * The "TestMsoController" class is primarily designed to help test "msoCommitController.js"
44 * This class expects and receives JSON data in the same format as expected
45 * in the "real" application version of this code. However, string versions of JSON are
46 * maintained internally here instead of marshalled / unmarshalled JSON objects.
47 * The primary reasons for this were to encapsulate all the test code in this single file and
48 * minimize the time required to support initial test cases.
50 * The non-test equivalent of this controller could alternatively incorporate POJO objects
51 * instead of strings. However, the same data format sent to / received from the browser
52 * JavaScript code would still be expected.
54 * Two specific mechanisms used in this test class may be useful to the application version:
56 * 1) The use of "{variable}" elements in @RequestMappings along with the corresponding
57 * @PathVariable declarations.
59 * 2) The use of @ExceptionHandler for general purpose exception handler.
60 * (See @ExceptionHandler comments)
62 * This class is intended to be used in either:
64 * A) Eclipse environments
66 * B) Linux environments with ONLY a single user running tests.
67 * The "quick and dirty" error simulation approach used here makes use of static states for some
68 * scenarios. Thus multiple users simultaneously testing in Linux environments
69 * may have contention issues.
73 * The Class TestMsoController.
76 @RequestMapping("testmso")
77 public class TestMsoController extends RestrictedBaseController {
80 * Artificial delay (in milliseconds) added before responding to create /
84 /** The Constant TEST_DELAY_SHORT_MSEC. */
85 private final static int TEST_DELAY_SHORT_MSEC = 1000;
88 * Long delay to simulate non-responsive server test
91 /** The Constant TEST_DELAY_LONG_MSEC. */
92 private final static int TEST_DELAY_LONG_MSEC = 15000;
95 * Default number of polls expected before transaction complete.
98 /** The Constant MAXIMUM_POLLS_DEFAULT. */
99 private final static int MAXIMUM_POLLS_DEFAULT = 4;
102 * Number of polls to simulate "maximum polls exceeded" test.
105 /** The Constant MAXIMUM_POLLS_LARGE. */
106 private final static int MAXIMUM_POLLS_LARGE = 10;
109 * Simulated error types. The GUI front end is expected to set these values
110 * in the "modelName" field of the "mso_create_svc_instance" request.
113 /** The Constant ERROR_POLICY_EXCEPTION. */
114 private final static String ERROR_POLICY_EXCEPTION = "ERROR_POLICY_EXCEPTION";
116 /** The Constant ERROR_SERVICE_EXCEPTION. */
117 private final static String ERROR_SERVICE_EXCEPTION = "ERROR_SERVICE_EXCEPTION";
119 /** The Constant ERROR_POLL_FAILURE. */
120 private final static String ERROR_POLL_FAILURE = "ERROR_POLL_FAILURE";
122 /** The Constant ERROR_INVALID_FIELD_INITIAL. */
123 private final static String ERROR_INVALID_FIELD_INITIAL = "ERROR_INVALID_FIELD_INITIAL";
125 /** The Constant ERROR_INVALID_FIELD_POLL. */
126 private final static String ERROR_INVALID_FIELD_POLL = "ERROR_INVALID_FIELD_POLL";
128 /** The Constant ERROR_GENERAL_SERVER_EXCEPTION. */
129 private final static String ERROR_GENERAL_SERVER_EXCEPTION = "ERROR_GENERAL_SERVER_EXCEPTION";
131 /** The Constant ERROR_MAX_POLLS. */
132 private final static String ERROR_MAX_POLLS = "ERROR_MAX_POLLS";
134 /** The Constant ERROR_SERVER_TIMEOUT_INITIAL. */
135 private final static String ERROR_SERVER_TIMEOUT_INITIAL = "ERROR_SERVER_TIMEOUT_INITIAL";
137 /** The Constant ERROR_SERVER_TIMEOUT_POLL. */
138 private final static String ERROR_SERVER_TIMEOUT_POLL = "ERROR_SERVER_TIMEOUT_POLL";
140 /** The simulated error. */
141 private String simulatedError = "";
143 /** The maximum polls. */
144 private int maximumPolls = 0;
146 /** The attempt count. */
147 private int attemptCount = 0;
150 * Creates the svc instance.
152 * @param request the request
153 * @return the response entity
154 * @throws Exception the exception
156 @RequestMapping(value = "/mso_create_svc_instance", method = RequestMethod.POST)
157 public ResponseEntity<String> createSvcInstance(HttpServletRequest request) throws Exception {
158 readAndLogRequest("CREATE SERVICE INSTANCE", request);
159 Thread.sleep(TEST_DELAY_SHORT_MSEC);
160 maximumPolls = MAXIMUM_POLLS_DEFAULT; // Simulates MSO polling behavior
164 * This block of code simulates various errors and would NOT be expected
165 * in a non-test method
167 System.err.println("simulatedError: " + simulatedError);
169 if (simulatedError.equals(ERROR_POLICY_EXCEPTION)) {
170 return new ResponseEntity<String>(policyExceptionResponse, HttpStatus.OK);
172 if (simulatedError.equals(ERROR_SERVICE_EXCEPTION)) {
173 return new ResponseEntity<String>(serviceExceptionResponse, HttpStatus.OK);
175 if (simulatedError.equals(ERROR_INVALID_FIELD_INITIAL)) {
177 * Force invalid response field name. Return
178 * "XXXXXrequestReferences" instead of "requestReferences"
180 return new ResponseEntity<String>(acceptResponse.replace("requestReferences", "XXXXXrequestReferences"),
184 if (simulatedError.equals(ERROR_GENERAL_SERVER_EXCEPTION)) {
185 throw new IOException("an example of an IO exception");
188 if (simulatedError.equals(ERROR_SERVER_TIMEOUT_INITIAL)) {
189 Thread.sleep(TEST_DELAY_LONG_MSEC);
192 if (simulatedError.equals(ERROR_MAX_POLLS)) {
193 maximumPolls = MAXIMUM_POLLS_LARGE;
197 * End of block of simulated error code.
200 return new ResponseEntity<String>(acceptResponse, HttpStatus.OK);
204 * Delete svc instance.
206 * @param serviceInstanceId the service instance id
207 * @param request the request
208 * @return the response entity
209 * @throws Exception the exception
211 @RequestMapping(value = "/mso_delete_svc_instance/{serviceInstanceId}", method = RequestMethod.POST)
212 public ResponseEntity<String> deleteSvcInstance(@PathVariable("serviceInstanceId") String serviceInstanceId,
213 HttpServletRequest request) throws Exception {
214 readAndLogRequest("DELETE SERVICE INSTANCE: serviceInstanceId: " + serviceInstanceId, request);
215 Thread.sleep(TEST_DELAY_SHORT_MSEC);
216 maximumPolls = MAXIMUM_POLLS_DEFAULT; // Simulates MSO polling behavior
218 return new ResponseEntity<String>(acceptResponse, HttpStatus.OK);
222 * Creates the vnf instance.
224 * @param serviceInstanceId the service instance id
225 * @param request the request
226 * @return the response entity
227 * @throws Exception the exception
229 @RequestMapping(value = "/mso_create_vnf_instance/{serviceInstanceId}", method = RequestMethod.POST)
230 public ResponseEntity<String> createVnfInstance(@PathVariable("serviceInstanceId") String serviceInstanceId,
231 HttpServletRequest request) throws Exception {
232 readAndLogRequest("CREATE VNF INSTANCE: serviceInstanceId: " + serviceInstanceId, request);
233 Thread.sleep(TEST_DELAY_SHORT_MSEC);
234 maximumPolls = MAXIMUM_POLLS_DEFAULT; // Simulates MSO polling behavior
236 return new ResponseEntity<String>(acceptResponse, HttpStatus.OK);
240 * Delete vnf instance.
242 * @param serviceInstanceId the service instance id
243 * @param vnfInstanceId the vnf instance id
244 * @param request the request
245 * @return the response entity
246 * @throws Exception the exception
248 @RequestMapping(value = "/mso_delete_vnf_instance/{serviceInstanceId}/vnfs/{vnfInstanceId}", method = RequestMethod.POST)
249 public ResponseEntity<String> deleteVnfInstance(@PathVariable("serviceInstanceId") String serviceInstanceId,
250 @PathVariable("vnfInstanceId") String vnfInstanceId, HttpServletRequest request) throws Exception {
252 "DELETE VNF INSTANCE: serviceInstanceId: " + serviceInstanceId + " vnfInstanceId: " + vnfInstanceId,
254 Thread.sleep(TEST_DELAY_SHORT_MSEC);
255 maximumPolls = MAXIMUM_POLLS_DEFAULT; // Simulates MSO polling behavior
257 return new ResponseEntity<String>(acceptResponse, HttpStatus.OK);
261 * Creates the vf module instance.
263 * @param serviceInstanceId the service instance id
264 * @param vnfInstanceId the vnf instance id
265 * @param request the request
266 * @return the response entity
267 * @throws Exception the exception
269 // /serviceInstances/v2/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/ff305d54-75b4-ff1b-adb2-eb6b9e5460ff/vfModules
270 @RequestMapping(value = "/mso_create_vfmodule_instance/{serviceInstanceId}/vnfs/{vnfInstanceId}", method = RequestMethod.POST)
271 public ResponseEntity<String> createVfModuleInstance(@PathVariable("serviceInstanceId") String serviceInstanceId,
272 @PathVariable("vnfInstanceId") String vnfInstanceId, HttpServletRequest request) throws Exception {
273 readAndLogRequest("CREATE VF MODULE INSTANCE: serviceInstanceId: " + serviceInstanceId + " vnfInstanceId: "
274 + vnfInstanceId, request);
275 Thread.sleep(TEST_DELAY_SHORT_MSEC);
276 maximumPolls = MAXIMUM_POLLS_DEFAULT; // Simulates MSO polling behavior
278 return new ResponseEntity<String>(acceptResponse, HttpStatus.OK);
282 * Delete vf module instance.
284 * @param serviceInstanceId the service instance id
285 * @param vnfInstanceId the vnf instance id
286 * @param vfModuleInstanceId the vf module instance id
287 * @param request the request
288 * @return the response entity
289 * @throws Exception the exception
291 // /serviceInstances/v2/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/ff305d54-75b4-ff1b-adb2-eb6b9e5460ff/vfModules/ff305d54-75b4-ff1b-bdb2-eb6b9e5460ff
292 @RequestMapping(value = "/mso_delete_vfmodule_instance/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules/{vfModuleInstanceId}", method = RequestMethod.POST)
293 public ResponseEntity<String> deleteVfModuleInstance(@PathVariable("serviceInstanceId") String serviceInstanceId,
294 @PathVariable("vnfInstanceId") String vnfInstanceId,
295 @PathVariable("vfModuleInstanceId") String vfModuleInstanceId, HttpServletRequest request)
297 readAndLogRequest("DELETE VF MODULE INSTANCE: serviceInstanceId: " + serviceInstanceId + " vnfInstanceId: "
298 + vnfInstanceId + " vfModuleInstanceId: " + vfModuleInstanceId, request);
299 Thread.sleep(TEST_DELAY_SHORT_MSEC);
300 maximumPolls = MAXIMUM_POLLS_DEFAULT; // Simulates MSO polling behavior
302 return new ResponseEntity<String>(acceptResponse, HttpStatus.OK);
307 * Creates the volume group instance.
309 * @param serviceInstanceId the service instance id
310 * @param vnfInstanceId the vnf instance id
311 * @param request the request
312 * @return the response entity
313 * @throws Exception the exception
315 // /serviceInstances/v2/ff305d54-75b4-431b-adb2-eb6b9e5ff000/volumeGroups
316 @RequestMapping(value = "/mso_create_volumegroup_instance/{serviceInstanceId}/vnfs/{vnfInstanceId}", method = RequestMethod.POST)
317 public ResponseEntity<String> createVolumeGroupInstance(@PathVariable("serviceInstanceId") String serviceInstanceId,
318 @PathVariable("vnfInstanceId") String vnfInstanceId, HttpServletRequest request) throws Exception {
319 readAndLogRequest("CREATE VOLUME GROUP INSTANCE: seviceInstanceId: " + serviceInstanceId + " vnfInstanceId: "
320 + vnfInstanceId, request);
321 Thread.sleep(TEST_DELAY_SHORT_MSEC);
322 maximumPolls = MAXIMUM_POLLS_DEFAULT; // Simulates MSO polling behavior
324 return new ResponseEntity<String>(acceptResponse, HttpStatus.OK);
328 * Delete volume group instance.
330 * @param serviceInstanceId the service instance id
331 * @param vnfInstanceId the vnf instance id
332 * @param volumeGroupInstanceId the volume group instance id
333 * @param request the request
334 * @return the response entity
335 * @throws Exception the exception
337 // /serviceInstances/v2/ff305d54-75b4-431b-adb2-eb6b9e5ff000/volumeGroups/ff305d54-75b4-ff1b-cdb2-eb6b9e5460ff
338 @RequestMapping(value = "/mso_delete_volumegroup_instance/{serviceInstanceId}/vnfs/{vnfInstanceId}/volumeGroups/{volumeGroupInstanceId}", method = RequestMethod.POST)
339 public ResponseEntity<String> deleteVolumeGroupInstance(@PathVariable("serviceInstanceId") String serviceInstanceId,
340 @PathVariable("vnfInstanceId") String vnfInstanceId,
341 @PathVariable("volumeGroupInstanceId") String volumeGroupInstanceId, HttpServletRequest request)
343 readAndLogRequest("DELETE NW INSTANCE: serviceInstanceId: " + serviceInstanceId + " vnfInstanceId: "
344 + vnfInstanceId + " volumeGroupInstanceId: " + volumeGroupInstanceId, request);
345 Thread.sleep(TEST_DELAY_SHORT_MSEC);
346 maximumPolls = MAXIMUM_POLLS_DEFAULT; // Simulates MSO polling behavior
348 return new ResponseEntity<String>(acceptResponse, HttpStatus.OK);
352 * Creates the nw instance.
354 * @param serviceInstanceId the service instance id
355 * @param request the request
356 * @return the response entity
357 * @throws Exception the exception
359 @RequestMapping(value = "/mso_create_nw_instance/{serviceInstanceId}", method = RequestMethod.POST)
360 public ResponseEntity<String> createNwInstance(@PathVariable("serviceInstanceId") String serviceInstanceId,
361 HttpServletRequest request) throws Exception {
362 readAndLogRequest("CREATE NW INSTANCE: serviceInstanceId: " + serviceInstanceId, request);
363 Thread.sleep(TEST_DELAY_SHORT_MSEC);
364 maximumPolls = MAXIMUM_POLLS_DEFAULT; // Simulates MSO polling behavior
366 return new ResponseEntity<String>(acceptResponse, HttpStatus.OK);
370 * Delete nw instance.
372 * @param serviceInstanceId the service instance id
373 * @param networkInstanceId the network instance id
374 * @param request the request
375 * @return the response entity
376 * @throws Exception the exception
378 @RequestMapping(value = "/mso_delete_nw_instance/{serviceInstanceId}/networks/{networkInstanceId}", method = RequestMethod.POST)
379 public ResponseEntity<String> deleteNwInstance(@PathVariable("serviceInstanceId") String serviceInstanceId,
380 @PathVariable("networkInstanceId") String networkInstanceId, HttpServletRequest request) throws Exception {
381 readAndLogRequest("DELETE NW INSTANCE: serviceInstanceId: " + serviceInstanceId + " networkInstanceId: "
382 + networkInstanceId, request);
383 Thread.sleep(TEST_DELAY_SHORT_MSEC);
384 maximumPolls = MAXIMUM_POLLS_DEFAULT; // Simulates MSO polling behavior
386 return new ResponseEntity<String>(acceptResponse, HttpStatus.OK);
390 * Gets the orchestration request.
392 * @param requestId the request id
393 * @param request the request
394 * @return the orchestration request
395 * @throws Exception the exception
397 @RequestMapping(value = "/mso_get_orch_req/{requestId}", method = RequestMethod.GET)
398 public ResponseEntity<String> getOrchestrationRequest(@PathVariable("requestId") String requestId,
399 HttpServletRequest request) throws Exception {
401 System.err.println("GET ORCHESTRATION REQUEST: requestId: " + requestId);
404 * This block of code simulates various errors and would NOT be expected
405 * in a non-test method
408 if (simulatedError.equals(ERROR_INVALID_FIELD_POLL)) {
410 * Force invalid response field name. Return "XXXXXrequestStatus"
411 * instead of "requestStatus"
413 return new ResponseEntity<String>(inProgressResponse.replace("requestStatus", "XXXXXrequestStatus"),
417 if (simulatedError.equals(ERROR_POLL_FAILURE)) {
419 * Force status field with "Failure"
421 return new ResponseEntity<String>(inProgressResponse.replace("InProgress", "Failure"), HttpStatus.OK);
424 if (simulatedError.equals(ERROR_SERVER_TIMEOUT_POLL)) {
425 Thread.sleep(TEST_DELAY_LONG_MSEC);
429 * End of block of simulated error code.
433 * This logic simulates how MSO might behave ... i.e. return different
434 * results depending on the value of 'maximumPolls'.
437 int percentProgress = (++attemptCount * 100) / maximumPolls;
439 System.err.println("attempts: " + attemptCount + " max: " + maximumPolls + " percent: " + percentProgress);
441 String response = inProgressResponse.replace("\"50\"", "\"" + Integer.toString(percentProgress) + "\"");
443 if (attemptCount < maximumPolls) {
444 if (attemptCount > 1) {
445 response = response.replace("vLan setup", "setup step " + Integer.toString(attemptCount));
447 return new ResponseEntity<String>(response, HttpStatus.OK);
449 return new ResponseEntity<String>(
450 response.replace("InProgress", "Complete").replace("vLan setup complete", ""), HttpStatus.OK);
455 * Gets the orchestration requests.
457 * @param filterString the filter string
458 * @param request the request
459 * @return the orchestration requests
460 * @throws Exception the exception
462 @RequestMapping(value = "/mso_get_orch_reqs/{filterString}", method = RequestMethod.GET)
463 public ResponseEntity<String> getOrchestrationRequests(@PathVariable("filterString") String filterString,
464 HttpServletRequest request) throws Exception {
466 System.err.println("GET ORCHESTRATION REQUESTS: filterString: " + filterString);
468 return new ResponseEntity<String>(getOrchestrationRequestsResponse, HttpStatus.OK);
473 * General purpose exception handler that could be used in application code.
475 * The method returns exceptions as error code 500. Both the exception type
476 * and message are written as a JSON object.
478 * See the following references:
480 * 1) The ExceptionResponse POJO.
482 * 2) The "getHttpErrorMessage" function in "utilityService.js" - an example
483 * of how the browser JavaScript code can interpret this response.
490 * @param response the response
491 * @throws IOException Signals that an I/O exception has occurred.
493 @ExceptionHandler(Exception.class)
494 private void exception(Exception e, HttpServletResponse response) throws IOException {
497 * This logging step should preferably be replaced with an appropriate
498 * logging method consistent whatever logging mechanism the rest of the
499 * application code uses.
502 e.printStackTrace(System.err);
504 response.setContentType("application/json; charset=UTF-8");
505 response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
507 ExceptionResponse exceptionResponse = new ExceptionResponse();
508 exceptionResponse.setException(e.getClass().toString().replaceFirst("^.*\\.", ""));
509 exceptionResponse.setMessage(e.getMessage());
511 response.getWriter().write(new ObjectMapper().writeValueAsString(exceptionResponse));
513 response.flushBuffer();
518 * 'readAndLogRequest' only intended to be used for testing.
520 * The method reads JSON from the input stream and thus prevents other
521 * mechanisms from reading the input.
525 * Read and log request.
527 * @param label the label
528 * @param request the request
529 * @throws Exception the exception
531 private void readAndLogRequest(String label, HttpServletRequest request) throws Exception {
532 String input = request.getReader().lines().collect(Collectors.joining(System.lineSeparator()));
534 ObjectMapper mapper = new ObjectMapper();
535 Object json = mapper.readValue(input, Object.class);
537 System.err.println(label + "\n" + mapper.writerWithDefaultPrettyPrinter().writeValueAsString(json));
540 * Only needed for error simulation ...
542 if (input.matches("^.*modelName.*$")) {
543 simulatedError = input.replaceAll("^.*\"modelName\":\"", "").replaceAll("\".*$", "");
548 * Various test responses:
553 /** The accept response. */
555 * Sample responses to initial create / delete transaction
557 private String acceptResponse =
559 " \"status\": 202," +
561 " \"requestReferences\": {" +
562 " \"instanceId\": \"bc305d54-75b4-431b-adb2-eb6b9e546014\"," +
563 " \"requestId\": \"rq1234d1-5a33-55df-13ab-12abad84e331\"" +
568 /** The policy exception response. */
569 private String policyExceptionResponse =
571 " \"status\": 400," +
573 " \"requestError\": {" +
574 " \"policyException\": {" +
575 " \"messageId\": \"POL9003\"," +
576 " \"text\": \"Message content size exceeds the allowable limit\"" +
582 /** The service exception response. */
583 private String serviceExceptionResponse =
585 " \"status\": 400," +
587 " \"requestError\": {" +
588 " \"serviceException\": {" +
589 " \"messageId\": \"SVC2000\"," +
590 " \"text\": \"Missing Parameter: %1. Error code is %2\"," +
591 " \"variables\": [" +
601 /** The in progress response. */
603 * Sample response to subsequent getOrchestrationRequest
605 private String inProgressResponse =
607 " \"status\": 200," +
610 " \"requestId\": \"rq1234d1-5a33-55df-13ab-12abad84e333\"," +
611 " \"startTime\": \"Thu, 04 Jun 2009 02:51:59 GMT\"," +
612 " \"instanceIds\": {" +
613 " \"serviceInstanceId\": \"bc305d54-75b4-431b-adb2-eb6b9e546014\"" +
615 " \"requestScope\": \"service\"," +
616 " \"requestType\": \"createInstance\"," +
617 " \"requestDetails\": {" +
618 " \"modelInfo\": {" +
619 " \"modelType\": \"service\"," +
620 " \"modelId\": \"sn5256d1-5a33-55df-13ab-12abad84e764\"," +
621 " \"modelNameVersionId\": \"ab6478e4-ea33-3346-ac12-ab121484a333\"," +
622 " \"modelName\": \"WanBonding\"," +
623 " \"modelVersion\": \"1\"" +
625 " \"subscriberInfo\": {" +
626 " \"globalSubscriberId\": \"C12345\"," +
627 " \"subscriberName\": \"General Electric Division 12\"" +
629 " \"requestParameters\": {" +
630 " \"vpnId\": \"1a2b3c4d5e6f\"," +
631 " \"productName\": \"Trinity\"," +
632 " \"customerId\": \"icore9883749\"" +
635 " \"requestStatus\": {" +
636 " \"timestamp\": \"Thu, 04 Jun 2009 02:53:39 GMT\"," +
637 " \"requestState\": \"InProgress\"," +
638 " \"statusMessage\": \"vLan setup complete\"," +
639 " \"percentProgress\": \"50\"" +
646 * Sample response to subsequent getOrchestrationRequests
649 /** The get orchestration requests response. */
650 private String getOrchestrationRequestsResponse =
652 " \"status\": 200," +
654 " \"requestList\": [" +
657 " \"requestId\": \"rq1234d1-5a33-55df-13ab-12abad84e333\"," +
658 " \"startTime\": \"Thu, 04 Jun 2009 02:51:59 GMT\"," +
659 " \"finishTime\": \"Thu, 04 Jun 2009 02:55:59 GMT\"," +
660 " \"instanceReferences\": {" +
661 " \"serviceInstanceId\": \"bc305d54-75b4-431b-adb2-eb6b9e546014\"" +
663 " \"requestScope\": \"service\"," +
664 " \"requestType\": \"createInstance\"," +
665 " \"requestDetails\": {" +
666 " \"modelInfo\": {" +
667 " \"modelType\": \"service\"," +
668 " \"modelId\": \"sn5256d1-5a33-55df-13ab-12abad84e764\"," +
669 " \"modelNameVersionId\": \"ab6478e4-ea33-3346-ac12-ab121484a333\"," +
670 " \"modelName\": \"WanBonding\"," +
671 " \"modelVersion\": \"1\"" +
673 " \"subscriberInfo\": {" +
674 " \"globalSubscriberId\": \"C12345\"," +
675 " \"subscriberName\": \"General Electric Division 12\"" +
677 " \"requestParameters\": {" +
678 " \"vpnId\": \"1a2b3c4d5e6f\"," +
679 " \"productName\": \"Trinity\"," +
680 " \"customerId\": \"icore9883749\"" +
683 " \"requestStatus\": {" +
684 " \"timestamp\": \"Thu, 04 Jun 2009 02:54:49 GMT\"," +
685 " \"requestState\": \"complete\"," +
686 " \"statusMessage\": \"Resource Created\"," +
687 " \"percentProgress\": \"100\"" +
693 " \"requestId\": \"rq1234d1-5a33-55df-13ab-12abad84e334\"," +
694 " \"startTime\": \"Thu, 04 Jun 2009 03:52:59 GMT\"," +
695 " \"instanceReferences\": {" +
696 " \"serviceInstanceId\": \"bc305d54-75b4-431b-adb2-eb6b9e546014\"" +
698 " \"requestScope\": \"service\"," +
699 " \"requestType\": \"updateInstance\"," +
700 " \"requestDetails\": {" +
701 " \"modelInfo\": {" +
702 " \"modelType\": \"service\"," +
703 " \"modelId\": \"sn5256d1-5a33-55df-13ab-12abad84e764\"," +
704 " \"modelNameVersionId\": \"ab6478e4-ea33-3346-ac12-ab121484a333\"," +
705 " \"modelName\": \"WanBonding\"," +
706 " \"modelVersion\": \"1\"" +
708 " \"subscriberInfo\": {" +
709 " \"globalSubscriberId\": \"C12345\"," +
710 " \"subscriberName\": \"General Electric Division 12\"" +
712 " \"requestParameters\": {" +
713 " \"vpnId\": \"1a2b3c4d5e70\"," +
714 " \"productName\": \"Trinity\"," +
715 " \"customerId\": \"icore9883749\"" +
718 " \"requestStatus\": {" +
719 " \"timestamp\": \"Thu, 04 Jun 2009 03:53:39 GMT\"," +
720 " \"requestState\": \"InProgress\"," +
721 " \"statusMessage\": \"vLan setup complete\"," +
722 " \"percentProgress\": \"50\"" +