From 2999499d35924b0ae589cd36e3f4d8947b76814e Mon Sep 17 00:00:00 2001 From: fujinhua Date: Tue, 27 Feb 2018 15:55:39 +0800 Subject: [PATCH] Add Create a VNF instance api req serializer Change-Id: I9e4f45e942e2c47d200fa0d7f8fbe4f79297a422 Issue-ID: VFC-779 Signed-off-by: fujinhua --- lcm/v2/serializers.py | 8 ++++++++ lcm/v2/urls.py | 2 +- lcm/v2/views.py | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lcm/v2/serializers.py b/lcm/v2/serializers.py index 342c2a8c..d4c590c1 100644 --- a/lcm/v2/serializers.py +++ b/lcm/v2/serializers.py @@ -11,3 +11,11 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + +from rest_framework import serializers + + +class CreateVnfRequestSerializer(serializers.Serializer): + vnfdId = serializers.CharField(help_text="Identifier that identifies the VNFD which defines the VNF instance to be created", required=True) + vnfInstanceName = serializers.CharField(help_text="Human-readable name of the VNF instance to be created", required=False, allow_null=True, allow_blank=True) + vnfInstanceDescription = serializers.CharField(help_text="Human-readable description of the VNF instance to be created", required=False, allow_null=True, allow_blank=True) diff --git a/lcm/v2/urls.py b/lcm/v2/urls.py index b901e880..275ae941 100644 --- a/lcm/v2/urls.py +++ b/lcm/v2/urls.py @@ -1,4 +1,4 @@ -# Copyright 2016 ZTE Corporation. +# Copyright 2018 ZTE Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lcm/v2/views.py b/lcm/v2/views.py index d142176f..c077ccaa 100644 --- a/lcm/v2/views.py +++ b/lcm/v2/views.py @@ -1,4 +1,4 @@ -# Copyright 2016 ZTE Corporation. +# Copyright 2018 ZTE Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -- 2.16.6