Method: Fog::Compute::IBM::Mock#get_request

Defined in:
lib/fog/ibm/requests/compute/get_request.rb

#get_request(request_id) ⇒ Object

[View source]

47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/fog/ibm/requests/compute/get_request.rb', line 47

def get_request(request_id)
  response = Excon::Response.new
  response.status = 200
  response.body =  {"instances"=>
     [{"name"=>"test from fog",
       "location"=>"101",
       "keyName"=>"mykey",
       "primaryIP"=>
        {"type"=>0, "ip"=>"42.42.42.42 ", "hostname"=>"42.42.42.42 "},
       "productCodes"=>[],
       "requestId"=>"75364",
       "imageId"=>"20020159",
       "launchTime"=>1304012220770,
       "id"=>"75064",
       "volumes"=>[],
       "instanceType"=>"SLV32.2/4096/60*350",
       "requestName"=>"test from fog",
       "secondaryIP"=>[],
       "status"=>1,
       "software"=>
        [{"name"=>"SUSE Linux Enterprise Server",
          "type"=>"OS",
          "version"=>"11 SP1"}],
       "expirationTime"=>1367084229205,
       "owner"=>"user@example.com"}]}
  response
end