Class: Fog::Google::SQL::Operation
- Inherits:
-
Model
- Object
- Model
- Fog::Google::SQL::Operation
- Defined in:
- lib/fog/google/models/sql/operation.rb
Overview
An Operation resource contains information about database instance operations such as create, delete, and restart
Constant Summary collapse
- DONE_STATE =
'DONE'
- PENDING_STATE =
'PENDING'
- RUNNING_STATE =
'RUNNING'
- UNKNOWN_STATE =
'UNKNOWN'
Instance Method Summary collapse
-
#pending? ⇒ Boolean
Checks if the instance operation is pending.
-
#ready? ⇒ Boolean
Checks if the instance operation is done.
-
#reload ⇒ Fog::Google::SQL::Operation
Reloads an instance operation.
Instance Method Details
#pending? ⇒ Boolean
Checks if the instance operation is pending
35 36 37 |
# File 'lib/fog/google/models/sql/operation.rb', line 35 def pending? self.state == PENDING_STATE end |
#ready? ⇒ Boolean
Checks if the instance operation is done
43 44 45 |
# File 'lib/fog/google/models/sql/operation.rb', line 43 def ready? self.state == DONE_STATE end |
#reload ⇒ Fog::Google::SQL::Operation
Reloads an instance operation
51 52 53 54 55 56 57 |
# File 'lib/fog/google/models/sql/operation.rb', line 51 def reload requires :identity data = collection.get(self.instance, self.identity) merge_attributes(data.attributes) self end |