src/bosh_aws_cpi/lib/cloud/aws/network_configurator.rb
# Applies network configuration to the vm
# @param [AWS:EC2] ec2 instance EC2 client
# @param [Aws::EC2::Instance] instance EC2 instance to configure
Applies network configuration to the vm
Applies network configuration to the vm
def configure(ec2, instance)
      if @vip_network
        configure_vip(ec2, instance)
      else
        elastic_ip = instance.elastic_ip
        if elastic_ip
          @logger.info("Disassociating elastic IP `#{elastic_ip}' " \
                       "from instance `#{instance.id}'")
          instance.disassociate_elastic_ip
        end
      end
    end
def configure ( ec2 , instance ) if @vip_network configure_vip ( ec2 , instance ) else elastic_ip = instance . elastic_ip if elastic_ip @logger . info ( "Disassociating elastic IP `#{elastic_ip}' " "from instance `#{instance.id}'" ) instance . disassociate_elastic_ip end end end
Applies network configuration to the vm
Applies network configuration to the vm
# If there is no vip network we should disassociate any elastic IP # currently held by instance (as it might have had elastic IP before)
ec2
<not_specific>
instance
<not_specific>
<not_specific>
instance EC2 instance to configure
instance EC2 instance to configure