Class: Staypuft::Deployment::CinderService::Netapp
- Inherits:
-
Object
- Object
- Staypuft::Deployment::CinderService::Netapp
- 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
-
#controller_ips ⇒ Object
Returns the value of attribute controller_ips.
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#hostname ⇒ Object
Returns the value of attribute hostname.
-
#id ⇒ Object
Returns the value of attribute id.
-
#login ⇒ Object
Returns the value of attribute login.
-
#nfs_shares ⇒ Object
Returns the value of attribute nfs_shares.
-
#nfs_shares_config ⇒ Object
Returns the value of attribute nfs_shares_config.
-
#password ⇒ Object
Returns the value of attribute password.
-
#sa_password ⇒ Object
Returns the value of attribute sa_password.
-
#server_port ⇒ Object
Returns the value of attribute server_port.
-
#storage_family ⇒ Object
Returns the value of attribute storage_family.
-
#storage_pools ⇒ Object
Returns the value of attribute storage_pools.
-
#storage_protocol ⇒ Object
Returns the value of attribute storage_protocol.
-
#transport_type ⇒ Object
Returns the value of attribute transport_type.
-
#vfiler ⇒ Object
Returns the value of attribute vfiler.
-
#volume_list ⇒ Object
Returns the value of attribute volume_list.
-
#vserver ⇒ Object
Returns the value of attribute vserver.
Class Method Summary collapse
Instance Method Summary collapse
- #attributes ⇒ Object
- #attributes=(attrs) ⇒ Object
-
#initialize(attrs = {}) ⇒ Netapp
constructor
A new instance of Netapp.
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_ips ⇒ Object
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 |
#errors ⇒ Object (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 |
#hostname ⇒ Object
Returns the value of attribute hostname.
8 9 10 |
# File 'app/models/staypuft/deployment/cinder_service/netapp.rb', line 8 def hostname @hostname end |
#id ⇒ Object
Returns the value of attribute id.
8 9 10 |
# File 'app/models/staypuft/deployment/cinder_service/netapp.rb', line 8 def id @id end |
#login ⇒ Object
Returns the value of attribute login.
8 9 10 |
# File 'app/models/staypuft/deployment/cinder_service/netapp.rb', line 8 def login @login end |
#nfs_shares ⇒ Object
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_config ⇒ Object
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 |
#password ⇒ Object
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_password ⇒ Object
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_port ⇒ Object
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_family ⇒ Object
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_pools ⇒ Object
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_protocol ⇒ Object
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_type ⇒ Object
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 |
#vfiler ⇒ Object
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_list ⇒ Object
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 |
#vserver ⇒ Object
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, = {}) attr end |
.lookup_ancestors ⇒ Object
33 34 35 |
# File 'app/models/staypuft/deployment/cinder_service/netapp.rb', line 33 def self.lookup_ancestors [self] end |
Instance Method Details
#attributes ⇒ Object
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 |