Class: Brocade::SAN::ZoneConfiguration

Inherits:
Object
  • Object
show all
Defined in:
lib/brocadesan/zone_configuration.rb

Overview

Zone Configuration model

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#effectiveObject (readonly)

true if configuration is effective, false if defined



9
10
11
# File 'lib/brocadesan/zone_configuration.rb', line 9

def effective
  @effective
end

#nameObject (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

#membersObject

returns array of members



21
22
23
# File 'lib/brocadesan/zone_configuration.rb', line 21

def members
  @members
end

#to_sObject



33
34
35
# File 'lib/brocadesan/zone_configuration.rb', line 33

def to_s
  @name
end