Sha256: 0fb2447e43d4c6b54efbc597a3a5c73cbe0fa7a9c81dd147f1a8f472ac06758e

Contents?: true

Size: 780 Bytes

Versions: 7

Compression:

Stored size: 780 Bytes

Contents

module VPC
  class VpnDirector
    attr_accessor :builder

    def initialize(vpc_builder)
      @builder = vpc_builder
    end

    def create
      begin

        @builder.create_customer_gateway

        @builder.create_vpn_gateway

        @builder.attach_vpn_gateway

        @builder.create_vpn_connection

        @builder.create_route

      rescue Exception => e
        puts "Error occurred (#{e.class})"
        throw e
      end
    end

    def destroy
      begin

        @builder.delete_route

        @builder.delete_vpn_connection

        @builder.detach_vpn_gateway

        @builder.delete_vpn_gateway

        @builder.delete_customer_gateway

      rescue Exception => e
        puts "Error occurred (#{e.class})"
        throw e
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
etude_for_aws-0.7.10 lib/etude_for_aws/vpc/vpn_director.rb
etude_for_aws-0.7.9 lib/etude_for_aws/vpc/vpn_director.rb
etude_for_aws-0.7.8 lib/etude_for_aws/vpc/vpn_director.rb
etude_for_aws-0.7.7 lib/etude_for_aws/vpc/vpn_director.rb
etude_for_aws-0.7.6 lib/etude_for_aws/vpc/vpn_director.rb
etude_for_aws-0.7.5 lib/etude_for_aws/vpc/vpn_director.rb
etude_for_aws-0.7.4 lib/etude_for_aws/vpc/vpn_director.rb