fog-openstack 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (162) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +12 -28
  3. data/docs/workflow.md +129 -0
  4. data/examples/workflow/workflow-examples.rb +387 -0
  5. data/gemfiles/Gemfile-1.9 +1 -0
  6. data/lib/fog/openstack.rb +5 -1
  7. data/lib/fog/openstack/baremetal.rb +14 -38
  8. data/lib/fog/openstack/compute.rb +4 -33
  9. data/lib/fog/openstack/core.rb +104 -50
  10. data/lib/fog/openstack/identity.rb +2 -1
  11. data/lib/fog/openstack/identity_v2.rb +0 -2
  12. data/lib/fog/openstack/identity_v3.rb +0 -2
  13. data/lib/fog/openstack/image_v1.rb +6 -6
  14. data/lib/fog/openstack/image_v2.rb +7 -6
  15. data/lib/fog/openstack/introspection.rb +10 -35
  16. data/lib/fog/openstack/metering.rb +16 -35
  17. data/lib/fog/openstack/monitoring.rb +5 -31
  18. data/lib/fog/openstack/network.rb +5 -34
  19. data/lib/fog/openstack/nfv.rb +10 -35
  20. data/lib/fog/openstack/orchestration.rb +5 -40
  21. data/lib/fog/openstack/planning.rb +11 -36
  22. data/lib/fog/openstack/requests/compute/get_limits.rb +8 -7
  23. data/lib/fog/openstack/requests/network/update_router.rb +1 -1
  24. data/lib/fog/openstack/requests/workflow_v2/create_action.rb +28 -0
  25. data/lib/fog/openstack/requests/workflow_v2/create_action_execution.rb +31 -0
  26. data/lib/fog/openstack/requests/workflow_v2/create_cron_trigger.rb +55 -0
  27. data/lib/fog/openstack/requests/workflow_v2/create_environment.rb +31 -0
  28. data/lib/fog/openstack/requests/workflow_v2/create_execution.rb +30 -0
  29. data/lib/fog/openstack/requests/workflow_v2/create_workbook.rb +28 -0
  30. data/lib/fog/openstack/requests/workflow_v2/create_workflow.rb +28 -0
  31. data/lib/fog/openstack/requests/workflow_v2/delete_action.rb +25 -0
  32. data/lib/fog/openstack/requests/workflow_v2/delete_action_execution.rb +25 -0
  33. data/lib/fog/openstack/requests/workflow_v2/delete_cron_trigger.rb +25 -0
  34. data/lib/fog/openstack/requests/workflow_v2/delete_environment.rb +25 -0
  35. data/lib/fog/openstack/requests/workflow_v2/delete_execution.rb +25 -0
  36. data/lib/fog/openstack/requests/workflow_v2/delete_workbook.rb +25 -0
  37. data/lib/fog/openstack/requests/workflow_v2/delete_workflow.rb +25 -0
  38. data/lib/fog/openstack/requests/workflow_v2/get_action.rb +27 -0
  39. data/lib/fog/openstack/requests/workflow_v2/get_action_execution.rb +26 -0
  40. data/lib/fog/openstack/requests/workflow_v2/get_cron_trigger.rb +28 -0
  41. data/lib/fog/openstack/requests/workflow_v2/get_environment.rb +28 -0
  42. data/lib/fog/openstack/requests/workflow_v2/get_execution.rb +26 -0
  43. data/lib/fog/openstack/requests/workflow_v2/get_task.rb +27 -0
  44. data/lib/fog/openstack/requests/workflow_v2/get_workbook.rb +28 -0
  45. data/lib/fog/openstack/requests/workflow_v2/get_workflow.rb +28 -0
  46. data/lib/fog/openstack/requests/workflow_v2/list_action_executions.rb +28 -0
  47. data/lib/fog/openstack/requests/workflow_v2/list_actions.rb +30 -0
  48. data/lib/fog/openstack/requests/workflow_v2/list_cron_triggers.rb +28 -0
  49. data/lib/fog/openstack/requests/workflow_v2/list_environments.rb +28 -0
  50. data/lib/fog/openstack/requests/workflow_v2/list_executions.rb +28 -0
  51. data/lib/fog/openstack/requests/workflow_v2/list_services.rb +28 -0
  52. data/lib/fog/openstack/requests/workflow_v2/list_tasks.rb +28 -0
  53. data/lib/fog/openstack/requests/workflow_v2/list_workbooks.rb +28 -0
  54. data/lib/fog/openstack/requests/workflow_v2/list_workflows.rb +30 -0
  55. data/lib/fog/openstack/requests/workflow_v2/rerun_task.rb +33 -0
  56. data/lib/fog/openstack/requests/workflow_v2/update_action.rb +28 -0
  57. data/lib/fog/openstack/requests/workflow_v2/update_action_execution.rb +33 -0
  58. data/lib/fog/openstack/requests/workflow_v2/update_environment.rb +31 -0
  59. data/lib/fog/openstack/requests/workflow_v2/update_execution.rb +33 -0
  60. data/lib/fog/openstack/requests/workflow_v2/update_workbook.rb +28 -0
  61. data/lib/fog/openstack/requests/workflow_v2/update_workflow.rb +28 -0
  62. data/lib/fog/openstack/requests/workflow_v2/validate_action.rb +28 -0
  63. data/lib/fog/openstack/requests/workflow_v2/validate_workbook.rb +28 -0
  64. data/lib/fog/openstack/requests/workflow_v2/validate_workflow.rb +28 -0
  65. data/lib/fog/openstack/storage.rb +4 -35
  66. data/lib/fog/openstack/version.rb +1 -1
  67. data/lib/fog/openstack/volume_v1.rb +7 -5
  68. data/lib/fog/openstack/volume_v2.rb +7 -5
  69. data/lib/fog/openstack/workflow.rb +12 -0
  70. data/lib/fog/openstack/workflow_v2.rb +160 -0
  71. metadata +48 -95
  72. data/lib/fog/openstack/common.rb +0 -44
  73. data/tests/openstack/models/compute/images_tests.rb +0 -13
  74. data/tests/openstack/models/compute/security_group_tests.rb +0 -54
  75. data/tests/openstack/models/compute/server_tests.rb +0 -220
  76. data/tests/openstack/models/compute/service_tests.rb +0 -17
  77. data/tests/openstack/models/image/image_tests.rb +0 -36
  78. data/tests/openstack/models/image/images_tests.rb +0 -19
  79. data/tests/openstack/models/network/floating_ip_tests.rb +0 -35
  80. data/tests/openstack/models/network/floating_ips_tests.rb +0 -19
  81. data/tests/openstack/models/network/ike_policies_tests.rb +0 -28
  82. data/tests/openstack/models/network/ike_policy_tests.rb +0 -36
  83. data/tests/openstack/models/network/ipsec_policies_tests.rb +0 -26
  84. data/tests/openstack/models/network/ipsec_policy_tests.rb +0 -36
  85. data/tests/openstack/models/network/ipsec_site_connection_tests.rb +0 -50
  86. data/tests/openstack/models/network/ipsec_site_connections_tests.rb +0 -32
  87. data/tests/openstack/models/network/lb_health_monitor_tests.rb +0 -52
  88. data/tests/openstack/models/network/lb_health_monitors_tests.rb +0 -21
  89. data/tests/openstack/models/network/lb_member_tests.rb +0 -28
  90. data/tests/openstack/models/network/lb_members_tests.rb +0 -21
  91. data/tests/openstack/models/network/lb_pool_tests.rb +0 -53
  92. data/tests/openstack/models/network/lb_pools_tests.rb +0 -20
  93. data/tests/openstack/models/network/lb_vip_tests.rb +0 -39
  94. data/tests/openstack/models/network/lb_vips_tests.rb +0 -21
  95. data/tests/openstack/models/network/network_tests.rb +0 -61
  96. data/tests/openstack/models/network/networks_tests.rb +0 -21
  97. data/tests/openstack/models/network/port_tests.rb +0 -28
  98. data/tests/openstack/models/network/ports_tests.rb +0 -25
  99. data/tests/openstack/models/network/router_tests.rb +0 -39
  100. data/tests/openstack/models/network/routers_tests.rb +0 -21
  101. data/tests/openstack/models/network/security_group_rule_tests.rb +0 -27
  102. data/tests/openstack/models/network/security_group_rules_tests.rb +0 -25
  103. data/tests/openstack/models/network/security_group_tests.rb +0 -17
  104. data/tests/openstack/models/network/security_groups_tests.rb +0 -16
  105. data/tests/openstack/models/network/subnet_tests.rb +0 -30
  106. data/tests/openstack/models/network/subnets_tests.rb +0 -27
  107. data/tests/openstack/models/network/vpn_service_tests.rb +0 -27
  108. data/tests/openstack/models/network/vpn_services_tests.rb +0 -22
  109. data/tests/openstack/models/nfv/vnf_tests.rb +0 -35
  110. data/tests/openstack/models/nfv/vnfd_tests.rb +0 -23
  111. data/tests/openstack/models/nfv/vnfds_tests.rb +0 -31
  112. data/tests/openstack/models/nfv/vnfs_tests.rb +0 -38
  113. data/tests/openstack/models/planning/.gitkeep +0 -0
  114. data/tests/openstack/models/planning/plan_tests.rb +0 -51
  115. data/tests/openstack/models/planning/plans_tests.rb +0 -18
  116. data/tests/openstack/models/planning/role_tests.rb +0 -14
  117. data/tests/openstack/models/storage/file_tests.rb +0 -251
  118. data/tests/openstack/requests/compute/address_tests.rb +0 -58
  119. data/tests/openstack/requests/compute/aggregate_tests.rb +0 -59
  120. data/tests/openstack/requests/compute/availability_zone_tests.rb +0 -18
  121. data/tests/openstack/requests/compute/flavor_tests.rb +0 -95
  122. data/tests/openstack/requests/compute/helper.rb +0 -41
  123. data/tests/openstack/requests/compute/image_tests.rb +0 -58
  124. data/tests/openstack/requests/compute/keypair_tests.rb +0 -30
  125. data/tests/openstack/requests/compute/limit_tests.rb +0 -59
  126. data/tests/openstack/requests/compute/quota_tests.rb +0 -60
  127. data/tests/openstack/requests/compute/security_group_tests.rb +0 -61
  128. data/tests/openstack/requests/compute/server_tests.rb +0 -289
  129. data/tests/openstack/requests/compute/service_tests.rb +0 -33
  130. data/tests/openstack/requests/compute/tenant_tests.rb +0 -19
  131. data/tests/openstack/requests/compute/volume_tests.rb +0 -38
  132. data/tests/openstack/requests/image/image_tests.rb +0 -135
  133. data/tests/openstack/requests/metering/event_tests.rb +0 -17
  134. data/tests/openstack/requests/metering/meter_tests.rb +0 -52
  135. data/tests/openstack/requests/metering/resource_tests.rb +0 -19
  136. data/tests/openstack/requests/network/ike_policy_tests.rb +0 -65
  137. data/tests/openstack/requests/network/ipsec_policy_tests.rb +0 -65
  138. data/tests/openstack/requests/network/ipsec_site_connection_tests.rb +0 -82
  139. data/tests/openstack/requests/network/lb_health_monitor_tests.rb +0 -93
  140. data/tests/openstack/requests/network/lb_member_tests.rb +0 -60
  141. data/tests/openstack/requests/network/lb_pool_tests.rb +0 -80
  142. data/tests/openstack/requests/network/lb_vip_tests.rb +0 -71
  143. data/tests/openstack/requests/network/network_tests.rb +0 -107
  144. data/tests/openstack/requests/network/port_tests.rb +0 -66
  145. data/tests/openstack/requests/network/quota_tests.rb +0 -65
  146. data/tests/openstack/requests/network/router_tests.rb +0 -73
  147. data/tests/openstack/requests/network/security_group_rule_tests.rb +0 -58
  148. data/tests/openstack/requests/network/security_group_tests.rb +0 -43
  149. data/tests/openstack/requests/network/subnet_tests.rb +0 -66
  150. data/tests/openstack/requests/network/vpn_service_tests.rb +0 -61
  151. data/tests/openstack/requests/nfv/vnf_tests.rb +0 -70
  152. data/tests/openstack/requests/nfv/vnfd_tests.rb +0 -44
  153. data/tests/openstack/requests/orchestration/stack_tests.rb +0 -64
  154. data/tests/openstack/requests/planning/.gitkeep +0 -0
  155. data/tests/openstack/requests/planning/plan_tests.rb +0 -65
  156. data/tests/openstack/requests/planning/role_tests.rb +0 -16
  157. data/tests/openstack/requests/storage/container_tests.rb +0 -64
  158. data/tests/openstack/requests/storage/large_object_tests.rb +0 -372
  159. data/tests/openstack/requests/storage/object_tests.rb +0 -208
  160. data/tests/openstack/requests/volume/availability_zone_tests.rb +0 -13
  161. data/tests/openstack/requests/volume/quota_tests.rb +0 -50
  162. data/tests/openstack/requests/volume/volume_type_tests.rb +0 -32
