oneview-sdk 4.5.1 → 5.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (263) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +56 -0
  3. data/Gemfile +0 -0
  4. data/Guardfile +0 -0
  5. data/LICENSE +0 -0
  6. data/README.md +0 -0
  7. data/Rakefile +0 -0
  8. data/bin/oneview-sdk-ruby +0 -0
  9. data/lib/oneview-sdk.rb +0 -0
  10. data/lib/oneview-sdk/cli.rb +0 -0
  11. data/lib/oneview-sdk/client.rb +0 -0
  12. data/lib/oneview-sdk/config_loader.rb +0 -0
  13. data/lib/oneview-sdk/exceptions.rb +0 -0
  14. data/lib/oneview-sdk/image-streamer/client.rb +0 -0
  15. data/lib/oneview-sdk/image-streamer/resource/api300.rb +0 -0
  16. data/lib/oneview-sdk/image-streamer/resource/api300/artifact_bundle.rb +0 -0
  17. data/lib/oneview-sdk/image-streamer/resource/api300/build_plan.rb +0 -0
  18. data/lib/oneview-sdk/image-streamer/resource/api300/deployment_group.rb +0 -0
  19. data/lib/oneview-sdk/image-streamer/resource/api300/deployment_plan.rb +0 -0
  20. data/lib/oneview-sdk/image-streamer/resource/api300/golden_image.rb +0 -0
  21. data/lib/oneview-sdk/image-streamer/resource/api300/os_volume.rb +0 -0
  22. data/lib/oneview-sdk/image-streamer/resource/api300/plan_script.rb +0 -0
  23. data/lib/oneview-sdk/image-streamer/resource/api300/resource.rb +0 -0
  24. data/lib/oneview-sdk/image_streamer.rb +0 -0
  25. data/lib/oneview-sdk/resource.rb +54 -23
  26. data/lib/oneview-sdk/resource/api200.rb +0 -0
  27. data/lib/oneview-sdk/resource/api200/client_certificate.rb +134 -0
  28. data/lib/oneview-sdk/resource/api200/connection_template.rb +2 -1
  29. data/lib/oneview-sdk/resource/api200/datacenter.rb +0 -0
  30. data/lib/oneview-sdk/resource/api200/enclosure.rb +5 -9
  31. data/lib/oneview-sdk/resource/api200/enclosure_group.rb +2 -1
  32. data/lib/oneview-sdk/resource/api200/ethernet_network.rb +2 -2
  33. data/lib/oneview-sdk/resource/api200/event.rb +0 -0
  34. data/lib/oneview-sdk/resource/api200/fabric.rb +0 -0
  35. data/lib/oneview-sdk/resource/api200/fc_network.rb +0 -0
  36. data/lib/oneview-sdk/resource/api200/fcoe_network.rb +0 -0
  37. data/lib/oneview-sdk/resource/api200/firmware_bundle.rb +2 -1
  38. data/lib/oneview-sdk/resource/api200/firmware_driver.rb +0 -0
  39. data/lib/oneview-sdk/resource/api200/id_pool.rb +5 -3
  40. data/lib/oneview-sdk/resource/api200/interconnect.rb +0 -0
  41. data/lib/oneview-sdk/resource/api200/lig_uplink_set.rb +0 -0
  42. data/lib/oneview-sdk/resource/api200/logical_downlink.rb +0 -0
  43. data/lib/oneview-sdk/resource/api200/logical_enclosure.rb +1 -1
  44. data/lib/oneview-sdk/resource/api200/logical_interconnect.rb +4 -3
  45. data/lib/oneview-sdk/resource/api200/logical_interconnect_group.rb +2 -2
  46. data/lib/oneview-sdk/resource/api200/logical_switch.rb +0 -0
  47. data/lib/oneview-sdk/resource/api200/logical_switch_group.rb +0 -0
  48. data/lib/oneview-sdk/resource/api200/managed_san.rb +0 -0
  49. data/lib/oneview-sdk/resource/api200/network_set.rb +0 -0
  50. data/lib/oneview-sdk/resource/api200/power_device.rb +1 -1
  51. data/lib/oneview-sdk/resource/api200/rack.rb +0 -0
  52. data/lib/oneview-sdk/resource/api200/resource.rb +0 -0
  53. data/lib/oneview-sdk/resource/api200/san_manager.rb +0 -0
  54. data/lib/oneview-sdk/resource/api200/server_hardware.rb +2 -2
  55. data/lib/oneview-sdk/resource/api200/server_hardware_type.rb +0 -0
  56. data/lib/oneview-sdk/resource/api200/server_profile.rb +35 -25
  57. data/lib/oneview-sdk/resource/api200/server_profile_template.rb +24 -14
  58. data/lib/oneview-sdk/resource/api200/storage_pool.rb +0 -0
  59. data/lib/oneview-sdk/resource/api200/storage_system.rb +6 -10
  60. data/lib/oneview-sdk/resource/api200/switch.rb +4 -10
  61. data/lib/oneview-sdk/resource/api200/unmanaged_device.rb +0 -0
  62. data/lib/oneview-sdk/resource/api200/uplink_set.rb +0 -0
  63. data/lib/oneview-sdk/resource/api200/user.rb +18 -0
  64. data/lib/oneview-sdk/resource/api200/volume.rb +15 -11
  65. data/lib/oneview-sdk/resource/api200/volume_attachment.rb +3 -1
  66. data/lib/oneview-sdk/resource/api200/volume_snapshot.rb +0 -0
  67. data/lib/oneview-sdk/resource/api200/volume_template.rb +0 -0
  68. data/lib/oneview-sdk/resource/api200/web_server_certificate.rb +97 -0
  69. data/lib/oneview-sdk/resource/api300.rb +0 -0
  70. data/lib/oneview-sdk/resource/api300/c7000.rb +0 -0
  71. data/lib/oneview-sdk/resource/api300/c7000/client_certificate.rb +22 -0
  72. data/lib/oneview-sdk/resource/api300/c7000/connection_template.rb +0 -8
  73. data/lib/oneview-sdk/resource/api300/c7000/datacenter.rb +0 -0
  74. data/lib/oneview-sdk/resource/api300/c7000/enclosure.rb +0 -0
  75. data/lib/oneview-sdk/resource/api300/c7000/enclosure_group.rb +0 -1
  76. data/lib/oneview-sdk/resource/api300/c7000/ethernet_network.rb +1 -0
  77. data/lib/oneview-sdk/resource/api300/c7000/event.rb +0 -0
  78. data/lib/oneview-sdk/resource/api300/c7000/fabric.rb +0 -0
  79. data/lib/oneview-sdk/resource/api300/c7000/fc_network.rb +1 -0
  80. data/lib/oneview-sdk/resource/api300/c7000/fcoe_network.rb +1 -0
  81. data/lib/oneview-sdk/resource/api300/c7000/firmware_bundle.rb +0 -0
  82. data/lib/oneview-sdk/resource/api300/c7000/firmware_driver.rb +0 -0
  83. data/lib/oneview-sdk/resource/api300/c7000/id_pool.rb +0 -0
  84. data/lib/oneview-sdk/resource/api300/c7000/interconnect.rb +0 -0
  85. data/lib/oneview-sdk/resource/api300/{synergy/logical_switch.rb → c7000/internal_link_set.rb} +30 -7
  86. data/lib/oneview-sdk/resource/api300/c7000/lig_uplink_set.rb +0 -0
  87. data/lib/oneview-sdk/resource/api300/c7000/logical_downlink.rb +0 -0
  88. data/lib/oneview-sdk/resource/api300/c7000/logical_enclosure.rb +9 -7
  89. data/lib/oneview-sdk/resource/api300/c7000/logical_interconnect.rb +2 -20
  90. data/lib/oneview-sdk/resource/api300/c7000/logical_interconnect_group.rb +2 -0
  91. data/lib/oneview-sdk/resource/api300/c7000/logical_switch.rb +0 -19
  92. data/lib/oneview-sdk/resource/api300/c7000/logical_switch_group.rb +1 -0
  93. data/lib/oneview-sdk/resource/api300/c7000/managed_san.rb +0 -0
  94. data/lib/oneview-sdk/resource/api300/c7000/network_set.rb +1 -0
  95. data/lib/oneview-sdk/resource/api300/c7000/power_device.rb +0 -0
  96. data/lib/oneview-sdk/resource/api300/c7000/rack.rb +0 -0
  97. data/lib/oneview-sdk/resource/api300/c7000/resource.rb +0 -0
  98. data/lib/oneview-sdk/resource/api300/c7000/san_manager.rb +0 -0
  99. data/lib/oneview-sdk/resource/api300/c7000/scope.rb +0 -0
  100. data/lib/oneview-sdk/resource/api300/c7000/server_hardware.rb +0 -0
  101. data/lib/oneview-sdk/resource/api300/c7000/server_hardware_type.rb +0 -0
  102. data/lib/oneview-sdk/resource/api300/c7000/server_profile.rb +0 -0
  103. data/lib/oneview-sdk/resource/api300/c7000/server_profile_template.rb +0 -0
  104. data/lib/oneview-sdk/resource/api300/c7000/storage_pool.rb +0 -0
  105. data/lib/oneview-sdk/resource/api300/c7000/storage_system.rb +0 -0
  106. data/lib/oneview-sdk/resource/api300/c7000/switch.rb +0 -0
  107. data/lib/oneview-sdk/resource/api300/c7000/unmanaged_device.rb +0 -0
  108. data/lib/oneview-sdk/resource/api300/c7000/uplink_set.rb +0 -0
  109. data/lib/oneview-sdk/resource/api300/c7000/user.rb +0 -0
  110. data/lib/oneview-sdk/resource/api300/c7000/volume.rb +0 -0
  111. data/lib/oneview-sdk/resource/api300/c7000/volume_attachment.rb +0 -0
  112. data/lib/oneview-sdk/resource/api300/c7000/volume_snapshot.rb +0 -0
  113. data/lib/oneview-sdk/resource/api300/c7000/volume_template.rb +0 -0
  114. data/lib/oneview-sdk/resource/api300/c7000/web_server_certificate.rb +22 -0
  115. data/lib/oneview-sdk/resource/api300/synergy.rb +0 -0
  116. data/lib/oneview-sdk/resource/api300/synergy/client_certificate.rb +22 -0
  117. data/lib/oneview-sdk/resource/api300/synergy/connection_template.rb +0 -8
  118. data/lib/oneview-sdk/resource/api300/synergy/datacenter.rb +0 -0
  119. data/lib/oneview-sdk/resource/api300/synergy/drive_enclosure.rb +0 -0
  120. data/lib/oneview-sdk/resource/api300/synergy/enclosure.rb +2 -2
  121. data/lib/oneview-sdk/resource/api300/synergy/enclosure_group.rb +0 -0
  122. data/lib/oneview-sdk/resource/api300/synergy/ethernet_network.rb +1 -0
  123. data/lib/oneview-sdk/resource/api300/synergy/event.rb +0 -0
  124. data/lib/oneview-sdk/resource/api300/synergy/fabric.rb +1 -1
  125. data/lib/oneview-sdk/resource/api300/synergy/fc_network.rb +1 -0
  126. data/lib/oneview-sdk/resource/api300/synergy/fcoe_network.rb +3 -15
  127. data/lib/oneview-sdk/resource/api300/synergy/firmware_bundle.rb +0 -0
  128. data/lib/oneview-sdk/resource/api300/synergy/firmware_driver.rb +0 -0
  129. data/lib/oneview-sdk/resource/api300/synergy/id_pool.rb +0 -0
  130. data/lib/oneview-sdk/resource/api300/synergy/interconnect.rb +0 -0
  131. data/lib/oneview-sdk/resource/api300/synergy/internal_link_set.rb +22 -0
  132. data/lib/oneview-sdk/resource/api300/synergy/lig_uplink_set.rb +0 -0
  133. data/lib/oneview-sdk/resource/api300/synergy/logical_downlink.rb +2 -14
  134. data/lib/oneview-sdk/resource/api300/synergy/logical_enclosure.rb +0 -0
  135. data/lib/oneview-sdk/resource/api300/synergy/logical_interconnect.rb +0 -20
  136. data/lib/oneview-sdk/resource/api300/synergy/logical_interconnect_group.rb +3 -1
  137. data/lib/oneview-sdk/resource/api300/synergy/managed_san.rb +0 -0
  138. data/lib/oneview-sdk/resource/api300/synergy/network_set.rb +2 -17
  139. data/lib/oneview-sdk/resource/api300/synergy/os_deployment_plan.rb +0 -0
  140. data/lib/oneview-sdk/resource/api300/synergy/power_device.rb +0 -0
  141. data/lib/oneview-sdk/resource/api300/synergy/rack.rb +0 -0
  142. data/lib/oneview-sdk/resource/api300/synergy/resource.rb +0 -0
  143. data/lib/oneview-sdk/resource/api300/synergy/san_manager.rb +0 -0
  144. data/lib/oneview-sdk/resource/api300/synergy/sas_interconnect.rb +0 -0
  145. data/lib/oneview-sdk/resource/api300/synergy/sas_logical_interconnect.rb +0 -0
  146. data/lib/oneview-sdk/resource/api300/synergy/sas_logical_interconnect_group.rb +0 -0
  147. data/lib/oneview-sdk/resource/api300/synergy/scope.rb +0 -0
  148. data/lib/oneview-sdk/resource/api300/synergy/server_hardware.rb +0 -0
  149. data/lib/oneview-sdk/resource/api300/synergy/server_hardware_type.rb +0 -0
  150. data/lib/oneview-sdk/resource/api300/synergy/server_profile.rb +24 -27
  151. data/lib/oneview-sdk/resource/api300/synergy/server_profile_template.rb +0 -12
  152. data/lib/oneview-sdk/resource/api300/synergy/storage_pool.rb +0 -0
  153. data/lib/oneview-sdk/resource/api300/synergy/storage_system.rb +0 -0
  154. data/lib/oneview-sdk/resource/api300/synergy/switch.rb +0 -0
  155. data/lib/oneview-sdk/resource/api300/synergy/unmanaged_device.rb +0 -0
  156. data/lib/oneview-sdk/resource/api300/synergy/uplink_set.rb +0 -0
  157. data/lib/oneview-sdk/resource/api300/synergy/user.rb +0 -0
  158. data/lib/oneview-sdk/resource/api300/synergy/volume.rb +0 -0
  159. data/lib/oneview-sdk/resource/api300/synergy/volume_attachment.rb +0 -0
  160. data/lib/oneview-sdk/resource/api300/synergy/volume_snapshot.rb +0 -0
  161. data/lib/oneview-sdk/resource/api300/synergy/volume_template.rb +0 -0
  162. data/lib/oneview-sdk/resource/api300/synergy/web_server_certificate.rb +22 -0
  163. data/lib/oneview-sdk/resource/api500.rb +0 -0
  164. data/lib/oneview-sdk/resource/api500/c7000.rb +0 -0
  165. data/lib/oneview-sdk/resource/api500/c7000/client_certificate.rb +22 -0
  166. data/lib/oneview-sdk/resource/api500/c7000/connection_template.rb +0 -0
  167. data/lib/oneview-sdk/resource/api500/c7000/datacenter.rb +0 -0
  168. data/lib/oneview-sdk/resource/api500/c7000/enclosure.rb +35 -0
  169. data/lib/oneview-sdk/resource/api500/c7000/enclosure_group.rb +21 -0
  170. data/lib/oneview-sdk/resource/api500/c7000/ethernet_network.rb +0 -0
  171. data/lib/oneview-sdk/resource/api500/c7000/event.rb +2 -2
  172. data/lib/oneview-sdk/resource/api500/c7000/fabric.rb +0 -0
  173. data/lib/oneview-sdk/resource/api500/c7000/fc_network.rb +1 -0
  174. data/lib/oneview-sdk/resource/api500/c7000/fcoe_network.rb +0 -0
  175. data/lib/oneview-sdk/resource/api500/c7000/firmware_bundle.rb +0 -0
  176. data/lib/oneview-sdk/resource/api500/c7000/firmware_driver.rb +0 -0
  177. data/lib/oneview-sdk/resource/api500/c7000/id_pool.rb +22 -0
  178. data/lib/oneview-sdk/resource/api500/c7000/interconnect.rb +8 -0
  179. data/lib/oneview-sdk/resource/api500/c7000/internal_link_set.rb +22 -0
  180. data/lib/oneview-sdk/resource/api500/c7000/lig_uplink_set.rb +0 -0
  181. data/lib/oneview-sdk/resource/api500/c7000/logical_downlink.rb +0 -0
  182. data/lib/oneview-sdk/resource/api500/c7000/logical_enclosure.rb +40 -0
  183. data/lib/oneview-sdk/resource/api500/c7000/logical_interconnect.rb +0 -0
  184. data/lib/oneview-sdk/resource/api500/c7000/logical_interconnect_group.rb +0 -0
  185. data/lib/oneview-sdk/resource/api500/c7000/logical_switch.rb +0 -0
  186. data/lib/oneview-sdk/resource/api500/c7000/logical_switch_group.rb +0 -0
  187. data/lib/oneview-sdk/resource/api500/c7000/managed_san.rb +10 -0
  188. data/lib/oneview-sdk/resource/api500/c7000/network_set.rb +0 -0
  189. data/lib/oneview-sdk/resource/api500/c7000/power_device.rb +0 -0
  190. data/lib/oneview-sdk/resource/api500/c7000/rack.rb +0 -0
  191. data/lib/oneview-sdk/resource/api500/c7000/resource.rb +0 -0
  192. data/lib/oneview-sdk/resource/api500/c7000/san_manager.rb +0 -0
  193. data/lib/oneview-sdk/resource/api500/c7000/scope.rb +49 -0
  194. data/lib/oneview-sdk/resource/api500/c7000/server_hardware.rb +20 -0
  195. data/lib/oneview-sdk/resource/api500/c7000/server_hardware_type.rb +1 -0
  196. data/lib/oneview-sdk/resource/api500/c7000/server_profile.rb +60 -1
  197. data/lib/oneview-sdk/resource/api500/c7000/server_profile_template.rb +86 -0
  198. data/lib/oneview-sdk/resource/api500/c7000/storage_pool.rb +57 -2
  199. data/lib/oneview-sdk/resource/api500/c7000/storage_system.rb +132 -0
  200. data/lib/oneview-sdk/resource/api500/c7000/switch.rb +7 -0
  201. data/lib/oneview-sdk/resource/api500/c7000/unmanaged_device.rb +0 -0
  202. data/lib/oneview-sdk/resource/api500/c7000/uplink_set.rb +0 -0
  203. data/lib/oneview-sdk/resource/api500/c7000/user.rb +0 -0
  204. data/lib/oneview-sdk/resource/api500/c7000/volume.rb +135 -0
  205. data/lib/oneview-sdk/resource/api500/c7000/volume_attachment.rb +24 -1
  206. data/lib/oneview-sdk/resource/api500/c7000/volume_snapshot.rb +10 -0
  207. data/lib/oneview-sdk/resource/api500/c7000/volume_template.rb +94 -3
  208. data/lib/oneview-sdk/resource/api500/c7000/web_server_certificate.rb +22 -0
  209. data/lib/oneview-sdk/resource/api500/synergy.rb +0 -0
  210. data/lib/oneview-sdk/resource/api500/synergy/client_certificate.rb +22 -0
  211. data/lib/oneview-sdk/resource/api500/synergy/connection_template.rb +0 -0
  212. data/lib/oneview-sdk/resource/api500/synergy/datacenter.rb +0 -0
  213. data/lib/oneview-sdk/resource/api500/synergy/drive_enclosure.rb +0 -0
  214. data/lib/oneview-sdk/resource/api500/synergy/enclosure.rb +35 -0
  215. data/lib/oneview-sdk/resource/api500/synergy/enclosure_group.rb +27 -0
  216. data/lib/oneview-sdk/resource/api500/synergy/ethernet_network.rb +0 -0
  217. data/lib/oneview-sdk/resource/api500/synergy/event.rb +2 -2
  218. data/lib/oneview-sdk/resource/api500/synergy/fabric.rb +0 -0
  219. data/lib/oneview-sdk/resource/api500/synergy/fc_network.rb +1 -0
  220. data/lib/oneview-sdk/resource/api500/synergy/fcoe_network.rb +0 -0
  221. data/lib/oneview-sdk/resource/api500/synergy/firmware_bundle.rb +0 -0
  222. data/lib/oneview-sdk/resource/api500/synergy/firmware_driver.rb +0 -0
  223. data/lib/oneview-sdk/resource/api500/synergy/{logical_switch.rb → id_pool.rb} +3 -3
  224. data/lib/oneview-sdk/resource/api500/synergy/interconnect.rb +17 -1
  225. data/lib/oneview-sdk/resource/api500/synergy/internal_link_set.rb +22 -0
  226. data/lib/oneview-sdk/resource/api500/synergy/lig_uplink_set.rb +0 -0
  227. data/lib/oneview-sdk/resource/api500/synergy/logical_downlink.rb +0 -0
  228. data/lib/oneview-sdk/resource/api500/synergy/logical_enclosure.rb +17 -0
  229. data/lib/oneview-sdk/resource/api500/synergy/logical_interconnect.rb +0 -0
  230. data/lib/oneview-sdk/resource/api500/synergy/logical_interconnect_group.rb +0 -0
  231. data/lib/oneview-sdk/resource/api500/synergy/managed_san.rb +2 -2
  232. data/lib/oneview-sdk/resource/api500/synergy/network_set.rb +0 -0
  233. data/lib/oneview-sdk/resource/api500/synergy/os_deployment_plan.rb +22 -0
  234. data/lib/oneview-sdk/resource/api500/synergy/power_device.rb +1 -1
  235. data/lib/oneview-sdk/resource/api500/synergy/rack.rb +0 -0
  236. data/lib/oneview-sdk/resource/api500/synergy/resource.rb +0 -0
  237. data/lib/oneview-sdk/resource/api500/synergy/san_manager.rb +0 -0
  238. data/lib/oneview-sdk/resource/api500/synergy/sas_interconnect.rb +0 -0
  239. data/lib/oneview-sdk/resource/api500/synergy/sas_logical_interconnect.rb +0 -0
  240. data/lib/oneview-sdk/resource/api500/synergy/sas_logical_interconnect_group.rb +0 -0
  241. data/lib/oneview-sdk/resource/api500/synergy/scope.rb +2 -2
  242. data/lib/oneview-sdk/resource/api500/synergy/server_hardware.rb +2 -2
  243. data/lib/oneview-sdk/resource/api500/synergy/server_hardware_type.rb +0 -0
  244. data/lib/oneview-sdk/resource/api500/synergy/server_profile.rb +4 -1
  245. data/lib/oneview-sdk/resource/api500/synergy/server_profile_template.rb +16 -2
  246. data/lib/oneview-sdk/resource/api500/synergy/storage_pool.rb +2 -2
  247. data/lib/oneview-sdk/resource/api500/synergy/storage_system.rb +1 -1
  248. data/lib/oneview-sdk/resource/api500/synergy/switch.rb +0 -0
  249. data/lib/oneview-sdk/resource/api500/synergy/unmanaged_device.rb +0 -0
  250. data/lib/oneview-sdk/resource/api500/synergy/uplink_set.rb +0 -0
  251. data/lib/oneview-sdk/resource/api500/synergy/user.rb +0 -0
  252. data/lib/oneview-sdk/resource/api500/synergy/volume.rb +2 -2
  253. data/lib/oneview-sdk/resource/api500/synergy/volume_attachment.rb +3 -3
  254. data/lib/oneview-sdk/resource/api500/synergy/volume_snapshot.rb +2 -2
  255. data/lib/oneview-sdk/resource/api500/synergy/volume_template.rb +2 -2
  256. data/lib/oneview-sdk/resource/api500/synergy/web_server_certificate.rb +22 -0
  257. data/lib/oneview-sdk/resource_helper.rb +30 -0
  258. data/lib/oneview-sdk/rest.rb +6 -2
  259. data/lib/oneview-sdk/scmb.rb +0 -0
  260. data/lib/oneview-sdk/ssl_helper.rb +0 -0
  261. data/lib/oneview-sdk/version.rb +1 -1
  262. data/oneview-sdk.gemspec +0 -0
  263. metadata +21 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 09e027ffed968897551d5a984eb4d543ea14c6e8
