oneview-sdk 4.1.0 → 4.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +17 -2
  3. data/Gemfile +11 -0
  4. data/Guardfile +26 -0
  5. data/README.md +9 -3
  6. data/lib/oneview-sdk.rb +1 -1
  7. data/lib/oneview-sdk/image-streamer/resource/{api_300.rb → api300.rb} +0 -0
  8. data/lib/oneview-sdk/image-streamer/resource/api300/artifact_bundle.rb +10 -12
  9. data/lib/oneview-sdk/image-streamer/resource/api300/golden_image.rb +6 -61
  10. data/lib/oneview-sdk/resource.rb +23 -6
  11. data/lib/oneview-sdk/resource/api200/firmware_bundle.rb +4 -37
  12. data/lib/oneview-sdk/resource/api200/lig_uplink_set.rb +1 -1
  13. data/lib/oneview-sdk/resource/api200/logical_interconnect_group.rb +47 -29
  14. data/lib/oneview-sdk/resource/api200/volume.rb +2 -22
  15. data/lib/oneview-sdk/resource/api300/c7000/server_hardware.rb +1 -13
  16. data/lib/oneview-sdk/resource/api300/synergy/os_deployment_plan.rb +41 -0
  17. data/lib/oneview-sdk/resource/api300/synergy/server_profile.rb +13 -0
  18. data/lib/oneview-sdk/resource/api500.rb +66 -0
  19. data/lib/oneview-sdk/resource/api500/c7000.rb +27 -0
  20. data/lib/oneview-sdk/resource/api500/c7000/connection_template.rb +22 -0
  21. data/lib/oneview-sdk/resource/api500/c7000/datacenter.rb +22 -0
  22. data/lib/oneview-sdk/resource/api500/c7000/enclosure.rb +22 -0
  23. data/lib/oneview-sdk/resource/api500/c7000/enclosure_group.rb +22 -0
  24. data/lib/oneview-sdk/resource/api500/c7000/ethernet_network.rb +22 -0
  25. data/lib/oneview-sdk/resource/api500/c7000/fabric.rb +22 -0
  26. data/lib/oneview-sdk/resource/api500/c7000/fc_network.rb +22 -0
  27. data/lib/oneview-sdk/resource/api500/c7000/fcoe_network.rb +22 -0
  28. data/lib/oneview-sdk/resource/api500/c7000/firmware_bundle.rb +21 -0
  29. data/lib/oneview-sdk/resource/api500/c7000/firmware_driver.rb +22 -0
  30. data/lib/oneview-sdk/resource/api500/c7000/interconnect.rb +22 -0
  31. data/lib/oneview-sdk/resource/api500/c7000/lig_uplink_set.rb +21 -0
  32. data/lib/oneview-sdk/resource/api500/c7000/logical_downlink.rb +22 -0
  33. data/lib/oneview-sdk/resource/api500/c7000/logical_enclosure.rb +22 -0
  34. data/lib/oneview-sdk/resource/api500/c7000/logical_interconnect.rb +22 -0
  35. data/lib/oneview-sdk/resource/api500/c7000/logical_interconnect_group.rb +22 -0
  36. data/lib/oneview-sdk/resource/api500/c7000/logical_switch.rb +22 -0
  37. data/lib/oneview-sdk/resource/api500/c7000/logical_switch_group.rb +22 -0
  38. data/lib/oneview-sdk/resource/api500/c7000/managed_san.rb +22 -0
  39. data/lib/oneview-sdk/resource/api500/c7000/network_set.rb +22 -0
  40. data/lib/oneview-sdk/resource/api500/c7000/power_device.rb +21 -0
  41. data/lib/oneview-sdk/resource/api500/c7000/rack.rb +22 -0
  42. data/lib/oneview-sdk/resource/api500/c7000/resource.rb +21 -0
  43. data/lib/oneview-sdk/resource/api500/c7000/san_manager.rb +22 -0
  44. data/lib/oneview-sdk/resource/api500/c7000/scope.rb +22 -0
  45. data/lib/oneview-sdk/resource/api500/c7000/server_hardware.rb +22 -0
  46. data/lib/oneview-sdk/resource/api500/c7000/server_hardware_type.rb +21 -0
  47. data/lib/oneview-sdk/resource/api500/c7000/server_profile.rb +22 -0
  48. data/lib/oneview-sdk/resource/api500/c7000/server_profile_template.rb +22 -0
  49. data/lib/oneview-sdk/resource/api500/c7000/storage_pool.rb +22 -0
  50. data/lib/oneview-sdk/resource/api500/c7000/storage_system.rb +22 -0
  51. data/lib/oneview-sdk/resource/api500/c7000/switch.rb +22 -0
  52. data/lib/oneview-sdk/resource/api500/c7000/unmanaged_device.rb +22 -0
  53. data/lib/oneview-sdk/resource/api500/c7000/uplink_set.rb +22 -0
  54. data/lib/oneview-sdk/resource/api500/c7000/user.rb +22 -0
  55. data/lib/oneview-sdk/resource/api500/c7000/volume.rb +22 -0
  56. data/lib/oneview-sdk/resource/api500/c7000/volume_attachment.rb +22 -0
  57. data/lib/oneview-sdk/resource/api500/c7000/volume_snapshot.rb +22 -0
  58. data/lib/oneview-sdk/resource/api500/c7000/volume_template.rb +22 -0
  59. data/lib/oneview-sdk/resource/api500/synergy.rb +27 -0
  60. data/lib/oneview-sdk/resource/api500/synergy/connection_template.rb +22 -0
  61. data/lib/oneview-sdk/resource/api500/synergy/datacenter.rb +22 -0
  62. data/lib/oneview-sdk/resource/api500/synergy/drive_enclosure.rb +22 -0
  63. data/lib/oneview-sdk/resource/api500/synergy/enclosure.rb +22 -0
  64. data/lib/oneview-sdk/resource/api500/synergy/enclosure_group.rb +22 -0
  65. data/lib/oneview-sdk/resource/api500/synergy/ethernet_network.rb +22 -0
  66. data/lib/oneview-sdk/resource/api500/synergy/fabric.rb +22 -0
  67. data/lib/oneview-sdk/resource/api500/synergy/fc_network.rb +22 -0
  68. data/lib/oneview-sdk/resource/api500/synergy/fcoe_network.rb +22 -0
  69. data/lib/oneview-sdk/resource/api500/synergy/firmware_bundle.rb +21 -0
  70. data/lib/oneview-sdk/resource/api500/synergy/firmware_driver.rb +22 -0
  71. data/lib/oneview-sdk/resource/api500/synergy/interconnect.rb +22 -0
  72. data/lib/oneview-sdk/resource/api500/synergy/lig_uplink_set.rb +21 -0
  73. data/lib/oneview-sdk/resource/api500/synergy/logical_downlink.rb +22 -0
  74. data/lib/oneview-sdk/resource/api500/synergy/logical_enclosure.rb +22 -0
  75. data/lib/oneview-sdk/resource/api500/synergy/logical_interconnect.rb +22 -0
  76. data/lib/oneview-sdk/resource/api500/synergy/logical_interconnect_group.rb +22 -0
  77. data/lib/oneview-sdk/resource/api500/synergy/logical_switch.rb +22 -0
  78. data/lib/oneview-sdk/resource/api500/synergy/managed_san.rb +22 -0
  79. data/lib/oneview-sdk/resource/api500/synergy/network_set.rb +22 -0
  80. data/lib/oneview-sdk/resource/api500/synergy/power_device.rb +21 -0
  81. data/lib/oneview-sdk/resource/api500/synergy/rack.rb +22 -0
  82. data/lib/oneview-sdk/resource/api500/synergy/resource.rb +21 -0
  83. data/lib/oneview-sdk/resource/api500/synergy/san_manager.rb +22 -0
  84. data/lib/oneview-sdk/resource/api500/synergy/sas_interconnect.rb +22 -0
  85. data/lib/oneview-sdk/resource/api500/synergy/sas_logical_interconnect.rb +22 -0
  86. data/lib/oneview-sdk/resource/api500/synergy/sas_logical_interconnect_group.rb +22 -0
  87. data/lib/oneview-sdk/resource/api500/synergy/scope.rb +22 -0
  88. data/lib/oneview-sdk/resource/api500/synergy/server_hardware.rb +22 -0
  89. data/lib/oneview-sdk/resource/api500/synergy/server_hardware_type.rb +22 -0
  90. data/lib/oneview-sdk/resource/api500/synergy/server_profile.rb +22 -0
  91. data/lib/oneview-sdk/resource/api500/synergy/server_profile_template.rb +22 -0
  92. data/lib/oneview-sdk/resource/api500/synergy/storage_pool.rb +22 -0
  93. data/lib/oneview-sdk/resource/api500/synergy/storage_system.rb +22 -0
  94. data/lib/oneview-sdk/resource/api500/synergy/switch.rb +22 -0
  95. data/lib/oneview-sdk/resource/api500/synergy/unmanaged_device.rb +22 -0
  96. data/lib/oneview-sdk/resource/api500/synergy/uplink_set.rb +22 -0
  97. data/lib/oneview-sdk/resource/api500/synergy/user.rb +22 -0
  98. data/lib/oneview-sdk/resource/api500/synergy/volume.rb +22 -0
  99. data/lib/oneview-sdk/resource/api500/synergy/volume_attachment.rb +22 -0
  100. data/lib/oneview-sdk/resource/api500/synergy/volume_snapshot.rb +22 -0
  101. data/lib/oneview-sdk/resource/api500/synergy/volume_template.rb +22 -0
  102. data/lib/oneview-sdk/rest.rb +21 -8
  103. data/lib/oneview-sdk/version.rb +1 -1
  104. metadata +90 -4
