fog-oraclecloud 0.1.12 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +12 -10
  3. data/Gemfile +4 -4
  4. data/LICENSE +20 -20
  5. data/README.md +153 -153
  6. data/Rakefile +2 -2
  7. data/bin/console +14 -14
  8. data/bin/setup +8 -8
  9. data/fog-oracle.gemspec +32 -31
  10. data/lib/fog/oraclecloud.rb +29 -29
  11. data/lib/fog/oraclecloud/compute.rb +184 -184
  12. data/lib/fog/oraclecloud/database.rb +129 -129
  13. data/lib/fog/oraclecloud/java.rb +123 -115
  14. data/lib/fog/oraclecloud/models/compute/image.rb +43 -43
  15. data/lib/fog/oraclecloud/models/compute/image_list.rb +39 -39
  16. data/lib/fog/oraclecloud/models/compute/image_lists.rb +22 -22
  17. data/lib/fog/oraclecloud/models/compute/images.rb +22 -22
  18. data/lib/fog/oraclecloud/models/compute/instance.rb +74 -69
  19. data/lib/fog/oraclecloud/models/compute/instances.rb +22 -22
  20. data/lib/fog/oraclecloud/models/compute/object_plan.rb +16 -16
  21. data/lib/fog/oraclecloud/models/compute/object_plans.rb +12 -12
  22. data/lib/fog/oraclecloud/models/compute/orchestration.rb +89 -89
  23. data/lib/fog/oraclecloud/models/compute/orchestrations.rb +20 -20
  24. data/lib/fog/oraclecloud/models/compute/security_application.rb +42 -42
  25. data/lib/fog/oraclecloud/models/compute/security_applications.rb +22 -22
  26. data/lib/fog/oraclecloud/models/compute/security_list.rb +26 -26
  27. data/lib/fog/oraclecloud/models/compute/security_lists.rb +22 -22
  28. data/lib/fog/oraclecloud/models/compute/security_rule.rb +41 -41
  29. data/lib/fog/oraclecloud/models/compute/security_rules.rb +22 -22
  30. data/lib/fog/oraclecloud/models/compute/ssh_key.rb +37 -37
  31. data/lib/fog/oraclecloud/models/compute/ssh_keys.rb +22 -22
  32. data/lib/fog/oraclecloud/models/compute/volume.rb +47 -47
  33. data/lib/fog/oraclecloud/models/compute/volumes.rb +20 -20
  34. data/lib/fog/oraclecloud/models/database/backup.rb +37 -37
  35. data/lib/fog/oraclecloud/models/database/backups.rb +30 -30
  36. data/lib/fog/oraclecloud/models/database/instance.rb +331 -331
  37. data/lib/fog/oraclecloud/models/database/instances.rb +25 -25
  38. data/lib/fog/oraclecloud/models/database/patch.rb +34 -34
  39. data/lib/fog/oraclecloud/models/database/patches.rb +18 -18
  40. data/lib/fog/oraclecloud/models/database/recoveries.rb +26 -26
  41. data/lib/fog/oraclecloud/models/database/recovery.rb +43 -43
  42. data/lib/fog/oraclecloud/models/database/server.rb +28 -28
  43. data/lib/fog/oraclecloud/models/database/servers.rb +18 -18
  44. data/lib/fog/oraclecloud/models/database/snapshot.rb +60 -60
  45. data/lib/fog/oraclecloud/models/database/snapshots.rb +22 -22
  46. data/lib/fog/oraclecloud/models/java/database.rb +17 -17
  47. data/lib/fog/oraclecloud/models/java/databases.rb +17 -17
  48. data/lib/fog/oraclecloud/models/java/instance.rb +269 -265
  49. data/lib/fog/oraclecloud/models/java/instances.rb +23 -23
  50. data/lib/fog/oraclecloud/models/java/server.rb +62 -62
  51. data/lib/fog/oraclecloud/models/java/servers.rb +25 -25
  52. data/lib/fog/oraclecloud/models/soa/instance.rb +163 -163
  53. data/lib/fog/oraclecloud/models/soa/instances.rb +54 -54
  54. data/lib/fog/oraclecloud/models/storage/container.rb +33 -33
  55. data/lib/fog/oraclecloud/models/storage/containers.rb +24 -24
  56. data/lib/fog/oraclecloud/models/storage/object.rb +27 -27
  57. data/lib/fog/oraclecloud/models/storage/objects.rb +27 -27
  58. data/lib/fog/oraclecloud/requests/compute/create_image.rb +30 -30
  59. data/lib/fog/oraclecloud/requests/compute/create_image_list.rb +27 -27
  60. data/lib/fog/oraclecloud/requests/compute/create_instance.rb +53 -53
  61. data/lib/fog/oraclecloud/requests/compute/create_orchestration.rb +82 -82
  62. data/lib/fog/oraclecloud/requests/compute/create_security_application.rb +28 -28
  63. data/lib/fog/oraclecloud/requests/compute/create_security_rule.rb +29 -29
  64. data/lib/fog/oraclecloud/requests/compute/create_ssh_key.rb +46 -46
  65. data/lib/fog/oraclecloud/requests/compute/create_volume.rb +28 -28
  66. data/lib/fog/oraclecloud/requests/compute/delete_image.rb +19 -19
  67. data/lib/fog/oraclecloud/requests/compute/delete_image_list.rb +19 -19
  68. data/lib/fog/oraclecloud/requests/compute/delete_instance.rb +33 -33
  69. data/lib/fog/oraclecloud/requests/compute/delete_orchestration.rb +36 -36
  70. data/lib/fog/oraclecloud/requests/compute/delete_security_application.rb +20 -20
  71. data/lib/fog/oraclecloud/requests/compute/delete_security_rule.rb +20 -20
  72. data/lib/fog/oraclecloud/requests/compute/delete_ssh_key.rb +32 -32
  73. data/lib/fog/oraclecloud/requests/compute/get_image.rb +21 -21
  74. data/lib/fog/oraclecloud/requests/compute/get_image_list.rb +21 -21
  75. data/lib/fog/oraclecloud/requests/compute/get_instance.rb +45 -45
  76. data/lib/fog/oraclecloud/requests/compute/get_orchestration.rb +39 -39
  77. data/lib/fog/oraclecloud/requests/compute/get_security_application.rb +20 -20
  78. data/lib/fog/oraclecloud/requests/compute/get_security_rule.rb +20 -20
  79. data/lib/fog/oraclecloud/requests/compute/get_ssh_key.rb +39 -39
  80. data/lib/fog/oraclecloud/requests/compute/list_image_lists.rb +29 -29
  81. data/lib/fog/oraclecloud/requests/compute/list_images.rb +16 -16
  82. data/lib/fog/oraclecloud/requests/compute/list_instances.rb +28 -28
  83. data/lib/fog/oraclecloud/requests/compute/list_orchestrations.rb +28 -28
  84. data/lib/fog/oraclecloud/requests/compute/list_security_applications.rb +21 -21
  85. data/lib/fog/oraclecloud/requests/compute/list_security_lists.rb +16 -16
  86. data/lib/fog/oraclecloud/requests/compute/list_security_rules.rb +21 -21
  87. data/lib/fog/oraclecloud/requests/compute/list_ssh_keys.rb +29 -29
  88. data/lib/fog/oraclecloud/requests/compute/list_volumes.rb +16 -16
  89. data/lib/fog/oraclecloud/requests/compute/start_orchestration.rb +39 -39
  90. data/lib/fog/oraclecloud/requests/compute/stop_orchestration.rb +39 -39
  91. data/lib/fog/oraclecloud/requests/compute/update_image.rb +27 -27
  92. data/lib/fog/oraclecloud/requests/compute/update_image_list.rb +27 -27
  93. data/lib/fog/oraclecloud/requests/compute/update_orchestration.rb +80 -80
  94. data/lib/fog/oraclecloud/requests/compute/update_ssh_key.rb +49 -49
  95. data/lib/fog/oraclecloud/requests/database/backup_instance.rb +45 -45
  96. data/lib/fog/oraclecloud/requests/database/create_instance.rb +101 -101
  97. data/lib/fog/oraclecloud/requests/database/create_snapshot.rb +50 -50
  98. data/lib/fog/oraclecloud/requests/database/delete_instance.rb +26 -26
  99. data/lib/fog/oraclecloud/requests/database/delete_snapshot.rb +26 -26
  100. data/lib/fog/oraclecloud/requests/database/get_instance.rb +62 -62
  101. data/lib/fog/oraclecloud/requests/database/get_instance_from_job.rb +31 -31
  102. data/lib/fog/oraclecloud/requests/database/get_snapshot.rb +43 -43
  103. data/lib/fog/oraclecloud/requests/database/list_backups.rb +39 -39
  104. data/lib/fog/oraclecloud/requests/database/list_instances.rb +29 -29
  105. data/lib/fog/oraclecloud/requests/database/list_patches.rb +51 -51
  106. data/lib/fog/oraclecloud/requests/database/list_recoveries.rb +40 -40
  107. data/lib/fog/oraclecloud/requests/database/list_servers.rb +27 -27
  108. data/lib/fog/oraclecloud/requests/database/list_snapshots.rb +27 -27
  109. data/lib/fog/oraclecloud/requests/database/recover_instance.rb +83 -83
  110. data/lib/fog/oraclecloud/requests/database/scale_instance.rb +40 -40
  111. data/lib/fog/oraclecloud/requests/java/create_instance.rb +156 -87
  112. data/lib/fog/oraclecloud/requests/java/delete_instance.rb +37 -37
  113. data/lib/fog/oraclecloud/requests/java/get_instance.rb +43 -43
  114. data/lib/fog/oraclecloud/requests/java/get_server.rb +42 -42
  115. data/lib/fog/oraclecloud/requests/java/list_instances.rb +29 -29
  116. data/lib/fog/oraclecloud/requests/java/list_servers.rb +30 -30
  117. data/lib/fog/oraclecloud/requests/java/scale_a_node.rb +45 -45
  118. data/lib/fog/oraclecloud/requests/java/scale_in_a_cluster.rb +35 -35
  119. data/lib/fog/oraclecloud/requests/java/scale_out_a_cluster.rb +38 -38
  120. data/lib/fog/oraclecloud/requests/soa/create_instance.rb +71 -71
  121. data/lib/fog/oraclecloud/requests/soa/delete_instance.rb +35 -35
  122. data/lib/fog/oraclecloud/requests/soa/get_instance.rb +42 -42
  123. data/lib/fog/oraclecloud/requests/soa/get_job_status.rb +22 -22
  124. data/lib/fog/oraclecloud/requests/soa/list_instances.rb +29 -29
  125. data/lib/fog/oraclecloud/requests/storage/create_container.rb +41 -41
  126. data/lib/fog/oraclecloud/requests/storage/delete_container.rb +15 -15
  127. data/lib/fog/oraclecloud/requests/storage/get_container.rb +63 -63
  128. data/lib/fog/oraclecloud/requests/storage/list_containers.rb +27 -27
  129. data/lib/fog/oraclecloud/soa.rb +106 -106
  130. data/lib/fog/oraclecloud/storage.rb +98 -98
  131. data/lib/fog/oraclecloud/version.rb +5 -5
  132. data/tests/helper.rb +5 -3
  133. data/tests/helpers/mock_helper.rb +14 -14
  134. data/tests/requests/compute_tests.rb +9 -9
  135. data/tests/requests/database_tests.rb +241 -241
  136. data/tests/requests/instance_tests.rb +68 -61
  137. data/tests/requests/java_tests.rb +149 -109
  138. data/tests/requests/orchestrations_tests.rb +90 -90
  139. data/tests/requests/soa_tests.rb +151 -151
  140. data/tests/requests/ssh_keys_tests.rb +53 -53
  141. data/tests/requests/storage_tests.rb +54 -54
  142. metadata +17 -3
