diff options
author | 2022-07-25 10:46:57 +0100 | |
---|---|---|
committer | 2022-07-26 10:18:58 +0100 | |
commit | 751aa0f3c7f090bc10bc59f74aaace1f297a7c2c (patch) | |
tree | acc983fd58594b56b24846e3ee6becb8c494418c /examples/examples-grpc/src/main/resources/logic/ResponseTask.js | |
parent | cfa642373420fa2bc429c94f17e4f0c0798e5791 (diff) |
Update APEX example to use JSON Schema plugin
Change-Id: Ic8b412ce0ca71b4452d67b1e4445e423b0ec5b54
Issue-ID: POLICY-4292
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
Diffstat (limited to 'examples/examples-grpc/src/main/resources/logic/ResponseTask.js')
-rw-r--r-- | examples/examples-grpc/src/main/resources/logic/ResponseTask.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/examples-grpc/src/main/resources/logic/ResponseTask.js b/examples/examples-grpc/src/main/resources/logic/ResponseTask.js index dc4948990..d3424bdc1 100644 --- a/examples/examples-grpc/src/main/resources/logic/ResponseTask.js +++ b/examples/examples-grpc/src/main/resources/logic/ResponseTask.js @@ -1,7 +1,7 @@ /* * ============LICENSE_START======================================================= * Copyright (C) 2020 Nordix. All rights reserved. - * Modifications Copyright (C) 2021 Bell Canada. All rights reserved. + * Modifications Copyright (C) 2021-2022 Bell Canada. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ var albumID = uuidType.fromString("d0050623-18e5-46c9-9298-9a567990cd7c"); var pmSubscriptionInfo = executor.getContextAlbum("PMSubscriptionAlbum").get(albumID.toString()); -var responseStatus = executor.subject.getOutFieldSchemaHelper("CDSResponseStatusEvent", "status").createNewInstance(); +var responseStatus = new java.util.HashMap(); responseStatus.put("subscriptionName", pmSubscriptionInfo.get("subscription").get("subscriptionName")) responseStatus.put("nfName", pmSubscriptionInfo.get("nfName")) @@ -34,7 +34,7 @@ responseStatus.put("changeType", pmSubscriptionInfo.get("changeType")) var response = executor.inFields.get("payload") -if ("failure".equals(response.get("create_DasH_subscription_DasH_response").get("odl_DasH_response").get("status"))) { +if ("failure".equals(response.get("create-subscription-response").get("odl-response").get("status"))) { responseStatus.put("message", "failed") } else { responseStatus.put("message", "success") |