4
- data.tar.gz: 82e11fc63814dddd9153478513a0f0086b780213
3
+ metadata.gz: d45265d54a25dcf7c5cdeea02ee2e18bcc028b38
4
+ data.tar.gz: e0ebab15f6f7cfb82adb872c85d5fffbb3157140
5
5
  SHA512:
6
- metadata.gz: 313db274cec0f76d473a4e90c2f77560e9a48c951c0f90a67a90f15188890cd82480ab6d7a95c1c7790dc0a768a8944f6e5be36c48d23c7f19c4706fd534697b
7
- data.tar.gz: 2b1dbf8c75a58bec1f1b2f55a5981850382c1f897e067d4905fd4764201cc333830dbb2500a3065fbff63095b980e3a740c27a090dd5daefacff840d16b59db5
6
+ metadata.gz: e8f5d7643953556c36b59b117a9069a7b72f07963b8ccbe197a90642da70ff5f879da91250d61345193bc0cc6f7ebae32d71f02c0dacbb44ecc4fdc8a429b242
7
+ data.tar.gz: 028524d1c0984bb1b7cb8524e85830c41fd6e9eede503b11f79f9c66db23a4928414f30d7f2bf91de3edd419b0e1245729fbeafc64e48c6eb60f2099b85d1b7c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,59 @@
1
+ ## v5.0.0
2
+
3
+ #### New Resources:
4
+ This release adds support to HPE OneView Rest API version 200 (for hardware variant C7000), 300 and 500 (both for the hardware variants C7000 and Synergy) to the new features:
5
+ - Client Certificate
6
+ - Web Server Certificate
7
+
8
+ #### Features supported
9
+ This release adds support to OneView Rest API version 500 for the hardware variants C7000 and Synergy to the already existing features:
10
+ - Connection Template
11
+ - Datacenter
12
+ - Drive Enclosure
13
+ - Enclosure
14
+ - Enclosure Group
15
+ - Ethernet Network
16
+ - Event
17
+ - Fabric
18
+ - FC Network
19
+ - FCoE Network
20
+ - Firmware Bundle
21
+ - Firmware Driver
22
+ - ID Pool
23
+ - Interconnect
24
+ - Internal Link Set
25
+ - Logical Downlink
26
+ - Logical Enclosure
27
+ - Logical Interconnect
28
+ - Logical Interconnect Group
29
+ - Logical Switch
30
+ - Logical Switch Group
31
+ - Managed SANs
32
+ - Network Set
33
+ - Power Device
34
+ - OS Deployment Plan
35
+ - Rack
36
+ - SAN Manager
37
+ - SAS Interconnect
38
+ - SAS Logical Interconnect
39
+ - SAS Logical Interconnect Group
40
+ - Scopes
41
+ - Server Hardware
42
+ - Server Hardware Type
43
+ - Server Profile Template
44
+ - Storage Pool
45
+ - Storage System
46
+ - Switches
47
+ - Unmanaged Devices
48
+ - Uplink Set
49
+ - User
50
+ - Volume
51
+ - Volume Attachment
52
+ - Volume Templates
53
+
54
+ #### Breaking changes
55
+ 1. In the Switch resource, the `statistics` method was fixed, a non-existent endpoint was removed `/rest/switches/statistics/{portName}/subport/{subportNumber}`. Now the method only get statistics of a switch or a specific port.
56
+
1
57
  ## v4.5.1
