mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
change naming to specify what the request is expecting - plural of networkInterfaces vs networkInterface
This commit is contained in:
parent
34cbc568c7
commit
ad6e84fb9c
2 changed files with 5 additions and 5 deletions
|
@ -30,7 +30,7 @@ module Fog
|
||||||
# * 'Ebs.DeleteOnTermination'<~String> - specifies whether or not to delete the volume on instance termination
|
# * 'Ebs.DeleteOnTermination'<~String> - specifies whether or not to delete the volume on instance termination
|
||||||
# * 'Ebs.VolumeType'<~String> - Type of EBS volue. Valid options in ['standard', 'io1'] default is 'standard'.
|
# * 'Ebs.VolumeType'<~String> - Type of EBS volue. Valid options in ['standard', 'io1'] default is 'standard'.
|
||||||
# * 'Ebs.Iops'<~String> - The number of I/O operations per second (IOPS) that the volume supports. Required when VolumeType is 'io1'
|
# * 'Ebs.Iops'<~String> - The number of I/O operations per second (IOPS) that the volume supports. Required when VolumeType is 'io1'
|
||||||
# * 'NetworkInterface'<~Array>: array of hashes
|
# * 'NetworkInterfaces'<~Array>: array of hashes
|
||||||
# * 'NetworkInterfaceId'<~String> - An existing interface to attach to a single instance
|
# * 'NetworkInterfaceId'<~String> - An existing interface to attach to a single instance
|
||||||
# * 'DeviceIndex'<~String> - The device index. Applies both to attaching an existing network interface and creating a network interface
|
# * 'DeviceIndex'<~String> - The device index. Applies both to attaching an existing network interface and creating a network interface
|
||||||
# * 'SubnetId'<~String> - The subnet ID. Applies only when creating a network interface
|
# * 'SubnetId'<~String> - The subnet ID. Applies only when creating a network interface
|
||||||
|
@ -120,7 +120,7 @@ module Fog
|
||||||
if options['UserData']
|
if options['UserData']
|
||||||
options['UserData'] = Base64.encode64(options['UserData'])
|
options['UserData'] = Base64.encode64(options['UserData'])
|
||||||
end
|
end
|
||||||
if network_interfaces = options.delete('NetworkInterface')
|
if network_interfaces = options.delete('NetworkInterfaces')
|
||||||
network_interfaces.each_with_index do |mapping, index|
|
network_interfaces.each_with_index do |mapping, index|
|
||||||
for key, value in mapping
|
for key, value in mapping
|
||||||
options.merge!({ format("NetworkInterface.%d.#{key}", index) => value })
|
options.merge!({ format("NetworkInterface.%d.#{key}", index) => value })
|
||||||
|
@ -178,7 +178,7 @@ module Fog
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
network_interfaces = (options['NetworkInterface'] || []).inject([]) do |mapping, device|
|
network_interfaces = (options['NetworkInterfaces'] || []).inject([]) do |mapping, device|
|
||||||
device_index = device.fetch("DeviceIndex", 0)
|
device_index = device.fetch("DeviceIndex", 0)
|
||||||
subnet_id = device.fetch("SubnetId", options[:subnet_id] || Fog::AWS::Mock.subnet_id)
|
subnet_id = device.fetch("SubnetId", options[:subnet_id] || Fog::AWS::Mock.subnet_id)
|
||||||
private_ip_address = device.fetch("PrivateIpAddress", options[:private_ip_address] || Fog::AWS::Mock.private_ip_address)
|
private_ip_address = device.fetch("PrivateIpAddress", options[:private_ip_address] || Fog::AWS::Mock.private_ip_address)
|
||||||
|
@ -207,7 +207,7 @@ module Fog
|
||||||
'associatePublicIP' => options['associatePublicIP'] || false,
|
'associatePublicIP' => options['associatePublicIP'] || false,
|
||||||
'architecture' => 'i386',
|
'architecture' => 'i386',
|
||||||
'blockDeviceMapping' => block_device_mapping,
|
'blockDeviceMapping' => block_device_mapping,
|
||||||
'networkInterface' => network_interfaces,
|
'networkInterfaces' => network_interfaces,
|
||||||
'clientToken' => options['clientToken'],
|
'clientToken' => options['clientToken'],
|
||||||
'dnsName' => nil,
|
'dnsName' => nil,
|
||||||
'ebsOptimized' => options['EbsOptimized'] || false,
|
'ebsOptimized' => options['EbsOptimized'] || false,
|
||||||
|
|
|
@ -6,7 +6,7 @@ Shindo.tests('Fog::Compute[:aws] | instance requests', ['aws']) do
|
||||||
'associatePublicIP' => Fog::Nullable::Boolean,
|
'associatePublicIP' => Fog::Nullable::Boolean,
|
||||||
'attachmentId' => Fog::Nullable::String,
|
'attachmentId' => Fog::Nullable::String,
|
||||||
'blockDeviceMapping' => [Fog::Nullable::Hash],
|
'blockDeviceMapping' => [Fog::Nullable::Hash],
|
||||||
'networkInterface' => [Fog::Nullable::Hash],
|
'networkInterfaces' => [Fog::Nullable::Hash],
|
||||||
'clientToken' => Fog::Nullable::String,
|
'clientToken' => Fog::Nullable::String,
|
||||||
'dnsName' => NilClass,
|
'dnsName' => NilClass,
|
||||||
'ebsOptimized' => Fog::Boolean,
|
'ebsOptimized' => Fog::Boolean,
|
||||||
|
|
Loading…
Add table
Reference in a new issue