oneview-sdk 5.2.0 → 5.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (275) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +11 -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/TESTING.md +0 -0
  9. data/bin/oneview-sdk-ruby +0 -0
  10. data/endpoints-support.md +221 -186
  11. data/lib/oneview-sdk.rb +4 -3
  12. data/lib/oneview-sdk/cli.rb +9 -9
  13. data/lib/oneview-sdk/client.rb +6 -6
  14. data/lib/oneview-sdk/config_loader.rb +0 -0
  15. data/lib/oneview-sdk/exceptions.rb +0 -0
  16. data/lib/oneview-sdk/image-streamer/client.rb +4 -4
  17. data/lib/oneview-sdk/image-streamer/resource/api300.rb +0 -0
  18. data/lib/oneview-sdk/image-streamer/resource/api300/artifact_bundle.rb +1 -1
  19. data/lib/oneview-sdk/image-streamer/resource/api300/build_plan.rb +0 -0
  20. data/lib/oneview-sdk/image-streamer/resource/api300/deployment_group.rb +0 -0
  21. data/lib/oneview-sdk/image-streamer/resource/api300/deployment_plan.rb +0 -0
  22. data/lib/oneview-sdk/image-streamer/resource/api300/golden_image.rb +1 -1
  23. data/lib/oneview-sdk/image-streamer/resource/api300/os_volume.rb +0 -0
  24. data/lib/oneview-sdk/image-streamer/resource/api300/plan_script.rb +0 -0
  25. data/lib/oneview-sdk/image-streamer/resource/api300/resource.rb +0 -0
  26. data/lib/oneview-sdk/image_streamer.rb +0 -0
  27. data/lib/oneview-sdk/resource.rb +5 -6
  28. data/lib/oneview-sdk/resource/api200.rb +0 -0
  29. data/lib/oneview-sdk/resource/api200/client_certificate.rb +0 -0
  30. data/lib/oneview-sdk/resource/api200/connection_template.rb +0 -0
  31. data/lib/oneview-sdk/resource/api200/datacenter.rb +0 -0
  32. data/lib/oneview-sdk/resource/api200/enclosure.rb +5 -6
  33. data/lib/oneview-sdk/resource/api200/enclosure_group.rb +0 -0
  34. data/lib/oneview-sdk/resource/api200/ethernet_network.rb +0 -0
  35. data/lib/oneview-sdk/resource/api200/event.rb +0 -0
  36. data/lib/oneview-sdk/resource/api200/fabric.rb +0 -0
  37. data/lib/oneview-sdk/resource/api200/fc_network.rb +0 -0
  38. data/lib/oneview-sdk/resource/api200/fcoe_network.rb +0 -0
  39. data/lib/oneview-sdk/resource/api200/firmware_bundle.rb +0 -0
  40. data/lib/oneview-sdk/resource/api200/firmware_driver.rb +0 -0
  41. data/lib/oneview-sdk/resource/api200/id_pool.rb +0 -0
  42. data/lib/oneview-sdk/resource/api200/interconnect.rb +1 -1
  43. data/lib/oneview-sdk/resource/api200/lig_uplink_set.rb +0 -0
  44. data/lib/oneview-sdk/resource/api200/logical_downlink.rb +0 -0
  45. data/lib/oneview-sdk/resource/api200/logical_enclosure.rb +0 -0
  46. data/lib/oneview-sdk/resource/api200/logical_interconnect.rb +0 -0
  47. data/lib/oneview-sdk/resource/api200/logical_interconnect_group.rb +6 -6
  48. data/lib/oneview-sdk/resource/api200/logical_switch.rb +5 -3
  49. data/lib/oneview-sdk/resource/api200/logical_switch_group.rb +0 -0
  50. data/lib/oneview-sdk/resource/api200/login_detail.rb +27 -0
  51. data/lib/oneview-sdk/resource/api200/managed_san.rb +0 -0
  52. data/lib/oneview-sdk/resource/api200/network_set.rb +0 -0
  53. data/lib/oneview-sdk/resource/api200/power_device.rb +0 -0
  54. data/lib/oneview-sdk/resource/api200/rack.rb +8 -1
  55. data/lib/oneview-sdk/resource/api200/resource.rb +0 -0
  56. data/lib/oneview-sdk/resource/api200/san_manager.rb +0 -0
  57. data/lib/oneview-sdk/resource/api200/server_hardware.rb +10 -4
  58. data/lib/oneview-sdk/resource/api200/server_hardware_type.rb +1 -1
  59. data/lib/oneview-sdk/resource/api200/server_profile.rb +2 -2
  60. data/lib/oneview-sdk/resource/api200/server_profile_template.rb +0 -0
  61. data/lib/oneview-sdk/resource/api200/storage_pool.rb +6 -0
  62. data/lib/oneview-sdk/resource/api200/storage_system.rb +7 -1
  63. data/lib/oneview-sdk/resource/api200/switch.rb +1 -1
  64. data/lib/oneview-sdk/resource/api200/unmanaged_device.rb +0 -0
  65. data/lib/oneview-sdk/resource/api200/uplink_set.rb +0 -0
  66. data/lib/oneview-sdk/resource/api200/user.rb +5 -4
  67. data/lib/oneview-sdk/resource/api200/version.rb +27 -0
  68. data/lib/oneview-sdk/resource/api200/volume.rb +21 -17
  69. data/lib/oneview-sdk/resource/api200/volume_attachment.rb +0 -0
  70. data/lib/oneview-sdk/resource/api200/volume_snapshot.rb +0 -0
  71. data/lib/oneview-sdk/resource/api200/volume_template.rb +7 -10
  72. data/lib/oneview-sdk/resource/api200/web_server_certificate.rb +0 -0
  73. data/lib/oneview-sdk/resource/api300.rb +1 -1
  74. data/lib/oneview-sdk/resource/api300/c7000.rb +0 -0
  75. data/lib/oneview-sdk/resource/api300/c7000/client_certificate.rb +0 -0
  76. data/lib/oneview-sdk/resource/api300/c7000/connection_template.rb +0 -0
  77. data/lib/oneview-sdk/resource/api300/c7000/datacenter.rb +0 -0
  78. data/lib/oneview-sdk/resource/api300/c7000/enclosure.rb +0 -0
  79. data/lib/oneview-sdk/resource/api300/c7000/enclosure_group.rb +0 -0
  80. data/lib/oneview-sdk/resource/api300/c7000/ethernet_network.rb +0 -0
  81. data/lib/oneview-sdk/resource/api300/c7000/event.rb +0 -0
  82. data/lib/oneview-sdk/resource/api300/c7000/fabric.rb +0 -0
  83. data/lib/oneview-sdk/resource/api300/c7000/fc_network.rb +0 -0
  84. data/lib/oneview-sdk/resource/api300/c7000/fcoe_network.rb +0 -0
  85. data/lib/oneview-sdk/resource/api300/c7000/firmware_bundle.rb +0 -0
  86. data/lib/oneview-sdk/resource/api300/c7000/firmware_driver.rb +0 -0
  87. data/lib/oneview-sdk/resource/api300/c7000/id_pool.rb +0 -0
  88. data/lib/oneview-sdk/resource/api300/c7000/interconnect.rb +0 -0
  89. data/lib/oneview-sdk/resource/api300/c7000/internal_link_set.rb +0 -0
  90. data/lib/oneview-sdk/resource/api300/c7000/lig_uplink_set.rb +0 -0
  91. data/lib/oneview-sdk/resource/api300/c7000/logical_downlink.rb +0 -0
  92. data/lib/oneview-sdk/resource/api300/c7000/logical_enclosure.rb +0 -0
  93. data/lib/oneview-sdk/resource/api300/c7000/logical_interconnect.rb +0 -0
  94. data/lib/oneview-sdk/resource/api300/c7000/logical_interconnect_group.rb +0 -0
  95. data/lib/oneview-sdk/resource/api300/c7000/logical_switch.rb +0 -0
  96. data/lib/oneview-sdk/resource/api300/c7000/logical_switch_group.rb +0 -0
  97. data/lib/oneview-sdk/resource/api300/c7000/login_detail.rb +23 -0
  98. data/lib/oneview-sdk/resource/api300/c7000/managed_san.rb +0 -0
  99. data/lib/oneview-sdk/resource/api300/c7000/network_set.rb +0 -0
  100. data/lib/oneview-sdk/resource/api300/c7000/power_device.rb +0 -0
  101. data/lib/oneview-sdk/resource/api300/c7000/rack.rb +0 -0
  102. data/lib/oneview-sdk/resource/api300/c7000/resource.rb +0 -0
  103. data/lib/oneview-sdk/resource/api300/c7000/san_manager.rb +0 -0
  104. data/lib/oneview-sdk/resource/api300/c7000/scope.rb +3 -5
  105. data/lib/oneview-sdk/resource/api300/c7000/server_hardware.rb +0 -0
  106. data/lib/oneview-sdk/resource/api300/c7000/server_hardware_type.rb +0 -0
  107. data/lib/oneview-sdk/resource/api300/c7000/server_profile.rb +0 -0
  108. data/lib/oneview-sdk/resource/api300/c7000/server_profile_template.rb +0 -0
  109. data/lib/oneview-sdk/resource/api300/c7000/storage_pool.rb +0 -0
  110. data/lib/oneview-sdk/resource/api300/c7000/storage_system.rb +0 -0
  111. data/lib/oneview-sdk/resource/api300/c7000/switch.rb +0 -0
  112. data/lib/oneview-sdk/resource/api300/c7000/unmanaged_device.rb +0 -0
  113. data/lib/oneview-sdk/resource/api300/c7000/uplink_set.rb +0 -0
  114. data/lib/oneview-sdk/resource/api300/c7000/user.rb +0 -0
  115. data/lib/oneview-sdk/resource/api300/c7000/version.rb +23 -0
  116. data/lib/oneview-sdk/resource/api300/c7000/volume.rb +0 -0
  117. data/lib/oneview-sdk/resource/api300/c7000/volume_attachment.rb +0 -0
  118. data/lib/oneview-sdk/resource/api300/c7000/volume_snapshot.rb +0 -0
  119. data/lib/oneview-sdk/resource/api300/c7000/volume_template.rb +0 -0
  120. data/lib/oneview-sdk/resource/api300/c7000/web_server_certificate.rb +0 -0
  121. data/lib/oneview-sdk/resource/api300/synergy.rb +0 -0
  122. data/lib/oneview-sdk/resource/api300/synergy/client_certificate.rb +0 -0
  123. data/lib/oneview-sdk/resource/api300/synergy/connection_template.rb +0 -0
  124. data/lib/oneview-sdk/resource/api300/synergy/datacenter.rb +0 -0
  125. data/lib/oneview-sdk/resource/api300/synergy/drive_enclosure.rb +0 -0
  126. data/lib/oneview-sdk/resource/api300/synergy/enclosure.rb +1 -1
  127. data/lib/oneview-sdk/resource/api300/synergy/enclosure_group.rb +0 -0
  128. data/lib/oneview-sdk/resource/api300/synergy/ethernet_network.rb +0 -0
  129. data/lib/oneview-sdk/resource/api300/synergy/event.rb +0 -0
  130. data/lib/oneview-sdk/resource/api300/synergy/fabric.rb +0 -0
  131. data/lib/oneview-sdk/resource/api300/synergy/fc_network.rb +0 -0
  132. data/lib/oneview-sdk/resource/api300/synergy/fcoe_network.rb +0 -0
  133. data/lib/oneview-sdk/resource/api300/synergy/firmware_bundle.rb +0 -0
  134. data/lib/oneview-sdk/resource/api300/synergy/firmware_driver.rb +0 -0
  135. data/lib/oneview-sdk/resource/api300/synergy/id_pool.rb +0 -0
  136. data/lib/oneview-sdk/resource/api300/synergy/interconnect.rb +0 -0
  137. data/lib/oneview-sdk/resource/api300/synergy/internal_link_set.rb +0 -0
  138. data/lib/oneview-sdk/resource/api300/synergy/lig_uplink_set.rb +0 -0
  139. data/lib/oneview-sdk/resource/api300/synergy/logical_downlink.rb +0 -0
  140. data/lib/oneview-sdk/resource/api300/synergy/logical_enclosure.rb +0 -0
  141. data/lib/oneview-sdk/resource/api300/synergy/logical_interconnect.rb +0 -0
  142. data/lib/oneview-sdk/resource/api300/synergy/logical_interconnect_group.rb +0 -0
  143. data/lib/oneview-sdk/resource/api300/synergy/login_detail.rb +23 -0
  144. data/lib/oneview-sdk/resource/api300/synergy/managed_san.rb +0 -0
  145. data/lib/oneview-sdk/resource/api300/synergy/network_set.rb +0 -0
  146. data/lib/oneview-sdk/resource/api300/synergy/os_deployment_plan.rb +0 -0
  147. data/lib/oneview-sdk/resource/api300/synergy/power_device.rb +0 -0
  148. data/lib/oneview-sdk/resource/api300/synergy/rack.rb +0 -0
  149. data/lib/oneview-sdk/resource/api300/synergy/resource.rb +0 -0
  150. data/lib/oneview-sdk/resource/api300/synergy/san_manager.rb +0 -0
  151. data/lib/oneview-sdk/resource/api300/synergy/sas_interconnect.rb +0 -0
  152. data/lib/oneview-sdk/resource/api300/synergy/sas_logical_interconnect.rb +0 -0
  153. data/lib/oneview-sdk/resource/api300/synergy/sas_logical_interconnect_group.rb +0 -0
  154. data/lib/oneview-sdk/resource/api300/synergy/scope.rb +0 -0
  155. data/lib/oneview-sdk/resource/api300/synergy/server_hardware.rb +0 -0
  156. data/lib/oneview-sdk/resource/api300/synergy/server_hardware_type.rb +0 -0
  157. data/lib/oneview-sdk/resource/api300/synergy/server_profile.rb +0 -0
  158. data/lib/oneview-sdk/resource/api300/synergy/server_profile_template.rb +0 -0
  159. data/lib/oneview-sdk/resource/api300/synergy/storage_pool.rb +0 -0
  160. data/lib/oneview-sdk/resource/api300/synergy/storage_system.rb +0 -0
  161. data/lib/oneview-sdk/resource/api300/synergy/switch.rb +0 -0
  162. data/lib/oneview-sdk/resource/api300/synergy/unmanaged_device.rb +0 -0
  163. data/lib/oneview-sdk/resource/api300/synergy/uplink_set.rb +0 -0
  164. data/lib/oneview-sdk/resource/api300/synergy/user.rb +0 -0
  165. data/lib/oneview-sdk/resource/api300/synergy/version.rb +23 -0
  166. data/lib/oneview-sdk/resource/api300/synergy/volume.rb +0 -0
  167. data/lib/oneview-sdk/resource/api300/synergy/volume_attachment.rb +0 -0
  168. data/lib/oneview-sdk/resource/api300/synergy/volume_snapshot.rb +0 -0
  169. data/lib/oneview-sdk/resource/api300/synergy/volume_template.rb +0 -0
  170. data/lib/oneview-sdk/resource/api300/synergy/web_server_certificate.rb +0 -0
  171. data/lib/oneview-sdk/resource/api500.rb +1 -1
  172. data/lib/oneview-sdk/resource/api500/c7000.rb +0 -0
  173. data/lib/oneview-sdk/resource/api500/c7000/client_certificate.rb +0 -0
  174. data/lib/oneview-sdk/resource/api500/c7000/connection_template.rb +0 -0
  175. data/lib/oneview-sdk/resource/api500/c7000/datacenter.rb +0 -0
  176. data/lib/oneview-sdk/resource/api500/c7000/enclosure.rb +0 -0
  177. data/lib/oneview-sdk/resource/api500/c7000/enclosure_group.rb +0 -0
  178. data/lib/oneview-sdk/resource/api500/c7000/ethernet_network.rb +0 -0
  179. data/lib/oneview-sdk/resource/api500/c7000/event.rb +0 -0
  180. data/lib/oneview-sdk/resource/api500/c7000/fabric.rb +0 -0
  181. data/lib/oneview-sdk/resource/api500/c7000/fc_network.rb +0 -0
  182. data/lib/oneview-sdk/resource/api500/c7000/fcoe_network.rb +0 -0
  183. data/lib/oneview-sdk/resource/api500/c7000/firmware_bundle.rb +0 -0
  184. data/lib/oneview-sdk/resource/api500/c7000/firmware_driver.rb +0 -0
  185. data/lib/oneview-sdk/resource/api500/c7000/id_pool.rb +0 -0
  186. data/lib/oneview-sdk/resource/api500/c7000/interconnect.rb +0 -0
  187. data/lib/oneview-sdk/resource/api500/c7000/internal_link_set.rb +0 -0
  188. data/lib/oneview-sdk/resource/api500/c7000/lig_uplink_set.rb +0 -0
  189. data/lib/oneview-sdk/resource/api500/c7000/logical_downlink.rb +0 -0
  190. data/lib/oneview-sdk/resource/api500/c7000/logical_enclosure.rb +0 -0
  191. data/lib/oneview-sdk/resource/api500/c7000/logical_interconnect.rb +0 -0
  192. data/lib/oneview-sdk/resource/api500/c7000/logical_interconnect_group.rb +0 -0
  193. data/lib/oneview-sdk/resource/api500/c7000/logical_switch.rb +0 -0
  194. data/lib/oneview-sdk/resource/api500/c7000/logical_switch_group.rb +0 -0
  195. data/lib/oneview-sdk/resource/api500/c7000/login_detail.rb +23 -0
  196. data/lib/oneview-sdk/resource/api500/c7000/managed_san.rb +0 -0
  197. data/lib/oneview-sdk/resource/api500/c7000/network_set.rb +0 -0
  198. data/lib/oneview-sdk/resource/api500/c7000/power_device.rb +0 -0
  199. data/lib/oneview-sdk/resource/api500/c7000/rack.rb +0 -0
  200. data/lib/oneview-sdk/resource/api500/c7000/resource.rb +0 -0
  201. data/lib/oneview-sdk/resource/api500/c7000/san_manager.rb +0 -0
  202. data/lib/oneview-sdk/resource/api500/c7000/scope.rb +0 -0
  203. data/lib/oneview-sdk/resource/api500/c7000/server_hardware.rb +0 -0
  204. data/lib/oneview-sdk/resource/api500/c7000/server_hardware_type.rb +0 -0
  205. data/lib/oneview-sdk/resource/api500/c7000/server_profile.rb +0 -0
  206. data/lib/oneview-sdk/resource/api500/c7000/server_profile_template.rb +0 -0
  207. data/lib/oneview-sdk/resource/api500/c7000/storage_pool.rb +7 -1
  208. data/lib/oneview-sdk/resource/api500/c7000/storage_system.rb +3 -3
  209. data/lib/oneview-sdk/resource/api500/c7000/switch.rb +0 -0
  210. data/lib/oneview-sdk/resource/api500/c7000/unmanaged_device.rb +0 -0
  211. data/lib/oneview-sdk/resource/api500/c7000/uplink_set.rb +0 -0
  212. data/lib/oneview-sdk/resource/api500/c7000/user.rb +0 -0
  213. data/lib/oneview-sdk/resource/api500/c7000/version.rb +23 -0
  214. data/lib/oneview-sdk/resource/api500/c7000/volume.rb +21 -14
  215. data/lib/oneview-sdk/resource/api500/c7000/volume_attachment.rb +0 -0
  216. data/lib/oneview-sdk/resource/api500/c7000/volume_snapshot.rb +0 -0
  217. data/lib/oneview-sdk/resource/api500/c7000/volume_template.rb +3 -5
  218. data/lib/oneview-sdk/resource/api500/c7000/web_server_certificate.rb +0 -0
  219. data/lib/oneview-sdk/resource/api500/synergy.rb +0 -0
  220. data/lib/oneview-sdk/resource/api500/synergy/client_certificate.rb +0 -0
  221. data/lib/oneview-sdk/resource/api500/synergy/connection_template.rb +0 -0
  222. data/lib/oneview-sdk/resource/api500/synergy/datacenter.rb +0 -0
  223. data/lib/oneview-sdk/resource/api500/synergy/drive_enclosure.rb +0 -0
  224. data/lib/oneview-sdk/resource/api500/synergy/enclosure.rb +0 -0
  225. data/lib/oneview-sdk/resource/api500/synergy/enclosure_group.rb +0 -0
  226. data/lib/oneview-sdk/resource/api500/synergy/ethernet_network.rb +0 -0
  227. data/lib/oneview-sdk/resource/api500/synergy/event.rb +0 -0
  228. data/lib/oneview-sdk/resource/api500/synergy/fabric.rb +0 -0
  229. data/lib/oneview-sdk/resource/api500/synergy/fc_network.rb +0 -0
  230. data/lib/oneview-sdk/resource/api500/synergy/fcoe_network.rb +0 -0
  231. data/lib/oneview-sdk/resource/api500/synergy/firmware_bundle.rb +0 -0
  232. data/lib/oneview-sdk/resource/api500/synergy/firmware_driver.rb +0 -0
  233. data/lib/oneview-sdk/resource/api500/synergy/id_pool.rb +0 -0
  234. data/lib/oneview-sdk/resource/api500/synergy/interconnect.rb +0 -0
  235. data/lib/oneview-sdk/resource/api500/synergy/internal_link_set.rb +0 -0
  236. data/lib/oneview-sdk/resource/api500/synergy/lig_uplink_set.rb +0 -0
  237. data/lib/oneview-sdk/resource/api500/synergy/logical_downlink.rb +0 -0
  238. data/lib/oneview-sdk/resource/api500/synergy/logical_enclosure.rb +0 -0
  239. data/lib/oneview-sdk/resource/api500/synergy/logical_interconnect.rb +0 -0
  240. data/lib/oneview-sdk/resource/api500/synergy/logical_interconnect_group.rb +0 -0
  241. data/lib/oneview-sdk/resource/api500/synergy/login_detail.rb +23 -0
  242. data/lib/oneview-sdk/resource/api500/synergy/managed_san.rb +0 -0
  243. data/lib/oneview-sdk/resource/api500/synergy/network_set.rb +0 -0
  244. data/lib/oneview-sdk/resource/api500/synergy/os_deployment_plan.rb +0 -0
  245. data/lib/oneview-sdk/resource/api500/synergy/power_device.rb +0 -0
  246. data/lib/oneview-sdk/resource/api500/synergy/rack.rb +0 -0
  247. data/lib/oneview-sdk/resource/api500/synergy/resource.rb +0 -0
  248. data/lib/oneview-sdk/resource/api500/synergy/san_manager.rb +0 -0
  249. data/lib/oneview-sdk/resource/api500/synergy/sas_interconnect.rb +0 -0
  250. data/lib/oneview-sdk/resource/api500/synergy/sas_logical_interconnect.rb +0 -0
  251. data/lib/oneview-sdk/resource/api500/synergy/sas_logical_interconnect_group.rb +0 -0
  252. data/lib/oneview-sdk/resource/api500/synergy/scope.rb +0 -0
  253. data/lib/oneview-sdk/resource/api500/synergy/server_hardware.rb +0 -0
  254. data/lib/oneview-sdk/resource/api500/synergy/server_hardware_type.rb +0 -0
  255. data/lib/oneview-sdk/resource/api500/synergy/server_profile.rb +0 -0
  256. data/lib/oneview-sdk/resource/api500/synergy/server_profile_template.rb +0 -0
  257. data/lib/oneview-sdk/resource/api500/synergy/storage_pool.rb +0 -0
  258. data/lib/oneview-sdk/resource/api500/synergy/storage_system.rb +0 -0
  259. data/lib/oneview-sdk/resource/api500/synergy/switch.rb +0 -0
  260. data/lib/oneview-sdk/resource/api500/synergy/unmanaged_device.rb +0 -0
  261. data/lib/oneview-sdk/resource/api500/synergy/uplink_set.rb +0 -0
  262. data/lib/oneview-sdk/resource/api500/synergy/user.rb +0 -0
  263. data/lib/oneview-sdk/resource/api500/synergy/version.rb +23 -0
  264. data/lib/oneview-sdk/resource/api500/synergy/volume.rb +0 -0
  265. data/lib/oneview-sdk/resource/api500/synergy/volume_attachment.rb +0 -0
  266. data/lib/oneview-sdk/resource/api500/synergy/volume_snapshot.rb +0 -0
  267. data/lib/oneview-sdk/resource/api500/synergy/volume_template.rb +0 -0
  268. data/lib/oneview-sdk/resource/api500/synergy/web_server_certificate.rb +0 -0
  269. data/lib/oneview-sdk/resource_helper.rb +0 -0
  270. data/lib/oneview-sdk/rest.rb +7 -6
  271. data/lib/oneview-sdk/scmb.rb +0 -0
  272. data/lib/oneview-sdk/ssl_helper.rb +3 -2
  273. data/lib/oneview-sdk/version.rb +1 -1
  274. data/oneview-sdk.gemspec +3 -2
  275. metadata +31 -7
