oneview-sdk 5.1.0 → 5.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/oneview-sdk/resource/api200/volume.rb +10 -0
- data/lib/oneview-sdk/resource/api500/c7000/volume.rb +16 -2
- data/lib/oneview-sdk/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8acba074bfd37fc4088aa46ae6877e1592d7830f
|
4
|
+
data.tar.gz: 58a66a91dca7ee5994b90b81f4ff8d964b5f8d62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f8dc95b6599baad0f7c95a075335b74998752fb441cfec4d8579a668ce77e77101335457baf4bc9d9037d6c932275da11c9587ad4a762f7ca00ff77adc61d4d
|
7
|
+
data.tar.gz: d83b0b85189908d35bab0ab53fc117d8d6adabccbca4094a80518ca9d47f44394f5b4699f5412e311da9135270672b3112fc4240eb145653cf1aa04287d941bc
|
data/CHANGELOG.md
CHANGED
@@ -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['
|
74
|
-
|
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.
|
data/lib/oneview-sdk/version.rb
CHANGED
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.
|
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-
|
14
|
+
date: 2017-10-05 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: thor
|