-
Bug
-
Resolution: Done
-
Low
-
Casablanca Release
Incompatibility between swagger API and source code.
In lcm/lcm/swagger/vfc.vnfdriver.swagger.json, the post request to
"/nslcm/v1/ns/
/vnfs/
{vnfInstanceId}/Notify" expects
1. vnfmid
2. vnfInstanceId and
3. VNFLCMNotification
the VNFLCMNotification structure has the following attributes :
1. status
2. vnfInstanceId
3. operation
4. jobId
5. affectedVnfc
6. affectedCp
7. affectedVl
8. affectedVirtualStorage
But when we look at the source code,
In lcm/lcm/ns/vnfs/urls.py
url(r'^api/nslcm/v1/ns/(?P<vnfmid>[0-9a-zA-Z_-])/vnfs/(?P<vnfInstanceId>[0-9a-zA-Z_-])/Notify$', LcmNotify.as_view()),
In lcm/lcm/ns/vnfs/views.py,
class LcmNotify(APIView):
...
def post(self, request, vnfmid, vnfInstanceId):
...
NotifyLcm(vnfmid, vnfInstanceId, request.data).do_biz()
In lcm/lcm/ns/vnfs/notify_lcm.py,
class NotifyLcm(object):
def _init_(self, vnfmid, vnfInstanceId, data):
...
- self.vnfdmodule = ignore_case_get(data, 'vnfdmodule')*
Here, the vnfdmodule parameter is not a part of the VNFLCMNotification structure but it is expected. Though it doesnt throw any error, it is making the code incompatible with the swagger api.
Also, ZTE alone is currently filling up this parameter while sending a POST request call.
It would be good to update the swagger API with the vnfdmodule parameter as well.