Module: Junos::Ez::Vlans

Defined in:
lib/junos-ez/vlans.rb

Defined Under Namespace

Classes: Provider

Constant Summary collapse

PROPERTIES =
[
   :vlan_id, 
   :description, 
   :no_mac_learning
]

Class Method Summary collapse

Class Method Details

.Provider(ndev, varsym) ⇒ Object



11
12
13
14
15
16
17
18
19
20
# File 'lib/junos-ez/vlans.rb', line 11

def self.Provider( ndev, varsym )        
  newbie = case ndev.fact :switch_style
  when :VLAN, :VLAN_NG
    Junos::Ez::Vlans::Provider::VLAN.new( ndev )
  when :BRIDGE_DOMAIN
    Junos::Ez::Vlans::Provider::BRIDGE_DOMAIN.new( ndev )      
  end      
  newbie.properties = Junos::Ez::Provider::PROPERTIES + PROPERTIES
  Junos::Ez::Provider.attach_instance_variable( ndev, varsym, newbie )
end