2
58
 
3
59
  #### Bug fixes & Enhancements
data/Gemfile CHANGED
File without changes
data/Guardfile CHANGED
File without changes
data/LICENSE CHANGED
File without changes
data/README.md CHANGED
File without changes
data/Rakefile CHANGED
File without changes
data/bin/oneview-sdk-ruby CHANGED
File without changes
data/lib/oneview-sdk.rb CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -18,6 +18,7 @@ module OneviewSDK
18
18
  class Resource
19
19
  BASE_URI = '/rest'.freeze
20
20
  UNIQUE_IDENTIFIERS = %w(name uri).freeze # Ordered list of unique attributes to search by
21
+ DEFAULT_REQUEST_HEADER = {}.freeze
21
22
 
22
23
  attr_accessor \
23
24
  :client,
@@ -46,12 +47,13 @@ module OneviewSDK
46
47
 
47
48
  # Retrieve resource details based on this resource's name or URI.
48
49
  # @note one of the UNIQUE_IDENTIFIERS, e.g. name or uri, must be specified in the resource
50
+ # @param [Hash] header The header options for the request (key-value pairs)
49
51
  # @return [Boolean] Whether or not retrieve was successful
50
- def retrieve!
52
+ def retrieve!(header = self.class::DEFAULT_REQUEST_HEADER)
51
53
  retrieval_keys = self.class::UNIQUE_IDENTIFIERS.select { |k| !@data[k].nil? }