@@ -22,7 +22,7 @@ module OneviewSDK
22
22
  # @return [Array<OneviewSDK:API300:Synergy::Enclosure>] containing the added enclosures
23
23
  def add
24
24
  ensure_client
25
- required_attributes = %w(hostname)
25
+ required_attributes = %w[hostname]
26
26
  required_attributes.each { |k| raise IncompleteResource, "Missing required attribute: '#{k}'" unless @data.key?(k) }
27
27
 
28
28
  temp_data = @data.select { |k, _v| required_attributes.include?(k) }
@@ -0,0 +1,23 @@
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 '../../api200/login_detail'
13
+
14
+ module OneviewSDK
15
+ module API300
16
+ module Synergy
17
+ # login details resource for API300 synergy
18
+ class LoginDetail < OneviewSDK::API200::LoginDetail
19
+
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,23 @@
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 '../../api200/version'
13
+
14
+ module OneviewSDK
15
+ module API300
16
+ module Synergy
17
+ # Version resource implementation for API300 Synergy
18
+ class Version < OneviewSDK::API200::Version
19
+
20
+ end
21
+ end
22
+ end
23
+ end
@@ -12,7 +12,7 @@
12
12
  module OneviewSDK
13
13
  # Module for API v500
14
14
  module API500
15
- SUPPORTED_VARIANTS = %w(C7000 Synergy).freeze
15
+ SUPPORTED_VARIANTS = %w[C7000 Synergy].freeze
16
16
  DEFAULT_VARIANT = 'C7000'.freeze
