Module: ViprBlockVirtualPool
- Included in:
- Vipr
- Defined in:
- lib/vipruby/objects/blockvirtualpool.rb
Overview
The following Block Virtual Pool calls will get and execute Block Virtual Pool items
Instance Method Summary collapse
-
#block_vpool_deactivate(block_vpool_id = nil, auth = nil, cert = nil) ⇒ JSON
Deactivate Block Virtual Pool.
-
#check_block_vpool_id_post(block_vpool_id = nil) ⇒ Boolean
private
Error Handling method to check for Block Virtual Pool ID param.
-
#get_block_vpool(block_vpool_id, auth = nil, cert = nil) ⇒ JSON
Get Single Block Virtual Pool information.
-
#get_block_vpool_acl(block_vpool_id, auth = nil, cert = nil) ⇒ JSON
Get Single Block Virtual Pool ACL information.
-
#get_block_vpool_refresh_matched_pools(block_vpool_id, auth = nil, cert = nil) ⇒ JSON
Regresh Single Block Virtual Pool Matched Pools information.
-
#get_block_vpool_storage_pools(block_vpool_id, auth = nil, cert = nil) ⇒ JSON
Get Single Block Virtual Pool Storage Pools information.
-
#get_block_vpools(auth = nil, cert = nil) ⇒ json
Get All Block Virtual Pools.
Instance Method Details
#block_vpool_deactivate(block_vpool_id = nil, auth = nil, cert = nil) ⇒ JSON
Deactivate Block Virtual Pool. Deactivate block store virtual pool, this will move the virtual pool to a “marked-for-deletion” state, and no more resource may be created using it. The virtual pool will be deleted when all references to this virtual pool of type Volume are deleted
53 54 55 56 57 58 59 |
# File 'lib/vipruby/objects/blockvirtualpool.rb', line 53 def block_vpool_deactivate(block_vpool_id=nil,auth=nil, cert=nil) check_block_vpool_id_post(block_vpool_id) payload = { id: block_vpool_id }.to_json rest_post(payload, "#{@base_url}/block/vpools/#{block_vpool_id}/deactivate", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert) end |
#check_block_vpool_id_post(block_vpool_id = nil) ⇒ Boolean (private)
Error Handling method to check for Block Virtual Pool ID param. If the pass fails, an error exception is raised
68 69 70 71 72 |
# File 'lib/vipruby/objects/blockvirtualpool.rb', line 68 def check_block_vpool_id_post(block_vpool_id=nil) if block_vpool_id == nil raise "Missing param (block_vpool_id)" end end |
#get_block_vpool(block_vpool_id, auth = nil, cert = nil) ⇒ JSON
Get Single Block Virtual Pool information
17 18 19 |
# File 'lib/vipruby/objects/blockvirtualpool.rb', line 17 def get_block_vpool(block_vpool_id,auth=nil, cert=nil) rest_get("#{@base_url}/block/vpools/#{block_vpool_id}", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert) end |
#get_block_vpool_acl(block_vpool_id, auth = nil, cert = nil) ⇒ JSON
Get Single Block Virtual Pool ACL information
26 27 28 |
# File 'lib/vipruby/objects/blockvirtualpool.rb', line 26 def get_block_vpool_acl(block_vpool_id,auth=nil, cert=nil) rest_get("#{@base_url}/block/vpools/#{block_vpool_id}/acl", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert) end |
#get_block_vpool_refresh_matched_pools(block_vpool_id, auth = nil, cert = nil) ⇒ JSON
Regresh Single Block Virtual Pool Matched Pools information
44 45 46 |
# File 'lib/vipruby/objects/blockvirtualpool.rb', line 44 def get_block_vpool_refresh_matched_pools(block_vpool_id,auth=nil, cert=nil) rest_get("#{@base_url}/block/vpools/#{block_vpool_id}/refresh-matched-pools", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert) end |
#get_block_vpool_storage_pools(block_vpool_id, auth = nil, cert = nil) ⇒ JSON
Get Single Block Virtual Pool Storage Pools information
35 36 37 |
# File 'lib/vipruby/objects/blockvirtualpool.rb', line 35 def get_block_vpool_storage_pools(block_vpool_id,auth=nil, cert=nil) rest_get("#{@base_url}/block/vpools/#{block_vpool_id}/storage-pools", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert) end |
#get_block_vpools(auth = nil, cert = nil) ⇒ json
Get All Block Virtual Pools
8 9 10 |
# File 'lib/vipruby/objects/blockvirtualpool.rb', line 8 def get_block_vpools(auth=nil, cert=nil) rest_get("#{@base_url}/block/vpools", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert) end |