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
This commit is contained in:
Janki Chhatbar 2016-06-27 22:57:52 +05:30 committed by Janki Chhatbar
parent 885b53b6d0
commit 5a9490e567

@ -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'