52
54
  raise IncompleteResource, "Must set resource #{self.class::UNIQUE_IDENTIFIERS.join(' or ')} before trying to retrieve!" if retrieval_keys.empty?
53
55
  retrieval_keys.each do |k|
54
- results = self.class.find_by(@client, k => @data[k])
56
+ results = self.class.find_by(@client, { k => @data[k] }, self.class::BASE_URI, header)
55
57
  next if results.size != 1
56
58
  set_all(results[0].data)
57
59
  return true
@@ -61,22 +63,40 @@ module OneviewSDK
61
63
 
62
64
  # Check if a resource exists
63
65
  # @note one of the UNIQUE_IDENTIFIERS, e.g. name or uri, must be specified in the resource
66
+ # @param [Hash] header The header options for the request (key-value pairs)
64
67
  # @return [Boolean] Whether or not resource exists
65
- def exists?
68
+ def exists?(header = self.class::DEFAULT_REQUEST_HEADER)
66
69
  retrieval_keys = self.class::UNIQUE_IDENTIFIERS.select { |k| !@data[k].nil? }
67
70
  raise IncompleteResource, "Must set resource #{self.class::UNIQUE_IDENTIFIERS.join(' or ')} before trying to retrieve!" if retrieval_keys.empty?
68
71
  retrieval_keys.each do |k|