17
17
  @variant = DEFAULT_VARIANT
18
18
  @variant_updated = false # Whether or not the API variant has been set by the user
File without changes
@@ -0,0 +1,23 @@
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 '../../api300/c7000/login_detail'
13
+
14
+ module OneviewSDK
15
+ module API500
16
+ module C7000
17
+ # login details resource implementation for API500 C7000
18
+ class LoginDetail < OneviewSDK::API300::C7000::LoginDetail
19
+
20
+ end
21
+ end
22
+ end
23
+ end
@@ -17,7 +17,7 @@ module OneviewSDK
17
17
  # Storage pool resource implementation for API500 C7000
18
18
  class StoragePool < OneviewSDK::API500::C7000::Resource
19
19
  BASE_URI = '/rest/storage-pools'.freeze
20
- UNIQUE_IDENTIFIERS = %w(uri).freeze
20
+ UNIQUE_IDENTIFIERS = %w[uri].freeze
21
21
 
22
22
  # Create a resource object, associate it with a client, and set its properties.
23
23
  # @param [OneviewSDK::Client] client The client object for the OneView appliance
@@ -35,6 +35,12 @@ module OneviewSDK
35
35
  unavailable_method
36
36
  end
37
37
 
38
+ # Method is not available
39
+ # @raise [OneviewSDK::MethodUnavailable] method is not available
40
+ def create!(*)
41
+ unavailable_method
42
+ end
43
+
38
44
  # Method is not available