@@ -1,152 +1,152 @@
1
- require 'pp'
2
-
3
- Shindo.tests('Fog::Soa[oraclecloud] | SOA requests', 'soa') do
4
-
5
- tests("#soa-create", "create") do
6
- instance = Fog::OracleCloud[:soa].instances.create(
7
- :service_name => 'TestSOA',
8
- :description => 'A new weblogic instance',
9
- :dba_name => 'SYS',
10
- :dba_password => 'password',
11
- :db_service_name => 'TestDB',
12
- :admin_password => 'Welcome1$',
13
- :admin_username => 'weblogic',
14
- :shape => 'oc3m',
15
- :version => '12.2.1',
16
- :ssh_key => 'ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAkNNQ4ri2oUW46mBO/4CHMGCOALciumwGvFEMDLGNnlinstanceUSqU4IRrqgj+znLClfb29Oer0devdarM6DilsZVgZ2YbI5ZD5vICR/O9J0c28dArwbtFeIjcV2TCWyj5xKEXF1r+OrJMexHQa0fW1URGrU8QODpJNC/9eCVGcEXddL31xTZYpjoVOCVx66kNa6lSHEVV3T4zaCby9Oe5QI4gZe1+xyxHPNEW5wogwS3dlKSyL2CfBP0aUKOmJ5Nrl8+y0GqJQXdGjZ9FIknmwWueRW/6qPQvZocjOZ8YiPZgAP0RNy6lL+u8mnAazj/mrEdmB5QUzpDAllIr5Tn/xaddZQ==',
17
- :cloud_storage_container => 'Test123',
18
- :topology => 'osb'
19
- )
20
- test "can create a soa instance" do
21
- instance.is_a? Fog::OracleCloud::SOA::Instance
22
- end
23
-
24
- test "is being built" do
25
- !instance.ready?
26
- end
27
- instance.wait_for { ready? }
28
-
29
- test "is built" do
30
- instance.ready?
31
- end
32
- end
33
-
34
- tests("#soa-and-db-create", "create") do
35
- instance = Fog::OracleCloud[:soa].instances.create({
36
- :service_name => 'TestSOA2',
37
- :description => 'A new weblogic instance',
38
- :admin_password => 'Welcome1$',
39
- :admin_username => 'weblogic',
40
- :shape => 'oc3m',
41
- :version => '12.2.1',
42
- :ssh_key => 'ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAkNNQ4ri2oUW46mBO/4CHMGCOALciumwGvFEMDLGNnlinstanceUSqU4IRrqgj+znLClfb29Oer0devdarM6DilsZVgZ2YbI5ZD5vICR/O9J0c28dArwbtFeIjcV2TCWyj5xKEXF1r+OrJMexHQa0fW1URGrU8QODpJNC/9eCVGcEXddL31xTZYpjoVOCVx66kNa6lSHEVV3T4zaCby9Oe5QI4gZe1+xyxHPNEW5wogwS3dlKSyL2CfBP0aUKOmJ5Nrl8+y0GqJQXdGjZ9FIknmwWueRW/6qPQvZocjOZ8YiPZgAP0RNy6lL+u8mnAazj/mrEdmB5QUzpDAllIr5Tn/xaddZQ==',
43
- :topology => 'osb'
44
- })
45
- test "can create a soa instance" do
46
- instance.is_a? Fog::OracleCloud::SOA::Instance
47
- end
48
-
49
- test "is being built" do
50
- !instance.ready?
51
- end
52
- instance.wait_for { ready? }
53
-
54
- test "is built" do
55
- instance.ready?
56
- end
57
-
58
- test "shoud have created a database instance" do
59
- db = Fog::OracleCloud[:database].instances.get('TestSOA2-DB')
60
- db.is_a? Fog::OracleCloud::Database::Instance
61
- end
62
-
63
- test "should have created a storage container" do
64
- container = Fog::Storage[:oraclecloud].containers.get('TestSOA2_Backup')
65
- container.is_a? Fog::Storage::OracleCloud::Container
66
- end
67
- end
68
-
69
- tests('#soa-validation') do
70
- tests("should ensure service name doesn't have underscore").raises(ArgumentError) do
71
- instance = Fog::OracleCloud[:soa].instances.new({
72
- :service_name => 'Has_Underscore'
73
- })
74
- end
75
- tests("should ensure service name doesn't have number as first letter").raises(ArgumentError) do
76
- instance = Fog::OracleCloud[:soa].instances.new({
77
- :service_name => '1NotFirstLetter'
78
- })
79
- end
80
- tests("should ensure service name isn't too long").raises(ArgumentError) do
81
- instance = Fog::OracleCloud[:soa].instances.new({
82
- :service_name => 'ReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyLongName'
83
- })
84
- end
85
- tests("should ensure service name doesn't contain special characters").raises(ArgumentError) do
86
- instance = Fog::OracleCloud[:soa].instances.new({
87
- :service_name => 'Special$characters'
88
- })
89
- end
90
- tests("should ensure admin password starts with a letter").raises(ArgumentError) do
91
- instance = Fog::OracleCloud[:soa].instances.new({
92
- :service_name => 'Test',
93
- :admin_password => '1NotFirstLetter'
94
- })
95
- end
96
- tests("should ensure admin password is not too long").raises(ArgumentError) do
97
- instance = Fog::OracleCloud[:soa].instances.new({
98
- :service_name => 'Test',
99
- :admin_password => 'ReallyReallyReallyReallyReallyReallyReallyReallyPassword1$'
100
- })
101
- end
102
- tests("should ensure admin password has special chars").raises(ArgumentError) do
103
- instance = Fog::OracleCloud[:soa].instances.new({
104
- :service_name => 'Test',
105
- :admin_password => 'WelcomePassword1'
106
- })
107
- end
108
- tests("should ensure admin password has numbers").raises(ArgumentError) do
109
- instance = Fog::OracleCloud[:soa].instances.new({
110
- :service_name => 'Test',
111
- :admin_password => 'WelcomePassword$'
112
- })
113
- end
114
- end
115
-
116
- tests('#soa-read') do
117
- instances = Fog::OracleCloud[:soa].instances
118
- test "returns an Array" do
119
- instances.is_a? Array
120
- end
121
-
122
- test "should return records" do
123
- instances.size >= 1
124
- end
125
-
126
- test "should return a valid name" do
127
- instances.first.service_name.is_a? String
128
- end
129
-
130
- instance = Fog::OracleCloud[:soa].instances.get(instances.first.service_name)
131
- test "should return an instance" do
132
- instance.service_name.is_a? String
133
- end
134
-
135
- test "get job status" do
136
- status = instance.job_status
137
- status.is_a? Array
138
- end
139
- end
140
-
141
- tests("#soa-delete", "create") do
142
- instance = Fog::OracleCloud[:soa].instances.get('TestSOA')
143
- instance.destroy('SYS', 'password')
144
- instance.wait_for { stopping? }
145
- tests("should actually delete instance").raises(Fog::OracleCloud::SOA::NotFound) do
146
- instance.wait_for { stopped? }
147
- end
148
- # Clean up
149
- instance = Fog::OracleCloud[:soa].instances.get('TestSOA2')
150
- instance.destroy('SYS', 'Welcome1$')
151
- end
1
+ require 'pp'
2
+
3
+ Shindo.tests('Fog::Soa[oraclecloud] | SOA requests', 'soa') do
4
+
5
+ tests("#soa-create", "create") do
6
+ instance = Fog::OracleCloud[:soa].instances.create(
7
+ :service_name => 'TestSOA',
8
+ :description => 'A new weblogic instance',
9
+ :dba_name => 'SYS',
10
+ :dba_password => 'password',
11
+ :db_service_name => 'TestDB',
12
+ :admin_password => 'Welcome1$',
13
+ :admin_username => 'weblogic',
14
+ :shape => 'oc3m',
15
+ :version => '12.2.1',
16
+ :ssh_key => 'ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAkNNQ4ri2oUW46mBO/4CHMGCOALciumwGvFEMDLGNnlinstanceUSqU4IRrqgj+znLClfb29Oer0devdarM6DilsZVgZ2YbI5ZD5vICR/O9J0c28dArwbtFeIjcV2TCWyj5xKEXF1r+OrJMexHQa0fW1URGrU8QODpJNC/9eCVGcEXddL31xTZYpjoVOCVx66kNa6lSHEVV3T4zaCby9Oe5QI4gZe1+xyxHPNEW5wogwS3dlKSyL2CfBP0aUKOmJ5Nrl8+y0GqJQXdGjZ9FIknmwWueRW/6qPQvZocjOZ8YiPZgAP0RNy6lL+u8mnAazj/mrEdmB5QUzpDAllIr5Tn/xaddZQ==',
17
+ :cloud_storage_container => 'Test123',
18
+ :topology => 'osb'
19
+ )
20
+ test "can create a soa instance" do
21
+ instance.is_a? Fog::OracleCloud::SOA::Instance
22
+ end
23
+
24
+ test "is being built" do
25
+ !instance.ready?
26
+ end
27
+ instance.wait_for { ready? }
28
+
29
+ test "is built" do
30
+ instance.ready?
31
+ end
32
+ end
33
+
34
+ tests("#soa-and-db-create", "create") do
35
+ instance = Fog::OracleCloud[:soa].instances.create({
36
+ :service_name => 'TestSOA2',
37
+ :description => 'A new weblogic instance',
38
+ :admin_password => 'Welcome1$',
39
+ :admin_username => 'weblogic',
40
+ :shape => 'oc3m',
41
+ :version => '12.2.1',
42
+ :ssh_key => 'ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAkNNQ4ri2oUW46mBO/4CHMGCOALciumwGvFEMDLGNnlinstanceUSqU4IRrqgj+znLClfb29Oer0devdarM6DilsZVgZ2YbI5ZD5vICR/O9J0c28dArwbtFeIjcV2TCWyj5xKEXF1r+OrJMexHQa0fW1URGrU8QODpJNC/9eCVGcEXddL31xTZYpjoVOCVx66kNa6lSHEVV3T4zaCby9Oe5QI4gZe1+xyxHPNEW5wogwS3dlKSyL2CfBP0aUKOmJ5Nrl8+y0GqJQXdGjZ9FIknmwWueRW/6qPQvZocjOZ8YiPZgAP0RNy6lL+u8mnAazj/mrEdmB5QUzpDAllIr5Tn/xaddZQ==',
43
+ :topology => 'osb'
44
+ })
45
+ test "can create a soa instance" do
46
+ instance.is_a? Fog::OracleCloud::SOA::Instance
47
+ end
48
+
49
+ test "is being built" do
50
+ !instance.ready?
51
+ end
52
+ instance.wait_for { ready? }
53
+
54
+ test "is built" do
55
+ instance.ready?
56
+ end
57
+
58
+ test "shoud have created a database instance" do
59
+ db = Fog::OracleCloud[:database].instances.get('TestSOA2-DB')
60
+ db.is_a? Fog::OracleCloud::Database::Instance
61
+ end
62
+
63
+ test "should have created a storage container" do
64
+ container = Fog::Storage[:oraclecloud].containers.get('TestSOA2_Backup')
65
+ container.is_a? Fog::Storage::OracleCloud::Container
66
+ end
67
+ end
68
+
69
+ tests('#soa-validation') do
70
+ tests("should ensure service name doesn't have underscore").raises(ArgumentError) do
71
+ instance = Fog::OracleCloud[:soa].instances.new({
72
+ :service_name => 'Has_Underscore'
73
+ })
74
+ end
75
+ tests("should ensure service name doesn't have number as first letter").raises(ArgumentError) do
76
+ instance = Fog::OracleCloud[:soa].instances.new({
77
+ :service_name => '1NotFirstLetter'
78
+ })
79
+ end
80
+ tests("should ensure service name isn't too long").raises(ArgumentError) do
81
+ instance = Fog::OracleCloud[:soa].instances.new({
82
+ :service_name => 'ReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyLongName'
83
+ })
84
+ end
85
+ tests("should ensure service name doesn't contain special characters").raises(ArgumentError) do
86
+ instance = Fog::OracleCloud[:soa].instances.new({
87
+ :service_name => 'Special$characters'
88
+ })
89
+ end
90
+ tests("should ensure admin password starts with a letter").raises(ArgumentError) do
91
+ instance = Fog::OracleCloud[:soa].instances.new({
92
+ :service_name => 'Test',
93
+ :admin_password => '1NotFirstLetter'
94
+ })
95
+ end
96
+ tests("should ensure admin password is not too long").raises(ArgumentError) do
97
+ instance = Fog::OracleCloud[:soa].instances.new({
98
+ :service_name => 'Test',
99
+ :admin_password => 'ReallyReallyReallyReallyReallyReallyReallyReallyPassword1$'
100
+ })
101
+ end
102
+ tests("should ensure admin password has special chars").raises(ArgumentError) do
103
+ instance = Fog::OracleCloud[:soa].instances.new({
104
+ :service_name => 'Test',
105
+ :admin_password => 'WelcomePassword1'
106
+ })
107
+ end
108
+ tests("should ensure admin password has numbers").raises(ArgumentError) do
109
+ instance = Fog::OracleCloud[:soa].instances.new({
110
+ :service_name => 'Test',
111
+ :admin_password => 'WelcomePassword$'
112
+ })
113
+ end
114
+ end
115
+
116
+ tests('#soa-read') do
117
+ instances = Fog::OracleCloud[:soa].instances
118
+ test "returns an Array" do
119
+ instances.is_a? Array
120
+ end
121
+
122
+ test "should return records" do
123
+ instances.size >= 1
124
+ end
125
+
126
+ test "should return a valid name" do
127
+ instances.first.service_name.is_a? String
128
+ end
129
+
130
+ instance = Fog::OracleCloud[:soa].instances.get(instances.first.service_name)
131
+ test "should return an instance" do
132
+ instance.service_name.is_a? String
133
+ end
134
+
135
+ test "get job status" do
136
+ status = instance.job_status
137
+ status.is_a? Array
138
+ end
139
+ end
140
+
141
+ tests("#soa-delete", "create") do
142
+ instance = Fog::OracleCloud[:soa].instances.get('TestSOA')
143
+ instance.destroy('SYS', 'password')
144
+ instance.wait_for { stopping? }
145
+ tests("should actually delete instance").raises(Fog::OracleCloud::SOA::NotFound) do
146
+ instance.wait_for { stopped? }
147
+ end
148
+ # Clean up
149
+ instance = Fog::OracleCloud[:soa].instances.get('TestSOA2')
150
+ instance.destroy('SYS', 'Welcome1$')
151
+ end
152
152
  end
