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
@@ -16,7 +16,7 @@ module OneviewSDK
16
16
  # Server hardware resource implementation
17
17
  class ServerHardware < Resource
18
18
  BASE_URI = '/rest/server-hardware'.freeze
19
- UNIQUE_IDENTIFIERS = %w(name uri serialNumber virtualSerialNumber serverProfileUri).freeze
19
+ UNIQUE_IDENTIFIERS = %w[name uri serialNumber virtualSerialNumber serverProfileUri].freeze
20
20
 
21
21
  # Remove resource from OneView
22
22
  # @return [true] if resource was removed successfully
@@ -32,6 +32,12 @@ module OneviewSDK
32
32
  @data['type'] ||= 'server-hardware-4'
33
33
  end
34
34
 
35
+ # Method is not available
36
+ # @raise [OneviewSDK::MethodUnavailable] method is not available
37
+ def create!(*)
38
+ unavailable_method
39
+ end
40
+
35
41
  # Retrieve resource details based on this resource's name or URI.
36
42
  # @note one of the UNIQUE_IDENTIFIERS must be specified in the resource
37
43
  # @return [Boolean] Whether or not retrieve was successful
@@ -79,15 +85,15 @@ module OneviewSDK
79
85
  # @return [OneviewSDK::ServerHardware] self
80
86
  def add
81
87
  ensure_client
82
- required_attributes = %w(hostname username password licensingIntent)
88
+ required_attributes = %w[hostname username password licensingIntent]
83
89
  required_attributes.each { |k| raise IncompleteResource, "Missing required attribute: '#{k}'" unless @data.key?(k) }
84
90
 
85
- optional_attrs = %w(configurationState force restore)
91
+ optional_attrs = %w[configurationState force restore]
86
92
  temp_data = @data.select { |k, _v| required_attributes.include?(k) || optional_attrs.include?(k) }
87
93
  response = @client.rest_post(self.class::BASE_URI, { 'body' => temp_data }, @api_version)
88
94
  body = @client.response_handler(response)
89
95
  set_all(body)
90
- %w(username password hostname).each { |k| @data.delete(k) } # These are no longer needed
96
+ %w[username password hostname].each { |k| @data.delete(k) } # These are no longer needed
91
97
  self
92
98
  end
93
99
 
@@ -51,7 +51,7 @@ module OneviewSDK
51
51
  def update(attributes = {})
52
52
  set_all(attributes)
53
53
  ensure_client && ensure_uri
54
- data = @data.select { |k, _v| %w(name description).include?(k) }
54
+ data = @data.select { |k, _v| %w[name description].include?(k) }
55
55
  response = @client.rest_put(@data['uri'], { 'body' => data }, @api_version)
56
56
  @client.response_handler(response)
57
57
  self
@@ -18,7 +18,7 @@ module OneviewSDK
18
18
  class ServerProfile < Resource
19
19
  include OneviewSDK::ResourceHelper::PatchOperation
20
20
  BASE_URI = '/rest/server-profiles'.freeze
21
- UNIQUE_IDENTIFIERS = %w(name uri associatedServer serialNumber serverHardwareUri).freeze
21
+ UNIQUE_IDENTIFIERS = %w[name uri associatedServer serialNumber serverHardwareUri].freeze
22
22
 
23
23
  def initialize(client, params = {}, api_ver = nil)
24
24
  super
@@ -313,7 +313,7 @@ module OneviewSDK
313
313
  query_uri = build_query(query) if query
314
314
  response = client.rest_get("#{BASE_URI}/available-networks#{query_uri}")
315
315
  body = client.response_handler(response)
316
- body.select { |k, _v| %w(ethernetNetworks networkSets fcNetworks).include?(k) }
316
+ body.select { |k, _v| %w[ethernetNetworks networkSets fcNetworks].include?(k) }
317
317
  end
318
318
 
319
319
  # Gets the available servers based on the query parameters
@@ -44,6 +44,12 @@ module OneviewSDK
44
44
  unavailable_method
45
45
  end
46
46
 
47
+ # Method is not available
48
+ # @raise [OneviewSDK::MethodUnavailable] method is not available
49
+ def create!(*)
50
+ unavailable_method
51
+ end
52
+
47
53
  # Method is not available
48
54
  # @raise [OneviewSDK::MethodUnavailable] method is not available
49
55
  def delete(*)
@@ -16,7 +16,7 @@ module OneviewSDK
16
16
  # Storage system resource implementation
17
17
  class StorageSystem < Resource
18
18
  BASE_URI = '/rest/storage-systems'.freeze
19
- UNIQUE_IDENTIFIERS = %w(name uri serialNumber wwn).freeze # credentials['ip_hostname'] is supported too
19
+ UNIQUE_IDENTIFIERS = %w[name uri serialNumber wwn].freeze # credentials['ip_hostname'] is supported too
20
20
 
21
21
  # Remove resource from OneView
22
22
  # @return [true] if resource was removed successfully
