1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[compute|aws] Mock get_password_data request

This commit is contained in:
Aaron Suggs 2011-05-18 14:37:44 -04:00
parent 0f43707ab1
commit a30c6c9970

View file

@ -33,7 +33,19 @@ module Fog
class Mock
def get_password_data(instance_id)
Fog::Mock.not_implemented
response = Excon::Response.new
if instance = @data[:instances][instance_id]
response.status = 200
response.body = {
'instanceId' => instance_id,
'passwordData' => nil,
'requestId' => Fog::AWS::Mock.request_id,
'timestamp' => Time.now
}
response
else;
raise Fog::AWS::Compute::NotFound.new("The instance ID '#{instance_id}' does not exist")
end
end
end