Class: Staypuft::Deployment::CinderService::Netapp

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

Constant Summary collapse

STORAGE_FAMILIES =
{ :ontap_cluster => 'Clustered Data ONTAP',
:ontap_7mode => 'Data ONTAP 7-mode',
:eseries => 'E-Series' }
STORAGE_PROTOCOLS =
{ :nfs => 'NFS', :iscsi => 'iSCSI' }
TRANSPORT_TYPES =
{ :http => 'http', :https => 'https' }

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Netapp

Returns a new instance of Netapp.



20
21
22
23
24
25
26
27
# File 'app/models/staypuft/deployment/cinder_service/netapp.rb', line 20

def initialize(attrs = {})
  @errors = ActiveModel::Errors.new(self)
  self.server_port = 80
  self.storage_family = 'ontap_cluster'
  self.transport_type = 'http'
  self.storage_protocol = 'nfs'
  self.attributes = attrs
end

Instance Attribute Details

#controller_ipsObject

Returns the value of attribute controller_ips.



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

def controller_ips
  @controller_ips
end

#errorsObject (readonly)

Returns the value of attribute errors.



12
13
14
# File 'app/models/staypuft/deployment/cinder_service/netapp.rb', line 12

def errors
  @errors
end

#hostnameObject

Returns the value of attribute hostname.



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

def hostname
  @hostname
end

#idObject

Returns the value of attribute id.



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

def id
  @id
end

#loginObject

Returns the value of attribute login.



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

def 
  @login
end

#nfs_sharesObject

Returns the value of attribute nfs_shares.



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

def nfs_shares
  @nfs_shares
end

#nfs_shares_configObject

Returns the value of attribute nfs_shares_config.



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

def nfs_shares_config
  @nfs_shares_config
end

#passwordObject

Returns the value of attribute password.



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

def password
  @password
end

#sa_passwordObject

Returns the value of attribute sa_password.



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

def sa_password
  @sa_password
end

#server_portObject

Returns the value of attribute server_port.



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

def server_port
  @server_port
end

#storage_familyObject

Returns the value of attribute storage_family.



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

def storage_family
  @storage_family
end

#storage_poolsObject

Returns the value of attribute storage_pools.



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

def storage_pools
  @storage_pools
end

#storage_protocolObject

Returns the value of attribute storage_protocol.



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

def storage_protocol
  @storage_protocol
end

#transport_typeObject

Returns the value of attribute transport_type.



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

def transport_type
  @transport_type
end

#vfilerObject

Returns the value of attribute vfiler.



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

def vfiler
  @vfiler
end

#volume_listObject

Returns the value of attribute volume_list.



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

def volume_list
  @volume_list
end

#vserverObject

Returns the value of attribute vserver.



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

def vserver
  @vserver
end

Class Method Details

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



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

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

.lookup_ancestorsObject



33
34
35
# File 'app/models/staypuft/deployment/cinder_service/netapp.rb', line 33

def self.lookup_ancestors
  [self]
end

Instance Method Details

#attributesObject



37
38
39
40
41
42
43
44
# File 'app/models/staypuft/deployment/cinder_service/netapp.rb', line 37

def attributes
  { 'hostname' => nil, 'login' => nil, 'password' => nil,
    'server_port' => nil, 'storage_family' => nil, 'transport_type' => nil,
    'storage_protocol' => nil, 'nfs_shares' => nil, 'nfs_shares_config' => nil,
    'volume_list' => nil, 'vfiler' => nil, 'vserver' => nil,
    'controller_ips' => nil, 'sa_password' => nil,
    'storage_pools' => nil }
end

#attributes=(attrs) ⇒ Object



46
47
48
# File 'app/models/staypuft/deployment/cinder_service/netapp.rb', line 46

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