Class: Fog::Compute::OpenStack::Service
- Inherits:
-
Model
- Object
- Model
- Fog::Compute::OpenStack::Service
- Defined in:
- lib/fog/openstack/models/compute/service.rb
Instance Method Summary collapse
- #destroy ⇒ Object
- #disable ⇒ Object
- #disable_and_log_reason ⇒ Object
- #enable ⇒ Object
-
#initialize(attributes) ⇒ Service
constructor
A new instance of Service.
Constructor Details
#initialize(attributes) ⇒ Service
Returns a new instance of Service.
19 20 21 22 23 |
# File 'lib/fog/openstack/models/compute/service.rb', line 19 def initialize(attributes) # Old 'connection' is renamed as service and should be used instead prepare_service_value(attributes) super end |
Instance Method Details
#destroy ⇒ Object
40 41 42 43 44 |
# File 'lib/fog/openstack/models/compute/service.rb', line 40 def destroy requires :id service.delete_service(self.id) true end |
#disable ⇒ Object
30 31 32 33 |
# File 'lib/fog/openstack/models/compute/service.rb', line 30 def disable requires :binary, :host service.disable_service(self.host, self.binary) end |
#disable_and_log_reason ⇒ Object
35 36 37 38 |
# File 'lib/fog/openstack/models/compute/service.rb', line 35 def disable_and_log_reason requires :binary, :host, :disabled_reason service.disable_service_log_reason(self.host, self.binary, self.disabled_reason) end |
#enable ⇒ Object
25 26 27 28 |
# File 'lib/fog/openstack/models/compute/service.rb', line 25 def enable requires :binary, :host service.enable_service(self.host, self.binary) end |