Class: Staypuft::Deployment::CinderService::Equallogic

Inherits:
Object
  • Object
show all
Extended by:
ActiveModel::Naming
Includes:
ActiveModel::Serializers::JSON, ActiveModel::Validations
Defined in:
app/models/staypuft/deployment/cinder_service/equallogic.rb

Defined Under Namespace

Classes: SanIpValueValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Equallogic

Returns a new instance of Equallogic.



12
13
14
15
16
17
18
19
# File 'app/models/staypuft/deployment/cinder_service/equallogic.rb', line 12

def initialize(attrs = {})
  @errors = ActiveModel::Errors.new(self)
  self.attributes = attrs
  self.thin_provision = true
  self.use_chap = false
  self. = ''
  self.chap_password = ''
end

Instance Attribute Details

#chap_loginObject

Returns the value of attribute chap_login.



8
9
10
# File 'app/models/staypuft/deployment/cinder_service/equallogic.rb', line 8

def 
  @chap_login
end

#chap_passwordObject

Returns the value of attribute chap_password.



8
9
10
# File 'app/models/staypuft/deployment/cinder_service/equallogic.rb', line 8

def chap_password
  @chap_password
end

#errorsObject (readonly)

Returns the value of attribute errors.



10
11
12
# File 'app/models/staypuft/deployment/cinder_service/equallogic.rb', line 10

def errors
  @errors
end

#group_nameObject

Returns the value of attribute group_name.



8
9
10
# File 'app/models/staypuft/deployment/cinder_service/equallogic.rb', line 8

def group_name
  @group_name
end

#idObject

Returns the value of attribute id.



8
9
10
# File 'app/models/staypuft/deployment/cinder_service/equallogic.rb', line 8

def id
  @id
end

#poolObject

Returns the value of attribute pool.



8
9
10
# File 'app/models/staypuft/deployment/cinder_service/equallogic.rb', line 8

def pool
  @pool
end

#san_ipObject

Returns the value of attribute san_ip.



8
9
10
# File 'app/models/staypuft/deployment/cinder_service/equallogic.rb', line 8

def san_ip
  @san_ip
end

#san_loginObject

Returns the value of attribute san_login.



8
9
10
# File 'app/models/staypuft/deployment/cinder_service/equallogic.rb', line 8

def 
  @san_login
end

#san_passwordObject

Returns the value of attribute san_password.



8
9
10
# File 'app/models/staypuft/deployment/cinder_service/equallogic.rb', line 8

def san_password
  @san_password
end

#thin_provisionObject

Returns the value of attribute thin_provision.



8
9
10
# File 'app/models/staypuft/deployment/cinder_service/equallogic.rb', line 8

def thin_provision
  @thin_provision
end

#use_chapObject

Returns the value of attribute use_chap.



8
9
10
# File 'app/models/staypuft/deployment/cinder_service/equallogic.rb', line 8

def use_chap
  @use_chap
end

Class Method Details

.human_attribute_name(attr, options = {}) ⇒ Object



21
22
23
# File 'app/models/staypuft/deployment/cinder_service/equallogic.rb', line 21

def self.human_attribute_name(attr, options = {})
  attr
end

.lookup_ancestorsObject



25
26
27
# File 'app/models/staypuft/deployment/cinder_service/equallogic.rb', line 25

def self.lookup_ancestors
  [self]
end

Instance Method Details

#attributesObject



29
30
31
32
33
# File 'app/models/staypuft/deployment/cinder_service/equallogic.rb', line 29

def attributes
  { 'san_ip' => nil, 'san_login' => nil, 'san_password' => nil, 'pool' => nil,
    'group_name' => nil, 'thin_provision' => nil, 'use_chap' => nil,
    'chap_login' => nil, 'chap_password' => nil }
end

#attributes=(attrs) ⇒ Object



35
36
37
# File 'app/models/staypuft/deployment/cinder_service/equallogic.rb', line 35

def attributes=(attrs)
  attrs.each { |attr, value| send "#{attr}=", value } unless attrs.nil?
end