@@ -1,36 +0,0 @@
1
- Shindo.tests("Fog::Network[:openstack] | ipsec_policy", ['openstack']) do
2
- tests('success') do
3
- tests('#create').succeeds do
4
- @instance = Fog::Network[:openstack].ipsec_policies.create(:name => 'test-ipsec-policy',
5
- :description => 'Test VPN ipsec Policy',
6
- :tenant_id => 'tenant_id',
7
- :auth_algorithm => 'sha1',
8
- :encryption_algorithm => 'aes-128',
9
- :pfs => 'group5',
10
- :transform_protocol => 'esp',
11
- :lifetime => {
12
- 'units' => 'seconds',
13
- 'value' => 3600
14
- },
15
- :encapsulation_mode => 'tunnel')
16
- !@instance.id.nil?
17
- end
18
-
19
- tests('#update').succeeds do
20
- @instance.name = 'rename-test-ipsec-policy'
21
- @instance.description = 'Test VPN ipsec Policy'
22
- @instance.tenant_id = 'baz'
23
- @instance.auth_algorithm = 'sha27'
24
- @instance.encryption_algorithm = 'aes-18'
25
- @instance.pfs = 'group52'
26
- @instance.transform_protocol = 'espn'
27
- @instance.encapsulation_mode = 'tunnel'
28
- @instance.lifetime = {'units' => 'seconds', 'value' => 3600}
29
- @instance.update
30
- end
31
-
32
- tests('#destroy').succeeds do
33
- @instance.destroy == true
34
- end
35
- end
36
- end
@@ -1,50 +0,0 @@
1
- Shindo.tests("Fog::Network[:openstack] | ipsec_site_connection", ['openstack']) do
2
- tests('success') do
3
- tests('#create').succeeds do
4
- params = {:name => 'test-ipsec-site-connection',
5
- :vpnservice_id => 'vpn',
6
- :ikepolicy_id => 'ike',
7
- :ipsecpolicy_id => 'ipsec',
8
- :description => 'Test VPN IPSec Site Connection',
9
- :tenant_id => 'tenant_id',
10
- :peer_address => "172.24.4.226",
11
- :peer_id => "172.24.4.226",
12
- :peer_cidrs => [],
13
- :psk => "secret",
14
- :mtu => 1500,
15
- :dpd => {
16
- "action" => "hold",
17
- "interval" => 30,
18
- "timeout" => 120
19
- },
20
- :initiator => "bi-directional",
21
- :admin_state_up => true}
22
- @instance = Fog::Network[:openstack].ipsec_site_connections.create(params)
23
- !@instance.id.nil?
24
- end
25
-
26
- tests('#update').succeeds do
27
- @instance.name = 'rename-test-ipsec-site-connection'
28
- @instance.description = 'Test VPN IPSec Site Connection'
29
- @instance.tenant_id = 'baz'
30
- @instance.peer_address = "172.24.4.227"
31
- @instance.peer_id = "172.24.4.227"
32
- @instance.peer_cidrs = []
33
- @instance.psk = "secrets"
34
- @instance.mtu = 1600
35
- @instance.initiator = "bi-directional"
36
- @instance.admin_state_up = false
37
- @instance.dpd = {
38
- "action" => "hold",
39
- "interval" => 50,
40
- "timeout" => 120
41
- }
42
-
43
- @instance.update
44
- end
45
-
46
- tests('#destroy').succeeds do
47
- @instance.destroy == true
48
- end
49
- end
50
- end
@@ -1,32 +0,0 @@
1
- Shindo.tests("Fog::Network[:openstack] | ipsec_site_connections", ['openstack']) do
2
- params = {:name => 'test-ipsec-site-connection',
3
- :vpnservice_id => 'vpn',
4
- :ikepolicy_id => 'ike',
5
- :ipsecpolicy_id => 'ipsec',
6
- :description => 'Test VPN IPSec Site Connection',
7
- :tenant_id => 'tenant_id',
8
- :peer_address => "172.24.4.226",
9
- :peer_id => "172.24.4.226",
10
- :peer_cidrs => [],
11
- :psk => "secret",
12
- :mtu => 1500,
13
- :dpd => {"action" => "hold", "interval" => 30, "timeout" => 120},
14
- :initiator => "bi-directional",
15
- :admin_state_up => true}
16
-
17
- @ipsec_site_connection = Fog::Network[:openstack].ipsec_site_connections.create(params)
18
-
19
- @ipsec_site_connections = Fog::Network[:openstack].ipsec_site_connections
20
-
21
- tests('success') do
22
- tests('#all').succeeds do
23
- @ipsec_site_connections.all
24
- end
25
-
26
- tests('#get').succeeds do
27
- @ipsec_site_connections.get(@ipsec_site_connection.id)
28
- end
29
- end
30
-
31
- @ipsec_site_connection.destroy
32
- end
@@ -1,52 +0,0 @@
1
- Shindo.tests("Fog::Network[:openstack] | lb_health_monitor", ['openstack']) do
2
-
3
- tests('success') do
4
- before do
5
- @lb_pool = Fog::Network[:openstack].lb_pools.create(:subnet_id => 'subnet_id',
6
- :protocol => 'HTTP',
7
- :lb_method => 'ROUND_ROBIN')
8
- end
9
-
10
- after do
11
- @lb_pool.destroy
12
- end
13
-
14
- tests('#create').succeeds do
15
- @instance = Fog::Network[:openstack].lb_health_monitors.create(:type => 'PING',
16
- :delay => 1,
17
- :timeout => 5,
18
- :max_retries => 10,
19
- :http_method => 'GET',
20
- :url_path => '/',
21
- :expected_codes => '200, 201',
22
- :admin_state_up => true,
23
- :tenant_id => 'tenant_id')
24
- !@instance.id.nil?
25
- end
26
-
27
- tests('#update').succeeds do
28
- @instance.delay = 5
29
- @instance.timeout = 10
30
- @instance.max_retries = 20
31
- @instance.http_method = 'POST'
32
- @instance.url_path = '/varz'
33
- @instance.expected_codes = '200'
34
- @instance.admin_state_up = false
35
- @instance.update
36
- end
37
-
38
- tests('#associate_to_pool').succeeds do
39
- @instance.associate_to_pool(@lb_pool.id)
40
- end
41
-
42
- tests('#disassociate_from_pool').succeeds do
43
- @instance.disassociate_from_pool(@lb_pool.id)
44
- end
45
-
46
- tests('#destroy').succeeds do
47
- @instance.destroy == true
48
- end
49
-
50
- end
51
-
52
- end
@@ -1,21 +0,0 @@
1
- Shindo.tests("Fog::Network[:openstack] | lb_health_monitors", ['openstack']) do
2
- @lb_health_monitor = Fog::Network[:openstack].lb_health_monitors.create(:type => 'PING',
3
- :delay => 1,
4
- :timeout => 5,
5
- :max_retries => 10)
6
- @lb_health_monitors = Fog::Network[:openstack].lb_health_monitors
7
-
8
- tests('success') do
9
-
10
- tests('#all').succeeds do
11
- @lb_health_monitors.all
12
- end
13
-
14
- tests('#get').succeeds do
15
- @lb_health_monitors.get @lb_health_monitor.id
16
- end
17
-
18
- end
19
-
20
- @lb_health_monitor.destroy
21
- end
@@ -1,28 +0,0 @@
1
- Shindo.tests("Fog::Network[:openstack] | lb_member", ['openstack']) do
2
-
3
- tests('success') do
4
-
5
- tests('#create').succeeds do
6
- @instance = Fog::Network[:openstack].lb_members.create(:pool_id => 'pool_id',
7
- :address => '10.0.0.1',
8
- :protocol_port => '80',
9
- :weight => 100,
10
- :admin_state_up => true,
11
- :tenant_id => 'tenant_id')
12
- !@instance.id.nil?
13
- end
14
-
15
- tests('#update').succeeds do
16
- @instance.pool_id = 'new_pool_id'
17
- @instance.weight = 50
18
- @instance.admin_state_up = false
19
- @instance.update
20
- end
21
-
22
- tests('#destroy').succeeds do
23
- @instance.destroy == true
24
- end
25
-
26
- end
27
-
28
- end
@@ -1,21 +0,0 @@
1
- Shindo.tests("Fog::Network[:openstack] | lb_members", ['openstack']) do
2
- @lb_member = Fog::Network[:openstack].lb_members.create(:pool_id => 'pool_id',
3
- :address => '10.0.0.1',
4
- :protocol_port => '80',
5
- :weight => 100)
6
- @lb_members = Fog::Network[:openstack].lb_members
7
-
8
- tests('success') do
9
-
10
- tests('#all').succeeds do
11
- @lb_members.all
12
- end
13
-
14
- tests('#get').succeeds do
15
- @lb_members.get @lb_member.id
16
- end
17
-
18
- end
19
-
20
- @lb_member.destroy
21
- end
@@ -1,53 +0,0 @@
1
- Shindo.tests("Fog::Network[:openstack] | lb_pool", ['openstack']) do
2
-
3
- tests('success') do
4
- before do
5
- @lb_health_monitor = Fog::Network[:openstack].lb_health_monitors.create(:type => 'PING',
6
- :delay => 1,
7
- :timeout => 5,
8
- :max_retries => 10)
9
- end
10
-
11
- after do
12
- @lb_health_monitor.destroy
13
- end
14
-
15
- tests('#create').succeeds do
16
- @instance = Fog::Network[:openstack].lb_pools.create(:subnet_id => 'subnet_id',
17
- :protocol => 'HTTP',
18
- :lb_method => 'ROUND_ROBIN',
19
- :name => 'test-pool',
20
- :description => 'Test Pool',
21
- :admin_state_up => true,
22
- :tenant_id => 'tenant_id')
23
- !@instance.id.nil?
24
- end
25
-
26
- tests('#update').succeeds do
27
- @instance.name = 'new-test-pool'
28
- @instance.description = 'New Test Pool'
29
- @instance.lb_method = 'LEAST_CONNECTIONS'
30
- @instance.admin_state_up = false
31
- @instance.update
32
- end
33
-
34
- tests('#stats').succeeds do
35
- @instance.stats
36
- !@instance.active_connections.nil?
37
- end
38
-
39
- tests('#associate_health_monitor').succeeds do
40
- @instance.associate_health_monitor(@lb_health_monitor.id)
41
- end
42
-
43
- tests('#disassociate_health_monitor').succeeds do
44
- @instance.disassociate_health_monitor(@lb_health_monitor.id)
45
- end
46
-
47
- tests('#destroy').succeeds do
48
- @instance.destroy == true
49
- end
50
-
51
- end
52
-
53
- end
@@ -1,20 +0,0 @@
1
- Shindo.tests("Fog::Network[:openstack] | lb_pools", ['openstack']) do
2
- @lb_pool = Fog::Network[:openstack].lb_pools.create(:subnet_id => 'subnet_id',
3
- :protocol => 'HTTP',
4
- :lb_method => 'ROUND_ROBIN')
5
- @lb_pools = Fog::Network[:openstack].lb_pools
6
-
7
- tests('success') do
8
-
9
- tests('#all').succeeds do
10
- @lb_pools.all
11
- end
12
-
13
- tests('#get').succeeds do
14
- @lb_pools.get @lb_pool.id
15
- end
16
-
17
- end
18
-
19
- @lb_pool.destroy
20
- end
@@ -1,39 +0,0 @@
1
- Shindo.tests("Fog::Network[:openstack] | lb_vip", ['openstack']) do
2
-
3
- tests('success') do
4
-
5
- tests('#create').succeeds do
6
- @instance = Fog::Network[:openstack].lb_vips.create(:subnet_id => 'subnet_id',
7
- :pool_id => 'pool_id',
8
- :protocol => 'HTTP',
9
- :protocol_port => 80,
10
- :name => 'test-vip',
11
- :description => 'Test VIP',
12
- :address => '10.0.0.1',
13
- :session_persistence => {
14
- "cookie_name" => "COOKIE_NAME",
15
- "type" => "APP_COOKIE"
16
- },
17
- :connection_limit => 10,
18
- :admin_state_up => true,
19
- :tenant_id => 'tenant_id')
20
- !@instance.id.nil?
21
- end
22
-
23
- tests('#update').succeeds do
24
- @instance.pool_id = 'new_pool_id',
25
- @instance.name = 'new-test-vip'
26
- @instance.description = 'New Test VIP'
27
- @instance.session_persistence = { "type" => "HTTP_COOKIE" }
28
- @instance.connection_limit = 5
29
- @instance.admin_state_up = false
30
- @instance.update
31
- end
32
-
33
- tests('#destroy').succeeds do
34
- @instance.destroy == true
35
- end
36
-
37
- end
38
-
39
- end
@@ -1,21 +0,0 @@
1
- Shindo.tests("Fog::Network[:openstack] | lb_vips", ['openstack']) do
2
- @lb_vip = Fog::Network[:openstack].lb_vips.create(:subnet_id => 'subnet_id',
3
- :pool_id => 'pool_id',
4
- :protocol => 'HTTP',
5
- :protocol_port => 80)
6
- @lb_vips = Fog::Network[:openstack].lb_vips
7
-
8
- tests('success') do
9
-
10
- tests('#all').succeeds do
11
- @lb_vips.all
12
- end
13
-
14
- tests('#get').succeeds do
15
- @lb_vips.get @lb_vip.id
16
- end
17
-
18
- end
19
-
20
- @lb_vip.destroy
21
- end
@@ -1,61 +0,0 @@
1
- Shindo.tests("Fog::Network[:openstack] | network", ['openstack']) do
2
-
3
- tests('success') do
4
-
5
- tests('#create').succeeds do
6
- @instance = Fog::Network[:openstack].networks.create(:name => 'net_name',
7
- :shared => false,
8
- :admin_state_up => true,
9
- :tenant_id => 'tenant_id')
10
- !@instance.id.nil?
11
- end
12
-
13
- tests('#create+extensions').succeeds do
14
- net = Fog::Network[:openstack].networks.create(
15
- :name => 'net_name',
16
- :shared => false,
17
- :admin_state_up => true,
18
- :tenant_id => 'tenant_id',
19
- :router_external => true,
20
- # local, gre, vlan. Depends on the provider.
21
- # May rise an exception if the network_type isn't valid:
22
- # QuantumError: "Invalid input for operation: provider:physical_network"
23
- :provider_network_type => 'gre',
24
- :provider_segmentation_id => 22
25
- )
26
- net.destroy
27
- net.provider_network_type == 'gre'
28
- end
29
-
30
- tests('have attributes') do
31
- attributes = [
32
- :name,
33
- :subnets,
34
- :shared,
35
- :status,
36
- :admin_state_up,
37
- :tenant_id,
38
- :provider_network_type,
39
- :provider_physical_network,
40
- :provider_segmentation_id,
41
- :router_external
42
- ]
43
- tests("The network model should respond to") do
44
- attributes.each do |attribute|
45
- test("#{attribute}") { @instance.respond_to? attribute }
46
- end
47
- end
48
- end
49
-
50
- tests('#update').succeeds do
51
- @instance.name = 'new_net_name'
52
- @instance.update
53
- end
54
-
55
- tests('#destroy').succeeds do
56
- @instance.destroy == true
57
- end
58
-
59
- end
60
-
61
- end