Class: VCloudCloud::Steps::DiscardSuspendedState
- Inherits:
-
VCloudCloud::Step
- Object
- VCloudCloud::Step
- VCloudCloud::Steps::DiscardSuspendedState
- Defined in:
- lib/cloud/vcloud/steps/discard_suspended_state.rb
Instance Attribute Summary
Attributes inherited from VCloudCloud::Step
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 11 12 |
# File 'lib/cloud/vcloud/steps/discard_suspended_state.rb', line 4 def perform(ref, &block) entity = client.reload state[ref] if entity['status'] != VCloudSdk::Xml::RESOURCE_ENTITY_STATUS[:SUSPENDED].to_s @logger.debug "#{entity.name} not suspended" return end client.invoke_and_wait :post, entity.discard_state state[ref] = client.reload entity end |