Module: Junos::Ez::L1ports

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

Defined Under Namespace

Classes: Provider

Constant Summary collapse

PROPERTIES =
[ 
  :admin,               # [ :up, :down ]
  :description,         # string
  :mtu,                 # number
  :speed,               # [ :auto, '10m', '100m', '1g', '10g' ]
  :duplex,              # [ :auto, :half, :full ]
  :unit_count,          # number of configured units
]
IFS_NAME_FILTER =
'[fgx]e-*'

Class Method Summary collapse

Class Method Details

.Provider(ndev, varsym) ⇒ Object



16
17
18
19
20
21
22
23
24
25
26
# File 'lib/junos-ez/l1_ports.rb', line 16

def self.Provider( ndev, varsym )            
  newbie = case ndev.fact( :ifd_style )
  when :SWITCH
    Junos::Ez::L1ports::Provider::SWITCH.new( ndev )            
  when :CLASSIC
    Junos::Ez::L1ports::Provider::CLASSIC.new( ndev )      
  end      
  
  newbie.properties = Junos::Ez::Provider::PROPERTIES + PROPERTIES
  Junos::Ez::Provider.attach_instance_variable( ndev, varsym, newbie )
end