diff options
author | Sam Betts <sam@code-smash.net> | 2016-11-30 18:43:35 +0000 |
---|---|---|
committer | Vladyslav Drok <vdrok@mirantis.com> | 2017-01-11 15:08:26 +0200 |
commit | 4789d3b41ad045f201351ea40097dfd895bfc8a9 (patch) | |
tree | 98398d8f36ea671a472af37faa9d622655d6e872 /ironic/common/utils.py | |
parent | d18ebbc3e20b38eaecf681e698690101b0bd516d (diff) | |
download | ironic-4789d3b41ad045f201351ea40097dfd895bfc8a9.tar.gz |
Add Virtual Network Interface REST APIs
This patch adds the REST APIs for the virtual network interface API in
order to abstract the task of assigning logical network interfaces to
physical network interfaces.
Since Newton Ironic provides an interface for pluggable network
implementations. Different network implementations may want to handle
how logical to physical network interface assignment happens. To do this
the new API calls into new functions on the network implementation
loaded for the specified node.
This is part 3 of 3, and adds the node vif subcontroller to expose the
/nodes/<ident>/vifs REST API endpoint. API version is bumped to 1.28.
Co-Authored-By: Vasyl Saienko (vsaienko@mirantis.com)
Change-Id: I70f1166a15a26f392734e21d6bc30a03da4e5486
Partial-Bug: #1582188
Diffstat (limited to 'ironic/common/utils.py')
-rw-r--r-- | ironic/common/utils.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ironic/common/utils.py b/ironic/common/utils.py index cbd9b1ae0..8b221cc56 100644 --- a/ironic/common/utils.py +++ b/ironic/common/utils.py @@ -42,6 +42,8 @@ from ironic.conf import CONF LOG = logging.getLogger(__name__) +warn_deprecated_extra_vif_port_id = False + def _get_root_helper(): # NOTE(jlvillal): This function has been moved to ironic-lib. And is @@ -536,3 +538,13 @@ def render_template(template, params, is_file=True): env = jinja2.Environment(loader=loader) tmpl = env.get_template(tmpl_name) return tmpl.render(params) + + +def warn_about_deprecated_extra_vif_port_id(): + global warn_deprecated_extra_vif_port_id + if not warn_deprecated_extra_vif_port_id: + warn_deprecated_extra_vif_port_id = True + LOG.warning(_LW("Attaching VIF to a port via " + "extra['vif_port_id'] is deprecated and will not " + "be supported in Pike release. API endpoint " + "v1/nodes/<node>/vifs should be used instead.")) |