Class: Vscsi

Inherits:
Object
  • Object
show all
Defined in:
lib/rbvppc/vscsi.rb

Overview

Authors: Christopher M Wood (<[email protected]>) John F Hutchinson (<[email protected]) © Copyright IBM Corporation 2015.

LICENSE: MIT (opensource.org/licenses/MIT)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(virtual_slot_num, client_or_server, remote_lpar_id, remote_lpar_name, remote_slot_num, is_required) ⇒ Vscsi

Returns a new instance of Vscsi.

Raises:

  • (StandardError)


17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/rbvppc/vscsi.rb', line 17

def initialize(virtual_slot_num, client_or_server, remote_lpar_id,
				 remote_lpar_name, remote_slot_num, is_required)


	#Test for the explicitly required parameters
	raise StandardError.new("A vSCSI cannot be defined without a virtual_slot_num") if virtual_slot_num.nil?
	raise StandardError.new("A vSCSI cannot be defined without a client_or_server") if client_or_server.nil?
	raise StandardError.new("A vSCSI cannot be defined without a remote_lpar_id") if remote_lpar_id.nil?
	raise StandardError.new("A vSCSI cannot be defined without a remote_lpar_name") if remote_lpar_name.nil?
	raise StandardError.new("A vSCSI cannot be defined without specifying is_required") if is_required.nil?

	@virtual_slot_num 	= virtual_slot_num
	@client_or_server 	= client_or_server
	@remote_lpar_id		= remote_lpar_id
	@remote_lpar_name   = remote_lpar_name
	@remote_slot_num	= remote_slot_num
	@is_required		= is_required
	
end

Instance Attribute Details

#client_or_serverObject

Returns the value of attribute client_or_server.



10
11
12
# File 'lib/rbvppc/vscsi.rb', line 10

def client_or_server
  @client_or_server
end

#is_requiredObject

Returns the value of attribute is_required.



10
11
12
# File 'lib/rbvppc/vscsi.rb', line 10

def is_required
  @is_required
end

#remote_lpar_idObject

Returns the value of attribute remote_lpar_id.



10
11
12
# File 'lib/rbvppc/vscsi.rb', line 10

def remote_lpar_id
  @remote_lpar_id
end

#remote_lpar_nameObject

Returns the value of attribute remote_lpar_name.



10
11
12
# File 'lib/rbvppc/vscsi.rb', line 10

def remote_lpar_name
  @remote_lpar_name
end

#remote_slot_numObject

Returns the value of attribute remote_slot_num.



10
11
12
# File 'lib/rbvppc/vscsi.rb', line 10

def remote_slot_num
  @remote_slot_num
end

#virtual_slot_numObject

Returns the value of attribute virtual_slot_num.



10
11
12
# File 'lib/rbvppc/vscsi.rb', line 10

def virtual_slot_num
  @virtual_slot_num
end