2012-04-26 06:14:53 -04:00
|
|
|
require 'fog/compute/models/server'
|
|
|
|
require 'fog/openstack/models/compute/metadata'
|
|
|
|
|
|
|
|
module Fog
|
|
|
|
module Compute
|
|
|
|
class OpenStack
|
|
|
|
|
|
|
|
class Host < Fog::Model
|
|
|
|
|
|
|
|
attribute :host_name
|
|
|
|
attribute :service
|
|
|
|
attribute :details
|
|
|
|
|
|
|
|
def initialize(attributes)
|
2012-12-19 17:28:04 -05:00
|
|
|
# Old 'connection' is renamed as service and should be used instead
|
|
|
|
prepare_service_value(attributes)
|
2012-04-26 06:14:53 -04:00
|
|
|
super
|
|
|
|
end
|
|
|
|
|
|
|
|
def details
|
2012-12-22 18:24:36 -05:00
|
|
|
service.get_host_details(self.host_name).body['host']
|
2012-04-26 06:14:53 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|