-
Bug
-
Resolution: Done
-
Medium
-
Istanbul Release, Jakarta Release
-
None
The default value, in inputs of complex type that belongs to a node instance interface operation, are not being saved as JSON string.
To reproduce:
- import the VFC resource-NetworkfunctionCustInput-template-example.yml and certify
- create a VF and go to the composition screen
- add the imported VFC as a node instance
- select the added instance and go to the interface operation tab
- select the Standard->configure operation
- there will be a list of inputs with its default values pre-populated:
- the inputs of type onap.datatypes.partner.access_details will be empty, but it should come with default values as defined in the VFC resource-NetworkfunctionCustInput-template-example.yml:
dsl_stability_profile: standard1 central_splitter: false service_restoration_sla: Standard1 battery_backup: false partner_priorty_assist: false
It is possible to see in a backend call, which loads the node instances in the composition screen, that the input toscaDefaultValue value comes as an incorrect stringfied JSON representation:
{dsl_stability_profile=standard1, central_splitter=false, service_restoration_sla=Standard1, battery_backup=false, partner_priorty_assist=false}
This seems to be a common Java toString representation.
it should come as:
{"dsl_stability_profile": "standard1", "central_splitter": false, "service_restoration_sla": "Standard1", "battery_backup": false, "partner_priorty_assist": false}
Not sure were the problem lies, but it is probably during the instance creation, when the node is added to the composition (org.openecomp.sdc.be.servlets.ComponentInstanceServlet#createComponentInstance).