[Multitenancy] Add logic to work with network providers
This patch adds logic to work with network providers to fuel_* ironic drivers. Depends-On: I742a52c991058d1f8bd9170f9b583c28dff22839 Change-Id: Ic3f831a9a9e5ec9031bf1a588df62c9338c47d20 Related-Bug: #1588380
This commit is contained in:
parent
6288a593e2
commit
0d058150ad
|
@ -432,6 +432,7 @@ class FuelAgentDeploy(base.DeployInterface):
|
|||
:returns: status of the deploy. One of ironic.common.states.
|
||||
"""
|
||||
manager_utils.node_power_action(task, states.POWER_OFF)
|
||||
task.driver.network.unconfigure_tenant_networks(task)
|
||||
return states.DELETED
|
||||
|
||||
def prepare(self, task):
|
||||
|
@ -440,6 +441,12 @@ class FuelAgentDeploy(base.DeployInterface):
|
|||
:param task: a TaskManager instance.
|
||||
"""
|
||||
node = task.node
|
||||
if node.provision_state == states.DEPLOYING:
|
||||
# Adding the node to provisioning network so that the dhcp
|
||||
# options get added for the provisioning port.
|
||||
manager_utils.node_power_action(task, states.POWER_OFF)
|
||||
task.driver.network.add_provisioning_network(task)
|
||||
|
||||
_prepare_pxe_boot(task)
|
||||
|
||||
node.instance_info = build_instance_info_for_deploy(task)
|
||||
|
@ -538,7 +545,11 @@ class FuelAgentVendor(base.VendorInterface):
|
|||
LOG.info(_LI('Fuel Agent pass on node %s'), node.uuid)
|
||||
manager_utils.node_set_boot_device(task, boot_devices.DISK,
|
||||
persistent=True)
|
||||
manager_utils.node_power_action(task, states.REBOOT)
|
||||
|
||||
manager_utils.node_power_action(task, states.POWER_OFF)
|
||||
task.driver.network.remove_provisioning_network(task)
|
||||
task.driver.network.configure_tenant_networks(task)
|
||||
manager_utils.node_power_action(task, states.POWER_ON)
|
||||
except Exception as e:
|
||||
msg = (_('Deploy failed for node %(node)s. Error: %(error)s') %
|
||||
{'node': node.uuid, 'error': e})
|
||||
|
|
Loading…
Reference in New Issue