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:
parent
0f43707ab1
commit
a30c6c9970
1 changed files with 13 additions and 1 deletions
|
@ -33,7 +33,19 @@ module Fog
|
||||||
class Mock
|
class Mock
|
||||||
|
|
||||||
def get_password_data(instance_id)
|
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
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue