Class: Brocade::SAN::ZoneConfiguration
- Inherits:
-
Object
- Object
- Brocade::SAN::ZoneConfiguration
- Defined in:
- lib/brocadesan/zone_configuration.rb
Overview
Zone Configuration model
Instance Attribute Summary collapse
-
#effective ⇒ Object
readonly
true if configuration is effective, false if defined.
-
#name ⇒ Object
readonly
returns name of the zone configuration.
Instance Method Summary collapse
-
#add_member(member) ⇒ Object
add member to the object members of zone configurations are zones
member
is name of the zone. -
#initialize(name, opts = {}) ⇒ ZoneConfiguration
constructor
init method.
-
#members ⇒ Object
returns array of members.
- #to_s ⇒ Object
Constructor Details
#initialize(name, opts = {}) ⇒ ZoneConfiguration
init method
12 13 14 15 16 17 |
# File 'lib/brocadesan/zone_configuration.rb', line 12 def initialize(name,opts={}) # :nodoc: Switch::verify_name(name) @name=name @effective=opts[:effective].nil? ? false : true @members=[] end |
Instance Attribute Details
#effective ⇒ Object (readonly)
true if configuration is effective, false if defined
9 10 11 |
# File 'lib/brocadesan/zone_configuration.rb', line 9 def effective @effective end |
#name ⇒ Object (readonly)
returns name of the zone configuration
6 7 8 |
# File 'lib/brocadesan/zone_configuration.rb', line 6 def name @name end |
Instance Method Details
#add_member(member) ⇒ Object
add member to the object members of zone configurations are zones member
is name of the zone
28 29 30 31 |
# File 'lib/brocadesan/zone_configuration.rb', line 28 def add_member(member) Switch::verify_name(member) @members<<member end |
#members ⇒ Object
returns array of members
21 22 23 |
# File 'lib/brocadesan/zone_configuration.rb', line 21 def members @members end |
#to_s ⇒ Object
33 34 35 |
# File 'lib/brocadesan/zone_configuration.rb', line 33 def to_s @name end |