From 3a0cf64f12718247c8764903d5c8031cc7300416 Mon Sep 17 00:00:00 2001 From: yangyan Date: Wed, 2 May 2018 18:02:53 +0800 Subject: Fix Backward incompatible change in granting API Issue-ID: VFC-681 Change-Id: Ic0fb638bae7523c630a8d78a1c4890ebe8b4fdbb Signed-off-by: yangyan --- lcm/ns/vnfs/serializers.py | 4 ++-- lcm/ns/vnfs/views.py | 4 ++-- lcm/pub/msapi/resmgr.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lcm/ns/vnfs/serializers.py b/lcm/ns/vnfs/serializers.py index 7a74b167..b4fd1b9b 100644 --- a/lcm/ns/vnfs/serializers.py +++ b/lcm/ns/vnfs/serializers.py @@ -71,8 +71,8 @@ class AccessinfoSerializer(serializers.Serializer): class VimSerializer(serializers.Serializer): - vimid = serializers.CharField(help_text="ID of VIM", required=True) - accessinfo = AccessinfoSerializer(help_text="Access Info", required=True) + vimId = serializers.CharField(help_text="ID of VIM", required=True) + accessInfo = AccessinfoSerializer(help_text="Access Info", required=True) class GrantVnfRespSerializer(serializers.Serializer): diff --git a/lcm/ns/vnfs/views.py b/lcm/ns/vnfs/views.py index 75d2b500..3bb152b4 100644 --- a/lcm/ns/vnfs/views.py +++ b/lcm/ns/vnfs/views.py @@ -161,8 +161,8 @@ class NfGrant(APIView): """ rsp = { "vim": { - "vimid": ignore_case_get(ignore_case_get(request.data, 'additionalparam'), 'vimid'), - "accessinfo": { + "vimId": ignore_case_get(ignore_case_get(request.data, 'additionalparam'), 'vimid'), + "accessInfo": { "tenant": "admin" } } diff --git a/lcm/pub/msapi/resmgr.py b/lcm/pub/msapi/resmgr.py index 3e3e5873..8b0d56fb 100644 --- a/lcm/pub/msapi/resmgr.py +++ b/lcm/pub/msapi/resmgr.py @@ -62,8 +62,8 @@ def grant_vnf(req_param): vim_id = vim["vimId"] grant_rsp = { "vim": { - "vimid": vim_id, - "accessinfo": { + "vimId": vim_id, + "accessInfo": { "tenant": vim["tenant"] } } -- cgit 1.2.3-korg