Class: Fog::Compute::Google::Operation

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/google/models/compute/operation.rb

Constant Summary collapse

PENDING_STATE =
"PENDING"
RUNNING_STATE =
"RUNNING"
DONE_STATE =
"DONE"

Instance Method Summary collapse

Instance Method Details

#pending?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/fog/google/models/compute/operation.rb', line 22

def pending?
  self.status == PENDING_STATE
end

#ready?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/fog/google/models/compute/operation.rb', line 18

def ready?
  self.status == DONE_STATE
end

#reloadObject



26
27
28
29
30
31
32
33
# File 'lib/fog/google/models/compute/operation.rb', line 26

def reload
  requires :identity

  data = collection.get(identity, zone)
  new_attributes = data.attributes
  merge_attributes(new_attributes)
  self
end