Skip to content

Commit

Permalink
Support Cinder's volume-extend action
Browse files Browse the repository at this point in the history
  • Loading branch information
mansam committed Mar 15, 2019
1 parent dae6f78 commit c2bc078
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ def raw_update_volume(options)
:subject => self,
}) do
with_provider_object do |volume|
size = options.delete(:size)
volume.attributes.merge!(options)
volume.save
volume.extend(size) if size.to_i != volume.size.to_i
end
end
rescue => e
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class ManageIQ::Providers::Openstack::StorageManager::CinderManager < ManageIQ::
include ManageIQ::Providers::Openstack::ManagerMixin

supports :cinder_volume_types
supports :volume_resizing

# Auth and endpoints delegations, editing of this type of manager must be disabled
delegate :authentication_check,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
context "#update_volume" do
it 'updates the volume' do
expect(the_raw_volume).to receive(:save)
expect(the_raw_volume).to receive(:size)
cloud_volume.update_volume({})
end

Expand Down

0 comments on commit c2bc078

Please sign in to comment.