Creating VNFD in Dashboard doesn't work

When creating a VNFD in the Dashboard,
it shows an error message like below.

Error msg: unable to create tosca.
expecting dict type for api attribute instead of <type 'unicode'>

Co-Authored-By: Jangwon Lee <jangwon.lee@dcn.ssu.ac.kr>

Change-Id: I093df26bbf2a6d4e04f878dc800fe9dfc37cde3f
Related-Bug: #1823835
This commit is contained in:
hyunsikYang 2019-04-09 15:07:00 +09:00
parent 88cc477b7a
commit d27287d4aa

View File

@ -14,6 +14,7 @@
from django.forms import ValidationError
from django.utils.translation import ugettext_lazy as _
import yaml
from horizon import exceptions
from horizon import forms
@ -89,7 +90,7 @@ class OnBoardVNF(forms.SelfHandlingForm):
def handle(self, request, data):
try:
toscal = data['tosca']
toscal = yaml.load(data['tosca'], Loader=yaml.SafeLoader)
vnfd_name = data['name']
vnfd_description = data['description']
tosca_arg = {'vnfd': {'name': vnfd_name,