The interface name abbreviation to canonical name doesn't return the correct name for GigabitEthernet and doesn't support TenGigabitEthernet interfaces.
Signed-off-by: Brice Figureau <[email protected]> --- lib/puppet/util/network_device/cisco/device.rb | 3 ++- spec/unit/util/network_device/cisco/device_spec.rb | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/puppet/util/network_device/cisco/device.rb b/lib/puppet/util/network_device/cisco/device.rb index 005470e..09e4e5c 100644 --- a/lib/puppet/util/network_device/cisco/device.rb +++ b/lib/puppet/util/network_device/cisco/device.rb @@ -70,7 +70,8 @@ class Puppet::Util::NetworkDevice::Cisco::Device < Puppet::Util::NetworkDevice:: IF={ :FastEthernet => %w{FastEthernet FastEth Fast FE Fa F}, - :GigEthernet => %w{GigabitEthernet GigEthernet GigEth GE Gi G}, + :GigabitEthernet => %w{GigabitEthernet GigEthernet GigEth GE Gi G}, + :TenGigabitEthernet => %w{TenGigabitEthernet TE Te}, :Ethernet => %w{Ethernet Eth E}, :Serial => %w{Serial Se S}, :PortChannel => %w{PortChannel Port-Channel Po}, diff --git a/spec/unit/util/network_device/cisco/device_spec.rb b/spec/unit/util/network_device/cisco/device_spec.rb index 1c5a1a6..182d9ee 100755 --- a/spec/unit/util/network_device/cisco/device_spec.rb +++ b/spec/unit/util/network_device/cisco/device_spec.rb @@ -137,7 +137,8 @@ eos "Fa 0/1" => "FastEthernet0/1", "Fa0/1" => "FastEthernet0/1", "FastEth 0/1" => "FastEthernet0/1", - "Gi1" => "GigEthernet1", + "Gi1" => "GigabitEthernet1", + "Te2" => "TenGigabitEthernet2", "Di9" => "Dialer9", "Ethernet 0/0/1" => "Ethernet0/0/1", "E0" => "Ethernet0", -- 1.7.5.1 -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.