69
- results = self.class.find_by(@client, k => @data[k])
72
+ results = self.class.find_by(@client, { k => @data[k] }, self.class::BASE_URI, header)
70
73
  return true if results.size == 1
71
74
  end
72
75
  false
73
76
  end
74
77
 
78
+ # Merges the first hash data structure with the second
79
+ # @note both arguments should be a Ruby Hash object.
80
+ # The second hash should have strings as a keys.
81
+ # This method will change the second argument.
82
+ # @raise [StandardError] if the arguments, or one them, is not a Hash object
83
+ def deep_merge!(other_data, target_data = @data)
84
+ raise 'Both arguments should be a object Hash' unless other_data.is_a?(Hash) && target_data.is_a?(Hash)
85
+ other_data.each do |key, value|
86
+ value_target = target_data[key.to_s]
87
+ if value_target.is_a?(Hash) && value.is_a?(Hash)
88
+ deep_merge!(value, value_target)
89
+ else
90
+ target_data[key.to_s] = value
91
+ end
92
+ end
93
+ end
94
+
75
95
  # Set the given hash of key-value pairs as resource data attributes
76
96
  # @param [Hash, Resource] params The options for this resource (key-value pairs or resource object)
77
97
  # @note All top-level keys will be converted to strings
78
98
  # @return [Resource] self
