diff --git a/lib/fog/compute/requests/aws/get_password_data.rb b/lib/fog/compute/requests/aws/get_password_data.rb index 30ca950c6..8a6298a0b 100644 --- a/lib/fog/compute/requests/aws/get_password_data.rb +++ b/lib/fog/compute/requests/aws/get_password_data.rb @@ -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