This repository has been archived by the owner on Sep 19, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathnetscaler_lbvserver_service_binding_spec.rb
77 lines (68 loc) · 1.99 KB
/
netscaler_lbvserver_service_binding_spec.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
require 'spec_helper_acceptance'
describe 'lbvserver_service_binding tests' do
it 'makes a lbvserver_service_binding' do
pp=<<-EOS
netscaler_server { '1_10_server1':
ensure => present,
address => '1.10.1.1',
}
netscaler_service { '1_10_service1':
ensure => 'present',
server_name => '1_10_server1',
port => '80',
protocol => 'HTTP',
comments => 'This is a comment'
}
netscaler_lbvserver { '1_10_lbvserver1':
ensure => 'present',
service_type => 'HTTP',
ip_address => '1.10.1.2',
port => '8080',
state => true,
}
netscaler_lbvserver_service_binding { '1_10_lbvserver1/1_10_service1':
ensure => 'present',
weight => '100',
}
EOS
make_site_pp(pp)
run_device(:allow_changes => true)
run_device(:allow_changes => false)
end
it 'makes and deletes a lbvserver_service_binding' do
pp=<<-EOS
netscaler_server { '1_10_server2':
ensure => present,
address => '1.10.2.1',
}
netscaler_service { '1_10_service2':
ensure => 'present',
server_name => '1_10_server2',
port => '80',
protocol => 'HTTP',
comments => 'This is a comment'
}
netscaler_lbvserver { '1_10_lbvserver2':
ensure => 'present',
service_type => 'HTTP',
ip_address => '1.10.2.2',
port => '8080',
state => true,
}
netscaler_lbvserver_service_binding { '1_10_lbvserver2/1_10_service2':
ensure => 'present',
weight => '100',
}
EOS
pp2=<<-EOS
netscaler_lbvserver_service_binding { '1_10_lbvserver2/1_10_service2':
ensure => 'absent',
}
EOS
make_site_pp(pp)
run_device(:allow_changes => true)
make_site_pp(pp2)
run_device(:allow_changes => true)
run_device(:allow_changes => false)
end
end