mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
parent
6c7d5754dd
commit
6a98d14406
1 changed files with 5 additions and 1 deletions
|
@ -120,6 +120,10 @@ module Fog
|
|||
instances_set = []
|
||||
reservation_id = Fog::AWS::Mock.reservation_id
|
||||
|
||||
if options['KeyName'] && describe_key_pairs('key-name' => options['KeyName']).body['keySet'].empty?
|
||||
raise Fog::AWS::Compute::NotFound.new("The key pair '#{options['KeyName']}' does not exist")
|
||||
end
|
||||
|
||||
min_count.times do |i|
|
||||
instance_id = Fog::AWS::Mock.instance_id
|
||||
instance = {
|
||||
|
@ -132,7 +136,7 @@ module Fog
|
|||
'instanceState' => { 'code' => 0, 'name' => 'pending' },
|
||||
'instanceType' => options['InstanceType'] || 'm1.small',
|
||||
'kernelId' => options['KernelId'] || Fog::AWS::Mock.kernel_id,
|
||||
# 'keyName' => options['KeyName'],
|
||||
'keyName' => options['KeyName'],
|
||||
'launchTime' => Time.now,
|
||||
'monitoring' => { 'state' => options['Monitoring.Enabled'] || false },
|
||||
'placement' => { 'availabilityZone' => options['Placement.AvailabilityZone'] || Fog::AWS::Mock.availability_zone(@region) },
|
||||
|
|
Loading…
Add table
Reference in a new issue