Adding custom headers capability to REST client 15/82315/8
authorottero <rodrigo.ottero@est.tech>
Sun, 17 Mar 2019 19:38:32 +0000 (19:38 +0000)
committerottero <rodrigo.ottero@est.tech>
Sun, 17 Mar 2019 19:38:32 +0000 (19:38 +0000)
commit1b5d34c4a9c62de7aee833529e9df160315c5f8f
tree89f576232913076e4632c1603f27dc9be013d218
parent593e3233ffff0b82a8bdf687ca051666688296a7
Adding custom headers capability to REST client

For YANG PATCH requests to ODL to work, they need to have a Content-
type header of application/yang.patch+json and should not have Accept
as application/json

Current REST client inserts a default header to the requests with this
content:

  Content-Type: application/json
  Accept: application/json

The solution was to add the possibility of sending custom headers alon-
gside the other parameters.

Change-Id: I2cf0cd2ef7b87f4f5a246d427dffafe266cb33f7
Issue-ID: CCSDK-926
Signed-off-by: ottero <rodrigo.ottero@est.tech>
27 files changed:
components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/activation-blueprint.json
components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/config-assign-pnf-mapping.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/config-deploy-pnf-mapping.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/data_types.json
components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/node_types.json
components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/resources_definition_types.json
components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Plans/CONFIG_configDeploy.xml [moved from components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Plans/CONFIG_configure.xml with 91% similarity]
components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Scripts/python/RestconfAssignConfig.py [deleted file]
components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Scripts/python/RestconfConfigDeploy.py [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Scripts/python/RestconfConfigure.py [deleted file]
components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Templates/config-assign-pnf-mapping.json [deleted file]
components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Templates/config-assign-restconf-configlet-template.vtl
components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Templates/config-deploy-restconf-mount-template.vtl [moved from components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Templates/configure-restconf-mount-template.vtl with 85% similarity]
components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Templates/configure-pnf-mapping.json [deleted file]
components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Templates/configure-restconf-unmount-template.vtl [deleted file]
components/model-catalog/resource-dictionary/starter-dictionary/entity.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/pnf-id.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/pnf-name.json [new file with mode: 0755]
ms/blueprintsprocessor/application/src/main/resources/application-dev.properties
ms/blueprintsprocessor/application/src/main/resources/application.properties
ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/rest/service/BasicAuthRestClientService.kt
ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/rest/service/BlueprintWebClientService.kt
ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/rest/service/DME2ProxyRestClientService.kt
ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/rest/service/SSLBasicAuthRestClientService.kt
ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/rest/service/TokenAuthRestClientService.kt
ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/rest/utils/WebClientUtils.kt
ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/rest/service/RestClientServiceTest.kt