Class: Bosh::AwsCloud::Network

Inherits:
Object
  • Object
show all
Includes:
Helpers
Defined in:
lib/cloud/aws/network.rb

Direct Known Subclasses

DynamicNetwork, ManualNetwork, VipNetwork

Instance Method Summary collapse

Methods included from Helpers

#cloud_error, #default_ephemeral_disk_mapping, #ebs_ephemeral_disk_mapping, #extract_security_groups

Constructor Details

#initialize(name, spec) ⇒ Network

Creates a new network

Parameters:

  • name (String)

    Network name

  • spec (Hash)

    Raw network spec



14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/cloud/aws/network.rb', line 14

def initialize(name, spec)
  unless spec.is_a?(Hash)
    raise ArgumentError, "Invalid spec, Hash expected, " \
                         "#{spec.class} provided"
  end

  @logger = Bosh::Clouds::Config.logger

  @name = name
  @ip = spec["ip"]
  @cloud_properties = spec["cloud_properties"]
end

Instance Method Details

#configure(ec2, instance) ⇒ Object

Configures given instance

Parameters:

  • instance (AWS:EC2)

    EC2 client

  • EC2 (AWS::EC2::Instance)

    instance to configure



32
33
34
# File 'lib/cloud/aws/network.rb', line 32

def configure(ec2, instance)
  cloud_error("`configure' not implemented by #{self.class}")
end