Merge "Deprecate warning for infra_driver and mgmt_driver at server"
This commit is contained in:
commit
86717c8556
@ -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