Class: VCloudCloud::Steps::Reboot

Inherits:
VCloudCloud::Step show all
Defined in:
lib/cloud/vcloud/steps/reboot.rb

Instance Attribute Summary

Attributes inherited from VCloudCloud::Step

#client, #state

Instance Method Summary collapse

Methods inherited from VCloudCloud::Step

#cleanup, #initialize, #rollback

Constructor Details

This class inherits a constructor from VCloudCloud::Step

Instance Method Details

#perform(ref, &block) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/cloud/vcloud/steps/reboot.rb', line 4

def perform(ref, &block)
  entity = client.reload state[ref]
  reboot_link = entity.reboot_link
  raise "#{entity.name} unable to reboot" unless reboot_link
  client.invoke_and_wait :post, reboot_link
  state[ref] = client.reload entity
end