From 5a9490e56759e80761f5aa0cf8d7ffcf9fd80ab2 Mon Sep 17 00:00:00 2001 From: Janki Chhatbar Date: Mon, 27 Jun 2016 22:57:52 +0530 Subject: [PATCH] VNFD legacy template deprecation warning Throws VNFD legacy template deprecation warning in favor of using TOSCA templates. This is client-side patch. Partial-Bug: #1582928 Change-Id: Ia8bed682c1724a7d0e4e6330fc99c6ff49f71388 --- tackerclient/v1_0/client.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tackerclient/v1_0/client.py b/tackerclient/v1_0/client.py index 8304ad97..d68416e6 100644 --- a/tackerclient/v1_0/client.py +++ b/tackerclient/v1_0/client.py @@ -378,6 +378,10 @@ class Client(ClientBase): @APIParamsCall def create_vnfd(self, body=None): if body is not None: + if ("tosca_definitions_version" not in + body[self._VNFD]['attributes']['vnfd']): + _logger.warning("VNFD legacy templates are deprecated. Please " + "use NFV TOSCA templates.") body[self._VNFD]['service_types'] = [{'service_type': 'vnfd'}] body[self._VNFD]['infra_driver'] = 'heat' body[self._VNFD]['mgmt_driver'] = 'noop'