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 org.onap.policy.api.main.rest.provider.LegacyGuardPolicyProvider;
46 import org.onap.policy.api.main.rest.provider.LegacyOperationalPolicyProvider;
47 import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
48 import org.onap.policy.common.endpoints.utils.NetLoggerUtil;
49 import org.onap.policy.common.endpoints.utils.NetLoggerUtil.EventType;
50 import org.onap.policy.models.base.PfModelException;
51 import org.onap.policy.models.base.PfModelRuntimeException;
52 import org.onap.policy.models.tosca.legacy.concepts.LegacyGuardPolicyInput;
53 import org.onap.policy.models.tosca.legacy.concepts.LegacyGuardPolicyOutput;
54 import org.onap.policy.models.tosca.legacy.concepts.LegacyOperationalPolicy;
55 import org.slf4j.Logger;
56 import org.slf4j.LoggerFactory;
59 * Class to provide legacy REST API services.
61 * @author Chenfei Gao (cgao@research.att.com)
63 @Path("/policy/api/v1")
64 @Api(value = "Legacy Policy Design API")
65 @Produces("application/json")
66 @Consumes("application/json")
67 public class LegacyApiRestController extends CommonRestController {
69 private static final Logger LOGGER = LoggerFactory.getLogger(LegacyApiRestController.class);
72 * Retrieves the latest version of a particular guard policy.
74 * @param policyId the ID of specified guard policy
76 * @return the Response object containing the results of the API operation
79 @Path("/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/{policyId}/versions/latest")
80 @ApiOperation(value = "Retrieve the latest version of a particular guard policy",
81 notes = "Returns the latest version of the specified guard policy",
82 response = LegacyGuardPolicyOutput.class, responseContainer = "Map",
84 @ResponseHeader(name = "X-MinorVersion",
85 description = "Used to request or communicate a MINOR version back from the client"
86 + " to the server, and from the server back to the client",
87 response = String.class),
88 @ResponseHeader(name = "X-PatchVersion",
89 description = "Used only to communicate a PATCH version in a response for"
90 + " troubleshooting purposes only, and will not be provided by"
91 + " the client on request",
92 response = String.class),
93 @ResponseHeader(name = "X-LatestVersion",
94 description = "Used only to communicate an API's latest version",
95 response = String.class),
96 @ResponseHeader(name = "X-ONAP-RequestID",
97 description = "Used to track REST transactions for logging purpose",
98 response = UUID.class)
100 authorizations = @Authorization(value = "basicAuth"),
101 tags = { "Legacy Guard Policy", },
103 @Extension(name = "interface info", properties = {
104 @ExtensionProperty(name = "api-version", value = "1.0.0"),
105 @ExtensionProperty(name = "last-mod-release", value = "Dublin")
108 @ApiResponses(value = {
109 @ApiResponse(code = 401, message = "Authentication Error"),
110 @ApiResponse(code = 403, message = "Authorization Error"),
111 @ApiResponse(code = 404, message = "Resource Not Found"),
112 @ApiResponse(code = 500, message = "Internal Server Error")
114 public Response getLatestVersionOfGuardPolicy(
115 @PathParam("policyId") @ApiParam(value = "ID of policy", required = true) String policyId,
116 @HeaderParam("X-ONAP-RequestID") @ApiParam("RequestID for http transaction") UUID requestId) {
118 try (LegacyGuardPolicyProvider guardPolicyProvider = new LegacyGuardPolicyProvider()) {
119 Map<String, LegacyGuardPolicyOutput> policies = guardPolicyProvider.fetchGuardPolicy(policyId, null);
120 return makeOkResponse(requestId, policies);
121 } catch (PfModelException | PfModelRuntimeException pfme) {
122 LOGGER.error("GET /policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/{}"
123 + "/versions/latest", policyId, pfme);
124 return makeErrorResponse(requestId, pfme);
129 * Retrieves the specified version of a particular guard policy.
131 * @param policyId the ID of specified policy
132 * @param policyVersion the version of specified policy
134 * @return the Response object containing the results of the API operation
137 @Path("/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/{policyId}/versions/{policyVersion}")
138 @ApiOperation(value = "Retrieve one version of a particular guard policy",
139 notes = "Returns a particular version of a specified guard policy",
140 response = LegacyGuardPolicyOutput.class, responseContainer = "Map",
142 @ResponseHeader(name = "X-MinorVersion",
143 description = "Used to request or communicate a MINOR version back from the client"
144 + " to the server, and from the server back to the client",
145 response = String.class),
146 @ResponseHeader(name = "X-PatchVersion",
147 description = "Used only to communicate a PATCH version in a response for"
148 + " troubleshooting purposes only, and will not be provided by"
149 + " the client on request",
150 response = String.class),
151 @ResponseHeader(name = "X-LatestVersion",
152 description = "Used only to communicate an API's latest version",
153 response = String.class),
154 @ResponseHeader(name = "X-ONAP-RequestID",
155 description = "Used to track REST transactions for logging purpose",
156 response = UUID.class)
158 authorizations = @Authorization(value = "basicAuth"),
159 tags = { "Legacy Guard Policy", },
161 @Extension(name = "interface info", properties = {
162 @ExtensionProperty(name = "api-version", value = "1.0.0"),
163 @ExtensionProperty(name = "last-mod-release", value = "Dublin")
166 @ApiResponses(value = {
167 @ApiResponse(code = 401, message = "Authentication Error"),
168 @ApiResponse(code = 403, message = "Authorization Error"),
169 @ApiResponse(code = 404, message = "Resource Not Found"),
170 @ApiResponse(code = 500, message = "Internal Server Error")
172 public Response getSpecificVersionOfGuardPolicy(
173 @PathParam("policyId") @ApiParam(value = "ID of policy", required = true) String policyId,
174 @PathParam("policyVersion") @ApiParam(value = "Version of policy", required = true) String policyVersion,
175 @HeaderParam("X-ONAP-RequestID") @ApiParam("RequestID for http transaction") UUID requestId) {
177 try (LegacyGuardPolicyProvider guardPolicyProvider = new LegacyGuardPolicyProvider()) {
178 Map<String, LegacyGuardPolicyOutput> policies = guardPolicyProvider
179 .fetchGuardPolicy(policyId, policyVersion);
180 return makeOkResponse(requestId, policies);
181 } catch (PfModelException | PfModelRuntimeException pfme) {
182 LOGGER.error("GET /policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/{}/versions/{}",
183 policyId, policyVersion, pfme);
184 return makeErrorResponse(requestId, pfme);
189 * Creates a new guard policy.
191 * @param body the body of policy
193 * @return the Response object containing the results of the API operation
196 @Path("/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies")
197 @ApiOperation(value = "Create a new guard policy",
198 notes = "Client should provide entity body of the new guard policy",
199 authorizations = @Authorization(value = "basicAuth"),
200 tags = { "Legacy Guard Policy", },
201 response = LegacyGuardPolicyOutput.class, responseContainer = "Map",
203 @ResponseHeader(name = "X-MinorVersion",
204 description = "Used to request or communicate a MINOR version back from the client"
205 + " to the server, and from the server back to the client",
206 response = String.class),
207 @ResponseHeader(name = "X-PatchVersion",
208 description = "Used only to communicate a PATCH version in a response for"
209 + " troubleshooting purposes only, and will not be provided by"
210 + " the client on request",
211 response = String.class),
212 @ResponseHeader(name = "X-LatestVersion",
213 description = "Used only to communicate an API's latest version",
214 response = String.class),
215 @ResponseHeader(name = "X-ONAP-RequestID",
216 description = "Used to track REST transactions for logging purpose",
217 response = UUID.class)
220 @Extension(name = "interface info", properties = {
221 @ExtensionProperty(name = "api-version", value = "1.0.0"),
222 @ExtensionProperty(name = "last-mod-release", value = "Dublin")
225 @ApiResponses(value = {
226 @ApiResponse(code = 400, message = "Invalid Body"),
227 @ApiResponse(code = 401, message = "Authentication Error"),
228 @ApiResponse(code = 403, message = "Authorization Error"),
229 @ApiResponse(code = 500, message = "Internal Server Error")
231 public Response createGuardPolicy(
232 @HeaderParam("X-ONAP-RequestID") @ApiParam("RequestID for http transaction") UUID requestId,
233 @ApiParam(value = "Entity body of policy", required = true) LegacyGuardPolicyInput body) {
235 if (NetLoggerUtil.getNetworkLogger().isInfoEnabled()) {
236 NetLoggerUtil.log(EventType.IN, CommInfrastructure.REST,
237 "/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies", toJson(body));
240 try (LegacyGuardPolicyProvider guardPolicyProvider = new LegacyGuardPolicyProvider()) {
241 Map<String, LegacyGuardPolicyOutput> policy = guardPolicyProvider.createGuardPolicy(body);
242 return makeOkResponse(requestId, policy);
243 } catch (PfModelException | PfModelRuntimeException pfme) {
244 LOGGER.error("POST /policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies", pfme);
245 return makeErrorResponse(requestId, pfme);
250 * Deletes the specified version of a particular guard policy.
252 * @param policyId the ID of specified policy
253 * @param policyVersion the version of specified policy
255 * @return the Response object containing the results of the API operation
258 @Path("/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/{policyId}/versions/{policyVersion}")
259 @ApiOperation(value = "Delete a particular version of a guard policy",
260 notes = "Rule: the version that has been deployed in PDP group(s) cannot be deleted",
261 authorizations = @Authorization(value = "basicAuth"),
262 tags = { "Legacy Guard Policy", },
263 response = LegacyGuardPolicyOutput.class, responseContainer = "Map",
265 @ResponseHeader(name = "X-MinorVersion",
266 description = "Used to request or communicate a MINOR version back from the client"
267 + " to the server, and from the server back to the client",
268 response = String.class),
269 @ResponseHeader(name = "X-PatchVersion",
270 description = "Used only to communicate a PATCH version in a response for"
271 + " troubleshooting purposes only, and will not be provided by"
272 + " the client on request",
273 response = String.class),
274 @ResponseHeader(name = "X-LatestVersion",
275 description = "Used only to communicate an API's latest version",
276 response = String.class),
277 @ResponseHeader(name = "X-ONAP-RequestID",
278 description = "Used to track REST transactions for logging purpose",
279 response = UUID.class)
282 @Extension(name = "interface info", properties = {
283 @ExtensionProperty(name = "api-version", value = "1.0.0"),
284 @ExtensionProperty(name = "last-mod-release", value = "Dublin")
287 @ApiResponses(value = {
288 @ApiResponse(code = 401, message = "Authentication Error"),
289 @ApiResponse(code = 403, message = "Authorization Error"),
290 @ApiResponse(code = 404, message = "Resource Not Found"),
291 @ApiResponse(code = 409, message = "Delete Conflict, Rule Violation"),
292 @ApiResponse(code = 500, message = "Internal Server Error")
294 public Response deleteSpecificVersionOfGuardPolicy(
295 @PathParam("policyId") @ApiParam(value = "ID of policy", required = true) String policyId,
296 @PathParam("policyVersion") @ApiParam(value = "Version of policy", required = true) String policyVersion,
297 @HeaderParam("X-ONAP-RequestID") @ApiParam("RequestID for http transaction") UUID requestId) {
299 try (LegacyGuardPolicyProvider guardPolicyProvider = new LegacyGuardPolicyProvider()) {
300 Map<String, LegacyGuardPolicyOutput> policies = guardPolicyProvider
301 .deleteGuardPolicy(policyId, policyVersion);
302 return makeOkResponse(requestId, policies);
303 } catch (PfModelException | PfModelRuntimeException pfme) {
304 LOGGER.error("DELETE /policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/{}/versions/{}",
305 policyId, policyVersion, pfme);
306 return makeErrorResponse(requestId, pfme);
311 * Retrieves the latest version of a particular operational policy.
313 * @param policyId the ID of specified operational policy
315 * @return the Response object containing the results of the API operation
318 @Path("/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies/{policyId}/versions/latest")
319 @ApiOperation(value = "Retrieve the latest version of a particular operational policy",
320 notes = "Returns the latest version of the specified operational policy",
321 response = LegacyOperationalPolicy.class,
323 @ResponseHeader(name = "X-MinorVersion",
324 description = "Used to request or communicate a MINOR version back from the client"
325 + " to the server, and from the server back to the client",
326 response = String.class),
327 @ResponseHeader(name = "X-PatchVersion",
328 description = "Used only to communicate a PATCH version in a response for"
329 + " troubleshooting purposes only, and will not be provided by"
330 + " the client on request",
331 response = String.class),
332 @ResponseHeader(name = "X-LatestVersion",
333 description = "Used only to communicate an API's latest version",
334 response = String.class),
335 @ResponseHeader(name = "X-ONAP-RequestID",
336 description = "Used to track REST transactions for logging purpose",
337 response = UUID.class)
339 authorizations = @Authorization(value = "basicAuth"),
340 tags = { "Legacy Operational Policy", },
342 @Extension(name = "interface info", properties = {
343 @ExtensionProperty(name = "api-version", value = "1.0.0"),
344 @ExtensionProperty(name = "last-mod-release", value = "Dublin")
347 @ApiResponses(value = {
348 @ApiResponse(code = 401, message = "Authentication Error"),
349 @ApiResponse(code = 403, message = "Authorization Error"),
350 @ApiResponse(code = 404, message = "Resource Not Found"),
351 @ApiResponse(code = 500, message = "Internal Server Error")
353 public Response getLatestVersionOfOperationalPolicy(
354 @PathParam("policyId") @ApiParam(value = "ID of policy", required = true) String policyId,
355 @HeaderParam("X-ONAP-RequestID") @ApiParam("RequestID for http transaction") UUID requestId) {
357 try (LegacyOperationalPolicyProvider operationalPolicyProvider = new LegacyOperationalPolicyProvider()) {
358 LegacyOperationalPolicy policy = operationalPolicyProvider.fetchOperationalPolicy(policyId, null);
359 return makeOkResponse(requestId, policy);
360 } catch (PfModelException | PfModelRuntimeException pfme) {
361 LOGGER.error("GET /policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies/{}"
362 + "/versions/latest", policyId, pfme);
363 return makeErrorResponse(requestId, pfme);
368 * Retrieves the specified version of a particular operational policy.
370 * @param policyId the ID of specified policy
371 * @param policyVersion the version of specified policy
373 * @return the Response object containing the results of the API operation
376 @Path("/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/"
377 + "policies/{policyId}/versions/{policyVersion}")
378 @ApiOperation(value = "Retrieve one version of a particular operational policy",
379 notes = "Returns a particular version of a specified operational policy",
380 response = LegacyOperationalPolicy.class,
382 @ResponseHeader(name = "X-MinorVersion",
383 description = "Used to request or communicate a MINOR version back from the client"
384 + " to the server, and from the server back to the client",
385 response = String.class),
386 @ResponseHeader(name = "X-PatchVersion",
387 description = "Used only to communicate a PATCH version in a response for"
388 + " troubleshooting purposes only, and will not be provided by"
389 + " the client on request",
390 response = String.class),
391 @ResponseHeader(name = "X-LatestVersion",
392 description = "Used only to communicate an API's latest version",
393 response = String.class),
394 @ResponseHeader(name = "X-ONAP-RequestID",
395 description = "Used to track REST transactions for logging purpose",
396 response = UUID.class)
398 authorizations = @Authorization(value = "basicAuth"),
399 tags = { "Legacy Operational Policy", },
401 @Extension(name = "interface info", properties = {
402 @ExtensionProperty(name = "api-version", value = "1.0.0"),
403 @ExtensionProperty(name = "last-mod-release", value = "Dublin")
406 @ApiResponses(value = {
407 @ApiResponse(code = 401, message = "Authentication Error"),
408 @ApiResponse(code = 403, message = "Authorization Error"),
409 @ApiResponse(code = 404, message = "Resource Not Found"),
410 @ApiResponse(code = 500, message = "Internal Server Error")
412 public Response getSpecificVersionOfOperationalPolicy(
413 @PathParam("policyId") @ApiParam(value = "ID of policy", required = true) String policyId,
414 @PathParam("policyVersion") @ApiParam(value = "Version of policy", required = true) String policyVersion,
415 @HeaderParam("X-ONAP-RequestID") @ApiParam("RequestID for http transaction") UUID requestId) {
417 try (LegacyOperationalPolicyProvider operationalPolicyProvider = new LegacyOperationalPolicyProvider()) {
418 LegacyOperationalPolicy policy = operationalPolicyProvider.fetchOperationalPolicy(policyId, policyVersion);
419 return makeOkResponse(requestId, policy);
420 } catch (PfModelException | PfModelRuntimeException pfme) {
421 LOGGER.error("GET /policytypes/onap.policies.controlloop.Operational/versions/1.0.0/"
422 + "policies/{}/versions/{}", policyId, policyVersion, pfme);
423 return makeErrorResponse(requestId, pfme);
428 * Creates a new operational policy.
430 * @param body the body of policy
432 * @return the Response object containing the results of the API operation
435 @Path("/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies")
436 @ApiOperation(value = "Create a new operational policy",
437 notes = "Client should provide entity body of the new operational policy",
438 authorizations = @Authorization(value = "basicAuth"),
439 tags = { "Legacy Operational Policy", },
440 response = LegacyOperationalPolicy.class,
442 @ResponseHeader(name = "X-MinorVersion",
443 description = "Used to request or communicate a MINOR version back from the client"
444 + " to the server, and from the server back to the client",
445 response = String.class),
446 @ResponseHeader(name = "X-PatchVersion",
447 description = "Used only to communicate a PATCH version in a response for"
448 + " troubleshooting purposes only, and will not be provided by"
449 + " the client on request",
450 response = String.class),
451 @ResponseHeader(name = "X-LatestVersion",
452 description = "Used only to communicate an API's latest version",
453 response = String.class),
454 @ResponseHeader(name = "X-ONAP-RequestID",
455 description = "Used to track REST transactions for logging purpose",
456 response = UUID.class)
459 @Extension(name = "interface info", properties = {
460 @ExtensionProperty(name = "api-version", value = "1.0.0"),
461 @ExtensionProperty(name = "last-mod-release", value = "Dublin")
464 @ApiResponses(value = {
465 @ApiResponse(code = 400, message = "Invalid Body"),
466 @ApiResponse(code = 401, message = "Authentication Error"),
467 @ApiResponse(code = 403, message = "Authorization Error"),
468 @ApiResponse(code = 500, message = "Internal Server Error")
470 public Response createOperationalPolicy(
471 @HeaderParam("X-ONAP-RequestID") @ApiParam("RequestID for http transaction") UUID requestId,
472 @ApiParam(value = "Entity body of policy", required = true) LegacyOperationalPolicy body) {
474 if (NetLoggerUtil.getNetworkLogger().isInfoEnabled()) {
475 NetLoggerUtil.log(EventType.IN, CommInfrastructure.REST,
476 "/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies", toJson(body));
479 try (LegacyOperationalPolicyProvider operationalPolicyProvider = new LegacyOperationalPolicyProvider()) {
480 LegacyOperationalPolicy policy = operationalPolicyProvider.createOperationalPolicy(body);
481 return makeOkResponse(requestId, policy);
482 } catch (PfModelException | PfModelRuntimeException pfme) {
483 LOGGER.error("POST /policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies", pfme);
484 return makeErrorResponse(requestId, pfme);
489 * Deletes the specified version of a particular operational policy.
491 * @param policyId the ID of specified policy
492 * @param policyVersion the version of specified policy
494 * @return the Response object containing the results of the API operation
497 @Path("/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/"
498 + "policies/{policyId}/versions/{policyVersion}")
499 @ApiOperation(value = "Delete a particular version of a specified operational policy",
500 notes = "Rule: the version that has been deployed in PDP group(s) cannot be deleted",
501 authorizations = @Authorization(value = "basicAuth"),
502 tags = { "Legacy Operational Policy", },
503 response = LegacyOperationalPolicy.class,
505 @ResponseHeader(name = "X-MinorVersion",
506 description = "Used to request or communicate a MINOR version back from the client"
507 + " to the server, and from the server back to the client",
508 response = String.class),
509 @ResponseHeader(name = "X-PatchVersion",
510 description = "Used only to communicate a PATCH version in a response for"
511 + " troubleshooting purposes only, and will not be provided by"
512 + " the client on request",
513 response = String.class),
514 @ResponseHeader(name = "X-LatestVersion",
515 description = "Used only to communicate an API's latest version",
516 response = String.class),
517 @ResponseHeader(name = "X-ONAP-RequestID",
518 description = "Used to track REST transactions for logging purpose",
519 response = UUID.class)
522 @Extension(name = "interface info", properties = {
523 @ExtensionProperty(name = "api-version", value = "1.0.0"),
524 @ExtensionProperty(name = "last-mod-release", value = "Dublin")
527 @ApiResponses(value = {
528 @ApiResponse(code = 401, message = "Authentication Error"),
529 @ApiResponse(code = 403, message = "Authorization Error"),
530 @ApiResponse(code = 404, message = "Resource Not Found"),
531 @ApiResponse(code = 409, message = "Delete Conflict, Rule Violation"),
532 @ApiResponse(code = 500, message = "Internal Server Error")
534 public Response deleteSpecificVersionOfOperationalPolicy(
535 @PathParam("policyId") @ApiParam(value = "ID of policy", required = true) String policyId,
536 @PathParam("policyVersion") @ApiParam(value = "Version of policy", required = true) String policyVersion,
537 @HeaderParam("X-ONAP-RequestID") @ApiParam("RequestID for http transaction") UUID requestId) {
539 try (LegacyOperationalPolicyProvider operationalPolicyProvider = new LegacyOperationalPolicyProvider()) {
540 LegacyOperationalPolicy policy = operationalPolicyProvider
541 .deleteOperationalPolicy(policyId, policyVersion);
542 return makeOkResponse(requestId, policy);
543 } catch (PfModelException | PfModelRuntimeException pfme) {
544 LOGGER.error("DELETE /policytypes/onap.policies.controlloop.Operational/versions/1.0.0/"
545 + "policies/{}/versions/{}", policyId, policyVersion, pfme);
546 return makeErrorResponse(requestId, pfme);