diff options
author | Anshul Jain <theanshuljain@gmail.com> | 2018-03-23 02:11:32 -0500 |
---|---|---|
committer | paresh-sao <paresh.sao@hpe.com> | 2019-01-03 09:03:36 +0000 |
commit | 58a395bf8318ae390957684c5dee30578f4137e3 (patch) | |
tree | 3bd69b1ba3ca3b90825f9b5fd7f03e84a68089d7 /ironic/drivers/modules/agent.py | |
parent | 565cd192fc108bca6fc8394012249aa004743310 (diff) | |
download | ironic-58a395bf8318ae390957684c5dee30578f4137e3.tar.gz |
OOB RAID implementation for ilo5 based HPE Proliant servers.
This commit adds functionality to perform out-of-band RAID operations
for ilo5 based HPE Proliant servers. Using this a user can perform
create and delete the RAID configuration from the server.
Co-Authored-By: Paresh Sao <paresh.sao@hpe.com>
Change-Id: Iad0c609e59dca56729967133c6bbcff73b50a51e
Story: 2003349
Task: 24391
Diffstat (limited to 'ironic/drivers/modules/agent.py')
-rw-r--r-- | ironic/drivers/modules/agent.py | 30 |
1 files changed, 4 insertions, 26 deletions
diff --git a/ironic/drivers/modules/agent.py b/ironic/drivers/modules/agent.py index 020ebbc1f..c9344ab15 100644 --- a/ironic/drivers/modules/agent.py +++ b/ironic/drivers/modules/agent.py @@ -698,32 +698,10 @@ class AgentRAID(base.RAIDInterface): 'create_nonroot_volumes': create_nonroot_volumes, 'target_raid_config': node.target_raid_config}) - if not node.target_raid_config: - raise exception.MissingParameterValue( - _("Node %s has no target RAID configuration.") % node.uuid) - - target_raid_config = node.target_raid_config.copy() - - error_msg_list = [] - if not create_root_volume: - target_raid_config['logical_disks'] = [ - x for x in target_raid_config['logical_disks'] - if not x.get('is_root_volume')] - error_msg_list.append(_("skipping root volume")) - - if not create_nonroot_volumes: - error_msg_list.append(_("skipping non-root volumes")) - - target_raid_config['logical_disks'] = [ - x for x in target_raid_config['logical_disks'] - if x.get('is_root_volume')] - - if not target_raid_config['logical_disks']: - error_msg = _(' and ').join(error_msg_list) - raise exception.MissingParameterValue( - _("Node %(node)s has empty target RAID configuration " - "after %(msg)s.") % {'node': node.uuid, 'msg': error_msg}) - + target_raid_config = raid.filter_target_raid_config( + node, + create_root_volume=create_root_volume, + create_nonroot_volumes=create_nonroot_volumes) # Rewrite it back to the node object, but no need to save it as # we need to just send this to the agent ramdisk. node.driver_internal_info['target_raid_config'] = target_raid_config |