Class: Cumulus::EC2::VolumeGroup
- Inherits:
-
Struct
- Object
- Struct
- Cumulus::EC2::VolumeGroup
- Defined in:
- lib/ec2/models/EbsGroupConfig.rb
Instance Attribute Summary collapse
-
#count ⇒ Object
Returns the value of attribute count.
-
#encrypted ⇒ Object
Returns the value of attribute encrypted.
-
#iops ⇒ Object
Returns the value of attribute iops.
-
#kms_key ⇒ Object
Returns the value of attribute kms_key.
-
#size ⇒ Object
Returns the value of attribute size.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
Instance Attribute Details
#count ⇒ Object
Returns the value of attribute count
9 10 11 |
# File 'lib/ec2/models/EbsGroupConfig.rb', line 9 def count @count end |
#encrypted ⇒ Object
Returns the value of attribute encrypted
9 10 11 |
# File 'lib/ec2/models/EbsGroupConfig.rb', line 9 def encrypted @encrypted end |
#iops ⇒ Object
Returns the value of attribute iops
9 10 11 |
# File 'lib/ec2/models/EbsGroupConfig.rb', line 9 def iops @iops end |
#kms_key ⇒ Object
Returns the value of attribute kms_key
9 10 11 |
# File 'lib/ec2/models/EbsGroupConfig.rb', line 9 def kms_key @kms_key end |
#size ⇒ Object
Returns the value of attribute size
9 10 11 |
# File 'lib/ec2/models/EbsGroupConfig.rb', line 9 def size @size end |
#type ⇒ Object
Returns the value of attribute type
9 10 11 |
# File 'lib/ec2/models/EbsGroupConfig.rb', line 9 def type @type end |
Instance Method Details
#description ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/ec2/models/EbsGroupConfig.rb', line 21 def description [ "#{self.size}GiB", "#{self.type}", if self.type == "io1" then "#{self.iops} IOPS" end, if self.encrypted then "encrypted" else "unencrypted" end, if self.kms_key then "KMS #{self.kms_key}" end, ].reject(&:nil?).join("/") end |
#hash_key ⇒ Object
31 32 33 |
# File 'lib/ec2/models/EbsGroupConfig.rb', line 31 def hash_key "#{self.size}|#{self.type}|#{self.iops}|#{self.encrypted}|#{self.kms_key}" end |
#to_hash ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/ec2/models/EbsGroupConfig.rb', line 10 def to_hash { "size" => self.size, "type" => self.type, "iops" => self.iops, "count" => self.count, "encrypted" => self.encrypted, "kms-key" => self.kms_key }.reject { |k, v| v.nil? } end |