Module: CloudProviders::Ec2Helpers
- Defined in:
- lib/cloud_providers/ec2/ec2_helpers.rb
Instance Method Summary collapse
-
#associate_address ⇒ Object
Associate an address with the instance using ec2 Get the next_unused_elastic_ip and if there is one, associate the instance to the public ip.
-
#next_unused_elastic_ip ⇒ Object
Get the next usable elastic ip First, get the list of addresses from ec2 that the client has access to, then select only the ones that are not associated with an instance.
Instance Method Details
#associate_address ⇒ Object
Associate an address with the instance using ec2 Get the next_unused_elastic_ip and if there is one, associate the instance to the public ip
8 9 10 |
# File 'lib/cloud_providers/ec2/ec2_helpers.rb', line 8 def associate_address() raise StandardError.new('Not Implemented Yet') end |
#next_unused_elastic_ip ⇒ Object
Get the next usable elastic ip First, get the list of addresses from ec2 that the client has access to, then select only the ones that are not associated with an instance. If the cloud has set elastic_ips to use, then, using the intersection of the unused ips and those, find the first one available and return that.
19 20 21 22 23 24 25 |
# File 'lib/cloud_providers/ec2/ec2_helpers.rb', line 19 def next_unused_elastic_ip raise StandardError.new('Not Implemented Yet') if elastic_ips.empty? nil else end end |