@@ -38,6 +38,12 @@ module OneviewSDK
38
38
  unavailable_method
39
39
  end
40
40
 
41
+ # Method is not available
42
+ # @raise [OneviewSDK::MethodUnavailable] method is not available
43
+ def create!(*)
44
+ unavailable_method
45
+ end
46
+
41
47
  # Method is not available
42
48
  # @raise [OneviewSDK::MethodUnavailable] method is not available
43
49
  def delete(*)
@@ -17,7 +17,7 @@ module OneviewSDK
17
17
  class Switch < Resource
18
18
  BASE_URI = '/rest/switches'.freeze
19
19
  TYPE_URI = '/rest/switch-types'.freeze
20
- UNIQUE_IDENTIFIERS = %w(name uri serialNumber).freeze
20
+ UNIQUE_IDENTIFIERS = %w[name uri serialNumber].freeze
21
21
 
22
22
  # Remove resource from OneView
23
23
  # @return [true] if resource was removed successfully
@@ -16,7 +16,7 @@ module OneviewSDK
16
16
  # User resource implementation
17
17
  class User < Resource
18
18
  BASE_URI = '/rest/users'.freeze
19
- UNIQUE_IDENTIFIERS = %w(userName uri).freeze
19
+ UNIQUE_IDENTIFIERS = %w[userName uri].freeze
20
20
 
21
21
  # Create a resource object, associate it with a client, and set its properties.
22
22
  # @param [OneviewSDK::Client] client The client object for the OneView appliance
@@ -33,12 +33,13 @@ module OneviewSDK
33
33
  # Create the resource on OneView using the current data
34
34
  # @note Calls the refresh method to set additional data
35
35
  # @note Removes the password attribute after creation
36
+ # @param [Hash] header The header options for the request (key-value pairs)
36
37
  # @raise [OneviewSDK::IncompleteResource] if the client is not set
37
38
  # @raise [StandardError] if the resource creation fails
38
39
  # @return [Resource] self
39
- def create
40
+ def create(header = {})
40
41
  ensure_client
41
- response = @client.rest_post(self.class::BASE_URI, { 'body' => @data }, @api_version)
42
+ response = @client.rest_post(BASE_URI, DEFAULT_REQUEST_HEADER.merge(header).merge('body' => @data), @api_version)
42
43
  body = @client.response_handler(response)
43
44
  @data.delete('password')
44
45
  set_all(body)
@@ -53,7 +54,7 @@ module OneviewSDK
53
54
  def update(attributes = {})
54
55
  set_all(attributes)
55
56
  ensure_client && ensure_uri
56
- new_data = @data.select { |k, _v| k.to_s != 'roles' } # This cannot be updated here. It is updated below
57
+ new_data = @data.reject { |k, _v| k.to_s == 'roles' } # This cannot be updated here. It is updated below
57
58
  response = @client.rest_put(self.class::BASE_URI, { 'body' => new_data }, @api_version)
58
59
  d = @client.response_handler(response)
59
60
  set_roles(@data['roles']) if @data['roles'] && @data['roles'].sort != d['roles'].sort
@@ -0,0 +1,27 @@
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
+ module OneviewSDK
13
+ module API200
14
+ # Version resource implementation
15
+ class Version
16
+ BASE_URI = '/rest/version'.freeze
17
+
18
+ # Get current and minimum version
19
+ # @param [OneviewSDK::Client] client The client object for the OneView appliance
20
+ # @return [Hash] Version
21
+ def self.get_version(client)
22
+ response = client.rest_get(BASE_URI)
23
+ client.response_handler(response)
24
+ end
25
+ end
26
+ end
27
+ end
@@ -27,18 +27,29 @@ module OneviewSDK
27
27
 
28
28
  # Creates the volume
29
29
  # @note provisioning parameters are required for creation, but not afterwards; after creation, they will be removed.
30
+ # @param [Hash] header The header options for the request (key-value pairs)
30
31
  # @raise [OneviewSDK::IncompleteResource] if the client is not set
31
32
  # @raise [StandardError] if the resource creation fails
32
33
  # @return [Resource] self
33
- def create
34
- ensure_client
35
- response = @client.rest_post(self.class::BASE_URI, { 'body' => @data }, @api_version)
36
- body = @client.response_handler(response)
37
- set_all(body)
34
+ def create(header = {})
35
+ super(DEFAULT_REQUEST_HEADER.merge(header))
38
36
  @data.delete('provisioningParameters')
39
37
  self
40
38
  end
41
39
 
40
+ # Delete the resource from OneView if it exists, then create it using the current data
41
+ # @note Calls refresh method to set additional data
42
+ # @param [Hash] header The header options for the request (key-value pairs)
43
+ # @raise [OneviewSDK::IncompleteResource] if the client is not set
44
+ # @raise [StandardError] if the resource creation fails
45
+ # @return [Resource] self
46
+ def create!(header = {})
47
+ temp = self.class.new(@client, @data)
48
+ header = DEFAULT_REQUEST_HEADER.merge(header)
49
+ temp.delete(:all, header) if temp.retrieve!(header)
50
+ create(header)
51
+ end
52
+
42
53
  # Update resource attributes
