mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
private ip address should start with a 10.
This commit is contained in:
parent
b18deb16c9
commit
82b766b103
2 changed files with 5 additions and 1 deletions
|
@ -186,6 +186,10 @@ module Fog
|
||||||
ip.join('.')
|
ip.join('.')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.private_ip_address
|
||||||
|
ip_address.gsub(/^\d{1,3}\./,"10.")
|
||||||
|
end
|
||||||
|
|
||||||
def self.kernel_id
|
def self.kernel_id
|
||||||
"aki-#{Fog::Mock.random_hex(8)}"
|
"aki-#{Fog::Mock.random_hex(8)}"
|
||||||
end
|
end
|
||||||
|
|
|
@ -179,7 +179,7 @@ module Fog
|
||||||
instance['ipAddress'] = Fog::AWS::Mock.ip_address
|
instance['ipAddress'] = Fog::AWS::Mock.ip_address
|
||||||
instance['originalIpAddress'] = instance['ipAddress']
|
instance['originalIpAddress'] = instance['ipAddress']
|
||||||
instance['dnsName'] = Fog::AWS::Mock.dns_name_for(instance['ipAddress'])
|
instance['dnsName'] = Fog::AWS::Mock.dns_name_for(instance['ipAddress'])
|
||||||
instance['privateIpAddress'] = Fog::AWS::Mock.ip_address
|
instance['privateIpAddress'] = Fog::AWS::Mock.private_ip_address
|
||||||
instance['privateDnsName'] = Fog::AWS::Mock.private_dns_name_for(instance['privateIpAddress'])
|
instance['privateDnsName'] = Fog::AWS::Mock.private_dns_name_for(instance['privateIpAddress'])
|
||||||
instance['instanceState'] = { 'code' => 16, 'name' => 'running' }
|
instance['instanceState'] = { 'code' => 16, 'name' => 'running' }
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue