Module: ViprFileVirtualPool

Included in:
Vipr
Defined in:
lib/vipruby/objects/filevirtualpool.rb

Overview

The following File Virtual Pool calls will get and execute File Virtual Pool items

Instance Method Summary collapse

Instance Method Details

#check_file_vpool_id_post(file_vpool_id = nil) ⇒ Boolean (private)

Error Handling method to check for File Virtual Pool ID param. If the pass fails, an error exception is raised

Parameters:

  • file_vpool_id (String) (defaults to: nil)

    Requires the string of the file_vpool_id uid

Returns:

  • (Boolean)

    True if pass, false if it fails



68
69
70
71
72
# File 'lib/vipruby/objects/filevirtualpool.rb', line 68

def check_file_vpool_id_post(file_vpool_id=nil)
  if file_vpool_id == nil
      raise "Missing param (file_vpool_id)"
  end
end

#file_vpool_deactivate(file_vpool_id = nil, auth = nil, cert = nil) ⇒ JSON

Deactivate File Virtual Pool. Deactivate file 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

Parameters:

  • file_vpool_id (urn:id) (defaults to: nil)

    URN of a File Virtual Pool. Required Param

Returns:

  • (JSON)

    The JSON object of the File Virtual Pool



53
54
55
56
57
58
59
# File 'lib/vipruby/objects/filevirtualpool.rb', line 53

def file_vpool_deactivate(file_vpool_id=nil,auth=nil, cert=nil)
	check_file_vpool_id_post(file_vpool_id)
    payload = {
        id: file_vpool_id
      }.to_json
    rest_post(payload, "#{@base_url}/file/vpools/#{file_vpool_id}/deactivate", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
end

#get_file_vpool(file_vpool_id, auth = nil, cert = nil) ⇒ JSON

Get Single File Virtual Pool information

Parameters:

  • file_vpool_id (urn:id)

    URN of a File Virtual Pool. Required Param

Returns:

  • (JSON)

    The JSON object of the File Virtual Pool



17
18
19
# File 'lib/vipruby/objects/filevirtualpool.rb', line 17

def get_file_vpool(file_vpool_id,auth=nil, cert=nil)
	rest_get("#{@base_url}/file/vpools/#{file_vpool_id}", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
end

#get_file_vpool_acl(file_vpool_id, auth = nil, cert = nil) ⇒ JSON

Get Single File Virtual Pool ACL information

Parameters:

  • file_vpool_id (urn:id)

    URN of a File Virtual Pool. Required Param

Returns:

  • (JSON)

    The JSON object of the File Virtual Pool ACL



26
27
28
# File 'lib/vipruby/objects/filevirtualpool.rb', line 26

def get_file_vpool_acl(file_vpool_id,auth=nil, cert=nil)
	rest_get("#{@base_url}/file/vpools/#{file_vpool_id}/acl", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
end

#get_file_vpool_refresh_matched_pools(file_vpool_id, auth = nil, cert = nil) ⇒ JSON

Regresh Single File Virtual Pool Matched Pools information

Parameters:

  • file_vpool_id (urn:id)

    URN of a File Virtual Pool. Required Param

Returns:

  • (JSON)

    The JSON object of the File Virtual Pool Storage Pools



44
45
46
# File 'lib/vipruby/objects/filevirtualpool.rb', line 44

def get_file_vpool_refresh_matched_pools(file_vpool_id,auth=nil, cert=nil)
	rest_get("#{@base_url}/file/vpools/#{file_vpool_id}/refresh-matched-pools", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
end

#get_file_vpool_storage_pools(file_vpool_id, auth = nil, cert = nil) ⇒ JSON

Get Single File Virtual Pool Storage Pools information

Parameters:

  • file_vpool_id (urn:id)

    URN of a File Virtual Pool. Required Param

Returns:

  • (JSON)

    The JSON object of the File Virtual Pool Storage Pools



35
36
37
# File 'lib/vipruby/objects/filevirtualpool.rb', line 35

def get_file_vpool_storage_pools(file_vpool_id,auth=nil, cert=nil)
	rest_get("#{@base_url}/file/vpools/#{file_vpool_id}/storage-pools", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
end

#get_file_vpools(auth = nil, cert = nil) ⇒ json

Get All File Virtual Pools

Returns:

  • (json)

    JSON object of all the File Virtual Pools



8
9
10
# File 'lib/vipruby/objects/filevirtualpool.rb', line 8

def get_file_vpools(auth=nil, cert=nil)
	rest_get("#{@base_url}/file/vpools", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
end