Invoke Policy Executor and handle not-allowed response 57/138857/8
authorToineSiebelink <toine.siebelink@est.tech>
Tue, 27 Aug 2024 13:56:44 +0000 (14:56 +0100)
committerToineSiebelink <toine.siebelink@est.tech>
Thu, 29 Aug 2024 08:31:04 +0000 (09:31 +0100)
commita05ca3d3152de44ac3078e2455834dedb5789b1b
tree07b2346b58b27394827766cb28ff24e9d70df25f
parent0ae8299c8a4c811cc5bc001a8531f367687f0678
Invoke Policy Executor and handle not-allowed response

- Execute Policy Executor REST request
- Act (and log) on response from Policy Executor
- Add dispatcher(mock) in integration test FWK
- Add integration test for allow/non allowed and no authorization use cases
- disabled PolicyExecution feature by default (only enabled for testware)

Issue-ID: CPS-2247

Change-Id: I111ba9ba89cc91649b63b20f88414aa33721dbeb
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
23 files changed:
cps-application/src/main/resources/application.yml
cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyRestExceptionHandler.java
cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/NetworkCmProxyRestExceptionHandlerSpec.groovy
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/exceptions/PolicyExecutorException.java [new file with mode: 0644]
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/data/DmiDataOperations.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/data/policyexecutor/PolicyExecutor.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/utils/http/RestServiceUrlTemplateBuilder.java
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/config/DmiHttpClientConfigSpec.groovy
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/config/PolicyExecutorHttpClientConfigSpec.groovy
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/data/PolicyExecutorConfigurationSpec.groovy [new file with mode: 0644]
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/data/PolicyExecutorSpec.groovy
cps-ncmp-service/src/test/java/org/onap/cps/ncmp/utils/WebClientBuilderTestConfig.java [new file with mode: 0644]
cps-ncmp-service/src/test/resources/application.yml
docs/schemas/policy-executor/ncmp-create-schema-1.0.0.json
docs/schemas/policy-executor/ncmp-delete-schema-1.0.0.json
docs/schemas/policy-executor/ncmp-patch-schema-1.0.0.json
docs/schemas/policy-executor/ncmp-update-schema-1.0.0.json
integration-test/src/test/groovy/org/onap/cps/integration/base/CpsIntegrationSpecBase.groovy
integration-test/src/test/groovy/org/onap/cps/integration/base/DmiDispatcher.groovy
integration-test/src/test/groovy/org/onap/cps/integration/base/PolicyDispatcher.groovy [new file with mode: 0644]
integration-test/src/test/groovy/org/onap/cps/integration/functional/ncmp/PolicyExecutorIntegrationSpec.groovy [new file with mode: 0644]
integration-test/src/test/resources/application.yml
spotbugs/src/main/resources/spotbugs-exclude.xml