mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Merge pull request #1552 from smgt/glesys-server-attribute-fix
[glesys] Attributes were overwritten when getting server details
This commit is contained in:
commit
564176e284
2 changed files with 9 additions and 5 deletions
|
@ -14,11 +14,8 @@ module Fog
|
|||
attribute :cpucores
|
||||
attribute :memorysize
|
||||
attribute :disksize
|
||||
attribute :cpu
|
||||
attribute :memory
|
||||
attribute :disk
|
||||
attribute :uptime
|
||||
attribute :transfer
|
||||
attribute :uptime
|
||||
attribute :templatename
|
||||
attribute :managedhosting
|
||||
attribute :platform
|
||||
|
@ -27,6 +24,7 @@ module Fog
|
|||
attribute :state
|
||||
attribute :iplist
|
||||
attribute :description
|
||||
attribute :usage
|
||||
attribute :glera_enabled, :aliases => "gleraenabled"
|
||||
attribute :supported_features, :aliases => "supportedfeatures"
|
||||
|
||||
|
|
|
@ -24,8 +24,14 @@ module Fog
|
|||
if details.empty? || status.empty?
|
||||
nil
|
||||
else
|
||||
status['server'].merge!({ :serverid => identifier})
|
||||
details['server']['usage'] = Hash.new
|
||||
|
||||
%w|cpu memory disk transfer|.each do |attr|
|
||||
details['server']['usage'][attr] = status['server'].delete(attr)
|
||||
end
|
||||
|
||||
details['server'].merge!(status['server'])
|
||||
|
||||
new(details['server'])
|
||||
end
|
||||
rescue
|
||||
|
|
Loading…
Reference in a new issue