ci: cram: test tr181-bridging alignment to tr181 2.19.1
Paths under test:
* Bridging.Bridge.{i}.AgingTime
* Bridging.Bridge.{i}.Port.{i}.LowerLayers
* Bridging.Bridge.{i}.Port.{i}.PriorityRegeneration
* Bridging.Bridge.{i}.STP.BridgePriority
* Bridging.Bridge.{i}.VLAN.{i}.VLANID
Implements: PCF-2071
References: FEAT-32
Signed-off-by: Anatolii Rybchych <anatolii.rybchych@globallogic.com>
This commit is contained in:
parent
ee50c87dcf
commit
4c64d20c7e
@ -0,0 +1,8 @@
|
||||
Create R alias:
|
||||
|
||||
$ alias R="${CRAM_REMOTE_COMMAND:-}"
|
||||
|
||||
Check Aiging time type:
|
||||
|
||||
$ R "ba-cli 'dump -p Bridging.Bridge.1.'" | grep 'AgingTime'
|
||||
P....... <public> uint32 Bridging.Bridge.1.AgingTime=300
|
||||
@ -0,0 +1,22 @@
|
||||
Create R alias:
|
||||
|
||||
$ alias R="${CRAM_REMOTE_COMMAND:-}"
|
||||
|
||||
Add a VLAN with unique ID:
|
||||
|
||||
$ R ba-cli Bridging.Bridge.lan.VLAN.+{VLANID=100, Enable=1}? | grep -v '^>'
|
||||
Bridging.Bridge.1.VLAN.1.
|
||||
Bridging.Bridge.1.VLAN.1.Alias="cpe-VLAN-1"
|
||||
|
||||
|
||||
Add a VLAN with duplicate ID:
|
||||
|
||||
$ R "ba-cli 'Bridging.Bridge.lan.VLAN.+{VLANID=100, Enable=1}?'" | grep -v '^>'
|
||||
ERROR: add Bridging.Bridge.lan.VLAN. failed (13 - duplicate)
|
||||
|
||||
|
||||
Cleanup:
|
||||
|
||||
$ R "ba-cli Bridging.Bridge.lan.VLAN.[VLANID==100].-" | grep -v '^>'
|
||||
Bridging.Bridge.1.VLAN.1.
|
||||
|
||||
47
.gitlab/tests/cram/wnc-freedom/tr181-bridging/lower_layers.t
Normal file
47
.gitlab/tests/cram/wnc-freedom/tr181-bridging/lower_layers.t
Normal file
@ -0,0 +1,47 @@
|
||||
Create R alias:
|
||||
|
||||
$ alias R="${CRAM_REMOTE_COMMAND:-}"
|
||||
|
||||
Check lan bridge ports:
|
||||
|
||||
$ R ip link show | grep 'master br-lan' | cut -d: -f2 | sort
|
||||
lan1
|
||||
lan2
|
||||
lan3
|
||||
lan4
|
||||
wlan0
|
||||
wlan0.1
|
||||
wlan1
|
||||
wlan1.1
|
||||
wlan2
|
||||
wlan2.1
|
||||
|
||||
Replace a port with WAN interface:
|
||||
|
||||
$ R ba-cli 'Device.Bridging.Bridge.lan.Port.12.LowerLayers=Device.Ethernet.Interface.1' >/dev/null
|
||||
$ R ba-cli 'Device.Bridging.Bridge.lan.Port.12.Name?' | grep -v '^>'
|
||||
Device.Bridging.Bridge.1.Port.12.Name="wan"
|
||||
|
||||
|
||||
Check lan bridge ports:
|
||||
|
||||
$ alias R="${CRAM_REMOTE_COMMAND:-}"
|
||||
$ R ip link show | grep 'master br-lan' | cut -d: -f2 | sort
|
||||
lan1
|
||||
lan2
|
||||
lan3
|
||||
wan
|
||||
wlan0
|
||||
wlan0.1
|
||||
wlan1
|
||||
wlan1.1
|
||||
wlan2
|
||||
wlan2.1
|
||||
|
||||
|
||||
Restore:
|
||||
|
||||
$ R ba-cli 'Device.Bridging.Bridge.lan.Port.12.LowerLayers=Device.Ethernet.Interface.5' | grep -v '^>'
|
||||
Device.Bridging.Bridge.1.Port.12.
|
||||
Device.Bridging.Bridge.1.Port.12.LowerLayers="Device.Ethernet.Interface.5"
|
||||
|
||||
23
.gitlab/tests/cram/wnc-freedom/tr181-bridging/port_name.t
Normal file
23
.gitlab/tests/cram/wnc-freedom/tr181-bridging/port_name.t
Normal file
@ -0,0 +1,23 @@
|
||||
Create R alias:
|
||||
|
||||
$ alias R="${CRAM_REMOTE_COMMAND:-}"
|
||||
|
||||
Add an entry with a unique name:
|
||||
|
||||
$ R ba-cli 'Device.Bridging.Bridge.lan.Port.+{Name="eth100"}' | grep -v '^>'
|
||||
Device\.Bridging\.Bridge\.1\.Port\.\d+\. (re)
|
||||
Device\.Bridging\.Bridge\.1\.Port\.\d+\.Alias="cpe-Port-\d+" (re)
|
||||
|
||||
|
||||
Add an entry with a duplicate name:
|
||||
|
||||
$ R ba-cli 'Device.Bridging.Bridge.lan.Port.+{Name="eth100"}' | grep -v '^>'
|
||||
ERROR: add Device.Bridging.Bridge.lan.Port. failed (13 - duplicate)
|
||||
|
||||
|
||||
Restore:
|
||||
|
||||
$ R "ba-cli 'Device.Bridging.Bridge.lan.Port.[Name==\"eth100\"].-'" | grep -v '^>'
|
||||
Device\.Bridging\.Bridge\.1\.Port\.\d+\. (re)
|
||||
Device\.Bridging\.Bridge\.1\.Port\.\d+\.Stats\. (re)
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
Create R alias:
|
||||
|
||||
$ alias R="${CRAM_REMOTE_COMMAND:-}"
|
||||
|
||||
Check priority regeneration on eth0:
|
||||
|
||||
$ R ba-cli 'Device.Bridging.Bridge.lan.Port.1.PriorityRegeneration?' | grep -Ev '^>'
|
||||
Device.Bridging.Bridge.1.Port.1.PriorityRegeneration="0,1,2,3,4,5,6,7"
|
||||
|
||||
|
||||
Set the value bigger than allowed:
|
||||
|
||||
$ R "ba-cli 'Device.Bridging.Bridge.lan.Port.1.PriorityRegeneration=\"0,1,2,3,4,5,6,8\"'" | grep -Ev '^>'
|
||||
ERROR: set Device.Bridging.Bridge.lan.Port.1.PriorityRegeneration failed (10 - invalid value)
|
||||
|
||||
|
||||
Set the value lower than allowed:
|
||||
|
||||
$ R "ba-cli 'Device.Bridging.Bridge.lan.Port.1.PriorityRegeneration=\"0,1,2,3,4,5,6,-1\"'" | grep -v '^>'
|
||||
ERROR: set Device.Bridging.Bridge.lan.Port.1.PriorityRegeneration failed (10 - invalid value)
|
||||
|
||||
|
||||
Set the value with an extra item:
|
||||
|
||||
$ R "ba-cli 'Device.Bridging.Bridge.lan.Port.1.PriorityRegeneration=\"0,1,2,3,4,5,6,7,7\"'" | grep -v '^>'
|
||||
ERROR: set Device.Bridging.Bridge.lan.Port.1.PriorityRegeneration failed (10 - invalid value)
|
||||
|
||||
|
||||
Set the value with a missing item:
|
||||
|
||||
$ R "ba-cli 'Device.Bridging.Bridge.lan.Port.1.PriorityRegeneration=\"0,1,2,3,4,5,6\"'" | grep -v '^>'
|
||||
ERROR: set Device.Bridging.Bridge.lan.Port.1.PriorityRegeneration failed (10 - invalid value)
|
||||
|
||||
|
||||
Set a correct value:
|
||||
|
||||
$ R "ba-cli 'Device.Bridging.Bridge.lan.Port.1.PriorityRegeneration=\"0,1,2,3,4,5,6,6\"'" | grep -v '^>'
|
||||
Device.Bridging.Bridge.1.Port.1.
|
||||
Device.Bridging.Bridge.1.Port.1.PriorityRegeneration="0,1,2,3,4,5,6,6"
|
||||
|
||||
|
||||
Restore:
|
||||
|
||||
$ R "ba-cli 'Device.Bridging.Bridge.lan.Port.1.PriorityRegeneration=\"0,1,2,3,4,5,6,7\"'" | grep -v '^>'
|
||||
Device.Bridging.Bridge.1.Port.1.
|
||||
Device.Bridging.Bridge.1.Port.1.PriorityRegeneration="0,1,2,3,4,5,6,7"
|
||||
|
||||
@ -0,0 +1,35 @@
|
||||
Create R alias:
|
||||
|
||||
$ alias R="${CRAM_REMOTE_COMMAND:-}"
|
||||
|
||||
Check default value:
|
||||
|
||||
$ R ba-cli Bridging.Bridge.lan.STP.BridgePriority? | grep -v '^>'
|
||||
Bridging.Bridge.1.STP.BridgePriority=32768
|
||||
|
||||
|
||||
Try to set a negative value:
|
||||
|
||||
$ R ba-cli Bridging.Bridge.lan.STP.BridgePriority=-1 | grep -v '^>'
|
||||
ERROR: set Bridging.Bridge.lan.STP.BridgePriority failed (10 - invalid value)
|
||||
|
||||
|
||||
Try to set a value bigger than allowed:
|
||||
|
||||
$ R ba-cli Bridging.Bridge.lan.STP.BridgePriority=61441 | grep -v '^>'
|
||||
ERROR: set Bridging.Bridge.lan.STP.BridgePriority failed (10 - invalid value)
|
||||
|
||||
|
||||
Try to set the maximal allowed value:
|
||||
|
||||
$ R ba-cli Bridging.Bridge.lan.STP.BridgePriority=61440 | grep -v '^>'
|
||||
Bridging.Bridge.1.STP.
|
||||
Bridging.Bridge.1.STP.BridgePriority=61440
|
||||
|
||||
|
||||
Restore:
|
||||
|
||||
$ R ba-cli Bridging.Bridge.lan.STP.BridgePriority=32768 | grep -v '^>'
|
||||
Bridging.Bridge.1.STP.
|
||||
Bridging.Bridge.1.STP.BridgePriority=32768
|
||||
|
||||
Loading…
Reference in New Issue
Block a user