Method: Fog::Compute::IBM::Mock#deleteable?
- Defined in:
- lib/fog/ibm/requests/compute/delete_instance.rb
permalink #deleteable?(instance_id) ⇒ Boolean
we can’t delete the instance if it doesn’t exist, or is in an invalid state.
42 43 44 45 46 47 |
# File 'lib/fog/ibm/requests/compute/delete_instance.rb', line 42 def deleteable?(instance_id) return false unless instance_exists? instance_id instance = self.data[:instances][instance_id] return false if [0, 1, 7, 14, 15].include?(instance["status"].to_i) true end |