79
- def set_all(params = {})
99
+ def set_all(params = self.class::DEFAULT_REQUEST_HEADER)
80
100
  params = params.data if params.class <= Resource
81
101
  params = Hash[params.map { |(k, v)| [k.to_s, v] }]
82
102
  params.each { |key, value| set(key.to_s, value) }
@@ -146,12 +166,14 @@ module OneviewSDK
146
166
 
147
167
  # Create the resource on OneView using the current data
148
168
  # @note Calls the refresh method to set additional data
169
+ # @param [Hash] header The header options for the request (key-value pairs)
149
170
  # @raise [OneviewSDK::IncompleteResource] if the client is not set
150
171
  # @raise [StandardError] if the resource creation fails
151
172
  # @return [Resource] self
152
- def create
173
+ def create(header = self.class::DEFAULT_REQUEST_HEADER)
153
174
  ensure_client
154
- response = @client.rest_post(self.class::BASE_URI, { 'body' => @data }, @api_version)
175
+ options = {}.merge(header).merge('body' => @data)
176
+ response = @client.rest_post(self.class::BASE_URI, options, @api_version)
155
177
  body = @client.response_handler(response)
156
178
  set_all(body)
157
179
  self
@@ -159,21 +181,23 @@ module OneviewSDK
159
181
 
160
182
  # Delete the resource from OneView if it exists, then create it using the current data
161
183
  # @note Calls refresh method to set additional data
184
+ # @param [Hash] header The header options for the request (key-value pairs)
162
185
  # @raise [OneviewSDK::IncompleteResource] if the client is not set
163
186
  # @raise [StandardError] if the resource creation fails
164
187
  # @return [Resource] self
165
- def create!
188
+ def create!(header = self.class::DEFAULT_REQUEST_HEADER)
166
189
  temp = self.class.new(@client, @data)
167
- temp.delete if temp.retrieve!
168
- create
190
+ temp.delete(header) if temp.retrieve!(header)
191
+ create(header)
169
192
  end
170
193
 
171
194
  # Updates this object using the data that exists on OneView
172
195
  # @note Will overwrite any data that differs from OneView
196
+ # @param [Hash] header The header options for the request (key-value pairs)
173
197
  # @return [Resource] self
174
- def refresh
198
+ def refresh(header = self.class::DEFAULT_REQUEST_HEADER)
175
199
  ensure_client && ensure_uri
176
- response = @client.rest_get(@data['uri'], @api_version)
200
+ response = @client.rest_get(@data['uri'], header, @api_version)
177
201
  body = @client.response_handler(response)
178
202
  set_all(body)
179
203
  self
@@ -181,22 +205,25 @@ module OneviewSDK
181
205
 
182
206
  # Set data and save to OneView
183
207
  # @param [Hash] attributes The attributes to add/change for this resource (key-value pairs)
208
+ # @param [Hash] header The header options for the request (key-value pairs)
184
209
  # @raise [OneviewSDK::IncompleteResource] if the client or uri is not set
185
210
  # @raise [StandardError] if the resource save fails