@@ -1,54 +1,54 @@
1
- Shindo.tests('Fog::Compute[oraclecloud] | ssh_keys requests', 'ssh_keys') do
2
-
3
- tests("#sshkeys-create", "create") do
4
- sshkey = Fog::Compute[:oraclecloud].ssh_keys.create(
5
- :name => 'TestSSHKey2',
6
- :enabled => false,
7
- :key => 'ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAkNNQ4ri2oUW46mBO/4CHMGCOALciumwGvFEMDLGNnlDbUSqU4IRrqgj+znLClfb29Oer0devdarM6DilsZVgZ2YbI5ZD5vICR/O9J0c28dArwbtFeIjcV2TCWyj5xKEXF1r+OrJMexHQa0fW1URGrU8QODpJNC/9eCVGcEXddL31xTZYpjoVOCVx66kNa6lSHEVV3T4zaCby9Oe5QI4gZe1+xyxHPNEW5wogwS3dlKSyL2CfBP0aUKOmJ5Nrl8+y0GqJQXdGjZ9FIknmwWueRW/6qPQvZocjOZ8YiPZgAP0RNy6lL+u8mnAazj/mrEdmB5QUzpDAllIr5Tn/xaddZQ=='
8
- )
9
-
10
- test "can create an sshkey" do
11
- sshkey.is_a? Fog::Compute::OracleCloud::SshKey
12
- sshkey.uri.is_a? String
13
- end
14
-
15
- check = Fog::Compute[:oraclecloud].ssh_keys.get(sshkey.name)
16
- test "can get ssh key" do
17
- check.uri == sshkey.uri
18
- end
19
-
20
- sshkey.enabled = true
21
- sshkey.save()
22
- test "can update ssh key" do
23
- check = Fog::Compute[:oraclecloud].ssh_keys.get(sshkey.name)
24
- check.enabled == true
25
- end
26
-
27
- end
28
-
29
- tests("#sshkeys-read") do
30
- sshkeys = Fog::Compute[:oraclecloud].ssh_keys
31
- test "returns an Array" do
32
- sshkeys.is_a? Array
33
- end
34
- test "should return keys" do
35
- sshkeys.size >= 1
36
- end
37
- test "should return a valid name" do
38
- sshkeys.first.name.is_a? String
39
- end
40
-
41
- sshkey = Fog::Compute[:oraclecloud].ssh_keys.get(sshkeys.first.name)
42
- test "should return a key" do
43
- sshkey.name.is_a? String
44
- end
45
- end
46
-
47
- tests("#sshkeys-delete", "create") do
48
- sshkey = Fog::Compute[:oraclecloud].ssh_keys.get('TestSSHKey2')
49
- sshkey.destroy()
50
- tests("should delete key").raises(Fog::Compute::OracleCloud::NotFound) do
51
- sshkey = Fog::Compute[:oraclecloud].ssh_keys.get('TestSSHKey2')
52
- end
53
- end
1
+ Shindo.tests('Fog::Compute[oraclecloud] | ssh_keys requests', 'ssh_keys') do
2
+
3
+ tests("#sshkeys-create", "create") do
4
+ sshkey = Fog::Compute[:oraclecloud].ssh_keys.create(
5
+ :name => 'TestSSHKey2',
6
+ :enabled => false,
7
+ :key => 'ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAkNNQ4ri2oUW46mBO/4CHMGCOALciumwGvFEMDLGNnlDbUSqU4IRrqgj+znLClfb29Oer0devdarM6DilsZVgZ2YbI5ZD5vICR/O9J0c28dArwbtFeIjcV2TCWyj5xKEXF1r+OrJMexHQa0fW1URGrU8QODpJNC/9eCVGcEXddL31xTZYpjoVOCVx66kNa6lSHEVV3T4zaCby9Oe5QI4gZe1+xyxHPNEW5wogwS3dlKSyL2CfBP0aUKOmJ5Nrl8+y0GqJQXdGjZ9FIknmwWueRW/6qPQvZocjOZ8YiPZgAP0RNy6lL+u8mnAazj/mrEdmB5QUzpDAllIr5Tn/xaddZQ=='
8
+ )
9
+
10
+ test "can create an sshkey" do
11
+ sshkey.is_a? Fog::Compute::OracleCloud::SshKey
12
+ sshkey.uri.is_a? String
13
+ end
14
+
15
+ check = Fog::Compute[:oraclecloud].ssh_keys.get(sshkey.name)
16
+ test "can get ssh key" do
17
+ check.uri == sshkey.uri
18
+ end
19
+
20
+ sshkey.enabled = true
21
+ sshkey.save()
22
+ test "can update ssh key" do
23
+ check = Fog::Compute[:oraclecloud].ssh_keys.get(sshkey.name)
24
+ check.enabled == true
25
+ end
26
+
27
+ end
28
+
29
+ tests("#sshkeys-read") do
30
+ sshkeys = Fog::Compute[:oraclecloud].ssh_keys
31
+ test "returns an Array" do
32
+ sshkeys.is_a? Array
33
+ end
34
+ test "should return keys" do
35
+ sshkeys.size >= 1
36
+ end
37
+ test "should return a valid name" do
38
+ sshkeys.first.name.is_a? String
39
+ end
40
+
41
+ sshkey = Fog::Compute[:oraclecloud].ssh_keys.get(sshkeys.first.name)
42
+ test "should return a key" do
43
+ sshkey.name.is_a? String
44
+ end
45
+ end
46
+
47
+ tests("#sshkeys-delete", "create") do
48
+ sshkey = Fog::Compute[:oraclecloud].ssh_keys.get('TestSSHKey2')
49
+ sshkey.destroy()
50
+ tests("should delete key").raises(Fog::Compute::OracleCloud::NotFound) do
51
+ sshkey = Fog::Compute[:oraclecloud].ssh_keys.get('TestSSHKey2')
52
+ end
53
+ end
54
54
  end