@@ -0,0 +1,22 @@
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/synergy/scope'
13
+
14
+ module OneviewSDK
15
+ module API500
16
+ module Synergy
17
+ # Scope resource implementation for API500 Synergy
18
+ class Scope < OneviewSDK::API300::Synergy::Scope
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
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/synergy/server_hardware'
13
+
14
+ module OneviewSDK
15
+ module API500
16
+ module Synergy
17
+ # Server Hardware resource implementation on API500 Synergy
18
+ class ServerHardware < OneviewSDK::API300::Synergy::ServerHardware
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
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/synergy/server_hardware_type'
13
+
14
+ module OneviewSDK
15
+ module API500
16
+ module Synergy
17
+ # Server hardware type resource implementation for API500 Synergy
18
+ class ServerHardwareType < OneviewSDK::API300::Synergy::ServerHardwareType
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
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/synergy/server_profile'
13
+
14
+ module OneviewSDK
15
+ module API500
16
+ module Synergy
17
+ # Server profile resource implementation for API500 Synergy
18
+ class ServerProfile < OneviewSDK::API300::Synergy::ServerProfile
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
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/synergy/server_profile_template'
13
+
14
+ module OneviewSDK
15
+ module API500
16
+ module Synergy
17
+ # Server Profile Template resource implementation for API500 Synergy
18
+ class ServerProfileTemplate < OneviewSDK::API300::Synergy::ServerProfileTemplate
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
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/synergy/storage_pool'
13
+
14
+ module OneviewSDK
15
+ module API500
16
+ module Synergy
17
+ # Storage pool resource implementation for API 500 Synergy
18
+ class StoragePool < OneviewSDK::API300::Synergy::StoragePool
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
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/synergy/storage_system'
13
+
14
+ module OneviewSDK
15
+ module API500
16
+ module Synergy
17
+ # Storage system resource implementation for API 500 Synergy
18
+ class StorageSystem < OneviewSDK::API300::Synergy::StorageSystem
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
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/synergy/switch'
13
+
14
+ module OneviewSDK
15
+ module API500
16
+ module Synergy
17
+ # Switch resource implementation for API 500 Synergy
18
+ class Switch < OneviewSDK::API300::Synergy::Switch
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
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/synergy/unmanaged_device'
13
+
14
+ module OneviewSDK
15
+ module API500
16
+ module Synergy
17
+ # Unmanaged Device resource implementation for API500 Synergy
18
+ class UnmanagedDevice < OneviewSDK::API300::Synergy::UnmanagedDevice
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
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/synergy/uplink_set'
13
+
14
+ module OneviewSDK
15
+ module API500
16
+ module Synergy
17
+ # Uplink set resource implementation for API500 Synergy
18
+ class UplinkSet < OneviewSDK::API300::Synergy::UplinkSet
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
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/synergy/user'
13
+
14
+ module OneviewSDK
15
+ module API500
16
+ module Synergy
17
+ # User resource implementation for API500 Synergy
18
+ class User < OneviewSDK::API300::Synergy::User
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
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/synergy/volume'
13
+
14
+ module OneviewSDK
15
+ module API500
16
+ module Synergy
17
+ # Volume resource implementation for API500 Synergy
18
+ class Volume < OneviewSDK::API300::Synergy::Volume
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
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/synergy/volume_attachment'
13
+
14
+ module OneviewSDK
15
+ module API500
16
+ module Synergy
17
+ # Storage volume attachment resource implementation for API500 Synergy
18
+ class VolumeAttachment < OneviewSDK::API300::Synergy::VolumeAttachment
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
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/synergy/volume_snapshot'
13
+
14
+ module OneviewSDK
15
+ module API500
16
+ module Synergy
17
+ # Volume snapshot resource implementation for API500 Synergy
18
+ class VolumeSnapshot < OneviewSDK::API300::Synergy::VolumeSnapshot
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
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/synergy/volume_template'
13
+
14
+ module OneviewSDK
15
+ module API500
16
+ module Synergy
17
+ # Volume Template resource implementation for API500 Synergy
18
+ class VolumeTemplate < OneviewSDK::API300::Synergy::VolumeTemplate
19
+ end
20
+ end
21
+ end
22
+ end
@@ -118,20 +118,26 @@ module OneviewSDK
118
118
  # Uploads a file to a specific uri