186
211
  # @return [Resource] self
187
- def update(attributes = {})
212
+ def update(attributes = {}, header = self.class::DEFAULT_REQUEST_HEADER)
188
213
  set_all(attributes)
189
214
  ensure_client && ensure_uri
190
- response = @client.rest_put(@data['uri'], { 'body' => @data }, @api_version)
215
+ options = {}.merge(header).merge('body' => @data)
216
+ response = @client.rest_put(@data['uri'], options, @api_version)
191
217
  @client.response_handler(response)
192
218
  self
193
219
  end
194
220
 
195
221
  # Delete resource from OneView
222
+ # @param [Hash] header The header options for the request (key-value pairs)
196
223
  # @return [true] if resource was deleted successfully
197
- def delete
224
+ def delete(header = self.class::DEFAULT_REQUEST_HEADER)
198
225
  ensure_client && ensure_uri
199
- response = @client.rest_delete(@data['uri'], {}, @api_version)
226
+ response = @client.rest_delete(@data['uri'], header, @api_version)
200
227
  @client.response_handler(response)
201
228
  true
202
229
  end
@@ -231,7 +258,7 @@ module OneviewSDK
231
258
  # @param [OneviewSDK::Client] client The client object for the OneView appliance
232
259
  # @return [Hash] Schema
233
260
  def self.schema(client)
234
- response = client.rest_get("#{self::BASE_URI}/schema", client.api_version)
261
+ response = client.rest_get("#{self::BASE_URI}/schema", {}, client.api_version)
235
262
  client.response_handler(response)
236
263
  rescue StandardError => e
237
264
  client.logger.error('This resource does not implement the schema endpoint!') if e.message =~ /404 NOT FOUND/
@@ -260,9 +287,10 @@ module OneviewSDK
260
287
  # @param [OneviewSDK::Client] client The client object for the OneView appliance
261
288
  # @param [Hash] attributes Hash containing the attributes name and value
262
289
  # @param [String] uri URI of the endpoint
290
+ # @param [Hash] header The header options for the request (key-value pairs)
263
291
  # @return [Array<Resource>] Results matching the search
264
- def self.find_by(client, attributes, uri = self::BASE_URI)
265
- all = find_with_pagination(client, uri)
292
+ def self.find_by(client, attributes, uri = self::BASE_URI, header = self::DEFAULT_REQUEST_HEADER)
293
+ all = find_with_pagination(client, uri, header)
266
294
  results = []
267
295
  all.each do |member|
268
296
  temp = new(client, member)
@@ -274,11 +302,12 @@ module OneviewSDK
274
302
  # Make a GET request to the uri, and returns an array with all results (search using resource pagination)
275
303
  # @param [OneviewSDK::Client] client The client object for the OneView appliance
276
304
  # @param [String] uri URI of the endpoint
305
+ # @param [Hash] header The header options for the request (key-value pairs)
277
306
  # @return [Array<Hash>] Results
278
- def self.find_with_pagination(client, uri)
307
+ def self.find_with_pagination(client, uri, header = self::DEFAULT_REQUEST_HEADER)
279
308
  all = []
280
309
  loop do
281
- response = client.rest_get(uri)
310
+ response = client.rest_get(uri, header)
282
311
  body = client.response_handler(response)
283
312
  members = body['members']
284
313
  break unless members
@@ -290,9 +319,11 @@ module OneviewSDK
290
319
  end
291
320
 
292
321
  # Make a GET request to the resource base uri, and returns an array with all objects of this type
322
+ # @param [OneviewSDK::Client] client The client object for the OneView appliance
323
+ # @param [Hash] header The header options for the request (key-value pairs)
293
324
  # @return [Array<Resource>] Results
294
- def self.get_all(client)
295
- find_by(client, {})
325
+ def self.get_all(client, header = self::DEFAULT_REQUEST_HEADER)
326
+ find_by(client, {}, self::BASE_URI, header)
296
327
  end
297
328
 
298
329
  # Builds a Query string corresponding to the parameters passed
