From 65c72e8aa2c0248f1255f2c72d455cd47af518b1 Mon Sep 17 00:00:00 2001 From: sijeesh Date: Mon, 24 Feb 2020 18:52:19 +0530 Subject: [PATCH] Storage pool - Tested with latest api versions --- CHANGELOG.md | 1 + endpoints-support.md | 7 +++++ examples/storage_pool.pp | 26 ++++++++++--------- .../provider/oneview_storage_pool/c7000.rb | 2 +- .../provider/oneview_storage_pool/synergy.rb | 2 +- lib/puppet/type/oneview_storage_pool.rb | 2 +- 6 files changed, 25 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a553b9d..d75aea44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ - Server hardware type - Server profile - Server profile template +- Storage pool - Uplink set # v2.3.0 (2018-06-26) diff --git a/endpoints-support.md b/endpoints-support.md index 3f827ae8..c9ade791 100644 --- a/endpoints-support.md +++ b/endpoints-support.md @@ -175,6 +175,13 @@ |/rest/server-profiles/{id}/new-profile-template | GET | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | |/rest/server-profiles/{id}/messages | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: | |/rest/server-profiles/{id}/transformation | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +| **Storage Pools** | +|/rest/storage-pools | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/storage-pools | POST | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: | +|/rest/storage-pools/reachable-storage-pools | GET | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/storage-pools/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/storage-pools/{id} | PUT | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/storage-pools/{id} | DELETE | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: | | **Uplink Sets** | |/rest/uplink-sets | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: | |/rest/uplink-sets | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: | diff --git a/examples/storage_pool.pp b/examples/storage_pool.pp index a61a2c21..0596602d 100644 --- a/examples/storage_pool.pp +++ b/examples/storage_pool.pp @@ -1,5 +1,5 @@ ################################################################################ -# (C) Copyright 2016-2017 Hewlett Packard Enterprise Development LP +# (C) Copyright 2016-2020 Hewlett Packard Enterprise Development LP # # Licensed under the Apache License, Version 2.0 (the "License"); # You may not use this file except in compliance with the License. @@ -23,27 +23,27 @@ ensure => 'present', data => { poolName => 'CPG-SSD-AO', - storageSystemUri => 'ThreePAR7200-9055' + storageSystemUri => 'ThreePAR-2' # storageSystemUri => '/rest/storage-systems/TXQ1000307' } } oneview_storage_pool{'storage_pool_2': - ensure => 'found', - # require => Oneview_storage_pool['storage_pool_1'], - # This resource accepts a data hash to filter out results or no data hash to display all - # data => { - # poolName => 'CPG-SSD-AO', - # } + ensure => 'found', + require => Oneview_storage_pool['storage_pool_1'], + #This resource accepts a data hash to filter out results or no data hash to display all + data => { + poolName => 'CPG-SSD-AO', + } } # Method available from API500 and above oneview_storage_pool{'storage_pool_4': ensure => 'manage', data => { - name => 'cpg_growth-warning-100GiB', + name => 'cpg-growth-limit-1TiB', isManaged => true, - storageSystemUri => '/rest/storage-systems/TXQ1000307' + storageSystemUri => '/rest/storage-systems/TXQ1010307' } } @@ -51,7 +51,8 @@ oneview_storage_pool{'storage_pool_5': ensure => 'reachable', data => { - uri => '/rest/storage-pools/C2ECD708-4F97-4DC2-925A-A8D90065D7D2', + uri => '/rest/storage-pools/85DEFE8C-939C-4E40-B886-AB6B00DBCB05', + storageSystemUri => '/rest/storage-systems/TXQ1010307' } } @@ -60,6 +61,7 @@ ensure => 'absent', require => Oneview_storage_pool['storage_pool_2'], data => { - poolName => 'CPG-SSD-AO', + poolName => 'cpg-growth-limit-1TiB', + storageSystemUri => '/rest/storage-systems/TXQ1010307' } } diff --git a/lib/puppet/provider/oneview_storage_pool/c7000.rb b/lib/puppet/provider/oneview_storage_pool/c7000.rb index be5eaf6d..28a7a626 100644 --- a/lib/puppet/provider/oneview_storage_pool/c7000.rb +++ b/lib/puppet/provider/oneview_storage_pool/c7000.rb @@ -1,5 +1,5 @@ ################################################################################ -# (C) Copyright 2016-2017 Hewlett Packard Enterprise Development LP +# (C) Copyright 2016-2020 Hewlett Packard Enterprise Development LP # # Licensed under the Apache License, Version 2.0 (the "License"); # You may not use this file except in compliance with the License. diff --git a/lib/puppet/provider/oneview_storage_pool/synergy.rb b/lib/puppet/provider/oneview_storage_pool/synergy.rb index d4750e95..2cf55b42 100644 --- a/lib/puppet/provider/oneview_storage_pool/synergy.rb +++ b/lib/puppet/provider/oneview_storage_pool/synergy.rb @@ -1,5 +1,5 @@ ################################################################################ -# (C) Copyright 2016-2017 Hewlett Packard Enterprise Development LP +# (C) Copyright 2016-2020 Hewlett Packard Enterprise Development LP # # Licensed under the Apache License, Version 2.0 (the "License"); # You may not use this file except in compliance with the License. diff --git a/lib/puppet/type/oneview_storage_pool.rb b/lib/puppet/type/oneview_storage_pool.rb index 71670d11..daa03dde 100644 --- a/lib/puppet/type/oneview_storage_pool.rb +++ b/lib/puppet/type/oneview_storage_pool.rb @@ -1,5 +1,5 @@ ################################################################################ -# (C) Copyright 2016-2017 Hewlett Packard Enterprise Development LP +# (C) Copyright 2016-2020 Hewlett Packard Enterprise Development LP # # Licensed under the Apache License, Version 2.0 (the "License"); # You may not use this file except in compliance with the License.