Merge "VNFD legacy template deprecation warning"

This commit is contained in:
Jenkins 2016-08-04 22:28:43 +00:00 committed by Gerrit Code Review
commit eebea81587

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