39
45
  # @raise [OneviewSDK::MethodUnavailable] method is not available
40
46
  def delete(*)
@@ -17,7 +17,7 @@ module OneviewSDK
17
17
  # Storage System resource implementation for API500 C7000
18
18
  class StorageSystem < OneviewSDK::API300::C7000::StorageSystem
19
19
  # deviceSpecificAttributes['serialNumber'] and deviceSpecificAttributes['wwn'] are supported too
20
- UNIQUE_IDENTIFIERS = %w(name uri hostname).freeze
20
+ UNIQUE_IDENTIFIERS = %w[name uri hostname].freeze
21
21
 
22
22
  # Create a resource object, associate it with a client, and set its properties.
23
23
  # @param [OneviewSDK::Client] client The client object for the OneView appliance
@@ -47,7 +47,7 @@ module OneviewSDK
47
47
  # @return [OneviewSDK::StorageSystem] self
48
48
  def add
49
49
  ensure_client
50
- temp_old_data = JSON.load(@data.to_json)
50
+ temp_old_data = JSON.parse(@data.to_json)
51
51
  credentials = temp_old_data['credentials'] || {}
52
52
  request_body = {
53
53
  'family' => @data['family'],
@@ -103,7 +103,7 @@ module OneviewSDK
103
103
  # @return [Boolean] Whether or not retrieve was successful
104
104
  # @raise [OneviewSDK::IncompleteResource] if required attributes are not filled
105
105
  def retrieve!
106
- data_temp = JSON.load(@data.to_json)
106
+ data_temp = JSON.parse(@data.to_json)
107
107
  serial_number = data_temp['deviceSpecificAttributes']['serialNumber'] rescue nil
108
108
  wwn = data_temp['deviceSpecificAttributes']['wwn'] rescue nil
109
109
 
@@ -0,0 +1,23 @@
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 '../../api300/c7000/version'
13
+
14
+ module OneviewSDK
15
+ module API500
16
+ module C7000
17
+ # Version resource implementation for API500 C7000
18
+ class Version < OneviewSDK::API300::C7000::Version
19
+
20
+ end
21
+ end
22
+ end
23
+ end
@@ -25,10 +25,11 @@ module OneviewSDK
25
25
 
26
26
  # Creates the volume
27
27
  # @note properties and templateUri parameters are required for creation, but not afterwards; after creation, they will be removed.
28
+ # @param [Hash] header The header options for the request (key-value pairs)
28
29
  # @raise [OneviewSDK::IncompleteResource] if the client is not set.
29
30
  # @raise [StandardError] if the resource creation fails.
30
31
  # @return [Resource] self
31
- def create
32
+ def create(header = {})
32
33
  properties = Hash[@data['properties'].map { |k, v| [k.to_sym, v] }]
33
34
  family = properties[:dataProtectionLevel].nil? ? 'StoreServ' : 'StoreVirtual'
34
35
  template_data = {
@@ -37,7 +38,7 @@ module OneviewSDK
37
38
  }
38
39
  @data['templateUri'] = get_volume_template_uri(template_data) unless @data['templateUri']
39
40
 
40
- OneviewSDK::Resource.instance_method(:create).bind(self).call
41
+ OneviewSDK::Resource.instance_method(:create).bind(self).call(DEFAULT_REQUEST_HEADER.merge(header))
41
42
  @data.delete('properties')
42
43
  @data.delete('templateUri')
43
44
  self
@@ -54,14 +55,15 @@ module OneviewSDK
54
55
  # Deletes the resource from OneView or from Oneview and storage system
55
56
  # @param [Symbol] flag Delete storage system from Oneview only or in storage system as well.
56
57
  # Flags: :all = removes the volume from oneview and storage system. :oneview = removes from oneview only.
58
+ # @param [Hash] header The header options for the request (key-value pairs)
57
59
  # @raise [InvalidResource] if an invalid flag is passed.
58
60
  # @return [true] if resource was deleted successfully.
59
- def delete(flag = :all)
61
+ def delete(flag = :all, header = {})
60
62
  ensure_client && ensure_uri
61
- raise InvalidResource, 'Invalid flag value, use :oneview or :all' unless flag == :oneview || flag == :all
63
+ raise InvalidResource, 'Invalid flag value, use :oneview or :all' unless %i[oneview all].include?(flag)
62
64
  uri = @data['uri']
63
65
  uri << '?suppressDeviceUpdates=true' if flag == :oneview
64
- response = @client.rest_delete(uri, 'If-Match' => @data['eTag'])
66
+ response = @client.rest_delete(uri, DEFAULT_REQUEST_HEADER.merge(header).merge('If-Match' => @data['eTag']))
65
67
  @client.response_handler(response)
66
68
  true
67
69
  end
@@ -148,7 +150,7 @@ module OneviewSDK
148
150
  # @return [OneviewSDK::Volume] The volume imported.
149
151
  def add
150
152
  ensure_client
151
- required_attributes = %w(deviceVolumeName isShareable storageSystemUri)
153
+ required_attributes = %w[deviceVolumeName isShareable storageSystemUri]
152
154
  required_attributes.each { |k| raise IncompleteResource, "Missing required attribute: '#{k}'" unless @data.key?(k) || @data.key?(k.to_sym) }
153
155
  @data['name'] ||= @data['deviceVolumeName']
154
156
  response = @client.rest_post("#{BASE_URI}/from-existing", { 'body' => @data }, @api_version)
@@ -158,10 +160,12 @@ module OneviewSDK
158
160
 
159
161
  # Retrieve resource details based on this resource's name or URI.
160
162
  # @note one of the UNIQUE_IDENTIFIERS, e.g. name or uri or properties['name'], must be specified in the resource
163
+ # @param [Hash] header The header options for the request (key-value pairs)
161
164
  # @return [Boolean] Whether or not retrieve was successful
162
- def retrieve!
163
- return super unless @data['properties']
164
- results = find_by_name_in_properties
165
+ def retrieve!(header = {})
166
+ header = DEFAULT_REQUEST_HEADER.merge(header)
167
+ return super(header) unless @data['properties']
168
+ results = find_by_name_in_properties(header)
165
169
  return false unless results.size == 1
166
170
  set_all(results.first.data)
167
171
  true
@@ -169,10 +173,12 @@ module OneviewSDK
169
173
 
170
174
  # Check if a resource exists
171
175
  # @note one of the UNIQUE_IDENTIFIERS, e.g. name or uri or properties['name'], must be specified in the resource
176
+ # @param [Hash] header The header options for the request (key-value pairs)
172
177
  # @return [Boolean] Whether or not resource exists
173
- def exists?
174
- return super unless @data['properties']
175
- find_by_name_in_properties.size == 1
178
+ def exists?(header = {})
179
+ header = DEFAULT_REQUEST_HEADER.merge(header)
180
+ return super(header) unless @data['properties']
181
+ find_by_name_in_properties(header).size == 1
176
182
  end
177
183
 
178
184
  private
@@ -201,12 +207,13 @@ module OneviewSDK
201
207
  end
202
208
 
203
209
  # Gets the volume
210
+ # @param [Hash] header The header options for the request (key-value pairs)
204
211
  # @raise [OneviewSDK::IncompleteResource] if the name parameter is not set
205
212
  # @return [Array] the array of volumes
206
- def find_by_name_in_properties
213
+ def find_by_name_in_properties(header)
207
214
  name = @data['properties']['name'] || @data['properties'][:name]
208
215
  raise IncompleteResource, 'Must set resource name within the properties before trying to retrieve!' unless name
209
- self.class.find_by(@client, 'name' => name)
216
+ self.class.find_by(@client, { 'name' => name }, BASE_URI, header)
210
217
  end
211
218
  end
212
219
  end