-
Bug
-
Resolution: Done
-
None
-
unspecified
-
None
-
Operating System: All
Platform: All
-
7179
If service Function is created from GUI it adds additional prefix service-function-type
for the SF type and that causes sfc_agent crash while parsing the create SF REST message.
Here are steps to reproduce the bug.
0. Build and Install boron sfc ODL controller.
git clone https://git.opendaylight.org/gerrit/p/sfc.git --branch stable/boron
1. Connect to SFC GUI, http://<odl-ip>:8181/index.html
2. build sfc package from sfc-py folder and install it on your SF node
3. Run sfc_agent on SF as 'sudo python3.4 sfc/sfc_agent.py --rest --odl-ip-port odl-controller-ip>:8181 &
4. Connect to SFC GUI, Click on Service Functions , then click on Add Service function , use default template and save SF.
5. Fetch the service function created using RESTConf
(http://<odl-controller-ip>:8181/apidoc/explorer/index.html#!/service-function(2014-07-01)/GET_service_functions_get_1)
6. You would see output something like below
{
"name": "firewall-1",
"sf-data-plane-locator": [
],
"nsh-aware": true,
"rest-uri": "http://172.16.9.43:5000",
"ip-mgmt-address": "172.16.9.43",
"type": "service-function-type:firewall"
}
5. The type is getting set as
"type": "service-function-type:firewall"
Hence when ODL sends create SF REST message to SF, SF type gets sent as
{"type": "service-function-type:service-function-type:firewall"}whereas sfc_agent is expecting it to be
{"type": "service-function-type:firewall"}