2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2019 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.
19 * SPDX-License-Identifier: Apache-2.0
20 * ============LICENSE_END=========================================================
23 package org.onap.policy.api.main.rest;
25 import io.swagger.annotations.Api;
26 import io.swagger.annotations.ApiOperation;
27 import io.swagger.annotations.ApiParam;
28 import io.swagger.annotations.ApiResponse;
29 import io.swagger.annotations.ApiResponses;
30 import io.swagger.annotations.Authorization;
31 import io.swagger.annotations.Extension;
32 import io.swagger.annotations.ExtensionProperty;
33 import io.swagger.annotations.ResponseHeader;
35 import java.util.UUID;
36 import javax.ws.rs.Consumes;
37 import javax.ws.rs.DELETE;
38 import javax.ws.rs.GET;
39 import javax.ws.rs.HeaderParam;
40 import javax.ws.rs.POST;
41 import javax.ws.rs.Path;
42 import javax.ws.rs.PathParam;
43 import javax.ws.rs.Produces;
44 import javax.ws.rs.core.Response;
45 import javax.ws.rs.core.Response.ResponseBuilder;
46 import org.onap.policy.api.main.rest.provider.LegacyGuardPolicyProvider;
47 import org.onap.policy.api.main.rest.provider.LegacyOperationalPolicyProvider;
48 import org.onap.policy.models.base.PfModelException;
49 import org.onap.policy.models.base.PfModelRuntimeException;
50 import org.onap.policy.models.tosca.legacy.concepts.LegacyGuardPolicyInput;
51 import org.onap.policy.models.tosca.legacy.concepts.LegacyGuardPolicyOutput;
52 import org.onap.policy.models.tosca.legacy.concepts.LegacyOperationalPolicy;
55 * Class to provide legacy REST API services.
57 * @author Chenfei Gao (cgao@research.att.com)
59 @Path("/policy/api/v1")
60 @Api(value = "Legacy Policy Design API")
61 @Produces("application/json")
62 @Consumes("application/json")
63 public class LegacyApiRestController {
66 * Retrieves all versions of a particular guard policy.
68 * @param policyId the ID of specified guard policy
70 * @return the Response object containing the results of the API operation
73 @Path("/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/{policyId}")
74 @ApiOperation(value = "Retrieve all versions of a particular guard policy",
75 notes = "Returns a list of all versions of the specified guard policy",
76 response = LegacyGuardPolicyOutput.class, responseContainer = "Map",
78 @ResponseHeader(name = "X-MinorVersion",
79 description = "Used to request or communicate a MINOR version back from the client"
80 + " to the server, and from the server back to the client",
81 response = String.class),
82 @ResponseHeader(name = "X-PatchVersion",
83 description = "Used only to communicate a PATCH version in a response for"
84 + " troubleshooting purposes only, and will not be provided by"
85 + " the client on request",
86 response = String.class),
87 @ResponseHeader(name = "X-LatestVersion",
88 description = "Used only to communicate an API's latest version",
89 response = String.class),
90 @ResponseHeader(name = "X-ONAP-RequestID",
91 description = "Used to track REST transactions for logging purpose",
92 response = UUID.class)
94 authorizations = @Authorization(value = "basicAuth"),
95 tags = { "Legacy Guard Policy", },
97 @Extension(name = "interface info", properties = {
98 @ExtensionProperty(name = "api-version", value = "1.0.0"),
99 @ExtensionProperty(name = "last-mod-release", value = "Dublin")
102 @ApiResponses(value = {
103 @ApiResponse(code = 401, message = "Authentication Error"),
104 @ApiResponse(code = 403, message = "Authorization Error"),
105 @ApiResponse(code = 404, message = "Resource Not Found"),
106 @ApiResponse(code = 500, message = "Internal Server Error")
108 public Response getAllVersionsOfGuardPolicy(
109 @PathParam("policyId") @ApiParam(value = "ID of policy", required = true) String policyId,
110 @HeaderParam("X-ONAP-RequestID") @ApiParam("RequestID for http transaction") UUID requestId) {
112 try (LegacyGuardPolicyProvider guardPolicyProvider = new LegacyGuardPolicyProvider()) {
113 Map<String, LegacyGuardPolicyOutput> policies = guardPolicyProvider.fetchGuardPolicy(policyId, null);
114 return addLoggingHeaders(addVersionControlHeaders(Response.status(Response.Status.OK)), requestId)
115 .entity(policies).build();
116 } catch (PfModelException | PfModelRuntimeException pfme) {
117 return addLoggingHeaders(addVersionControlHeaders(
118 Response.status(pfme.getErrorResponse().getResponseCode())), requestId)
119 .entity(pfme.getErrorResponse()).build();
124 * Retrieves the specified version of a particular guard policy.
126 * @param policyId the ID of specified policy
127 * @param policyVersion the version of specified policy
129 * @return the Response object containing the results of the API operation
132 @Path("/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/{policyId}/versions/{policyVersion}")
133 @ApiOperation(value = "Retrieve one version of a particular guard policy",
134 notes = "Returns a particular version of a specified guard policy",
135 response = LegacyGuardPolicyOutput.class, responseContainer = "Map",
137 @ResponseHeader(name = "X-MinorVersion",
138 description = "Used to request or communicate a MINOR version back from the client"
139 + " to the server, and from the server back to the client",
140 response = String.class),
141 @ResponseHeader(name = "X-PatchVersion",
142 description = "Used only to communicate a PATCH version in a response for"
143 + " troubleshooting purposes only, and will not be provided by"
144 + " the client on request",
145 response = String.class),
146 @ResponseHeader(name = "X-LatestVersion",
147 description = "Used only to communicate an API's latest version",
148 response = String.class),
149 @ResponseHeader(name = "X-ONAP-RequestID",
150 description = "Used to track REST transactions for logging purpose",
151 response = UUID.class)
153 authorizations = @Authorization(value = "basicAuth"),
154 tags = { "Legacy Guard Policy", },
156 @Extension(name = "interface info", properties = {
157 @ExtensionProperty(name = "api-version", value = "1.0.0"),
158 @ExtensionProperty(name = "last-mod-release", value = "Dublin")
161 @ApiResponses(value = {
162 @ApiResponse(code = 401, message = "Authentication Error"),
163 @ApiResponse(code = 403, message = "Authorization Error"),
164 @ApiResponse(code = 404, message = "Resource Not Found"),
165 @ApiResponse(code = 500, message = "Internal Server Error")
167 public Response getSpecificVersionOfGuardPolicy(
168 @PathParam("policyId") @ApiParam(value = "ID of policy", required = true) String policyId,
169 @PathParam("policyVersion") @ApiParam(value = "Version of policy", required = true) String policyVersion,
170 @HeaderParam("X-ONAP-RequestID") @ApiParam("RequestID for http transaction") UUID requestId) {
172 try (LegacyGuardPolicyProvider guardPolicyProvider = new LegacyGuardPolicyProvider()) {
173 Map<String, LegacyGuardPolicyOutput> policies = guardPolicyProvider
174 .fetchGuardPolicy(policyId, policyVersion);
175 return addLoggingHeaders(addVersionControlHeaders(Response.status(Response.Status.OK)), requestId)
176 .entity(policies).build();
177 } catch (PfModelException | PfModelRuntimeException pfme) {
178 return addLoggingHeaders(addVersionControlHeaders(
179 Response.status(pfme.getErrorResponse().getResponseCode())), requestId)
180 .entity(pfme.getErrorResponse()).build();
185 * Creates a new guard policy.
187 * @param body the body of policy
189 * @return the Response object containing the results of the API operation
192 @Path("/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies")
193 @ApiOperation(value = "Create a new guard policy",
194 notes = "Client should provide entity body of the new guard policy",
195 authorizations = @Authorization(value = "basicAuth"),
196 tags = { "Legacy Guard Policy", },
197 response = LegacyGuardPolicyOutput.class, responseContainer = "Map",
199 @ResponseHeader(name = "X-MinorVersion",
200 description = "Used to request or communicate a MINOR version back from the client"
201 + " to the server, and from the server back to the client",
202 response = String.class),
203 @ResponseHeader(name = "X-PatchVersion",
204 description = "Used only to communicate a PATCH version in a response for"
205 + " troubleshooting purposes only, and will not be provided by"
206 + " the client on request",
207 response = String.class),
208 @ResponseHeader(name = "X-LatestVersion",
209 description = "Used only to communicate an API's latest version",
210 response = String.class),
211 @ResponseHeader(name = "X-ONAP-RequestID",
212 description = "Used to track REST transactions for logging purpose",
213 response = UUID.class)
216 @Extension(name = "interface info", properties = {
217 @ExtensionProperty(name = "api-version", value = "1.0.0"),
218 @ExtensionProperty(name = "last-mod-release", value = "Dublin")
221 @ApiResponses(value = {
222 @ApiResponse(code = 400, message = "Invalid Body"),
223 @ApiResponse(code = 401, message = "Authentication Error"),
224 @ApiResponse(code = 403, message = "Authorization Error"),
225 @ApiResponse(code = 500, message = "Internal Server Error")
227 public Response createGuardPolicy(
228 @HeaderParam("X-ONAP-RequestID") @ApiParam("RequestID for http transaction") UUID requestId,
229 @ApiParam(value = "Entity body of policy", required = true) LegacyGuardPolicyInput body) {
231 try (LegacyGuardPolicyProvider guardPolicyProvider = new LegacyGuardPolicyProvider()) {
232 Map<String, LegacyGuardPolicyOutput> policy = guardPolicyProvider.createGuardPolicy(body);
233 return addLoggingHeaders(addVersionControlHeaders(Response.status(Response.Status.OK)), requestId)
234 .entity(policy).build();
235 } catch (PfModelException | PfModelRuntimeException pfme) {
236 return addLoggingHeaders(addVersionControlHeaders(
237 Response.status(pfme.getErrorResponse().getResponseCode())), requestId)
238 .entity(pfme.getErrorResponse()).build();
243 * Deletes the specified version of a particular guard policy.
245 * @param policyId the ID of specified policy
246 * @param policyVersion the version of specified policy
248 * @return the Response object containing the results of the API operation
251 @Path("/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/{policyId}/versions/{policyVersion}")
252 @ApiOperation(value = "Delete a particular version of a guard policy",
253 notes = "Rule: the version that has been deployed in PDP group(s) cannot be deleted",
254 authorizations = @Authorization(value = "basicAuth"),
255 tags = { "Legacy Guard Policy", },
256 response = LegacyGuardPolicyOutput.class, responseContainer = "Map",
258 @ResponseHeader(name = "X-MinorVersion",
259 description = "Used to request or communicate a MINOR version back from the client"
260 + " to the server, and from the server back to the client",
261 response = String.class),
262 @ResponseHeader(name = "X-PatchVersion",
263 description = "Used only to communicate a PATCH version in a response for"
264 + " troubleshooting purposes only, and will not be provided by"
265 + " the client on request",
266 response = String.class),
267 @ResponseHeader(name = "X-LatestVersion",
268 description = "Used only to communicate an API's latest version",
269 response = String.class),
270 @ResponseHeader(name = "X-ONAP-RequestID",
271 description = "Used to track REST transactions for logging purpose",
272 response = UUID.class)
275 @Extension(name = "interface info", properties = {
276 @ExtensionProperty(name = "api-version", value = "1.0.0"),
277 @ExtensionProperty(name = "last-mod-release", value = "Dublin")
280 @ApiResponses(value = {
281 @ApiResponse(code = 401, message = "Authentication Error"),
282 @ApiResponse(code = 403, message = "Authorization Error"),
283 @ApiResponse(code = 404, message = "Resource Not Found"),
284 @ApiResponse(code = 409, message = "Delete Conflict, Rule Violation"),
285 @ApiResponse(code = 500, message = "Internal Server Error")
287 public Response deleteSpecificVersionOfGuardPolicy(
288 @PathParam("policyId") @ApiParam(value = "ID of policy", required = true) String policyId,
289 @PathParam("policyVersion") @ApiParam(value = "Version of policy", required = true) String policyVersion,
290 @HeaderParam("X-ONAP-RequestID") @ApiParam("RequestID for http transaction") UUID requestId) {
292 try (LegacyGuardPolicyProvider guardPolicyProvider = new LegacyGuardPolicyProvider()) {
293 Map<String, LegacyGuardPolicyOutput> policies = guardPolicyProvider
294 .deleteGuardPolicy(policyId, policyVersion);
295 return addLoggingHeaders(addVersionControlHeaders(Response.status(Response.Status.OK)), requestId)
296 .entity(policies).build();
297 } catch (PfModelException | PfModelRuntimeException pfme) {
298 return addLoggingHeaders(addVersionControlHeaders(
299 Response.status(pfme.getErrorResponse().getResponseCode())), requestId)
300 .entity(pfme.getErrorResponse()).build();
305 * Retrieves all versions of a particular operational policy.
307 * @param policyId the ID of specified operational policy
309 * @return the Response object containing the results of the API operation
312 @Path("/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies/{policyId}")
313 @ApiOperation(value = "Retrieve all versions of a particular operational policy",
314 notes = "Returns a list of all versions of the specified operational policy",
315 response = LegacyOperationalPolicy.class,
317 @ResponseHeader(name = "X-MinorVersion",
318 description = "Used to request or communicate a MINOR version back from the client"
319 + " to the server, and from the server back to the client",
320 response = String.class),
321 @ResponseHeader(name = "X-PatchVersion",
322 description = "Used only to communicate a PATCH version in a response for"
323 + " troubleshooting purposes only, and will not be provided by"
324 + " the client on request",
325 response = String.class),
326 @ResponseHeader(name = "X-LatestVersion",
327 description = "Used only to communicate an API's latest version",
328 response = String.class),
329 @ResponseHeader(name = "X-ONAP-RequestID",
330 description = "Used to track REST transactions for logging purpose",
331 response = UUID.class)
333 authorizations = @Authorization(value = "basicAuth"),
334 tags = { "Legacy Operational Policy", },
336 @Extension(name = "interface info", properties = {
337 @ExtensionProperty(name = "api-version", value = "1.0.0"),
338 @ExtensionProperty(name = "last-mod-release", value = "Dublin")
341 @ApiResponses(value = {
342 @ApiResponse(code = 401, message = "Authentication Error"),
343 @ApiResponse(code = 403, message = "Authorization Error"),
344 @ApiResponse(code = 404, message = "Resource Not Found"),
345 @ApiResponse(code = 500, message = "Internal Server Error")
347 public Response getAllVersionsOfOperationalPolicy(
348 @PathParam("policyId") @ApiParam(value = "ID of policy", required = true) String policyId,
349 @HeaderParam("X-ONAP-RequestID") @ApiParam("RequestID for http transaction") UUID requestId) {
351 try (LegacyOperationalPolicyProvider operationalPolicyProvider = new LegacyOperationalPolicyProvider()) {
352 LegacyOperationalPolicy policy = operationalPolicyProvider.fetchOperationalPolicy(policyId, null);
353 return addLoggingHeaders(addVersionControlHeaders(Response.status(Response.Status.OK)), requestId)
354 .entity(policy).build();
355 } catch (PfModelException | PfModelRuntimeException pfme) {
356 return addLoggingHeaders(addVersionControlHeaders(
357 Response.status(pfme.getErrorResponse().getResponseCode())), requestId)
358 .entity(pfme.getErrorResponse()).build();
363 * Retrieves the specified version of a particular operational policy.
365 * @param policyId the ID of specified policy
366 * @param policyVersion the version of specified policy
368 * @return the Response object containing the results of the API operation
371 @Path("/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/"
372 + "policies/{policyId}/versions/{policyVersion}")
373 @ApiOperation(value = "Retrieve one version of a particular operational policy",
374 notes = "Returns a particular version of a specified operational policy",
375 response = LegacyOperationalPolicy.class,
377 @ResponseHeader(name = "X-MinorVersion",
378 description = "Used to request or communicate a MINOR version back from the client"
379 + " to the server, and from the server back to the client",
380 response = String.class),
381 @ResponseHeader(name = "X-PatchVersion",
382 description = "Used only to communicate a PATCH version in a response for"
383 + " troubleshooting purposes only, and will not be provided by"
384 + " the client on request",
385 response = String.class),
386 @ResponseHeader(name = "X-LatestVersion",
387 description = "Used only to communicate an API's latest version",
388 response = String.class),
389 @ResponseHeader(name = "X-ONAP-RequestID",
390 description = "Used to track REST transactions for logging purpose",
391 response = UUID.class)
393 authorizations = @Authorization(value = "basicAuth"),
394 tags = { "Legacy Operational Policy", },
396 @Extension(name = "interface info", properties = {
397 @ExtensionProperty(name = "api-version", value = "1.0.0"),
398 @ExtensionProperty(name = "last-mod-release", value = "Dublin")
401 @ApiResponses(value = {
402 @ApiResponse(code = 401, message = "Authentication Error"),
403 @ApiResponse(code = 403, message = "Authorization Error"),
404 @ApiResponse(code = 404, message = "Resource Not Found"),
405 @ApiResponse(code = 500, message = "Internal Server Error")
407 public Response getSpecificVersionOfOperationalPolicy(
408 @PathParam("policyId") @ApiParam(value = "ID of policy", required = true) String policyId,
409 @PathParam("policyVersion") @ApiParam(value = "Version of policy", required = true) String policyVersion,
410 @HeaderParam("X-ONAP-RequestID") @ApiParam("RequestID for http transaction") UUID requestId) {
412 try (LegacyOperationalPolicyProvider operationalPolicyProvider = new LegacyOperationalPolicyProvider()) {
413 LegacyOperationalPolicy policy = operationalPolicyProvider.fetchOperationalPolicy(policyId, policyVersion);
414 return addLoggingHeaders(addVersionControlHeaders(Response.status(Response.Status.OK)), requestId)
415 .entity(policy).build();
416 } catch (PfModelException | PfModelRuntimeException pfme) {
417 return addLoggingHeaders(addVersionControlHeaders(
418 Response.status(pfme.getErrorResponse().getResponseCode())), requestId)
419 .entity(pfme.getErrorResponse()).build();
424 * Creates a new operational policy.
426 * @param body the body of policy
428 * @return the Response object containing the results of the API operation
431 @Path("/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies")
432 @ApiOperation(value = "Create a new operational policy",
433 notes = "Client should provide entity body of the new operational policy",
434 authorizations = @Authorization(value = "basicAuth"),
435 tags = { "Legacy Operational Policy", },
436 response = LegacyOperationalPolicy.class,
438 @ResponseHeader(name = "X-MinorVersion",
439 description = "Used to request or communicate a MINOR version back from the client"
440 + " to the server, and from the server back to the client",
441 response = String.class),
442 @ResponseHeader(name = "X-PatchVersion",
443 description = "Used only to communicate a PATCH version in a response for"
444 + " troubleshooting purposes only, and will not be provided by"
445 + " the client on request",
446 response = String.class),
447 @ResponseHeader(name = "X-LatestVersion",
448 description = "Used only to communicate an API's latest version",
449 response = String.class),
450 @ResponseHeader(name = "X-ONAP-RequestID",
451 description = "Used to track REST transactions for logging purpose",
452 response = UUID.class)
455 @Extension(name = "interface info", properties = {
456 @ExtensionProperty(name = "api-version", value = "1.0.0"),
457 @ExtensionProperty(name = "last-mod-release", value = "Dublin")
460 @ApiResponses(value = {
461 @ApiResponse(code = 400, message = "Invalid Body"),
462 @ApiResponse(code = 401, message = "Authentication Error"),
463 @ApiResponse(code = 403, message = "Authorization Error"),
464 @ApiResponse(code = 500, message = "Internal Server Error")
466 public Response createOperationalPolicy(
467 @HeaderParam("X-ONAP-RequestID") @ApiParam("RequestID for http transaction") UUID requestId,
468 @ApiParam(value = "Entity body of policy", required = true) LegacyOperationalPolicy body) {
470 try (LegacyOperationalPolicyProvider operationalPolicyProvider = new LegacyOperationalPolicyProvider()) {
471 LegacyOperationalPolicy policy = operationalPolicyProvider.createOperationalPolicy(body);
472 return addLoggingHeaders(addVersionControlHeaders(Response.status(Response.Status.OK)), requestId)
473 .entity(policy).build();
474 } catch (PfModelException | PfModelRuntimeException pfme) {
475 return addLoggingHeaders(addVersionControlHeaders(
476 Response.status(pfme.getErrorResponse().getResponseCode())), requestId)
477 .entity(pfme.getErrorResponse()).build();
482 * Deletes the specified version of a particular operational policy.
484 * @param policyId the ID of specified policy
485 * @param policyVersion the version of specified policy
487 * @return the Response object containing the results of the API operation
490 @Path("/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/"
491 + "policies/{policyId}/versions/{policyVersion}")
492 @ApiOperation(value = "Delete a particular version of a specified operational policy",
493 notes = "Rule: the version that has been deployed in PDP group(s) cannot be deleted",
494 authorizations = @Authorization(value = "basicAuth"),
495 tags = { "Legacy Operational Policy", },
496 response = LegacyOperationalPolicy.class,
498 @ResponseHeader(name = "X-MinorVersion",
499 description = "Used to request or communicate a MINOR version back from the client"
500 + " to the server, and from the server back to the client",
501 response = String.class),
502 @ResponseHeader(name = "X-PatchVersion",
503 description = "Used only to communicate a PATCH version in a response for"
504 + " troubleshooting purposes only, and will not be provided by"
505 + " the client on request",
506 response = String.class),
507 @ResponseHeader(name = "X-LatestVersion",
508 description = "Used only to communicate an API's latest version",
509 response = String.class),
510 @ResponseHeader(name = "X-ONAP-RequestID",
511 description = "Used to track REST transactions for logging purpose",
512 response = UUID.class)
515 @Extension(name = "interface info", properties = {
516 @ExtensionProperty(name = "api-version", value = "1.0.0"),
517 @ExtensionProperty(name = "last-mod-release", value = "Dublin")
520 @ApiResponses(value = {
521 @ApiResponse(code = 401, message = "Authentication Error"),
522 @ApiResponse(code = 403, message = "Authorization Error"),
523 @ApiResponse(code = 404, message = "Resource Not Found"),
524 @ApiResponse(code = 409, message = "Delete Conflict, Rule Violation"),
525 @ApiResponse(code = 500, message = "Internal Server Error")
527 public Response deleteSpecificVersionOfOperationalPolicy(
528 @PathParam("policyId") @ApiParam(value = "ID of policy", required = true) String policyId,
529 @PathParam("policyVersion") @ApiParam(value = "Version of policy", required = true) String policyVersion,
530 @HeaderParam("X-ONAP-RequestID") @ApiParam("RequestID for http transaction") UUID requestId) {
532 try (LegacyOperationalPolicyProvider operationalPolicyProvider = new LegacyOperationalPolicyProvider()) {
533 LegacyOperationalPolicy policy = operationalPolicyProvider
534 .deleteOperationalPolicy(policyId, policyVersion);
535 return addLoggingHeaders(addVersionControlHeaders(Response.status(Response.Status.OK)), requestId)
536 .entity(policy).build();
537 } catch (PfModelException | PfModelRuntimeException pfme) {
538 return addLoggingHeaders(addVersionControlHeaders(
539 Response.status(pfme.getErrorResponse().getResponseCode())), requestId)
540 .entity(pfme.getErrorResponse()).build();
544 private ResponseBuilder addVersionControlHeaders(ResponseBuilder rb) {
545 return rb.header("X-MinorVersion", "0").header("X-PatchVersion", "0").header("X-LatestVersion", "1.0.0");
548 private ResponseBuilder addLoggingHeaders(ResponseBuilder rb, UUID requestId) {
549 if (requestId == null) {
550 // Generate a random uuid if client does not embed requestId in rest request
551 return rb.header("X-ONAP-RequestID", UUID.randomUUID());
553 return rb.header("X-ONAP-RequestID", requestId);