@@ -1,55 +1,55 @@
1
- Shindo.tests('Fog::Storage[oraclecloud] | storage requests', 'storage') do
2
-
3
- tests("#storage-create", "create") do
4
- container = Fog::Storage[:oraclecloud].containers.create(
5
- :name => 'TestContainer1',
6
- )
7
- test "can create a storage container" do
8
- container.is_a? Fog::Storage::OracleCloud::Container
9
- container.name.is_a? String
10
- end
11
- pp container
12
- check = Fog::Storage[:oraclecloud].containers.get(container.name)
13
- test "can get container" do
14
- check.name == container.name
15
- end
16
-
17
- # Can't destroy immediately, as the cloud won't have replicated in time and will give us an error
18
- # when we try to delete. No way to find out if the cloud has finished this replication though
19
- # container.destroy()
20
- # tests("can delete container").raises(Excon::Error::NotFound) do
21
- # check = Fog::Storage[:oracle].containers.get(container.name)
22
- # end
23
- end
24
-
25
- tests("#storage-read") do
26
- containers = Fog::Storage[:oraclecloud].containers
27
-
28
- test "returns an Array" do
29
- containers.is_a? Array
30
- end
31
- test "should return keys" do
32
- containers.size >= 1
33
- end
34
- test "should return a valid name" do
35
- containers.first.name.is_a? String
36
- end
37
- container = Fog::Storage[:oraclecloud].containers.get(containers.first.name)
38
- test "should return a key" do
39
- container.name.is_a? String
40
- end
41
- end
42
-
43
- tests("#object-read") do
44
- objects = Fog::Storage[:oraclecloud].containers.first.objects
45
- test "returns an Array" do
46
- objects.is_a? Array
47
- end
48
- test "should return multiple" do
49
- objects.size >= 1
50
- end
51
- test "should return an object" do
52
- objects.first.name.is_a? String
53
- end
54
- end
1
+ Shindo.tests('Fog::Storage[oraclecloud] | storage requests', 'storage') do
2
+
3
+ tests("#storage-create", "create") do
4
+ container = Fog::Storage[:oraclecloud].containers.create(
5
+ :name => 'TestContainer1',
6
+ )
7
+ test "can create a storage container" do
8
+ container.is_a? Fog::Storage::OracleCloud::Container
9
+ container.name.is_a? String
10
+ end
11
+ pp container
12
+ check = Fog::Storage[:oraclecloud].containers.get(container.name)
13
+ test "can get container" do
14
+ check.name == container.name
15
+ end
16
+
17
+ # Can't destroy immediately, as the cloud won't have replicated in time and will give us an error
18
+ # when we try to delete. No way to find out if the cloud has finished this replication though
19
+ # container.destroy()
20
+ # tests("can delete container").raises(Excon::Error::NotFound) do
21
+ # check = Fog::Storage[:oracle].containers.get(container.name)
22
+ # end
23
+ end
24
+
25
+ tests("#storage-read") do
26
+ containers = Fog::Storage[:oraclecloud].containers
27
+
28
+ test "returns an Array" do
29
+ containers.is_a? Array
30
+ end
31
+ test "should return keys" do
32
+ containers.size >= 1
33
+ end
34
+ test "should return a valid name" do
35
+ containers.first.name.is_a? String
36
+ end
37
+ container = Fog::Storage[:oraclecloud].containers.get(containers.first.name)
38
+ test "should return a key" do
39
+ container.name.is_a? String
40
+ end
41
+ end
42
+
43
+ tests("#object-read") do
44
+ objects = Fog::Storage[:oraclecloud].containers.first.objects
45
+ test "returns an Array" do
46
+ objects.is_a? Array
47
+ end
48
+ test "should return multiple" do
49
+ objects.size >= 1
50
+ end
51
+ test "should return an object" do
52
+ objects.first.name.is_a? String
53
+ end
54
+ end
55
55
  end