oneview-sdk 5.1.0 → 5.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 26fdfbc6a1580a89ab455a59635308b016205719
4
- data.tar.gz: 7a9a5db530abd27b0acb20ed62ec484392130405
3
+ metadata.gz: 8acba074bfd37fc4088aa46ae6877e1592d7830f
4
+ data.tar.gz: 58a66a91dca7ee5994b90b81f4ff8d964b5f8d62
5
5
  SHA512:
6
- metadata.gz: e4f28fecb1acc31b70a376c950395683d3ff8c46201997af4ff3753ef7352b00de859a4bc4302f94e5083b1e2cd7662cff91747219d9e4fe2a21e30838ff6a12
7
- data.tar.gz: 524fdf8bf131b69b88a4839b198ceb6728faf369dfa38778acba0c62d9577f6760d82e50c76566d8247e246d3a656c6ca38f96297690199c1aa5ec8280edaf42
6
+ metadata.gz: 0f8dc95b6599baad0f7c95a075335b74998752fb441cfec4d8579a668ce77e77101335457baf4bc9d9037d6c932275da11c9587ad4a762f7ca00ff77adc61d4d
7
+ data.tar.gz: d83b0b85189908d35bab0ab53fc117d8d6adabccbca4094a80518ca9d47f44394f5b4699f5412e311da9135270672b3112fc4240eb145653cf1aa04287d941bc
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## v5.1.1
2
+
3
+ #### Bug fixes & Enhancements
4
+ - [#279](https://github.com/HewlettPackard/oneview-sdk-ruby/issues/279) Bug when setting the Storage Pool and Snapshot Pool when trying to make an update
5
+
1
6
  # v5.1.0
2
7
 
3
8
  #### Bug fixes & Enhancements
@@ -39,6 +39,14 @@ module OneviewSDK
39
39
  self
40
40
  end
41
41
 
42
+ # Update resource attributes
43
+ # @param [Hash] attributes attributes to be updated
44
+ # @return [OneviewSDK::Volume] self
45
+ def update(attributes = {})
46
+ @data.delete('provisioningParameters')
47
+ super
48
+ end
49
+
42
50
  # Deletes the resource from OneView or from Oneview and storage system
43
51
  # @param [Symbol] flag Delete storage system from Oneview only or in storage system as well
44
52
  # @return [true] if resource was deleted successfully
@@ -59,12 +67,14 @@ module OneviewSDK
59
67
 
60
68
  # Sets the storage system to the volume
61
69
  # @param [OneviewSDK::StorageSystem] storage_system Storage System
70
+ # @note The storageSystemUri attribute should not be set in the updated. Once created, this attribute is read only.
62
71
  def set_storage_system(storage_system)
63
72
  assure_uri(storage_system)
64
73
  set('storageSystemUri', storage_system['uri'])
65
74
  end
66
75
 
67
76
  # Sets the storage pool to the volume
77
+ # @note The storagePoolUri attribute should not be set in the updated. Once created, this attribute is read only.
68
78
  # @param [OneviewSDK::StoragePool] storage_pool Storage pool
69
79
  def set_storage_pool(storage_pool)
70
80
  assure_uri(storage_pool)
@@ -43,6 +43,14 @@ module OneviewSDK
43
43
  self
44
44
  end
45
45
 
46
+ # Update resource attributes
47
+ # @param [Hash] attributes attributes to be updated
48
+ # @return [OneviewSDK::Volume] self
49
+ def update(attributes = {})
50
+ @data.delete('properties')
51
+ OneviewSDK::Resource.instance_method(:update).bind(self).call(attributes)
52
+ end
53
+
46
54
  # Deletes the resource from OneView or from Oneview and storage system
47
55
  # @param [Symbol] flag Delete storage system from Oneview only or in storage system as well.
48
56
  # Flags: :all = removes the volume from oneview and storage system. :oneview = removes from oneview only.
@@ -60,6 +68,7 @@ module OneviewSDK
60
68
 
61
69
  # Sets the storage pool to the volume
62
70
  # @param [OneviewSDK::StoragePool] storage_pool Storage pool.
71
+ # @note The storagePoolUri attribute should not be set in the updated. Once created, this attribute is read only.
63
72
  def set_storage_pool(storage_pool)
64
73
  assure_uri(storage_pool)
65
74
  @data['properties'] ||= {}
@@ -70,8 +79,13 @@ module OneviewSDK
70
79
  # @param [OneviewSDK::StoragePool] storage_pool Storage Pool to use for snapshots.
71
80
  def set_snapshot_pool(storage_pool)
72
81
  assure_uri(storage_pool)
73
- @data['properties'] ||= {}
74
- @data['properties']['snapshotPool'] = storage_pool['uri']
82
+ if @data['uri']
83
+ @data['deviceSpecificAttributes'] ||= {}
84
+ @data['deviceSpecificAttributes']['snapshotPoolUri'] = storage_pool['uri']
85
+ else
86
+ @data['properties'] ||= {}
87
+ @data['properties']['snapshotPool'] = storage_pool['uri']
88
+ end
75
89
  end
76
90
 
77
91
  # Creates a new volume on the storage system from a snapshot of a volume.
@@ -11,5 +11,5 @@
11
11
 
12
12
  # Gem version defined here
13
13
  module OneviewSDK
14
- VERSION = '5.1.0'.freeze
14
+ VERSION = '5.1.1'.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: 5.1.0
4
+ version: 5.1.1
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-10-03 00:00:00.000000000 Z
14
+ date: 2017-10-05 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: thor