VNFD Legacy templates deprecated
Throws a deprecation warning while using legacy templates for VNF creation. Change-Id: Ie68389e4abd0c7293ec48ed2a380fb7956d8c599 Partial-Bug: #1582928
This commit is contained in:
parent
de6cc86ae0
commit
4a669a1261
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
deprecations:
|
||||
- Support for legacy templates for creating a VNFD is deprecated and will be
|
||||
removed in 'Newton' cycle. Please use TOSCA based templates.
|
|
@ -0,0 +1,6 @@
|
|||
Legacy Template Deprecate Warning
|
||||
=================================
|
||||
|
||||
From Mitaka version, Tacker supports TOSCA based VNFD templates. Legacy
|
||||
templates described under tacker/samples/legacy-templates are deprecated. Use
|
||||
TOSCA based templates described at tacker/samples/tosca-templates
|
|
@ -21,6 +21,7 @@ import six
|
|||
import eventlet
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
from oslo_log import versionutils
|
||||
from oslo_utils import excutils
|
||||
|
||||
from tacker.api.v1 import attributes
|
||||
|
@ -128,6 +129,11 @@ class VNFMPlugin(vm_db.VNFMPluginDb, VNFMMgmtMixin):
|
|||
|
||||
def create_device_template(self, context, device_template):
|
||||
template = device_template['device_template']
|
||||
if "tosca_definitions_version" not in template['attributes']['vnfd']:
|
||||
versionutils.report_deprecated_feature(LOG, 'VNFD legacy templates'
|
||||
' are deprecated since Mitaka release and will be removed in'
|
||||
' Ocata release. Please use NFV TOSCA templates.')
|
||||
|
||||
LOG.debug(_('template %s'), template)
|
||||
|
||||
infra_driver = template.get('infra_driver')
|
||||
|
|
Loading…
Reference in New Issue