Class: CPEE::ModelManagement::InstanceGet

Inherits:
Riddl::Implementation
  • Object
show all
Defined in:
lib/cpee-model-management/implementation.rb

Overview

}}}

Instance Method Summary collapse

Instance Method Details

#responseObject

{{{



848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
# File 'lib/cpee-model-management/implementation.rb', line 848

def response
  redis = @a[0]
  engine = @p[0].value
  uuid = @r[-1]
  prefix = File.join(engine,uuid.to_s)
  url, author, path, name, state, cpu, mem, parent, time = redis.mget(
    File.join(prefix,'instance-url'),
    File.join(prefix,'author'),
    File.join(prefix,'path'),
    File.join(prefix,'name'),
    File.join(prefix,'state'),
    File.join(prefix,'cpu'),
    File.join(prefix,'mem'),
    File.join(prefix,'parent'),
    File.join(prefix,'time')

  )
  Riddl::Parameter::Complex.new('instance','application/json',JSON.generate(:uuid => uuid, :url => url, :author => author, :path => path, :name => name, :state => state, :cpu => cpu, :mem => mem, :parent => parent, :time => time))
end