Module: ViprStorageSystem

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

Overview

The Following Storage System calls will add Storage Systems for all tenants. these commands can only be ran as the root/default tenant

Instance Method Summary collapse

Instance Method Details

#add_emc_block(name = nil, ip_or_dns = nil, user_name = nil, password = nil, port = nil, use_ssl = nil, auth = nil, cert = nil) ⇒ Hash

Note:

For supported versions, see the EMC ViPR Support Matrix on the EMC Community Network (community.emc.com)

Add EMC VMAX and VNX Block Storage System

Examples:

Add EMC VMAX and VNX Block Storage System

vipr.add_emc_block('vnx01', 'vnx01.mydomain.com')
vipr.add_emc_block('vnx02', 'vnx02.mydomain.com', 'sysadmin', 'sysadmin')
vipr.add_emc_block('vnx03', 'vnx03.mydomain.com', 'sysadmin', 'sysadmin', '8093', 'true')

Parameters:

  • name (String) (defaults to: nil)

    Name of the EMC Block Device. This name is arbitrary and only exists within ViPR. This is a required string.

  • ip_or_dns (String) (defaults to: nil)

    FQDN or IP Address of the EMC Block Device to add. This is a required string.

  • user_name (String) (defaults to: nil)

    User Name that will be used for authenticating against the EMC Block Device. This is an optional string. If no parameter is passed, then ‘admin’ is used. If you wish to specify a different password, port, or use_ssl param set this to nil

  • password (String) (defaults to: nil)

    Password that will be used for authenticating against the EMC Block Device. This is an optional string. If no parameter is passed, then ‘#1Password’ is used. If you wish to specify a different username, port, or use_ssl param set this to nil

  • port (String) (defaults to: nil)

    Port that will be used for communicating with the EMC Block Device. This is an optional string. If no parameter is passed, then ‘5989’ is used. If you wish to specify a different user_name, password, or use_ssl param set this to nil

  • use_ssl (String) (defaults to: nil)

    SSL setting for communicating with the EMC Block Device. This is an optional string. If no parameter is passed, then ‘false’ is used.

Returns:

  • (Hash)

    The resulted post operation



248
249
250
251
252
# File 'lib/vipruby/objects/storagesystem.rb', line 248

