Class: Bosh::Template::Test::LinkInstance

Inherits:
Object
  • Object
show all
Defined in:
lib/bosh/template/test/link_instance.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name: 'i-name', id: 'jkl8098', index: 4, az: 'az4', address: 'link.instance.address.com', bootstrap: false) ⇒ LinkInstance

Returns a new instance of LinkInstance.



5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/bosh/template/test/link_instance.rb', line 5

def initialize(
  name: 'i-name',
    id: 'jkl8098',
    index: 4,
    az: 'az4',
    address: 'link.instance.address.com',
    bootstrap: false)
  @bootstrap = bootstrap
  @address = address
  @az = az
  @index = index
  @id = id
  @name = name
end

Instance Attribute Details

#addressObject (readonly)

Returns the value of attribute address.



3
4
5
# File 'lib/bosh/template/test/link_instance.rb', line 3

def address
  @address
end

#azObject (readonly)

Returns the value of attribute az.



3
4
5
# File 'lib/bosh/template/test/link_instance.rb', line 3

def az
  @az
end

#bootstrapObject (readonly)

Returns the value of attribute bootstrap.



3
4
5
# File 'lib/bosh/template/test/link_instance.rb', line 3

def bootstrap
  @bootstrap
end

#idObject (readonly)

Returns the value of attribute id.



3
4
5
# File 'lib/bosh/template/test/link_instance.rb', line 3

def id
  @id
end

#indexObject (readonly)

Returns the value of attribute index.



3
4
5
# File 'lib/bosh/template/test/link_instance.rb', line 3

def index
  @index
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/bosh/template/test/link_instance.rb', line 3

def name
  @name
end

Instance Method Details

#to_hObject



20
21
22
23
24
25
26
27
28
29
# File 'lib/bosh/template/test/link_instance.rb', line 20

def to_h
  {
    'name' => name,
    'id' => id,
    'index' => index,
    'az' => az,
    'address' => address,
    'bootstrap' => bootstrap
  }
end