Skip to content

Commit

Permalink
Merge pull request #462 from jaywcarman/fix_powervs_provision_with_ne…
Browse files Browse the repository at this point in the history
…w_volumes

PowerVS: Attach newly created volumes during VM provision
(cherry picked from commit e9a033a)
  • Loading branch information
agrare authored and Fryguy committed Jul 5, 2023
1 parent 38aef1e commit 8cae6d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def prepare_for_clone

attached_volumes = options[:cloud_volumes] || []
attached_volumes.concat(phase_context[:new_volumes]).compact!
specs['volume_ids'] = attached_volumes unless attached_volumes.empty?
specs['volume_ids'] = attached_volumes.uniq unless attached_volumes.empty?

attached_networks = case get_option(:vlan)
when 'None'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ def prepare_volumes_and_networks
if new_volumes.any?
source.with_provider_connection(:service => "PCloudVolumesApi") do |api|
new_volumes.each do |new_volume|
api.pcloud_cloudinstances_volumes_post(
new_volume = api.pcloud_cloudinstances_volumes_post(
cloud_instance_id, IbmCloudPower::CreateDataVolume.new(new_volume)
)
phase_context[:new_volumes] << new_volume.volume_id
end
end
end
Expand Down

0 comments on commit 8cae6d3

Please sign in to comment.