Class: Bosh::Template::Test::InstanceSpec
- Inherits:
-
Object
- Object
- Bosh::Template::Test::InstanceSpec
- Defined in:
- lib/bosh/template/test/instance_spec.rb
Instance Method Summary collapse
-
#initialize(address: 'my.bosh.com', az: 'az1', bootstrap: false, deployment: 'my-deployment', id: 'xxxxxx-xxxxxxxx-xxxxx', index: 0, ip: '192.168.0.0', name: 'me', networks: {'network1' => {'foo' => 'bar', 'ip' => '192.168.0.0'}}) ⇒ InstanceSpec
constructor
A new instance of InstanceSpec.
- #to_h ⇒ Object
Constructor Details
#initialize(address: 'my.bosh.com', az: 'az1', bootstrap: false, deployment: 'my-deployment', id: 'xxxxxx-xxxxxxxx-xxxxx', index: 0, ip: '192.168.0.0', name: 'me', networks: {'network1' => {'foo' => 'bar', 'ip' => '192.168.0.0'}}) ⇒ InstanceSpec
Returns a new instance of InstanceSpec.
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/bosh/template/test/instance_spec.rb', line 3 def initialize( address: 'my.bosh.com', az: 'az1', bootstrap: false, deployment: 'my-deployment', id: 'xxxxxx-xxxxxxxx-xxxxx', index: 0, ip: '192.168.0.0', name: 'me', networks: {'network1' => {'foo' => 'bar', 'ip' => '192.168.0.0'}} ) @address = address @az = az @bootstrap = bootstrap @deployment = deployment @id = id @index = index @ip = ip @name = name @networks = networks end |
Instance Method Details
#to_h ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/bosh/template/test/instance_spec.rb', line 25 def to_h { 'address' => @address, 'az' => @az, 'bootstrap' => @bootstrap, 'deployment' => @deployment, 'id' => @id, 'index' => @index, 'ip' => @ip, 'name' => @name, 'networks' => @networks, 'job' => {'name' => @name} } end |