43
54
  # @param [Hash] attributes attributes to be updated
44
55
  # @return [OneviewSDK::Volume] self
@@ -49,20 +60,13 @@ module OneviewSDK
49
60
 
50
61
  # Deletes the resource from OneView or from Oneview and storage system
51
62
  # @param [Symbol] flag Delete storage system from Oneview only or in storage system as well
63
+ # @param [Hash] header The header options for the request (key-value pairs)
52
64
  # @return [true] if resource was deleted successfully
53
- def delete(flag = :all)
65
+ def delete(flag = :all, header = {})
54
66
  ensure_client && ensure_uri
55
- case flag
56
- when :oneview
57
- response = @client.rest_delete(@data['uri'], { 'exportOnly' => true }, @api_version)
58
- @client.response_handler(response)
59
- when :all
60
- response = @client.rest_delete(@data['uri'], {}, @api_version)
61
- @client.response_handler(response)
62
- else
63
- raise InvalidResource, 'Invalid flag value, use :oneview or :all'
64
- end
65
- true
67
+ raise InvalidResource, 'Invalid flag value, use :oneview or :all' unless %i[oneview all].include?(flag)
68
+ header = DEFAULT_REQUEST_HEADER.merge(header).merge('exportOnly' => true) if flag == :oneview
69
+ super(header)
66
70
  end
67
71
 
68
72
  # Sets the storage system to the volume
@@ -16,6 +16,7 @@ module OneviewSDK
16
16
  # Volume template resource implementation
17
17
  class VolumeTemplate < Resource
18
18
  BASE_URI = '/rest/storage-volume-templates'.freeze
19
+ DEFAULT_REQUEST_HEADER = { 'Accept-Language' => 'en_US' }.freeze
19
20
 
20
21
  # Create the client object, establishes connection, and set up the logging and api version.
21
22
  # @param [OneviewSDK::Client] client The client object for the OneView appliance
@@ -33,23 +34,19 @@ module OneviewSDK
33
34
 
34
35
  # Create the resource on OneView using the current data
35
36
  # @note Calls refresh method to set additional data
37
+ # @param [Hash] header The header options for the request (key-value pairs)
36
38
  # @raise [OneviewSDK::IncompleteResource] if the client is not set
37
39
  # @raise [StandardError] if the resource creation fails
38
40
  # @return [Resource] self
39
- def create
40
- ensure_client
41
- response = @client.rest_post(self.class::BASE_URI, { 'Accept-Language' => 'en_US', 'body' => @data }, @api_version)
42
- body = @client.response_handler(response)
43
- set_all(body)
41
+ def create(header = {})
42
+ super(DEFAULT_REQUEST_HEADER.merge(header))
44
43
  end
45
44
 
46
45
  # Deletes the volume template from OneView
46
+ # @param [Hash] header The header options for the request (key-value pairs)
47
47
  # @return [TrueClass] if the volume template was deleted successfully
48
- def delete
49
- ensure_client && ensure_uri
50
- response = @client.rest_delete(@data['uri'], { 'Accept-Language' => 'en_US' }, @api_version)
51
- @client.response_handler(response)
52
- true
48
+ def delete(header = {})
49
+ super(DEFAULT_REQUEST_HEADER.merge(header))
53
50
  end
54
51
 
55
52
  # Updates the volume template from OneView
@@ -12,7 +12,7 @@
12
12
  module OneviewSDK
13
13
  # Module for API v300
14
14
  module API300
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 '../../api200/login_detail'
13
+
14
+ module OneviewSDK
15
+ module API300
16
+ module C7000
17
+ # login details resource for API300 C7000
18
+ class LoginDetail < OneviewSDK::API200::LoginDetail
19
+
20
+ end
21
+ end
22
+ end
23
+ end
@@ -47,13 +47,11 @@ module OneviewSDK
47
47
  end
48
48
 
49
49
  # Delete resource from OneView
50
+ # @param [Hash] header The header options for the request (key-value pairs)
50
51
  # @raise [OneviewSDK::IncompleteResource] if the client or uri is not set
51
52
  # @return [true] if resource was deleted successfully
52
- def delete
53
- ensure_client && ensure_uri
54
- response = @client.rest_delete(@data['uri'], { 'If-Match' => @data['eTag'] }, @api_version)
55
- @client.response_handler(response)
56
- true
53
+ def delete(header = {})
54
+ super(DEFAULT_REQUEST_HEADER.merge(header).merge('If-Match' => @data['eTag']))
57
55
  end
58
56
 
59
57
  # Adds resource assignments
@@ -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 C7000
17
+ # Version resource implementation for API300 C7000
18
+ class Version < OneviewSDK::API200::Version
19
+
20
+ end
21
+ end
22
+ end
23
+ end