Class: Fog::OracleCloud::Database::Instance
- Inherits:
-
Model
- Object
- Model
- Fog::OracleCloud::Database::Instance
- Defined in:
- lib/fog/oraclecloud/models/database/instance.rb
Instance Method Summary collapse
- #clean_name ⇒ Object
- #destroy ⇒ Object
- #ip_address ⇒ Object
- #ready? ⇒ Boolean
- #save ⇒ Object
- #stopped? ⇒ Boolean
- #stopping? ⇒ Boolean
Instance Method Details
#clean_name ⇒ Object
47 48 49 |
# File 'lib/fog/oraclecloud/models/database/instance.rb', line 47 def clean_name name.sub %r{\/.*\/}, '' end |
#destroy ⇒ Object
73 74 75 76 |
# File 'lib/fog/oraclecloud/models/database/instance.rb', line 73 def destroy requires :service_name service.delete_instance(service_name).body end |
#ip_address ⇒ Object
68 69 70 71 |
# File 'lib/fog/oraclecloud/models/database/instance.rb', line 68 def ip_address # TODO: Replace with regex content_url.sub('http://', '') end |
#ready? ⇒ Boolean
56 57 58 |
# File 'lib/fog/oraclecloud/models/database/instance.rb', line 56 def ready? status == "Running" end |
#save ⇒ Object
51 52 53 54 |
# File 'lib/fog/oraclecloud/models/database/instance.rb', line 51 def save #identity ? update : create create end |
#stopped? ⇒ Boolean
64 65 66 |
# File 'lib/fog/oraclecloud/models/database/instance.rb', line 64 def stopped? status == 'Stopped' end |
#stopping? ⇒ Boolean
60 61 62 |
# File 'lib/fog/oraclecloud/models/database/instance.rb', line 60 def stopping? status == 'Maintenance' || status == 'Terminating' end |