mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
commit
6bdd11e313
1 changed files with 4 additions and 1 deletions
|
@ -8,10 +8,11 @@ module Fog
|
|||
class Host < Fog::Model
|
||||
|
||||
attribute :host_name
|
||||
attribute :service
|
||||
attribute :service_name
|
||||
attribute :details
|
||||
|
||||
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
|
||||
|
@ -19,6 +20,8 @@ module Fog
|
|||
|
||||
def details
|
||||
service.get_host_details(self.host_name).body['host']
|
||||
rescue Fog::Compute::OpenStack::NotFound
|
||||
nil
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue