def update_dhcp_opts(self, task, options, vifs=None):
    "Send or update the DHCP BOOT options for this node.\n\n        :param task: A TaskManager instance.\n        :param options: this will be a list of dicts, e.g.\n\n                          ::\n\n                           [{'opt_name': 'bootfile-name',\n                             'opt_value': 'pxelinux.0'},\n                            {'opt_name': 'server-ip-address',\n                             'opt_value': '123.123.123.456'},\n                            {'opt_name': 'tftp-server',\n                             'opt_value': '0.0.0.0'}]\n        :param vifs: a dict of Neutron port dicts to update DHCP options on.\n            The keys should be Ironic port UUIDs, and the values should be\n            Neutron port UUIDs\n            If the value is None, will get the list of ports from the Ironic\n            port objects.\n        "
    if (vifs is None):
        vifs = network.get_node_vif_ids(task)
    if (not vifs):
        raise exception.FailedToUpdateDHCPOptOnPort((_('No VIFs found for node %(node)s when attempting to update DHCP BOOT options.') % {'node': task.node.uuid}))
    failures = []
    for (port_id, port_vif) in vifs.items():
        try:
            self.update_port_dhcp_opts(port_vif, options, token=task.context.auth_token)
        except exception.FailedToUpdateDHCPOptOnPort:
            failures.append(port_id)
    if failures:
        if (len(failures) == len(vifs)):
            raise exception.FailedToUpdateDHCPOptOnPort((_('Failed to set DHCP BOOT options for any port on node %s.') % task.node.uuid))
        else:
            LOG.warning(_LW('Some errors were encountered when updating the DHCP BOOT options for node %(node)s on the following ports: %(ports)s.'), {'node': task.node.uuid, 'ports': failures})
    if isinstance(task.driver.power, ssh.SSHPower):
        LOG.debug('Waiting 15 seconds for Neutron.')
        time.sleep(15)
Send or update the DHCP BOOT options for this node.

:param task: A TaskManager instance.
:param options: this will be a list of dicts, e.g.

                  ::

                   [{'opt_name': 'bootfile-name',
                     'opt_value': 'pxelinux.0'},
                    {'opt_name': 'server-ip-address',
                     'opt_value': '123.123.123.456'},
                    {'opt_name': 'tftp-server',
                     'opt_value': '0.0.0.0'}]
:param vifs: a dict of Neutron port dicts to update DHCP options on.
    The keys should be Ironic port UUIDs, and the values should be
    Neutron port UUIDs
    If the value is None, will get the list of ports from the Ironic
    port objects.
def update_dhcp_opts(self, task, options, vifs=None):
    "Send or update the DHCP BOOT options for this node.\n\n        :param task: A TaskManager instance.\n        :param options: this will be a list of dicts, e.g.\n\n                          ::\n\n                           [{'opt_name': 'bootfile-name',\n                             'opt_value': 'pxelinux.0'},\n                            {'opt_name': 'server-ip-address',\n                             'opt_value': '123.123.123.456'},\n                            {'opt_name': 'tftp-server',\n                             'opt_value': '0.0.0.0'}]\n        :param vifs: a dict of Neutron port dicts to update DHCP options on.\n            The keys should be Ironic port UUIDs, and the values should be\n            Neutron port UUIDs\n            If the value is None, will get the list of ports from the Ironic\n            port objects.\n        "
    if (vifs is None):
        vifs = network.get_node_vif_ids(task)
    if (not vifs):
        raise exception.FailedToUpdateDHCPOptOnPort((_('No VIFs found for node %(node)s when attempting to update DHCP BOOT options.') % {'node': task.node.uuid}))
    failures = []
    for (port_id, port_vif) in vifs.items():
        try:
            self.update_port_dhcp_opts(port_vif, options, token=task.context.auth_token)
        except exception.FailedToUpdateDHCPOptOnPort:
            failures.append(port_id)
    if failures:
        if (len(failures) == len(vifs)):
            raise exception.FailedToUpdateDHCPOptOnPort((_('Failed to set DHCP BOOT options for any port on node %s.') % task.node.uuid))
        else:
            LOG.warning(_LW('Some errors were encountered when updating the DHCP BOOT options for node %(node)s on the following ports: %(ports)s.'), {'node': task.node.uuid, 'ports': failures})
    if isinstance(task.driver.power, ssh.SSHPower):
        LOG.debug('Waiting 15 seconds for Neutron.')
        time.sleep(15)