Deprecate warning for infra_driver and mgmt_driver at server
Deprecation warning deriving infra and mgmt driver from VNFD create API is added. Change-Id: Ieb2ff2a21fa6387ea38734ae65b0bddddd35f2a7 Partial-bug: #1618724
This commit is contained in:
parent
c352162639
commit
99f58e4f5f
@ -0,0 +1,4 @@
|
||||
---
|
||||
deprecations:
|
||||
- Deriving infra_driver and mgmt_drvier from VNFD API is deprecated and will
|
||||
be removed in Ocata.
|
@ -17,6 +17,7 @@
|
||||
import uuid
|
||||
|
||||
from oslo_log import log as logging
|
||||
from oslo_log import versionutils
|
||||
from oslo_utils import timeutils
|
||||
|
||||
import sqlalchemy as sa
|
||||
@ -229,6 +230,13 @@ class VNFMPluginDb(vnfm.VNFMPluginBase, db_base.CommonDbMixin):
|
||||
mgmt_driver = vnfd.get('mgmt_driver')
|
||||
service_types = vnfd.get('service_types')
|
||||
|
||||
if 'infra_driver' in vnfd or 'mgmt_driver' in vnfd:
|
||||
versionutils.report_deprecated_feature(LOG, "Deriving "
|
||||
"infra_driver and mgmt_driver from VNFD API is deprecated and"
|
||||
" will be removed in Ocata. infra_driver will be automatically"
|
||||
" derived from target vim type. mgmt_driver will be derived "
|
||||
"from TOSCA template values.")
|
||||
|
||||
if (not attributes.is_attr_set(infra_driver)):
|
||||
LOG.debug(_('hosting vnf driver unspecified'))
|
||||
raise vnfm.InfraDriverNotSpecified()
|
||||
|
Loading…
Reference in New Issue
Block a user