mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-13 16:40:50 -07:00
Adding slx_command module and supporting module_utils. (#38235)
* Adding slx_command module and supporting module_utils. This commit adds the slx_command module and tests as well as the required slxos module_utils. * Update copyright in header * Adding missing module init * Cleaning up shebangs/licensing. * Incorporating feedback Removing reference to `waitfor` alias in `slxos_command` module. Adding `Extreme Networks` to `short_description` of `slxos_command` module. * Adding cliconf tests * Fixing 3.X tests * Adding docstrings to test methods for slxos cliconf tests * Adding slxos terminal tests * Adding slxos module_utils tests * Adding Extreme Networks team members to BOTMETA.yml
This commit is contained in:
parent
8f6ee2a5ca
commit
5b1a8ee1e8
20 changed files with 2375 additions and 0 deletions
0
test/units/plugins/cliconf/__init__.py
Normal file
0
test/units/plugins/cliconf/__init__.py
Normal file
40
test/units/plugins/cliconf/fixtures/slxos/show_chassis
Normal file
40
test/units/plugins/cliconf/fixtures/slxos/show_chassis
Normal file
|
@ -0,0 +1,40 @@
|
|||
|
||||
Chassis Name: BR-SLX9140
|
||||
switchType: 3001
|
||||
|
||||
FAN Unit: 1
|
||||
Time Awake: 36 days
|
||||
|
||||
FAN Unit: 2
|
||||
Time Awake: 36 days
|
||||
|
||||
FAN Unit: 3
|
||||
Time Awake: 36 days
|
||||
|
||||
FAN Unit: 5
|
||||
Time Awake: 36 days
|
||||
|
||||
FAN Unit: 6
|
||||
Time Awake: 36 days
|
||||
|
||||
POWER SUPPLY Unit: 1
|
||||
Factory Part Num: 11-1111111-11
|
||||
Factory Serial Num: ASERIALNUMB
|
||||
Time Awake: 36 days
|
||||
|
||||
POWER SUPPLY Unit: 2
|
||||
Factory Part Num: 11-1111111-11
|
||||
Factory Serial Num: ASERIALNUMB
|
||||
Time Awake: 36 days
|
||||
|
||||
CHASSIS/WWN Unit: 1
|
||||
Power Consume Factor: 0
|
||||
Factory Part Num: 11-1111111-11
|
||||
Factory Serial Num: ASERIALNUMB
|
||||
Manufacture: Day: 12 Month: 1 Year: 2017
|
||||
Update: Day: 5 Month: 4 Year: 2018
|
||||
Time Alive: 277 days
|
||||
Time Awake: 36 days
|
||||
|
||||
Airflow direction : Port side INTAKE
|
||||
|
624
test/units/plugins/cliconf/fixtures/slxos/show_running-config
Normal file
624
test/units/plugins/cliconf/fixtures/slxos/show_running-config
Normal file
|
@ -0,0 +1,624 @@
|
|||
root enable
|
||||
host-table aging-mode conversational
|
||||
clock timezone Europe/Warsaw
|
||||
hardware
|
||||
profile tcam default
|
||||
profile overlay-visibility default
|
||||
profile route-table default maximum_paths 8
|
||||
system-mode default
|
||||
!
|
||||
http server use-vrf default-vrf
|
||||
http server use-vrf mgmt-vrf
|
||||
node-id 1
|
||||
!
|
||||
ntp server 172.16.10.2 use-vrf mgmt-vrf
|
||||
!
|
||||
logging raslog console INFO
|
||||
logging syslog-server 10.1.5.11 use-vrf mgmt-vrf
|
||||
!
|
||||
logging auditlog class SECURITY
|
||||
logging auditlog class CONFIGURATION
|
||||
logging auditlog class FIRMWARE
|
||||
logging syslog-facility local LOG_LOCAL0
|
||||
logging syslog-client localip CHASSIS_IP
|
||||
switch-attributes chassis-name SLX9140-LEAF2
|
||||
switch-attributes host-name DC2LEAF2
|
||||
no support autoupload enable
|
||||
support ffdc
|
||||
resource-monitor cpu enable threshold 90 action raslog
|
||||
resource-monitor memory enable threshold 100 action raslog
|
||||
resource-monitor process memory enable alarm 1000 critical 1200
|
||||
system-monitor fan threshold marginal-threshold 1 down-threshold 2
|
||||
system-monitor fan alert state removed action raslog
|
||||
system-monitor power threshold marginal-threshold 1 down-threshold 2
|
||||
system-monitor power alert state removed action raslog
|
||||
system-monitor temp threshold marginal-threshold 1 down-threshold 2
|
||||
system-monitor cid-card threshold marginal-threshold 1 down-threshold 2
|
||||
system-monitor cid-card alert state none action none
|
||||
system-monitor compact-flash threshold marginal-threshold 1 down-threshold 0
|
||||
system-monitor MM threshold marginal-threshold 1 down-threshold 0
|
||||
system-monitor LineCard threshold marginal-threshold 1 down-threshold 2
|
||||
system-monitor LineCard alert state none action none
|
||||
system-monitor SFM threshold marginal-threshold 1 down-threshold 2
|
||||
telemetry server use-vrf mgmt-vrf
|
||||
transport tcp
|
||||
port 50051
|
||||
activate
|
||||
!
|
||||
telemetry profile system-utilization default_system_utilization_statistics
|
||||
interval 60
|
||||
add total-system-memory
|
||||
add total-used-memory
|
||||
add total-free-memory
|
||||
add cached-memory
|
||||
add buffers
|
||||
add user-free-memory
|
||||
add kernel-free-memory
|
||||
add total-swap-memory
|
||||
add total-free-swap-memory
|
||||
add total-used-swap-memory
|
||||
add user-process
|
||||
add system-process
|
||||
add niced-process
|
||||
add iowait
|
||||
add hw-interrupt
|
||||
add sw-interrupt
|
||||
add idle-state
|
||||
add steal-time
|
||||
add uptime
|
||||
!
|
||||
telemetry profile interface default_interface_statistics
|
||||
interval 30
|
||||
add out-pkts
|
||||
add in-pkts
|
||||
add out-unicast-pkts
|
||||
add in-unicast-pkts
|
||||
add out-broadcast-pkts
|
||||
add in-broadcast-pkts
|
||||
add out-multicast-pkts
|
||||
add in-multicast-pkts
|
||||
add out-pkts-per-second
|
||||
add in-pkts-per-second
|
||||
add out-bandwidth
|
||||
add in-bandwidth
|
||||
add out-octets
|
||||
add in-octets
|
||||
add out-errors
|
||||
add in-errors
|
||||
add out-crc-errors
|
||||
add in-crc-errors
|
||||
add out-discards
|
||||
add in-discards
|
||||
!
|
||||
line vty
|
||||
exec-timeout 10
|
||||
!
|
||||
threshold-monitor Buffer limit 70
|
||||
vrf mgmt-vrf
|
||||
address-family ipv4 unicast
|
||||
ip route 0.0.0.0/0 172.168.192.1
|
||||
!
|
||||
address-family ipv6 unicast
|
||||
!
|
||||
!
|
||||
ssh server key rsa 2048
|
||||
ssh server key ecdsa 256
|
||||
ssh server key dsa
|
||||
ssh server use-vrf default-vrf
|
||||
ssh server use-vrf mgmt-vrf
|
||||
telnet server use-vrf default-vrf
|
||||
telnet server use-vrf mgmt-vrf
|
||||
role name admin desc Administrator
|
||||
role name user desc User
|
||||
aaa authentication login local
|
||||
aaa accounting exec default start-stop none
|
||||
aaa accounting commands default start-stop none
|
||||
service password-encryption
|
||||
username admin password "AINTNOPARTYLIKEAHOTELPARTYCAUSEAHOTELPARTYDONTSLEEPNOONEWOULDEVERACTUALLYTYPETHISWHYAREYOUHERE\n" encryption-level 7 role admin desc Administrator
|
||||
cee-map default
|
||||
precedence 1
|
||||
priority-group-table 1 weight 40 pfc on
|
||||
priority-group-table 15.0 pfc off
|
||||
priority-group-table 15.1 pfc off
|
||||
priority-group-table 15.2 pfc off
|
||||
priority-group-table 15.3 pfc off
|
||||
priority-group-table 15.4 pfc off
|
||||
priority-group-table 15.5 pfc off
|
||||
priority-group-table 15.6 pfc off
|
||||
priority-group-table 15.7 pfc off
|
||||
priority-group-table 2 weight 60 pfc off
|
||||
priority-table 2 2 2 1 2 2 2 15.0
|
||||
remap lossless-priority priority 0
|
||||
!
|
||||
mac access-list extended M1
|
||||
seq 10 permit any any
|
||||
!
|
||||
vlan 1
|
||||
ip igmp snooping startup-query-interval 100
|
||||
ipv6 mld snooping startup-query-interval 100
|
||||
!
|
||||
vlan 100
|
||||
!
|
||||
vlan 200
|
||||
!
|
||||
vlan 1001
|
||||
router-interface Ve 1001
|
||||
description Thomas-Test-Cluster
|
||||
!
|
||||
qos map cos-mutation all-zero-map
|
||||
map cos 0 to cos 0
|
||||
map cos 1 to cos 0
|
||||
map cos 2 to cos 0
|
||||
map cos 3 to cos 0
|
||||
map cos 4 to cos 0
|
||||
map cos 5 to cos 0
|
||||
map cos 6 to cos 0
|
||||
map cos 7 to cos 0
|
||||
!
|
||||
qos map cos-mutation default
|
||||
map cos 0 to cos 0
|
||||
map cos 1 to cos 1
|
||||
map cos 2 to cos 2
|
||||
map cos 3 to cos 3
|
||||
map cos 4 to cos 4
|
||||
map cos 5 to cos 5
|
||||
map cos 6 to cos 6
|
||||
map cos 7 to cos 7
|
||||
!
|
||||
qos map cos-traffic-class all-zero-map
|
||||
map cos 0 to traffic-class 0
|
||||
map cos 1 to traffic-class 0
|
||||
map cos 2 to traffic-class 0
|
||||
map cos 3 to traffic-class 0
|
||||
map cos 4 to traffic-class 0
|
||||
map cos 5 to traffic-class 0
|
||||
map cos 6 to traffic-class 0
|
||||
map cos 7 to traffic-class 0
|
||||
!
|
||||
qos map cos-traffic-class default
|
||||
map cos 0 to traffic-class 1
|
||||
map cos 1 to traffic-class 0
|
||||
map cos 2 to traffic-class 2
|
||||
map cos 3 to traffic-class 3
|
||||
map cos 4 to traffic-class 4
|
||||
map cos 5 to traffic-class 5
|
||||
map cos 6 to traffic-class 6
|
||||
map cos 7 to traffic-class 7
|
||||
!
|
||||
qos map cos-dscp all-zero-map
|
||||
map cos 0 to dscp 0
|
||||
map cos 1 to dscp 0
|
||||
map cos 2 to dscp 0
|
||||
map cos 3 to dscp 0
|
||||
map cos 4 to dscp 0
|
||||
map cos 5 to dscp 0
|
||||
map cos 6 to dscp 0
|
||||
map cos 7 to dscp 0
|
||||
!
|
||||
qos map cos-dscp default
|
||||
map cos 0 to dscp 0
|
||||
map cos 1 to dscp 8
|
||||
map cos 2 to dscp 16
|
||||
map cos 3 to dscp 24
|
||||
map cos 4 to dscp 32
|
||||
map cos 5 to dscp 40
|
||||
map cos 6 to dscp 48
|
||||
map cos 7 to dscp 56
|
||||
!
|
||||
qos map traffic-class-cos all-zero-map
|
||||
map traffic-class 0 to cos 0
|
||||
map traffic-class 1 to cos 0
|
||||
map traffic-class 2 to cos 0
|
||||
map traffic-class 3 to cos 0
|
||||
map traffic-class 4 to cos 0
|
||||
map traffic-class 5 to cos 0
|
||||
map traffic-class 6 to cos 0
|
||||
map traffic-class 7 to cos 0
|
||||
!
|
||||
qos map traffic-class-cos default
|
||||
map traffic-class 0 to cos 0
|
||||
map traffic-class 1 to cos 1
|
||||
map traffic-class 2 to cos 2
|
||||
map traffic-class 3 to cos 3
|
||||
map traffic-class 4 to cos 4
|
||||
map traffic-class 5 to cos 5
|
||||
map traffic-class 6 to cos 6
|
||||
map traffic-class 7 to cos 7
|
||||
!
|
||||
qos map traffic-class-mutation all-zero-map
|
||||
map traffic-class 0 to traffic-class 0
|
||||
map traffic-class 1 to traffic-class 0
|
||||
map traffic-class 2 to traffic-class 0
|
||||
map traffic-class 3 to traffic-class 0
|
||||
map traffic-class 4 to traffic-class 0
|
||||
map traffic-class 5 to traffic-class 0
|
||||
map traffic-class 6 to traffic-class 0
|
||||
map traffic-class 7 to traffic-class 0
|
||||
!
|
||||
qos map traffic-class-mutation default
|
||||
map traffic-class 0 to traffic-class 0
|
||||
map traffic-class 1 to traffic-class 1
|
||||
map traffic-class 2 to traffic-class 2
|
||||
map traffic-class 3 to traffic-class 3
|
||||
map traffic-class 4 to traffic-class 4
|
||||
map traffic-class 5 to traffic-class 5
|
||||
map traffic-class 6 to traffic-class 6
|
||||
map traffic-class 7 to traffic-class 7
|
||||
!
|
||||
qos map traffic-class-dscp all-zero-map
|
||||
map traffic-class 0 to dscp 0
|
||||
map traffic-class 1 to dscp 0
|
||||
map traffic-class 2 to dscp 0
|
||||
map traffic-class 3 to dscp 0
|
||||
map traffic-class 4 to dscp 0
|
||||
map traffic-class 5 to dscp 0
|
||||
map traffic-class 6 to dscp 0
|
||||
map traffic-class 7 to dscp 0
|
||||
!
|
||||
qos map traffic-class-dscp default
|
||||
map traffic-class 0 to dscp 0
|
||||
map traffic-class 1 to dscp 8
|
||||
map traffic-class 2 to dscp 16
|
||||
map traffic-class 3 to dscp 24
|
||||
map traffic-class 4 to dscp 32
|
||||
map traffic-class 5 to dscp 40
|
||||
map traffic-class 6 to dscp 48
|
||||
map traffic-class 7 to dscp 56
|
||||
!
|
||||
qos map dscp-mutation all-zero-map
|
||||
map dscp 0-63 to dscp 0
|
||||
!
|
||||
qos map dscp-mutation default
|
||||
map dscp 0 to dscp 0
|
||||
map dscp 1 to dscp 1
|
||||
map dscp 10 to dscp 10
|
||||
map dscp 11 to dscp 11
|
||||
map dscp 12 to dscp 12
|
||||
map dscp 13 to dscp 13
|
||||
map dscp 14 to dscp 14
|
||||
map dscp 15 to dscp 15
|
||||
map dscp 16 to dscp 16
|
||||
map dscp 17 to dscp 17
|
||||
map dscp 18 to dscp 18
|
||||
map dscp 19 to dscp 19
|
||||
map dscp 2 to dscp 2
|
||||
map dscp 20 to dscp 20
|
||||
map dscp 21 to dscp 21
|
||||
map dscp 22 to dscp 22
|
||||
map dscp 23 to dscp 23
|
||||
map dscp 24 to dscp 24
|
||||
map dscp 25 to dscp 25
|
||||
map dscp 26 to dscp 26
|
||||
map dscp 27 to dscp 27
|
||||
map dscp 28 to dscp 28
|
||||
map dscp 29 to dscp 29
|
||||
map dscp 3 to dscp 3
|
||||
map dscp 30 to dscp 30
|
||||
map dscp 31 to dscp 31
|
||||
map dscp 32 to dscp 32
|
||||
map dscp 33 to dscp 33
|
||||
map dscp 34 to dscp 34
|
||||
map dscp 35 to dscp 35
|
||||
map dscp 36 to dscp 36
|
||||
map dscp 37 to dscp 37
|
||||
map dscp 38 to dscp 38
|
||||
map dscp 39 to dscp 39
|
||||
map dscp 4 to dscp 4
|
||||
map dscp 40 to dscp 40
|
||||
map dscp 41 to dscp 41
|
||||
map dscp 42 to dscp 42
|
||||
map dscp 43 to dscp 43
|
||||
map dscp 44 to dscp 44
|
||||
map dscp 45 to dscp 45
|
||||
map dscp 46 to dscp 46
|
||||
map dscp 47 to dscp 47
|
||||
map dscp 48 to dscp 48
|
||||
map dscp 49 to dscp 49
|
||||
map dscp 5 to dscp 5
|
||||
map dscp 50 to dscp 50
|
||||
map dscp 51 to dscp 51
|
||||
map dscp 52 to dscp 52
|
||||
map dscp 53 to dscp 53
|
||||
map dscp 54 to dscp 54
|
||||
map dscp 55 to dscp 55
|
||||
map dscp 56 to dscp 56
|
||||
map dscp 57 to dscp 57
|
||||
map dscp 58 to dscp 58
|
||||
map dscp 59 to dscp 59
|
||||
map dscp 6 to dscp 6
|
||||
map dscp 60 to dscp 60
|
||||
map dscp 61 to dscp 61
|
||||
map dscp 62 to dscp 62
|
||||
map dscp 63 to dscp 63
|
||||
map dscp 7 to dscp 7
|
||||
map dscp 8 to dscp 8
|
||||
map dscp 9 to dscp 9
|
||||
!
|
||||
qos map dscp-traffic-class all-zero-map
|
||||
map dscp 0-63 to traffic-class 0
|
||||
!
|
||||
qos map dscp-traffic-class default
|
||||
map dscp 0-7 to traffic-class 0
|
||||
map dscp 16-23 to traffic-class 2
|
||||
map dscp 24-31 to traffic-class 3
|
||||
map dscp 32-39 to traffic-class 4
|
||||
map dscp 40-47 to traffic-class 5
|
||||
map dscp 48-55 to traffic-class 6
|
||||
map dscp 56-63 to traffic-class 7
|
||||
map dscp 8-15 to traffic-class 1
|
||||
!
|
||||
qos map dscp-cos all-zero-map
|
||||
map dscp 0-63 to cos 0
|
||||
!
|
||||
qos map dscp-cos default
|
||||
map dscp 0-7 to cos 0
|
||||
map dscp 16-23 to cos 2
|
||||
map dscp 24-31 to cos 3
|
||||
map dscp 32-39 to cos 4
|
||||
map dscp 40-47 to cos 5
|
||||
map dscp 48-55 to cos 6
|
||||
map dscp 56-63 to cos 7
|
||||
map dscp 8-15 to cos 1
|
||||
!
|
||||
protocol lldp
|
||||
advertise optional-tlv management-address
|
||||
system-description Brocade BR-SLX9140 Router
|
||||
!
|
||||
vlan dot1q tag native
|
||||
police-remark-profile default
|
||||
!
|
||||
class-map BD-100
|
||||
!
|
||||
class-map C1
|
||||
match access-group M1
|
||||
!
|
||||
class-map cee
|
||||
!
|
||||
class-map default
|
||||
!
|
||||
policy-map P1
|
||||
class C1
|
||||
police cir 1000000
|
||||
!
|
||||
!
|
||||
policy-map P2
|
||||
class default
|
||||
police cir 12121212
|
||||
!
|
||||
!
|
||||
no protocol vrrp
|
||||
no protocol vrrp-extended
|
||||
router bgp
|
||||
local-as 65301
|
||||
capability as4-enable
|
||||
bfd interval 300 min-rx 300 multiplier 3
|
||||
neighbor leaf_group peer-group
|
||||
neighbor leaf_group remote-as 65500
|
||||
neighbor leaf_group bfd
|
||||
neighbor 10.220.4.3 remote-as 65500
|
||||
neighbor 10.220.4.3 peer-group leaf_group
|
||||
address-family ipv4 unicast
|
||||
network 172.32.252.5/32
|
||||
maximum-paths 8
|
||||
!
|
||||
address-family ipv6 unicast
|
||||
!
|
||||
address-family l2vpn evpn
|
||||
!
|
||||
!
|
||||
interface Loopback 1
|
||||
ip address 172.16.128.6/32
|
||||
no shutdown
|
||||
!
|
||||
interface Loopback 2
|
||||
ip address 172.16.129.5/32
|
||||
no shutdown
|
||||
!
|
||||
interface Management 0
|
||||
no tcp burstrate
|
||||
no shutdown
|
||||
vrf forwarding mgmt-vrf
|
||||
ip address dhcp
|
||||
!
|
||||
interface Ethernet 0/1
|
||||
speed 25000
|
||||
fec mode disabled
|
||||
switchport
|
||||
switchport mode access
|
||||
switchport access vlan 1
|
||||
no shutdown
|
||||
!
|
||||
interface Ethernet 0/2
|
||||
no shutdown
|
||||
!
|
||||
interface Ethernet 0/3
|
||||
speed 25000
|
||||
fec mode RS-FEC
|
||||
no shutdown
|
||||
!
|
||||
interface Ethernet 0/4
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/5
|
||||
service-policy in P1
|
||||
no shutdown
|
||||
!
|
||||
interface Ethernet 0/6
|
||||
mtu 1548
|
||||
description L2 Interface
|
||||
no shutdown
|
||||
!
|
||||
interface Ethernet 0/7
|
||||
mtu 1548
|
||||
description L2 Interface
|
||||
no shutdown
|
||||
!
|
||||
interface Ethernet 0/8
|
||||
switchport
|
||||
switchport mode trunk
|
||||
switchport trunk allowed vlan add 100,200
|
||||
switchport trunk tag native-vlan
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/9
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/10
|
||||
no shutdown
|
||||
!
|
||||
interface Ethernet 0/11
|
||||
no shutdown
|
||||
!
|
||||
interface Ethernet 0/12
|
||||
no shutdown
|
||||
!
|
||||
interface Ethernet 0/13
|
||||
no shutdown
|
||||
!
|
||||
interface Ethernet 0/14
|
||||
no shutdown
|
||||
!
|
||||
interface Ethernet 0/15
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/16
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/17
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/18
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/19
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/20
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/21
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/22
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/23
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/24
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/25
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/26
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/27
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/28
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/29
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/30
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/31
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/32
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/33
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/34
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/35
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/36
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/37
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/38
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/39
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/40
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/41
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/42
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/43
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/44
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/45
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/46
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/47
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/48
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/49
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/50
|
||||
fec mode RS-FEC
|
||||
no shutdown
|
||||
!
|
||||
interface Ethernet 0/51
|
||||
fec mode RS-FEC
|
||||
no shutdown
|
||||
!
|
||||
interface Ethernet 0/52
|
||||
fec mode RS-FEC
|
||||
no shutdown
|
||||
!
|
||||
interface Ethernet 0/53
|
||||
fec mode RS-FEC
|
||||
no shutdown
|
||||
!
|
||||
interface Ethernet 0/54
|
||||
fec mode disabled
|
||||
no shutdown
|
||||
!
|
||||
interface Port-channel 200
|
||||
switchport
|
||||
switchport mode access
|
||||
switchport access vlan 200
|
||||
shutdown
|
||||
!
|
||||
interface Port-channel 1024
|
||||
insight enable
|
||||
no shutdown
|
||||
!
|
||||
monitor session 1
|
||||
source ethernet 0/1 destination port-channel 1024 direction both
|
||||
!
|
||||
monitor session 2
|
||||
!
|
||||
bridge-domain 100 p2mp
|
||||
!
|
||||
cluster MCT1 1
|
||||
!
|
624
test/units/plugins/cliconf/fixtures/slxos/show_startup-config
Normal file
624
test/units/plugins/cliconf/fixtures/slxos/show_startup-config
Normal file
|
@ -0,0 +1,624 @@
|
|||
root enable
|
||||
host-table aging-mode conversational
|
||||
clock timezone Europe/Warsaw
|
||||
hardware
|
||||
profile tcam default
|
||||
profile overlay-visibility default
|
||||
profile route-table default maximum_paths 8
|
||||
system-mode default
|
||||
!
|
||||
http server use-vrf default-vrf
|
||||
http server use-vrf mgmt-vrf
|
||||
node-id 1
|
||||
!
|
||||
ntp server 172.16.10.2 use-vrf mgmt-vrf
|
||||
!
|
||||
logging raslog console INFO
|
||||
logging syslog-server 10.1.5.11 use-vrf mgmt-vrf
|
||||
!
|
||||
logging auditlog class SECURITY
|
||||
logging auditlog class CONFIGURATION
|
||||
logging auditlog class FIRMWARE
|
||||
logging syslog-facility local LOG_LOCAL0
|
||||
logging syslog-client localip CHASSIS_IP
|
||||
switch-attributes chassis-name SLX9140-LEAF2
|
||||
switch-attributes host-name DC2LEAF2
|
||||
no support autoupload enable
|
||||
support ffdc
|
||||
resource-monitor cpu enable threshold 90 action raslog
|
||||
resource-monitor memory enable threshold 100 action raslog
|
||||
resource-monitor process memory enable alarm 1000 critical 1200
|
||||
system-monitor fan threshold marginal-threshold 1 down-threshold 2
|
||||
system-monitor fan alert state removed action raslog
|
||||
system-monitor power threshold marginal-threshold 1 down-threshold 2
|
||||
system-monitor power alert state removed action raslog
|
||||
system-monitor temp threshold marginal-threshold 1 down-threshold 2
|
||||
system-monitor cid-card threshold marginal-threshold 1 down-threshold 2
|
||||
system-monitor cid-card alert state none action none
|
||||
system-monitor compact-flash threshold marginal-threshold 1 down-threshold 0
|
||||
system-monitor MM threshold marginal-threshold 1 down-threshold 0
|
||||
system-monitor LineCard threshold marginal-threshold 1 down-threshold 2
|
||||
system-monitor LineCard alert state none action none
|
||||
system-monitor SFM threshold marginal-threshold 1 down-threshold 2
|
||||
telemetry server use-vrf mgmt-vrf
|
||||
transport tcp
|
||||
port 50051
|
||||
activate
|
||||
!
|
||||
telemetry profile system-utilization default_system_utilization_statistics
|
||||
interval 60
|
||||
add total-system-memory
|
||||
add total-used-memory
|
||||
add total-free-memory
|
||||
add cached-memory
|
||||
add buffers
|
||||
add user-free-memory
|
||||
add kernel-free-memory
|
||||
add total-swap-memory
|
||||
add total-free-swap-memory
|
||||
add total-used-swap-memory
|
||||
add user-process
|
||||
add system-process
|
||||
add niced-process
|
||||
add iowait
|
||||
add hw-interrupt
|
||||
add sw-interrupt
|
||||
add idle-state
|
||||
add steal-time
|
||||
add uptime
|
||||
!
|
||||
telemetry profile interface default_interface_statistics
|
||||
interval 30
|
||||
add out-pkts
|
||||
add in-pkts
|
||||
add out-unicast-pkts
|
||||
add in-unicast-pkts
|
||||
add out-broadcast-pkts
|
||||
add in-broadcast-pkts
|
||||
add out-multicast-pkts
|
||||
add in-multicast-pkts
|
||||
add out-pkts-per-second
|
||||
add in-pkts-per-second
|
||||
add out-bandwidth
|
||||
add in-bandwidth
|
||||
add out-octets
|
||||
add in-octets
|
||||
add out-errors
|
||||
add in-errors
|
||||
add out-crc-errors
|
||||
add in-crc-errors
|
||||
add out-discards
|
||||
add in-discards
|
||||
!
|
||||
line vty
|
||||
exec-timeout 10
|
||||
!
|
||||
threshold-monitor Buffer limit 70
|
||||
vrf mgmt-vrf
|
||||
address-family ipv4 unicast
|
||||
ip route 0.0.0.0/0 172.168.192.1
|
||||
!
|
||||
address-family ipv6 unicast
|
||||
!
|
||||
!
|
||||
ssh server key rsa 2048
|
||||
ssh server key ecdsa 256
|
||||
ssh server key dsa
|
||||
ssh server use-vrf default-vrf
|
||||
ssh server use-vrf mgmt-vrf
|
||||
telnet server use-vrf default-vrf
|
||||
telnet server use-vrf mgmt-vrf
|
||||
role name admin desc Administrator
|
||||
role name user desc User
|
||||
aaa authentication login local
|
||||
aaa accounting exec default start-stop none
|
||||
aaa accounting commands default start-stop none
|
||||
service password-encryption
|
||||
username admin password "AINTNOPARTYLIKEAHOTELPARTYCAUSEAHOTELPARTYDONTSLEEPNOONEWOULDEVERACTUALLYTYPETHISWHYAREYOUHERE\n" encryption-level 7 role admin desc Administrator
|
||||
cee-map default
|
||||
precedence 1
|
||||
priority-group-table 1 weight 40 pfc on
|
||||
priority-group-table 15.0 pfc off
|
||||
priority-group-table 15.1 pfc off
|
||||
priority-group-table 15.2 pfc off
|
||||
priority-group-table 15.3 pfc off
|
||||
priority-group-table 15.4 pfc off
|
||||
priority-group-table 15.5 pfc off
|
||||
priority-group-table 15.6 pfc off
|
||||
priority-group-table 15.7 pfc off
|
||||
priority-group-table 2 weight 60 pfc off
|
||||
priority-table 2 2 2 1 2 2 2 15.0
|
||||
remap lossless-priority priority 0
|
||||
!
|
||||
mac access-list extended M1
|
||||
seq 10 permit any any
|
||||
!
|
||||
vlan 1
|
||||
ip igmp snooping startup-query-interval 100
|
||||
ipv6 mld snooping startup-query-interval 100
|
||||
!
|
||||
vlan 100
|
||||
!
|
||||
vlan 200
|
||||
!
|
||||
vlan 1001
|
||||
router-interface Ve 1001
|
||||
description Thomas-Test-Cluster
|
||||
!
|
||||
qos map cos-mutation all-zero-map
|
||||
map cos 0 to cos 0
|
||||
map cos 1 to cos 0
|
||||
map cos 2 to cos 0
|
||||
map cos 3 to cos 0
|
||||
map cos 4 to cos 0
|
||||
map cos 5 to cos 0
|
||||
map cos 6 to cos 0
|
||||
map cos 7 to cos 0
|
||||
!
|
||||
qos map cos-mutation default
|
||||
map cos 0 to cos 0
|
||||
map cos 1 to cos 1
|
||||
map cos 2 to cos 2
|
||||
map cos 3 to cos 3
|
||||
map cos 4 to cos 4
|
||||
map cos 5 to cos 5
|
||||
map cos 6 to cos 6
|
||||
map cos 7 to cos 7
|
||||
!
|
||||
qos map cos-traffic-class all-zero-map
|
||||
map cos 0 to traffic-class 0
|
||||
map cos 1 to traffic-class 0
|
||||
map cos 2 to traffic-class 0
|
||||
map cos 3 to traffic-class 0
|
||||
map cos 4 to traffic-class 0
|
||||
map cos 5 to traffic-class 0
|
||||
map cos 6 to traffic-class 0
|
||||
map cos 7 to traffic-class 0
|
||||
!
|
||||
qos map cos-traffic-class default
|
||||
map cos 0 to traffic-class 1
|
||||
map cos 1 to traffic-class 0
|
||||
map cos 2 to traffic-class 2
|
||||
map cos 3 to traffic-class 3
|
||||
map cos 4 to traffic-class 4
|
||||
map cos 5 to traffic-class 5
|
||||
map cos 6 to traffic-class 6
|
||||
map cos 7 to traffic-class 7
|
||||
!
|
||||
qos map cos-dscp all-zero-map
|
||||
map cos 0 to dscp 0
|
||||
map cos 1 to dscp 0
|
||||
map cos 2 to dscp 0
|
||||
map cos 3 to dscp 0
|
||||
map cos 4 to dscp 0
|
||||
map cos 5 to dscp 0
|
||||
map cos 6 to dscp 0
|
||||
map cos 7 to dscp 0
|
||||
!
|
||||
qos map cos-dscp default
|
||||
map cos 0 to dscp 0
|
||||
map cos 1 to dscp 8
|
||||
map cos 2 to dscp 16
|
||||
map cos 3 to dscp 24
|
||||
map cos 4 to dscp 32
|
||||
map cos 5 to dscp 40
|
||||
map cos 6 to dscp 48
|
||||
map cos 7 to dscp 56
|
||||
!
|
||||
qos map traffic-class-cos all-zero-map
|
||||
map traffic-class 0 to cos 0
|
||||
map traffic-class 1 to cos 0
|
||||
map traffic-class 2 to cos 0
|
||||
map traffic-class 3 to cos 0
|
||||
map traffic-class 4 to cos 0
|
||||
map traffic-class 5 to cos 0
|
||||
map traffic-class 6 to cos 0
|
||||
map traffic-class 7 to cos 0
|
||||
!
|
||||
qos map traffic-class-cos default
|
||||
map traffic-class 0 to cos 0
|
||||
map traffic-class 1 to cos 1
|
||||
map traffic-class 2 to cos 2
|
||||
map traffic-class 3 to cos 3
|
||||
map traffic-class 4 to cos 4
|
||||
map traffic-class 5 to cos 5
|
||||
map traffic-class 6 to cos 6
|
||||
map traffic-class 7 to cos 7
|
||||
!
|
||||
qos map traffic-class-mutation all-zero-map
|
||||
map traffic-class 0 to traffic-class 0
|
||||
map traffic-class 1 to traffic-class 0
|
||||
map traffic-class 2 to traffic-class 0
|
||||
map traffic-class 3 to traffic-class 0
|
||||
map traffic-class 4 to traffic-class 0
|
||||
map traffic-class 5 to traffic-class 0
|
||||
map traffic-class 6 to traffic-class 0
|
||||
map traffic-class 7 to traffic-class 0
|
||||
!
|
||||
qos map traffic-class-mutation default
|
||||
map traffic-class 0 to traffic-class 0
|
||||
map traffic-class 1 to traffic-class 1
|
||||
map traffic-class 2 to traffic-class 2
|
||||
map traffic-class 3 to traffic-class 3
|
||||
map traffic-class 4 to traffic-class 4
|
||||
map traffic-class 5 to traffic-class 5
|
||||
map traffic-class 6 to traffic-class 6
|
||||
map traffic-class 7 to traffic-class 7
|
||||
!
|
||||
qos map traffic-class-dscp all-zero-map
|
||||
map traffic-class 0 to dscp 0
|
||||
map traffic-class 1 to dscp 0
|
||||
map traffic-class 2 to dscp 0
|
||||
map traffic-class 3 to dscp 0
|
||||
map traffic-class 4 to dscp 0
|
||||
map traffic-class 5 to dscp 0
|
||||
map traffic-class 6 to dscp 0
|
||||
map traffic-class 7 to dscp 0
|
||||
!
|
||||
qos map traffic-class-dscp default
|
||||
map traffic-class 0 to dscp 0
|
||||
map traffic-class 1 to dscp 8
|
||||
map traffic-class 2 to dscp 16
|
||||
map traffic-class 3 to dscp 24
|
||||
map traffic-class 4 to dscp 32
|
||||
map traffic-class 5 to dscp 40
|
||||
map traffic-class 6 to dscp 48
|
||||
map traffic-class 7 to dscp 56
|
||||
!
|
||||
qos map dscp-mutation all-zero-map
|
||||
map dscp 0-63 to dscp 0
|
||||
!
|
||||
qos map dscp-mutation default
|
||||
map dscp 0 to dscp 0
|
||||
map dscp 1 to dscp 1
|
||||
map dscp 10 to dscp 10
|
||||
map dscp 11 to dscp 11
|
||||
map dscp 12 to dscp 12
|
||||
map dscp 13 to dscp 13
|
||||
map dscp 14 to dscp 14
|
||||
map dscp 15 to dscp 15
|
||||
map dscp 16 to dscp 16
|
||||
map dscp 17 to dscp 17
|
||||
map dscp 18 to dscp 18
|
||||
map dscp 19 to dscp 19
|
||||
map dscp 2 to dscp 2
|
||||
map dscp 20 to dscp 20
|
||||
map dscp 21 to dscp 21
|
||||
map dscp 22 to dscp 22
|
||||
map dscp 23 to dscp 23
|
||||
map dscp 24 to dscp 24
|
||||
map dscp 25 to dscp 25
|
||||
map dscp 26 to dscp 26
|
||||
map dscp 27 to dscp 27
|
||||
map dscp 28 to dscp 28
|
||||
map dscp 29 to dscp 29
|
||||
map dscp 3 to dscp 3
|
||||
map dscp 30 to dscp 30
|
||||
map dscp 31 to dscp 31
|
||||
map dscp 32 to dscp 32
|
||||
map dscp 33 to dscp 33
|
||||
map dscp 34 to dscp 34
|
||||
map dscp 35 to dscp 35
|
||||
map dscp 36 to dscp 36
|
||||
map dscp 37 to dscp 37
|
||||
map dscp 38 to dscp 38
|
||||
map dscp 39 to dscp 39
|
||||
map dscp 4 to dscp 4
|
||||
map dscp 40 to dscp 40
|
||||
map dscp 41 to dscp 41
|
||||
map dscp 42 to dscp 42
|
||||
map dscp 43 to dscp 43
|
||||
map dscp 44 to dscp 44
|
||||
map dscp 45 to dscp 45
|
||||
map dscp 46 to dscp 46
|
||||
map dscp 47 to dscp 47
|
||||
map dscp 48 to dscp 48
|
||||
map dscp 49 to dscp 49
|
||||
map dscp 5 to dscp 5
|
||||
map dscp 50 to dscp 50
|
||||
map dscp 51 to dscp 51
|
||||
map dscp 52 to dscp 52
|
||||
map dscp 53 to dscp 53
|
||||
map dscp 54 to dscp 54
|
||||
map dscp 55 to dscp 55
|
||||
map dscp 56 to dscp 56
|
||||
map dscp 57 to dscp 57
|
||||
map dscp 58 to dscp 58
|
||||
map dscp 59 to dscp 59
|
||||
map dscp 6 to dscp 6
|
||||
map dscp 60 to dscp 60
|
||||
map dscp 61 to dscp 61
|
||||
map dscp 62 to dscp 62
|
||||
map dscp 63 to dscp 63
|
||||
map dscp 7 to dscp 7
|
||||
map dscp 8 to dscp 8
|
||||
map dscp 9 to dscp 9
|
||||
!
|
||||
qos map dscp-traffic-class all-zero-map
|
||||
map dscp 0-63 to traffic-class 0
|
||||
!
|
||||
qos map dscp-traffic-class default
|
||||
map dscp 0-7 to traffic-class 0
|
||||
map dscp 16-23 to traffic-class 2
|
||||
map dscp 24-31 to traffic-class 3
|
||||
map dscp 32-39 to traffic-class 4
|
||||
map dscp 40-47 to traffic-class 5
|
||||
map dscp 48-55 to traffic-class 6
|
||||
map dscp 56-63 to traffic-class 7
|
||||
map dscp 8-15 to traffic-class 1
|
||||
!
|
||||
qos map dscp-cos all-zero-map
|
||||
map dscp 0-63 to cos 0
|
||||
!
|
||||
qos map dscp-cos default
|
||||
map dscp 0-7 to cos 0
|
||||
map dscp 16-23 to cos 2
|
||||
map dscp 24-31 to cos 3
|
||||
map dscp 32-39 to cos 4
|
||||
map dscp 40-47 to cos 5
|
||||
map dscp 48-55 to cos 6
|
||||
map dscp 56-63 to cos 7
|
||||
map dscp 8-15 to cos 1
|
||||
!
|
||||
protocol lldp
|
||||
advertise optional-tlv management-address
|
||||
system-description Brocade BR-SLX9140 Router
|
||||
!
|
||||
vlan dot1q tag native
|
||||
police-remark-profile default
|
||||
!
|
||||
class-map BD-100
|
||||
!
|
||||
class-map C1
|
||||
match access-group M1
|
||||
!
|
||||
class-map cee
|
||||
!
|
||||
class-map default
|
||||
!
|
||||
policy-map P1
|
||||
class C1
|
||||
police cir 1000000
|
||||
!
|
||||
!
|
||||
policy-map P2
|
||||
class default
|
||||
police cir 12121212
|
||||
!
|
||||
!
|
||||
no protocol vrrp
|
||||
no protocol vrrp-extended
|
||||
router bgp
|
||||
local-as 65301
|
||||
capability as4-enable
|
||||
bfd interval 300 min-rx 300 multiplier 3
|
||||
neighbor leaf_group peer-group
|
||||
neighbor leaf_group remote-as 65500
|
||||
neighbor leaf_group bfd
|
||||
neighbor 10.220.4.3 remote-as 65500
|
||||
neighbor 10.220.4.3 peer-group leaf_group
|
||||
address-family ipv4 unicast
|
||||
network 172.32.252.5/32
|
||||
maximum-paths 8
|
||||
!
|
||||
address-family ipv6 unicast
|
||||
!
|
||||
address-family l2vpn evpn
|
||||
!
|
||||
!
|
||||
interface Loopback 1
|
||||
ip address 172.16.128.6/32
|
||||
no shutdown
|
||||
!
|
||||
interface Loopback 2
|
||||
ip address 172.16.129.5/32
|
||||
no shutdown
|
||||
!
|
||||
interface Management 0
|
||||
no tcp burstrate
|
||||
no shutdown
|
||||
vrf forwarding mgmt-vrf
|
||||
ip address dhcp
|
||||
!
|
||||
interface Ethernet 0/1
|
||||
speed 25000
|
||||
fec mode disabled
|
||||
switchport
|
||||
switchport mode access
|
||||
switchport access vlan 1
|
||||
no shutdown
|
||||
!
|
||||
interface Ethernet 0/2
|
||||
no shutdown
|
||||
!
|
||||
interface Ethernet 0/3
|
||||
speed 25000
|
||||
fec mode RS-FEC
|
||||
no shutdown
|
||||
!
|
||||
interface Ethernet 0/4
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/5
|
||||
service-policy in P1
|
||||
no shutdown
|
||||
!
|
||||
interface Ethernet 0/6
|
||||
mtu 1548
|
||||
description L2 Interface
|
||||
no shutdown
|
||||
!
|
||||
interface Ethernet 0/7
|
||||
mtu 1548
|
||||
description L2 Interface
|
||||
no shutdown
|
||||
!
|
||||
interface Ethernet 0/8
|
||||
switchport
|
||||
switchport mode trunk
|
||||
switchport trunk allowed vlan add 100,200
|
||||
switchport trunk tag native-vlan
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/9
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/10
|
||||
no shutdown
|
||||
!
|
||||
interface Ethernet 0/11
|
||||
no shutdown
|
||||
!
|
||||
interface Ethernet 0/12
|
||||
no shutdown
|
||||
!
|
||||
interface Ethernet 0/13
|
||||
no shutdown
|
||||
!
|
||||
interface Ethernet 0/14
|
||||
no shutdown
|
||||
!
|
||||
interface Ethernet 0/15
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/16
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/17
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/18
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/19
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/20
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/21
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/22
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/23
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/24
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/25
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/26
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/27
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/28
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/29
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/30
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/31
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/32
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/33
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/34
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/35
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/36
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/37
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/38
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/39
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/40
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/41
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/42
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/43
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/44
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/45
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/46
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/47
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/48
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/49
|
||||
shutdown
|
||||
!
|
||||
interface Ethernet 0/50
|
||||
fec mode RS-FEC
|
||||
no shutdown
|
||||
!
|
||||
interface Ethernet 0/51
|
||||
fec mode RS-FEC
|
||||
no shutdown
|
||||
!
|
||||
interface Ethernet 0/52
|
||||
fec mode RS-FEC
|
||||
no shutdown
|
||||
!
|
||||
interface Ethernet 0/53
|
||||
fec mode RS-FEC
|
||||
no shutdown
|
||||
!
|
||||
interface Ethernet 0/54
|
||||
fec mode disabled
|
||||
no shutdown
|
||||
!
|
||||
interface Port-channel 200
|
||||
switchport
|
||||
switchport mode access
|
||||
switchport access vlan 200
|
||||
shutdown
|
||||
!
|
||||
interface Port-channel 1024
|
||||
insight enable
|
||||
no shutdown
|
||||
!
|
||||
monitor session 1
|
||||
source ethernet 0/1 destination port-channel 1024 direction both
|
||||
!
|
||||
monitor session 2
|
||||
!
|
||||
bridge-domain 100 p2mp
|
||||
!
|
||||
cluster MCT1 1
|
||||
!
|
18
test/units/plugins/cliconf/fixtures/slxos/show_version
Normal file
18
test/units/plugins/cliconf/fixtures/slxos/show_version
Normal file
|
@ -0,0 +1,18 @@
|
|||
SLX-OS Operating System Software
|
||||
SLX-OS Operating System Version: 17s.1.02
|
||||
Copyright (c) 1995-2018 Brocade Communications Systems, Inc.
|
||||
Firmware name: 17s.1.02
|
||||
Build Time: 00:06:59 Sep 28, 2017
|
||||
Install Time: 15:58:29 Feb 9, 2018
|
||||
Kernel: 2.6.34.6
|
||||
Host Version: Ubuntu 14.04 LTS
|
||||
Host Kernel: Linux 3.14.17
|
||||
|
||||
Control Processor: QEMU Virtual CPU version 2.0.0
|
||||
|
||||
System Uptime: 34days 4hrs 41mins 53secs
|
||||
|
||||
Slot Name Primary/Secondary Versions Status
|
||||
---------------------------------------------------------------------------
|
||||
SW/0 SLX-OS 17s.1.02 ACTIVE*
|
||||
17s.1.02
|
140
test/units/plugins/cliconf/test_slxos.py
Normal file
140
test/units/plugins/cliconf/test_slxos.py
Normal file
|
@ -0,0 +1,140 @@
|
|||
#
|
||||
# (c) 2018 Extreme Networks Inc.
|
||||
#
|
||||
# This file is part of Ansible
|
||||
#
|
||||
# Ansible is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# Ansible is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
from os import path
|
||||
import json
|
||||
|
||||
from mock import MagicMock, call
|
||||
|
||||
from ansible.compat.tests import unittest
|
||||
from ansible.plugins.cliconf import slxos
|
||||
|
||||
FIXTURE_DIR = b'%s/fixtures/slxos' % (
|
||||
path.dirname(path.abspath(__file__)).encode('utf-8')
|
||||
)
|
||||
|
||||
|
||||
def _connection_side_effect(*args, **kwargs):
|
||||
try:
|
||||
if args:
|
||||
value = args[0]
|
||||
else:
|
||||
value = kwargs.get('command')
|
||||
|
||||
fixture_path = path.abspath(
|
||||
b'%s/%s' % (FIXTURE_DIR, b'_'.join(value.split(b' ')))
|
||||
)
|
||||
with open(fixture_path, 'rb') as file_desc:
|
||||
return file_desc.read()
|
||||
except (OSError, IOError):
|
||||
if args:
|
||||
value = args[0]
|
||||
return value
|
||||
elif kwargs.get('command'):
|
||||
value = kwargs.get('command')
|
||||
return value
|
||||
|
||||
return 'Nope'
|
||||
|
||||
|
||||
class TestPluginCLIConfSLXOS(unittest.TestCase):
|
||||
""" Test class for SLX-OS CLI Conf Methods
|
||||
"""
|
||||
def setUp(self):
|
||||
self._mock_connection = MagicMock()
|
||||
self._mock_connection.send.side_effect = _connection_side_effect
|
||||
self._cliconf = slxos.Cliconf(self._mock_connection)
|
||||
|
||||
def tearDown(self):
|
||||
pass
|
||||
|
||||
def test_get_device_info(self):
|
||||
""" Test get_device_info
|
||||
"""
|
||||
device_info = self._cliconf.get_device_info()
|
||||
|
||||
mock_device_info = {
|
||||
'network_os': 'slxos',
|
||||
'network_os_model': 'BR-SLX9140',
|
||||
'network_os_version': '17s.1.02',
|
||||
}
|
||||
|
||||
self.assertEqual(device_info, mock_device_info)
|
||||
|
||||
def test_get_config(self):
|
||||
""" Test get_config
|
||||
"""
|
||||
running_config = self._cliconf.get_config()
|
||||
|
||||
fixture_path = path.abspath(b'%s/show_running-config' % FIXTURE_DIR)
|
||||
with open(fixture_path, 'rb') as file_desc:
|
||||
mock_running_config = file_desc.read()
|
||||
self.assertEqual(running_config, mock_running_config)
|
||||
|
||||
startup_config = self._cliconf.get_config()
|
||||
|
||||
fixture_path = path.abspath(b'%s/show_running-config' % FIXTURE_DIR)
|
||||
with open(fixture_path, 'rb') as file_desc:
|
||||
mock_startup_config = file_desc.read()
|
||||
self.assertEqual(startup_config, mock_startup_config)
|
||||
|
||||
def test_edit_config(self):
|
||||
""" Test edit_config
|
||||
"""
|
||||
test_config_command = b'this\nis\nthe\nsong\nthat\nnever\nends'
|
||||
|
||||
self._cliconf.edit_config(test_config_command)
|
||||
|
||||
send_calls = []
|
||||
|
||||
for command in [b'configure terminal', test_config_command, b'end']:
|
||||
send_calls.append(call(
|
||||
command=command,
|
||||
prompt_retry_check=False,
|
||||
sendonly=False,
|
||||
newline=True
|
||||
))
|
||||
|
||||
self._mock_connection.send.assert_has_calls(send_calls)
|
||||
|
||||
def test_get_capabilities(self):
|
||||
""" Test get_capabilities
|
||||
"""
|
||||
capabilities = json.loads(self._cliconf.get_capabilities())
|
||||
mock_capabilities = {
|
||||
'network_api': 'cliconf',
|
||||
'rpc': [
|
||||
'get_config',
|
||||
'edit_config',
|
||||
'get_capabilities',
|
||||
'get'
|
||||
],
|
||||
'device_info': {
|
||||
'network_os_model': 'BR-SLX9140',
|
||||
'network_os_version': '17s.1.02',
|
||||
'network_os': 'slxos'
|
||||
}
|
||||
}
|
||||
|
||||
self.assertEqual(
|
||||
mock_capabilities,
|
||||
capabilities
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue