Class: Fog::Compute::HuaweiCloud::Host
- Inherits:
-
HuaweiCloud::Model
- Object
- Model
- HuaweiCloud::Model
- Fog::Compute::HuaweiCloud::Host
- Defined in:
- lib/fog/compute/huaweicloud/models/host.rb
Instance Attribute Summary
Attributes inherited from HuaweiCloud::Model
Instance Method Summary collapse
- #details ⇒ Object
-
#initialize(attributes) ⇒ Host
constructor
A new instance of Host.
Methods inherited from HuaweiCloud::Model
#create, #destroy, #save, #update
Constructor Details
#initialize(attributes) ⇒ Host
Returns a new instance of Host.
13 14 15 16 17 18 |
# File 'lib/fog/compute/huaweicloud/models/host.rb', line 13 def initialize(attributes) attributes["service_name"] = attributes.delete "service" # Old 'connection' is renamed as service and should be used instead prepare_service_value(attributes) super end |
Instance Method Details
#details ⇒ Object
20 21 22 23 24 |
# File 'lib/fog/compute/huaweicloud/models/host.rb', line 20 def details service.get_host_details(host_name).body['host'] rescue Fog::Compute::HuaweiCloud::NotFound nil end |