def add_emc_block(name=nil, ip_or_dns=nil, user_name=nil, password=nil, port=nil, use_ssl=nil, auth=nil, cert=nil)
	check_storage_provider_payload(name, ip_or_dns)
	port.nil? ? port = '5989' : port = port
    rest_post(storage_provider_payload(name, 'smis', ip_or_dns, port, user_name, password, use_ssl), "#{@base_url}/vdc/storage-providers", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
end

#add_emc_file(name = nil, ip_or_dns = nil, user_name = nil, password = nil, port = nil, smis_provider_ip = nil, smis_user_name = nil, smis_password = nil, smis_port_number = nil, smis_use_ssl = nil, auth = nil, cert = nil) ⇒ Hash

Note:

VNX File Control Station default port is 443. VNX File Onboard Storage Provider default port is 5988

Add EMC VNX for File Storage Provider

Examples:

Add EMC VNX for File Storage Provider

vipr.add_emc_file('vnx01', 'vnx01.mydomain.com', 'sysadmin', 'sysadmin', nil, 'smi_s_ip', 'smi_s_un', 'smi_s_pw')
vipr.add_emc_file('vnx01', 'vnx01.mydomain.com', 'sysadmin', 'sysadmin', '1067', 'smi_s_ip', 'smi_s_un', 'smi_s_pw', '1068', 'true')

Parameters:

  • name (String) (defaults to: nil)

    Name of the EMC VNX for File Storage Provider. This name is arbitrary and only exists within ViPR. This is a required string.

  • ip_or_dns (String) (defaults to: nil)

    FQDN or IP Address of the EMC VNX for File Storage Provider to add. This is a required string.

  • user_name (String) (defaults to: nil)

    User Name that will be used for authenticating against the EMC VNX for File Storage Provider. This is an optional string. If no parameter is passed, then ‘admin’ is used. If you wish to specify a different password, port, or use_ssl param set this to nil

  • password (String) (defaults to: nil)

    Password that will be used for authenticating against the EMC VNX for File Storage Provider. This is an optional string. If no parameter is passed, then ‘#1Password’ is used. If you wish to specify a different username, port, or use_ssl param set this to nil

  • port (String) (defaults to: nil)

    Port that will be used for communicating with the EMC VNX for File Storage Provider. This is an optional string. If no parameter is passed, then ‘443’ is used. If you wish to specify a different user_name, password, or use_ssl param set this to nil

  • smis_provider_ip (String) (defaults to: nil)

    IP Address for the SMI-S Communicator for the EMC VNX for File Storage Provider. This is a required string.

  • smis_user_name (String) (defaults to: nil)

    User Name for the SMI-S Communicator for the EMC VNX for File Storage Provider. This is an optional string. If no parameter is passed, then ‘admin’ is used.

  • smis_password (String) (defaults to: nil)

    Password for the user_name for the SMI-S Communicator for the EMC VNX for File Storage Provider. This is an optional string. If no parameter is passed, then ‘#1Password’ is used.

  • smis_port_number (String) (defaults to: nil)

    Port Number for the SMI-S Communicator for the EMC VNX for File Storage Provider. This is an optional string. If no parameter is passed, then ‘5988’ is used.

  • smis_use_ssl (String) (defaults to: nil)

    SSL setting for communicating with the SMI-S Communicator for the EMC VNX for File Storage Provider. This is an optional string. If no parameter is passed, then ‘false’ is used.

Returns:

  • (Hash)

    The resulted post operation



391
392
393
394
395
396
# File 'lib/vipruby/objects/storagesystem.rb', line 391

def add_emc_file(name=nil, ip_or_dns=nil, user_name=nil, password=nil, port=nil, smis_provider_ip=nil, smis_user_name=nil, smis_password=nil, smis_port_number=nil, smis_use_ssl=nil, auth=nil, cert=nil)
	check_storage_provider_payload(name, ip_or_dns)
		port.nil? ? port = '443' : port = port
		smis_port_number.nil? ? smis_port_number = '5988' : smis_port_number = smis_port_number
 rest_post(storage_system_payload(name, 'vnxfile', ip_or_dns, port, user_name, password, smis_provider_ip, smis_port_number, smis_user_name, smis_password, smis_use_ssl), "#{@base_url}/vdc/storage-systems", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
end

#add_hitachi(name = nil, ip_or_dns = nil, user_name = nil, password = nil, port = nil, use_ssl = nil, auth = nil, cert = nil) ⇒ Hash

Note:

For supported versions, see the EMC ViPR Support Matrix on the EMC Community Network (community.emc.com). Hitachi HiCommand Device Manager is required to use HDS storage with ViPR. You need to obtain the following information to configure and add the Hitachi HiCommand Device manager to ViPR: (1) A host or virtual machine for HiCommand Device manager setup (2) HiCommand Device Manager license, host address, credentials, and host port (default is 2001)

Add Hitachi Storage Systems

Examples:

Add Hitachi Storage System

vipr.add_hitachi('hitachi01', 'hitachi01.mydomain.com')
vipr.add_hitachi('hitachi02', 'hitachi02.mydomain.com', 'sysadmin', 'sysadmin')
vipr.add_hitachi('hitachi03', 'hitachi03.mydomain.com', 'sysadmin', 'sysadmin', '8093', 'true')

Parameters:

  • name (String) (defaults to: nil)

    Name of the Hitachi Device. This name is arbitrary and only exists within ViPR. This is a required string.

  • ip_or_dns (String) (defaults to: nil)

    FQDN or IP Address of the Hitachi Device to add. This is a required string.

  • user_name (String) (defaults to: nil)

    User Name that will be used for authenticating against the Hitachi Device. This is an optional string. If no parameter is passed, then ‘admin’ is used. If you wish to specify a different password, port, or use_ssl param set this to nil

  • password (String) (defaults to: nil)

    Password that will be used for authenticating against the Hitachi Device. This is an optional string. If no parameter is passed, then ‘#1Password’ is used. If you wish to specify a different username, port, or use_ssl param set this to nil

  • port (String) (defaults to: nil)

    Port that will be used for communicating with the Hitachi Device. This is an optional string. If no parameter is passed, then ‘2001’ is used. If you wish to specify a different user_name, password, or use_ssl param set this to nil

  • use_ssl (String) (defaults to: nil)

    SSL setting for communicating with the Hitachi Device. This is an optional string. If no parameter is passed, then ‘false’ is used.

Returns:

  • (Hash)

    The resulted post operation



274
275
276
277
278
# File 'lib/vipruby/objects/storagesystem.rb', line 274

def add_hitachi(name=nil, ip_or_dns=nil, user_name=nil, password=nil, port=nil, use_ssl=nil, auth=nil, cert=nil)
	check_storage_provider_payload(name, ip_or_dns)
		port.nil? ? port = '2001' : port = port
 rest_post(storage_provider_payload(name, 'hicommand', ip_or_dns, port, user_name, password, use_ssl), "#{@base_url}/vdc/storage-providers", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
end

#add_isilon(name = nil, ip_or_dns = nil, user_name = nil, password = nil, port = nil, auth = nil, cert = nil) ⇒ Hash

Note:

Supported Protocol: NFS, CIFS (Snapshot restore is not supported for Isilon storage systems.). Port (default is 8080)

Add Isilon Storage Provider

Examples:

Add Isilon Storage Provider

vipr.add_isilon('isilon01', 'isilon01.mydomain.com')
vipr.add_isilon('isilon01', 'isilon01.mydomain.com', 'sysadmin', 'sysadmin')
vipr.add_isilon('isilon01', 'isilon01.mydomain.com', 'sysadmin', 'sysadmin', '8093')

Parameters:

  • name (String) (defaults to: nil)

    Name of the Isilon Storage Provider. This name is arbitrary and only exists within ViPR. This is a required string.

  • ip_or_dns (String) (defaults to: nil)

    FQDN or IP Address of the Isilon Storage Provider to add. This is a required string.

  • user_name (String) (defaults to: nil)

    User Name that will be used for authenticating against the Isilon Storage Provider. This is an optional string. If no parameter is passed, then ‘admin’ is used. If you wish to specify a different password, port, or use_ssl param set this to nil

  • password (String) (defaults to: nil)

    Password that will be used for authenticating against the Isilon Storage Provider. This is an optional string. If no parameter is passed, then ‘#1Password’ is used. If you wish to specify a different username, port, or use_ssl param set this to nil

  • port (String) (defaults to: nil)

    Port that will be used for communicating with the Isilon Storage Provider. This is an optional string. If no parameter is passed, then ‘8080’ is used. If you wish to specify a different user_name, password, or use_ssl param set this to nil

Returns:

  • (Hash)

    The resulted post operation



366
367
368
369
370
# File 'lib/vipruby/objects/storagesystem.rb', line 366

def add_isilon(name=nil, ip_or_dns=nil, user_name=nil, password=nil, port=nil, auth=nil, cert=nil)
    check_storage_provider_payload(name, ip_or_dns)
		port.nil? ? port = '8080' : port = port
 rest_post(storage_system_payload(name, 'isilon', ip_or_dns, port, user_name, password), "#{@base_url}/vdc/storage-systems", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
end

#add_netapp(name = nil, ip_or_dns = nil, user_name = nil, password = nil, port = nil, auth = nil, cert = nil) ⇒ Hash

Note:

Supported Protocol: NFS, CIFS For supported versions, see the EMC ViPR Support Matrix available on the EMC Community Network (community.emc.com).

Add NetApp Storage Provider

Examples:

Add NetApp Storage Provider

vipr.netapp('netapp01', 'netapp01.mydomain.com')
vipr.netapp('netapp01', 'netapp01.mydomain.com', 'sysadmin', 'sysadmin')
vipr.netapp('netapp01', 'netapp01.mydomain.com', 'sysadmin', 'sysadmin', '8093')

Parameters:

  • name (String) (defaults to: nil)

    Name of the NetApp Storage Provider. This name is arbitrary and only exists within ViPR. This is a required string.

  • ip_or_dns (String) (defaults to: nil)

    FQDN or IP Address of the NetApp Storage Provider to add. This is a required string.

  • user_name (String) (defaults to: nil)

    User Name that will be used for authenticating against the NetApp Storage Provider. This is an optional string. If no parameter is passed, then ‘admin’ is used. If you wish to specify a different password, port, or use_ssl param set this to nil

  • password (String) (defaults to: nil)

    Password that will be used for authenticating against the NetApp Storage Provider. This is an optional string. If no parameter is passed, then ‘#1Password’ is used. If you wish to specify a different username, port, or use_ssl param set this to nil

  • port (String) (defaults to: nil)

    Port that will be used for communicating with the NetApp Storage Provider. This is an optional string. If no parameter is passed, then ‘443’ is used. If you wish to specify a different user_name, password, or use_ssl param set this to nil

Returns:

  • (Hash)

    The resulted post operation



414
415
416
417
418
# File 'lib/vipruby/objects/storagesystem.rb', line 414

def add_netapp(name=nil, ip_or_dns=nil, user_name=nil, password=nil, port=nil, auth=nil, cert=nil)
	check_storage_provider_payload(name, ip_or_dns)
		port.nil? ? port = '443' : port = port
 rest_post(storage_system_payload(name, 'netapp', ip_or_dns, port, user_name, password), "#{@base_url}/vdc/storage-systems", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
end

#add_scaleio(name = nil, ip_or_dns = nil, user_name = nil, password = nil, port = nil, use_ssl = nil, auth = nil, cert = nil) ⇒ Hash

Note:

Supported versions: ScaleIO 1.21.0.20 or later. Preconfiguration requirements: (1) Protection domains are defined. (2) All storage pools are defined.

Add ScaleIO Storage Systems

Examples:

Add ScaleIO Storage System

vipr.add_scaleio('scaleio01', 'scaleio01.mydomain.com')
vipr.add_scaleio('scaleio02', 'scaleio02.mydomain.com', 'sysadmin', 'sysadmin')
vipr.add_scaleio('scaleio03', 'scaleio03.mydomain.com', 'sysadmin', 'sysadmin', '8093', 'true')

Parameters:

  • name (String) (defaults to: nil)

    Name of the ScaleIO Storage System. This name is arbitrary and only exists within ViPR. This is a required string.

  • ip_or_dns (String) (defaults to: nil)

    FQDN or IP Address of the ScaleIO Storage System to add. This is a required string.

  • user_name (String) (defaults to: nil)

    User Name that will be used for authenticating against the ScaleIO Storage System. This is an optional string. If no parameter is passed, then ‘admin’ is used. If you wish to specify a different password, port, or use_ssl param set this to nil

  • password (String) (defaults to: nil)

    Password that will be used for authenticating against the ScaleIO Storage System. This is an optional string. If no parameter is passed, then ‘#1Password’ is used. If you wish to specify a different username, port, or use_ssl param set this to nil

  • port (String) (defaults to: nil)

    Port that will be used for communicating with the ScaleIO Storage System. This is an optional string. If no parameter is passed, then ‘22’ is used. If you wish to specify a different user_name, password, or use_ssl param set this to nil

  • use_ssl (String) (defaults to: nil)

    SSL setting for communicating with the ScaleIO Storage System. This is an optional string. If no parameter is passed, then ‘false’ is used.

Returns:

  • (Hash)

    The resulted post operation



321
322
323
324
325
# File 'lib/vipruby/objects/storagesystem.rb', line 321

def add_scaleio(name=nil, ip_or_dns=nil, user_name=nil, password=nil, port=nil, use_ssl=nil, auth=nil, cert=nil)
    check_storage_provider_payload(name, ip_or_dns)
		port.nil? ? port = '22' : port = port
 rest_post(storage_provider_payload(name, 'scaleio', ip_or_dns, port, user_name, password, use_ssl), "#{@base_url}/vdc/storage-providers", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
end

#add_third_party_block(name = nil, ip_or_dns = nil, user_name = nil, password = nil, port = nil, use_ssl = nil, auth = nil, cert = nil) ⇒ Hash

Note:

ViPR uses the OpenStack Block Storage (Cinder) Service to add third-party block storage systems to ViPR. For supported versions, see the EMC ViPR Support Matrix available on the EMC Community Network (community.emc.com).

Add Third Party Block Storage Provider

Examples:

Add Third Party Block Storage Provider

vipr.add_third_party_block('cinder01', 'cinder01.mydomain.com')
vipr.add_third_party_block('cinder01', 'cinder01.mydomain.com', 'sysadmin', 'sysadmin')
vipr.add_third_party_block('cinder01', 'cinder01.mydomain.com', 'sysadmin', 'sysadmin', '8093', 'true')

Parameters:

  • name (String) (defaults to: nil)

    Name of the Third Party Block Storage Provider. This name is arbitrary and only exists within ViPR. This is a required string.

  • ip_or_dns (String) (defaults to: nil)

    FQDN or IP Address of the Third Party Block Storage Provider to add. This is a required string.

  • user_name (String) (defaults to: nil)

    User Name that will be used for authenticating against the Third Party Block Storage Provider. This is an optional string. If no parameter is passed, then ‘admin’ is used. If you wish to specify a different password, port, or use_ssl param set this to nil

  • password (String) (defaults to: nil)

    Password that will be used for authenticating against the Third Party Block Storage Provider. This is an optional string. If no parameter is passed, then ‘#1Password’ is used. If you wish to specify a different username, port, or use_ssl param set this to nil

  • port (String) (defaults to: nil)

    Port that will be used for communicating with the Third Party Block Storage Provider. This is an optional string. If no parameter is passed, then ‘22’ is used. If you wish to specify a different user_name, password, or use_ssl param set this to nil

  • use_ssl (String) (defaults to: nil)

    SSL setting for communicating with the Third Party Block Storage Provider. This is an optional string. If no parameter is passed, then ‘false’ is used.

Returns:

  • (Hash)

    The resulted post operation



344
345
346
347
348
# File 'lib/vipruby/objects/storagesystem.rb', line 344

def add_third_party_block(name=nil, ip_or_dns=nil, user_name=nil, password=nil, port=nil, use_ssl=nil, auth=nil, cert=nil)
    check_storage_provider_payload(name, ip_or_dns)
		port.nil? ? port = '22' : port = port
 rest_post(storage_provider_payload(name, 'cinder', ip_or_dns, port, user_name, password, use_ssl), "#{@base_url}/vdc/storage-providers", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
end

#add_vplex(name = nil, ip_or_dns = nil, user_name = nil, password = nil, port = nil, use_ssl = nil, auth = nil, cert = nil) ⇒ Hash

Note:

ViPR supports VPLEX in a Local or Metro configuration. VPLEX Geo configurations are not supported.

Add VPLEX Storage Systems

Examples:

Add VPLEX Storage System

vipr.add_vplex('VPLEX01', 'VPLEX01.mydomain.com')
vipr.add_vplex('VPLEX02', 'VPLEX02.mydomain.com', 'sysadmin', 'sysadmin')
vipr.add_vplex('VPLEX03', 'VPLEX03.mydomain.com', 'sysadmin', 'sysadmin', '8093', 'true')

Parameters:

  • name (String) (defaults to: nil)

    Name of the VPLEX Device. This name is arbitrary and only exists within ViPR. This is a required string.

  • ip_or_dns (String) (defaults to: nil)

    FQDN or IP Address of the VPLEX Device to add. This is a required string.

  • user_name (String) (defaults to: nil)

    User Name that will be used for authenticating against the VPLEX Device. This is an optional string. If no parameter is passed, then ‘admin’ is used. If you wish to specify a different password, port, or use_ssl param set this to nil

  • password (String) (defaults to: nil)

    Password that will be used for authenticating against the VPLEX Device. This is an optional string. If no parameter is passed, then ‘#1Password’ is used. If you wish to specify a different username, port, or use_ssl param set this to nil

  • port (String) (defaults to: nil)

    Port that will be used for communicating with the VPLEX Device. This is an optional string. If no parameter is passed, then ‘443’ is used. If you wish to specify a different user_name, password, or use_ssl param set this to nil

  • use_ssl (String) (defaults to: nil)

    SSL setting for communicating with the VPLEX Device. This is an optional string. If no parameter is passed, then ‘false’ is used.

Returns:

  • (Hash)

    The resulted post operation



296
297
298
299
300
# File 'lib/vipruby/objects/storagesystem.rb', line 296

def add_vplex(name=nil, ip_or_dns=nil, user_name=nil, password=nil, port=nil, use_ssl=nil, auth=nil, cert=nil)
    check_storage_provider_payload(name, ip_or_dns)
		port.nil? ? port = '443' : port = port
 rest_post(storage_provider_payload(name, 'vplex', ip_or_dns, port, user_name, password, use_ssl), "#{@base_url}/vdc/storage-providers", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
end

#check_storage_provider_payload(name = nil, ip_or_dns = nil) ⇒ Boolean (private)

Error Handling method to check for Missing Param. If the pass fails, an error exception is raised

Parameters:

  • name (String) (defaults to: nil)

    Name of the Storage Provider. This name is arbitrary and only exists within ViPR. This is a required string.

  • ip_or_dns (String) (defaults to: nil)

    FQDN or IP Address of the Storage Provider to add. This is a required string.

Returns:

  • (Boolean)

    True if passes. If fails, raise exception



429
430
431
432
433
# File 'lib/vipruby/objects/storagesystem.rb', line 429

def check_storage_provider_payload(name=nil, ip_or_dns=nil)
  if name == nil || ip_or_dns == nil
      raise "Missing Param 'name' or 'ip_or_dns'"
  end
end

#check_storage_system_id_post(storage_system_id = nil) ⇒ Boolean (private)

Returns True if pass, false if it fails.

Parameters:

  • storage_system_id (String) (defaults to: nil)

    Requires the string of the storage_system_id uid [urn]

Returns:

  • (Boolean)

    True if pass, false if it fails



441
442
443
444
445
# File 'lib/vipruby/objects/storagesystem.rb', line 441

def check_storage_system_id_post(storage_system_id=nil)
  if storage_system_id == nil
      raise "Missing param (storage_system_id)"
  end
end

#get_storage_provider(storage_provider_id, auth = nil, cert = nil) ⇒ JSON

Get single Storage Provider information

Parameters:

  • storage_provider_id (urn:id)

    URN of a Storage Provider. Required Param

Returns:

  • (JSON)

    The JSON object of the Storage Provider



131
132
133
# File 'lib/vipruby/objects/storagesystem.rb', line 131

def get_storage_provider(storage_provider_id,auth=nil, cert=nil)
	rest_get("#{@base_url}/vdc/storage-providers/#{storage_provider_id}", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
end

#get_storage_provider_storage_system(storage_provider_id, storage_system_id, auth = nil, cert = nil) ⇒ JSON

Get single Storage Provider Storage System information

Parameters:

  • storage_provider_id (urn:id)

    URN of a Storage Provider. Required Param

  • storage_system_id (urn:id)

    URN of a Storage System. Required Param

Returns:

  • (JSON)

    The JSON object of the Storage Provider Storage Systems



150
151
152
# File 'lib/vipruby/objects/storagesystem.rb', line 150

def get_storage_provider_storage_system(storage_provider_id, storage_system_id,auth=nil, cert=nil)
	rest_get("#{@base_url}/vdc/storage-providers/#{storage_provider_id}/storage-systems/#{storage_system_id}", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
end

#get_storage_provider_storage_systems(storage_provider_id, auth = nil, cert = nil) ⇒ JSON

Get single Storage Provider Storage Systems information

Parameters:

  • storage_provider_id (urn:id)

    URN of a Storage Provider. Required Param

Returns:

  • (JSON)

    The JSON object of the Storage Provider Storage Systems



140
141
142
# File 'lib/vipruby/objects/storagesystem.rb', line 140

def get_storage_provider_storage_systems(storage_provider_id,auth=nil, cert=nil)
	rest_get("#{@base_url}/vdc/storage-providers/#{storage_provider_id}/storage-systems", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
end

#get_storage_provider_tasks(storage_provider_id, auth = nil, cert = nil) ⇒ JSON

Get single Storage Provider Tasks information

Parameters:

  • storage_provider_id (urn:id)

    URN of a Storage Provider. Required Param

Returns:

  • (JSON)

    The JSON object of the Storage Provider Tasks



159
160
161
# File 'lib/vipruby/objects/storagesystem.rb', line 159

def get_storage_provider_tasks(storage_provider_id,auth=nil, cert=nil)
	rest_get("#{@base_url}/vdc/storage-providers/#{storage_provider_id}/tasks", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
end

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

Get All Storage Providers. Gets the id, name, and self link for all registered storage providers.

Returns:

  • (json)

    JSON object of all the Storage Providers.



122
123
124
# File 'lib/vipruby/objects/storagesystem.rb', line 122

def get_storage_providers(auth=nil, cert=nil)
	rest_get("#{@base_url}/vdc/storage-providers", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
end

#get_storage_system(storage_system_id, auth = nil, cert = nil) ⇒ JSON

Get single Storage System information

Parameters:

  • storage_system_id (urn:id)

    URN of a Storage System. Required Param

Returns:

  • (JSON)

    The JSON object of the Storage System



18
19
20
# File 'lib/vipruby/objects/storagesystem.rb', line 18

def get_storage_system(storage_system_id,auth=nil, cert=nil)
	rest_get("#{@base_url}/vdc/storage-systems/#{storage_system_id}", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
end

#get_storage_system_auto_tier_policy(storage_system_id, auth = nil, cert = nil) ⇒ JSON

Get single Storage System Auto-Tier Policies

Parameters:

  • storage_system_id (urn:id)

    URN of a Storage System. Required Param

Returns:

  • (JSON)

    The JSON object of the Storage System Auto-Tier Policies



97
98
99
# File 'lib/vipruby/objects/storagesystem.rb', line 97

def get_storage_system_auto_tier_policy(storage_system_id,auth=nil, cert=nil)
	rest_get("#{@base_url}/vdc/storage-systemss/#{storage_system_id}/auto-tier-policies", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
end

#get_storage_system_storage_pools(storage_system_id, auth = nil, cert = nil) ⇒ JSON

Get single Storage System Storage Pools

Parameters:

  • storage_system_id (urn:id)

    URN of a Storage System. Required Param

Returns:

  • (JSON)

    The JSON object of the Storage System Storage Pools



79
80
81
# File 'lib/vipruby/objects/storagesystem.rb', line 79

def get_storage_system_storage_pools(storage_system_id,auth=nil, cert=nil)
	rest_get("#{@base_url}/vdc/storage-systemss/#{storage_system_id}/storage-pools", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
end

#get_storage_system_storage_ports(storage_system_id, auth = nil, cert = nil) ⇒ JSON

Get single Storage System Storage Ports

Parameters:

  • storage_system_id (urn:id)

    URN of a Storage System. Required Param

Returns:

  • (JSON)

    The JSON object of the Storage System Storage Ports



88
89
90
# File 'lib/vipruby/objects/storagesystem.rb', line 88

def get_storage_system_storage_ports(storage_system_id,auth=nil, cert=nil)
	rest_get("#{@base_url}/vdc/storage-systemss/#{storage_system_id}/storage-ports", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
end

#get_storage_system_unmanaged_filesystems(storage_system_id, auth = nil, cert = nil) ⇒ JSON

Get single Storage System unmanaged filesystems available

Parameters:

  • storage_system_id (urn:id)

    URN of a Storage System. Required Param

Returns:

  • (JSON)

    The JSON object of the Storage System unmanaged filesystems available



115
116
117
# File 'lib/vipruby/objects/storagesystem.rb', line 115

def get_storage_system_unmanaged_filesystems(storage_system_id,auth=nil, cert=nil)
	rest_get("#{@base_url}/vdc/storage-systemss/#{storage_system_id}/unmanaged/filesystems", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
end

#get_storage_system_unmanaged_volumes(storage_system_id, auth = nil, cert = nil) ⇒ JSON

Get single Storage System unmanaged volumes available

Parameters:

  • storage_system_id (urn:id)

    URN of a Storage System. Required Param

Returns:

  • (JSON)

    The JSON object of the Storage System unmanaged volumes available



106
107
108
# File 'lib/vipruby/objects/storagesystem.rb', line 106

def get_storage_system_unmanaged_volumes(storage_system_id,auth=nil, cert=nil)
	rest_get("#{@base_url}/vdc/storage-systemss/#{storage_system_id}/unmanaged/volumes", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
end

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

Get All Storage Systems. Gets the id, name, and self link for all registered storage systems.

Returns:

  • (json)

    JSON object of all the Storage Systems.



9
10
11
# File 'lib/vipruby/objects/storagesystem.rb', line 9

def get_storage_systems(auth=nil, cert=nil)
	rest_get("#{@base_url}/vdc/storage-systems", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
end

#storage_provider_payload(name, interface_type, ip_or_dns, port, user_name, password, use_ssl) ⇒ JSON

Returns The JSON structure for the post operation.

Parameters:

  • port (String)

    Port of the Storage Provider. This is a required string. This generated automatically based on the method call for types of storage providers. This is a required string. This can be modified based depending upon the storage system method call

  • user_name (String)

    User Name that will be used for authenticating against the Storage Provider. This is a required string. If a User Name is not provided, then ‘admin’ is used

  • password (String)

    Password for the user_name that will be used for authenticating against the Storage Provider. This is a required string. If a Password is not provided, then ‘#1Password’ is used

  • use_ssl (Boolean)

    Specify true or false for communicating to the Storage Provider. This is a required string, and will default to false unless ‘true’ is specified

Returns:

  • (JSON)

    The JSON structure for the post operation



174
175
176
177
178
179
180
181
182
183
184
185
186
# File 'lib/vipruby/objects/storagesystem.rb', line 174

def storage_provider_payload(name, interface_type, ip_or_dns, port, user_name, password, use_ssl)
	payload = {
    	name: name,
    	interface_type: interface_type,
    	ip_address: ip_or_dns,
    	port_number: port,
    	user_name: user_name.nil? ? 'admin' : user_name,
    	password: password.nil? ? '#1Password' : password,
    	use_ssl: use_ssl.nil? ? false : use_ssl
    }.to_json

    return payload
end

#storage_system_deactivate(storage_system_id = nil, auth = nil, cert = nil) ⇒ JSON

Deactivate Storage System. Remove a storage system. The method would remove the storage system from the system control and will remove all resources associated with the storage system from the database. Note that resources (pools, ports, volumes, etc.) are not removed from the storage system physically, but become unavailable for the user.

Parameters:

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

    URN of a Storage System. Required Param

Returns:

  • (JSON)

    The JSON object of the Storage System



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

def storage_system_deactivate(storage_system_id=nil,auth=nil, cert=nil)
	check_storage_system_id_post(storage_system_id)
    payload = {
        id: storage_system_id
      }.to_json
    rest_post(payload, "#{@base_url}/vdc/storage-systems/#{storage_system_id}/deactivate", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
end

#storage_system_deregister(storage_system_id = nil, auth = nil, cert = nil) ⇒ JSON

Deregister Storage System. Allows the user to deregister a registered storage system so that it is no longer used by the system. This simply sets the registration_status of the storage system to UNREGISTERED

Parameters:

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

    URN of a Storage System. Required Param

Returns:

  • (JSON)

    The JSON object of the Storage System



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

def storage_system_deregister(storage_system_id=nil,auth=nil, cert=nil)
	check_storage_system_id_post(storage_system_id)
    payload = {
        id: storage_system_id
      }.to_json
    rest_post(payload, "#{@base_url}/vdc/storage-systems/#{storage_system_id}/deregister", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
end

#storage_system_discover(storage_system_id = nil, auth = nil, cert = nil) ⇒ JSON

Discover Storage System. Allows the user to manually discover the registered storage system with the passed id.

Parameters:

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

    URN of a Storage System. Required Param

Returns:

  • (JSON)

    The JSON object of the Storage System



40
41
42
43
44
45
46
# File 'lib/vipruby/objects/storagesystem.rb', line 40

def storage_system_discover(storage_system_id=nil,auth=nil, cert=nil)
	check_storage_system_id_post(storage_system_id)
    payload = {
        id: storage_system_id
      }.to_json
    rest_post(payload, "#{@base_url}/vdc/storage-systems/#{storage_system_id}/discover", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
end

#storage_system_payload(name, system_type, ip_or_dns, port, user_name, password, smis_provider_ip = nil, smis_port_number = nil, smis_user_name = nil, smis_password = nil, smis_use_ssl = nil) ⇒ JSON

Returns The JSON structure for the post operation.

Parameters:

  • system_type (String)

    Interface type of the Storage System. This generated automatically based on the method call for types of storage providers. This is a required string.

  • ip_or_dns (String)

    IP Address or FQDN of the Storage System. This is a required string.

  • port (String)

    Port of the Storage System. This is a required string. This generated automatically based on the method call for types of storage providers. This is a required string. This can be modified based depending upon the storage system method call

  • user_name (String)

    User Name that will be used for authenticating against the Storage System. This is a required string. If a User Name is not provided, then ‘admin’ is used

  • password (String)

    Password for the user_name that will be used for authenticating against the Storage System. This is a required string. If a Password is not provided, then ‘#1Password’ is used

  • smis_provider_ip (String) (defaults to: nil)

    IP Address or FQDN of the SMI-S Provider for the Storage System. This is a required string. Only used for #add_emc_file method

  • smis_port_number (String) (defaults to: nil)

    Port Number of the SMI-S Provider for the Storage System. This is a required string, and will default to ‘5988’ unless something else is specified. Only used for #add_emc_file method

  • smis_user_name (String) (defaults to: nil)

    User Name that will be used for authenticating against the SMI-S Provider to the Storage System. This is a required string, and will default to ‘admin’ unless something else is specified. Only used for #add_emc_file method

  • smis_password (String) (defaults to: nil)

    Password that will be used for authenticating against the SMI-S Provider to the Storage System. This is a required string, and will default to ‘#1Password’ unless something else is specified. Only used for #add_emc_file method

  • smis_use_ssl (Boolean) (defaults to: nil)

    Specify true or false for communicating to the Storage System. This is a required string, and will default to false unless true is passed. Only used for #add_emc_file method

Returns:

  • (JSON)

    The JSON structure for the post operation



203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
# File 'lib/vipruby/objects/storagesystem.rb', line 203

def storage_system_payload(name, system_type, ip_or_dns, port, user_name, password, smis_provider_ip=nil, smis_port_number=nil, smis_user_name=nil, smis_password=nil, smis_use_ssl=nil)
	if smis_provider_ip == nil
		payload = {
	    	name: name,
	    	system_type: system_type,
	    	ip_address: ip_or_dns,
	    	port_number: port,
	    	user_name: user_name.nil? ? 'admin' : user_name,
	    	password: password.nil? ? '#1Password' : password,
	    }.to_json
    else
    	payload = {
      		name: name,
      		system_type: system_type,
      		ip_address: ip_or_dns,
      		port_number: port,
      		user_name: user_name.nil? ? 'admin' : user_name,
      		password: password.nil? ? '#1Password' : password,
     		smis_provider_ip: smis_provider_ip,
		    smis_port_number: smis_port_number.nil? ? '5988' : smis_port_number,
		    smis_user_name: smis_user_name.nil? ? 'admin' : smis_user_name,
		    smis_password: smis_password.nil? ? '#1Password' : smis_password,
		    smis_use_ssl: smis_use_ssl.nil? ? false : smis_use_ssl
		 }.to_json
	end

    return payload
end

#storage_system_register(storage_system_id = nil, auth = nil, cert = nil) ⇒ JSON

Register Storage System. Allows the user register the storage system with the passed id.

Parameters:

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

    URN of a Storage System. Required Param

Returns:

  • (JSON)

    The JSON object of the Storage System



27
28
29
30
31
32
33
# File 'lib/vipruby/objects/storagesystem.rb', line 27

def storage_system_register(storage_system_id=nil,auth=nil, cert=nil)
	check_storage_system_id_post(storage_system_id)
    payload = {
        id: storage_system_id
      }.to_json
    rest_post(payload, "#{@base_url}/vdc/storage-systems/#{storage_system_id}/register", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
end