diff --git a/lib/fog/glesys/models/compute/server.rb b/lib/fog/glesys/models/compute/server.rb index 8c58abb13..f1b5edb3a 100644 --- a/lib/fog/glesys/models/compute/server.rb +++ b/lib/fog/glesys/models/compute/server.rb @@ -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" diff --git a/lib/fog/glesys/models/compute/servers.rb b/lib/fog/glesys/models/compute/servers.rb index 6a4b26e93..ae959d120 100644 --- a/lib/fog/glesys/models/compute/servers.rb +++ b/lib/fog/glesys/models/compute/servers.rb @@ -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