File without changes
@@ -0,0 +1,134 @@
1
+ # (C) Copyright 2017 Hewlett Packard Enterprise Development LP
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # You may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+ #
7
+ # Unless required by applicable law or agreed to in writing, software distributed
8
+ # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
9
+ # CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
10
+ # language governing permissions and limitations under the License.
11
+
12
+ require_relative 'resource'
13
+
14
+ module OneviewSDK
15
+ module API200
16
+ # Client certificate resource implementation
17
+ class ClientCertificate < Resource
18
+ BASE_URI = '/rest/certificates'.freeze
19
+ DEFAULT_REQUEST_HEADER = { 'requestername' => 'DEFAULT' }.freeze
20
+
21
+ # Imports the given SSL certificate into the appliance trust store
22
+ # @param [Hash] header The header options of request (key-value pairs)
23
+ # @option header [String] :requestername Used to identify requester to allow querying of proper trust store.
24
+ # Default value is "DEFAULT". List of valid input values are { "DEFAULT", "AUTHN", "RABBITMQ", "ILOOA" }.
25
+ # @return [ClientCertificate] self
26
+ alias import create
27
+
28
+ # Removes the SSL certificate
29
+ # @param [Hash] header The header options of request (key-value pairs)
30
+ # @option header [String] :requestername Used to identify requester to allow querying of proper trust store.
31
+ # Default value is "DEFAULT". List of valid input values are { "DEFAULT", "AUTHN", "RABBITMQ", "ILOOA" }.
32
+ # @return [true] if resource was deleted successfully
33
+ alias remove delete
34
+
35
+ # Create a resource object, associate it with a client, and set its properties.
36
+ # @param [OneviewSDK::Client] client The client object for the OneView appliance
37
+ # @param [Hash] params The options for this resource (key-value pairs)
38
+ # @param [Integer] api_ver The api version to use when interracting with this resource.
39
+ def initialize(client, params = {}, api_ver = nil)
40
+ super
41
+ # Default values
42
+ @data['type'] ||= 'SSLCertificateDTO'
43
+ @data['uri'] ||= "#{self.class::BASE_URI}/#{@data['aliasName']}" if @data['aliasName']
44
+ end
45
+
46
+ # Method is not available
47
+ # @raise [OneviewSDK::MethodUnavailable] method is not available
48
+ def create(*)
49
+ unavailable_method
50
+ end
51
+
52
+ # Method is not available
53
+ # @raise [OneviewSDK::MethodUnavailable] method is not available
54
+ def delete(*)
55
+ unavailable_method
56
+ end
57
+
58
+ # Imports the given list of SSL certificates into the appliance trust store.
59
+ # @param [OneviewSDK::Client] client The client object for the OneView appliance
60
+ # @param [Array<ClientCertificate>] certificates The Client Certificate list
61
+ # @param [Hash] header The header options of request (key-value pairs)
62
+ # @option header [String] :requestername Used to identify requester to allow querying of proper trust store.
63
+ # Default value is "DEFAULT". List of valid input values are { "DEFAULT", "AUTHN", "RABBITMQ", "ILOOA" }.
64
+ # @option header [String] :Accept-Language The language code requested in the response.
65
+ # If a suitable match to the requested language is not available, en-US or the appliance locale is used.
66
+ # @raise [ArgumentError] if the certificates list is nil or empty
67
+ # @return [Array<ClientCertificate>] list of Client Certificate imported
68
+ def self.import(client, certificates, header = self::DEFAULT_REQUEST_HEADER)
69
+ raise ArgumentError, 'the certificates list should be valid' if certificates.nil? || certificates.empty?
70
+ options = {}.merge(header)
71
+ options['body'] = certificates.map(&:data)
72
+ response = client.rest_post(self::BASE_URI + '?multiResource=true', options)
73
+ body = client.response_handler(response)
74
+ body.map { |data| new(client, data) }
75
+ end
76
+
77
+ # Replaces a list of existing SSL certificates with a new list of certificates.
78
+ # @param [OneviewSDK::Client] client The client object for the OneView appliance
79
+ # @param [Array<ClientCertificate>] certificates The Client Certificate list
80
+ # @param [Boolean] force If set to true, the operation completes despite any problems with network connectivity or errors on the resource itself
81
+ # @param [Hash] header The header options of request (key-value pairs)
82
+ # @option header [String] :requestername Used to identify requester to allow querying of proper trust store.
83
+ # Default value is "DEFAULT". List of valid input values are { "DEFAULT", "AUTHN", "RABBITMQ", "ILOOA" }.
84
+ # @option header [String] :Accept-Language The language code requested in the response.
85
+ # If a suitable match to the requested language is not available, en-US or the appliance locale is used.
86
+ # @return [Array<ClientCertificate>] list of the Client Certificate
87
+ def self.replace(client, certificates, force = false, header = self::DEFAULT_REQUEST_HEADER)
88
+ raise ArgumentError, 'the certificates list should be valid' if certificates.nil? || certificates.empty?
89
+ options = {}.merge(header)
90
+ options['body'] = certificates.map(&:data)
91
+ uri = self::BASE_URI + build_query(multi_resource: true, force: force)
92
+ response = client.rest_put(uri, options)
93
+ body = client.response_handler(response)
94
+ body.map { |data| new(client, data) }
95
+ end
96
+
97
+ # Removes a list of SSL certificates based on the list of alias names provided as filter criteria.
98
+ # @param [OneviewSDK::Client] client The client object for the OneView appliance
99
+ # @param [Array<String>] alias_names The alias names list used as filter to remove the client certificates
100
+ # @param [Boolean] force If set to true, the operation completes despite any problems with network connectivity or errors on the resource itself
101
+ # @param [Hash] header The header options of request (key-value pairs)
102
+ # @option header [String] :requestername Used to identify requester to allow querying of proper trust store.
103
+ # Default value is "DEFAULT". List of valid input values are { "DEFAULT", "AUTHN", "RABBITMQ", "ILOOA" }.
104
+ # @option header [String] :Accept-Language The language code requested in the response.
105
+ # If a suitable match to the requested language is not available, en-US or the appliance locale is used.
106
+ # @raise [ArgumentError] if the certificates list is nil or empty
107
+ def self.remove(client, alias_names, force = false, header = self::DEFAULT_REQUEST_HEADER)
108
+ raise ArgumentError, 'the certificates list should be valid' if alias_names.nil? || alias_names.empty?
109
+ uri = self::BASE_URI + build_query(multi_resource: true, force: force)
110
+ uri += '&filter=' + alias_names.join('&filter=')
111
+ response = client.rest_delete(uri, header)
112
+ client.response_handler(response)
113
+ end
114
+
115
+ # Validates the input certificate by verifying if it is X509 compliant.
116
+ # @param [Hash] header The header options of request (key-value pairs)
117
+ # @option header [String] :requestername Used to identify requester to allow querying of proper trust store.
118
+ # Default value is "DEFAULT". List of valid input values are { "DEFAULT", "AUTHN", "RABBITMQ", "ILOOA" }.
119
+ # @option header [String] :Accept-Language The language code requested in the response.
120
+ # If a suitable match to the requested language is not available, en-US or the appliance locale is used.
121
+ # @raise [OneviewSDK::IncompleteResource] if the client or the uri is not set
122
+ # @return [OneviewSDK::ClientCertificate] self
123
+ def validate(header = self.class::DEFAULT_REQUEST_HEADER)
124
+ ensure_client && ensure_uri
125
+ options = {}.merge(header)
126
+ options['body'] = @data
127
+ response = @client.rest_post(self.class::BASE_URI + '/validator', options, @api_version)
128
+ body = @client.response_handler(response)
129
+ set_all(body)
130
+ self
131
+ end
132
+ end
133
+ end
134
+ end