119
119
  # @param [String] file_path
120
120
  # @param [String] path The url path starting with "/"
121
- # @param [Hash] body_params The params to append to body of http request. Default is {}.
122
- # @option body_params [String] 'name' The name to show (when resource accepts a name)
121
+ # @param [Hash] options The options for the request. Default is {}.
122
+ # @option options [String] :body Hash to be converted into json and set as the request body
123
+ # @option options [String] :header Hash to be converted into json and set as the request header
124
+ # @option options [String] :file_name String that defines the new file name
123
125
  # @param [Integer] timeout The number of seconds to wait for completing the request. Default is 300.
124
126
  # @return [Hash] The parsed JSON body of response
125
- def upload_file(file_path, path, body_params = {}, timeout = READ_TIMEOUT)
127
+ def upload_file(file_path, path, options = {}, timeout = READ_TIMEOUT)
126
128
  raise NotFound, "ERROR: File '#{file_path}' not found!" unless File.file?(file_path)
127
- options = {
129
+ options = Hash[options.map { |k, v| [k.to_s, v] }]
130
+ body_params = options['body'] || {}
131
+ headers_params = options['header'] || {}
132
+ headers = {
128
133
  'Content-Type' => 'multipart/form-data',
129
134
  'X-Api-Version' => @api_version.to_s,
130
135
  'auth' => @token
131
136
  }
137
+ headers.merge!(headers_params)
132
138
 
133
139
  File.open(file_path) do |file|
134
- name_to_show = body_params.delete('name') || body_params.delete(:name) || File.basename(file_path)
140
+ name_to_show = options['file_name'] || File.basename(file_path)
135
141
  body_params['file'] = UploadIO.new(file, 'application/octet-stream', name_to_show)
136
142
 
137
143
  uri = URI.parse(URI.escape(@url + path))
@@ -141,12 +147,19 @@ module OneviewSDK
141
147
  req = Net::HTTP::Post::Multipart.new(
142
148
  uri.path,
143
149
  body_params,
144
- options
150
+ headers
145
151
  )
146
152
 
147
153
  http_request.start do |http|
148
- response = http.request(req)
149
- return response_handler(response)
154
+ begin
155
+ response = http.request(req)
156
+ return response_handler(response)
157
+ rescue Net::ReadTimeout
158
+ raise "The connection was closed because the timeout of #{timeout} seconds has expired."\
159
+ 'You can specify the timeout in seconds by passing the timeout on the method call.'\
160
+ 'Interrupted file uploads may result in corrupted file remaining in the appliance.'\
161
+ 'HPE recommends checking the appliance for corrupted file and removing it.'
162
+ end
150
163
  end
151
164
  end
152
165
  end
@@ -11,5 +11,5 @@
11
11
 
12
12
  # Gem version defined here
13
13
  module OneviewSDK
14
- VERSION = '4.1.0'.freeze
14
+ VERSION = '4.2.0'.freeze
15
15
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oneview-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.0
4
+ version: 4.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henrique Diomede
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2017-02-24 00:00:00.000000000 Z
14
+ date: 2017-03-24 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: thor
@@ -180,6 +180,7 @@ extra_rdoc_files: []
180
180
  files:
181
181
  - CHANGELOG.md
182
182
  - Gemfile
183
+ - Guardfile
183
184
  - LICENSE
184
185
  - README.md
185
186
  - Rakefile
@@ -190,6 +191,7 @@ files:
190
191
  - lib/oneview-sdk/config_loader.rb
191
192
  - lib/oneview-sdk/exceptions.rb
192
193
  - lib/oneview-sdk/image-streamer/client.rb
194
+ - lib/oneview-sdk/image-streamer/resource/api300.rb
193
195
  - lib/oneview-sdk/image-streamer/resource/api300/artifact_bundle.rb
194
196
  - lib/oneview-sdk/image-streamer/resource/api300/build_plan.rb
195
197
  - lib/oneview-sdk/image-streamer/resource/api300/deployment_group.rb
@@ -198,7 +200,6 @@ files:
198
200
  - lib/oneview-sdk/image-streamer/resource/api300/os_volume.rb
199
201
  - lib/oneview-sdk/image-streamer/resource/api300/plan_script.rb
200
202
  - lib/oneview-sdk/image-streamer/resource/api300/resource.rb
201
- - lib/oneview-sdk/image-streamer/resource/api_300.rb
202
203
  - lib/oneview-sdk/image_streamer.rb
203
204
  - lib/oneview-sdk/resource.rb
204
205
  - lib/oneview-sdk/resource/api200.rb
@@ -302,6 +303,7 @@ files:
302
303
  - lib/oneview-sdk/resource/api300/synergy/logical_switch.rb
303
304
  - lib/oneview-sdk/resource/api300/synergy/managed_san.rb
304
305
  - lib/oneview-sdk/resource/api300/synergy/network_set.rb
306
+ - lib/oneview-sdk/resource/api300/synergy/os_deployment_plan.rb
305
307
  - lib/oneview-sdk/resource/api300/synergy/power_device.rb
306
308
  - lib/oneview-sdk/resource/api300/synergy/rack.rb
307
309
  - lib/oneview-sdk/resource/api300/synergy/resource.rb
@@ -324,6 +326,90 @@ files:
324
326
  - lib/oneview-sdk/resource/api300/synergy/volume_attachment.rb
325
327
  - lib/oneview-sdk/resource/api300/synergy/volume_snapshot.rb
326
328
  - lib/oneview-sdk/resource/api300/synergy/volume_template.rb
329
+ - lib/oneview-sdk/resource/api500.rb
330
+ - lib/oneview-sdk/resource/api500/c7000.rb
331
+ - lib/oneview-sdk/resource/api500/c7000/connection_template.rb
332
+ - lib/oneview-sdk/resource/api500/c7000/datacenter.rb
333
+ - lib/oneview-sdk/resource/api500/c7000/enclosure.rb
334
+ - lib/oneview-sdk/resource/api500/c7000/enclosure_group.rb
335
+ - lib/oneview-sdk/resource/api500/c7000/ethernet_network.rb
336
+ - lib/oneview-sdk/resource/api500/c7000/fabric.rb
337
+ - lib/oneview-sdk/resource/api500/c7000/fc_network.rb
338
+ - lib/oneview-sdk/resource/api500/c7000/fcoe_network.rb
339
+ - lib/oneview-sdk/resource/api500/c7000/firmware_bundle.rb
340
+ - lib/oneview-sdk/resource/api500/c7000/firmware_driver.rb
341
+ - lib/oneview-sdk/resource/api500/c7000/interconnect.rb
342
+ - lib/oneview-sdk/resource/api500/c7000/lig_uplink_set.rb
343
+ - lib/oneview-sdk/resource/api500/c7000/logical_downlink.rb
344
+ - lib/oneview-sdk/resource/api500/c7000/logical_enclosure.rb
345
+ - lib/oneview-sdk/resource/api500/c7000/logical_interconnect.rb
346
+ - lib/oneview-sdk/resource/api500/c7000/logical_interconnect_group.rb
347
+ - lib/oneview-sdk/resource/api500/c7000/logical_switch.rb
348
+ - lib/oneview-sdk/resource/api500/c7000/logical_switch_group.rb
349
+ - lib/oneview-sdk/resource/api500/c7000/managed_san.rb
350
+ - lib/oneview-sdk/resource/api500/c7000/network_set.rb
351
+ - lib/oneview-sdk/resource/api500/c7000/power_device.rb
352
+ - lib/oneview-sdk/resource/api500/c7000/rack.rb
353
+ - lib/oneview-sdk/resource/api500/c7000/resource.rb
354
+ - lib/oneview-sdk/resource/api500/c7000/san_manager.rb
355
+ - lib/oneview-sdk/resource/api500/c7000/scope.rb
356
+ - lib/oneview-sdk/resource/api500/c7000/server_hardware.rb
357
+ - lib/oneview-sdk/resource/api500/c7000/server_hardware_type.rb
358
+ - lib/oneview-sdk/resource/api500/c7000/server_profile.rb
359
+ - lib/oneview-sdk/resource/api500/c7000/server_profile_template.rb
360
+ - lib/oneview-sdk/resource/api500/c7000/storage_pool.rb
361
+ - lib/oneview-sdk/resource/api500/c7000/storage_system.rb
362
+ - lib/oneview-sdk/resource/api500/c7000/switch.rb
363
+ - lib/oneview-sdk/resource/api500/c7000/unmanaged_device.rb
364
+ - lib/oneview-sdk/resource/api500/c7000/uplink_set.rb
365
+ - lib/oneview-sdk/resource/api500/c7000/user.rb
366
+ - lib/oneview-sdk/resource/api500/c7000/volume.rb
367
+ - lib/oneview-sdk/resource/api500/c7000/volume_attachment.rb
368
+ - lib/oneview-sdk/resource/api500/c7000/volume_snapshot.rb
369
+ - lib/oneview-sdk/resource/api500/c7000/volume_template.rb
370
+ - lib/oneview-sdk/resource/api500/synergy.rb
371
+ - lib/oneview-sdk/resource/api500/synergy/connection_template.rb
372
+ - lib/oneview-sdk/resource/api500/synergy/datacenter.rb
373
+ - lib/oneview-sdk/resource/api500/synergy/drive_enclosure.rb
374
+ - lib/oneview-sdk/resource/api500/synergy/enclosure.rb
375
+ - lib/oneview-sdk/resource/api500/synergy/enclosure_group.rb
376
+ - lib/oneview-sdk/resource/api500/synergy/ethernet_network.rb
377
+ - lib/oneview-sdk/resource/api500/synergy/fabric.rb
378
+ - lib/oneview-sdk/resource/api500/synergy/fc_network.rb
379
+ - lib/oneview-sdk/resource/api500/synergy/fcoe_network.rb
380
+ - lib/oneview-sdk/resource/api500/synergy/firmware_bundle.rb
381
+ - lib/oneview-sdk/resource/api500/synergy/firmware_driver.rb
382
+ - lib/oneview-sdk/resource/api500/synergy/interconnect.rb
383
+ - lib/oneview-sdk/resource/api500/synergy/lig_uplink_set.rb
384
+ - lib/oneview-sdk/resource/api500/synergy/logical_downlink.rb
385
+ - lib/oneview-sdk/resource/api500/synergy/logical_enclosure.rb
386
+ - lib/oneview-sdk/resource/api500/synergy/logical_interconnect.rb
387
+ - lib/oneview-sdk/resource/api500/synergy/logical_interconnect_group.rb
388
+ - lib/oneview-sdk/resource/api500/synergy/logical_switch.rb
389
+ - lib/oneview-sdk/resource/api500/synergy/managed_san.rb
390
+ - lib/oneview-sdk/resource/api500/synergy/network_set.rb
391
+ - lib/oneview-sdk/resource/api500/synergy/power_device.rb
392
+ - lib/oneview-sdk/resource/api500/synergy/rack.rb
393
+ - lib/oneview-sdk/resource/api500/synergy/resource.rb
394
+ - lib/oneview-sdk/resource/api500/synergy/san_manager.rb
395
+ - lib/oneview-sdk/resource/api500/synergy/sas_interconnect.rb
396
+ - lib/oneview-sdk/resource/api500/synergy/sas_logical_interconnect.rb
397
+ - lib/oneview-sdk/resource/api500/synergy/sas_logical_interconnect_group.rb
398
+ - lib/oneview-sdk/resource/api500/synergy/scope.rb
399
+ - lib/oneview-sdk/resource/api500/synergy/server_hardware.rb
400
+ - lib/oneview-sdk/resource/api500/synergy/server_hardware_type.rb
401
+ - lib/oneview-sdk/resource/api500/synergy/server_profile.rb
402
+ - lib/oneview-sdk/resource/api500/synergy/server_profile_template.rb
403
+ - lib/oneview-sdk/resource/api500/synergy/storage_pool.rb
404
+ - lib/oneview-sdk/resource/api500/synergy/storage_system.rb
405
+ - lib/oneview-sdk/resource/api500/synergy/switch.rb
406
+ - lib/oneview-sdk/resource/api500/synergy/unmanaged_device.rb
407
+ - lib/oneview-sdk/resource/api500/synergy/uplink_set.rb
408
+ - lib/oneview-sdk/resource/api500/synergy/user.rb
409
+ - lib/oneview-sdk/resource/api500/synergy/volume.rb
410
+ - lib/oneview-sdk/resource/api500/synergy/volume_attachment.rb
411
+ - lib/oneview-sdk/resource/api500/synergy/volume_snapshot.rb
412
+ - lib/oneview-sdk/resource/api500/synergy/volume_template.rb
327
413
  - lib/oneview-sdk/rest.rb
328
414
  - lib/oneview-sdk/ssl_helper.rb
329
415
  - lib/oneview-sdk/version.rb
@@ -348,7 +434,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
348
434
  version: '0'
349
435
  requirements: []
350
436
  rubyforge_project:
351
- rubygems_version: 2.6.7
437
+ rubygems_version: 2.6.10
352
438
  signing_key:
353
439
  specification_version: 4
354
440
  summary: Gem to interact with the HPE OneView API