Files
ironic/ironic/dhcp/none.py
T
Vasyl Saienko 06e8930727 Remove deprecated DHCP provider methods
This patch removes the deprecated DHCP provider method
``update_port_address``. For users who created their own network
interfaces or DHCP providers the logic should be moved to a custom
network interface's ``port_changed`` and ``portgroup_changed``
methods. The following methods should be implemented by custom
network interfaces:

    * ``vif_list``: List attached VIF IDs for a node.
    * ``vif_attach``: Attach a virtual network interface to a node.
    * ``vif_detach``: Detach a virtual network interface from a node.
    * ``port_changed``: Handle any actions required when a port
       changes.
    * ``portgroup_changed``: Handle any actions required when a
      port group changes.
    * ``get_current_vif``: Return VIF ID attached to port or port group
      object.removes deprecated by [0] DHCP provider update_port_address().

[0] 9088891ce7

Change-Id: I887f31937c576ff8933e7c1454e0b2cb0962e340
2017-04-13 17:35:53 +03:00

30 lines
936 B
Python

# Copyright 2014 Rackspace, Inc.
# All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from ironic.dhcp import base
class NoneDHCPApi(base.BaseDHCP):
"""No-op DHCP API."""
def update_port_dhcp_opts(self, port_id, dhcp_options, token=None):
pass
def update_dhcp_opts(self, task, options, vifs=None):
pass
def get_ip_addresses(self, task):
return []