ci: cram: test tr181-dhcpv4client alignment to tr181 2.19.1
Paths under test:
* DHCPv4.Client.{i}.Alias
* DHCPv4.Client.{i}.DSCPMark
* DHCPv4.Client.{i}.Interface
* DHCPv4.Client.{i}.ReqOption
* DHCPv4.Client.{i}.SentOption
* DHCPv4.Client.{i}.Stats.
Implements: PCF-2072
References: FEAT-32
Signed-off-by: Anatolii Rybchych <anatolii.rybchych@globallogic.com>
This commit is contained in:
parent
4c64d20c7e
commit
7d33e03403
48
.gitlab/tests/cram/wnc-freedom/tr181-dhcpv4client/alias.t
Normal file
48
.gitlab/tests/cram/wnc-freedom/tr181-dhcpv4client/alias.t
Normal file
@ -0,0 +1,48 @@
|
||||
Create R alias:
|
||||
|
||||
$ alias R="${CRAM_REMOTE_COMMAND:-}"
|
||||
|
||||
|
||||
Create DHCPv4.Client.{i}. with Alias value of appropriate length:
|
||||
|
||||
$ alias R="${CRAM_REMOTE_COMMAND:-}"
|
||||
$ R ba-cli 'Device.DHCPv4.Client.+ { Alias='AliasLenTest' }' | grep -Ev '^>|^$'
|
||||
Device.DHCPv4.Client.5.
|
||||
Device.DHCPv4.Client.5.Alias="AliasLenTest"
|
||||
|
||||
Set DHCPv4.Client.{i}.Alias value with len > 64:
|
||||
|
||||
$ R ba-cli 'Device.DHCPv4.Client.5.Alias=wanclient1wanclient1wanclient1wanclient1wanclient1wanclient1wanclient1' | grep -Ev '^>|^$'
|
||||
ERROR: set Device.DHCPv4.Client.5.Alias failed (10 - invalid value)
|
||||
|
||||
Create ReqOption.{i}.Alias value of appropriate length:
|
||||
|
||||
$ R ba-cli 'Device.DHCPv4.Client.5.ReqOption.+ { Alias=TestReqOptAliasLen }' | grep -Ev '^>|^$'
|
||||
Device.DHCPv4.Client.5.ReqOption.1.
|
||||
Device.DHCPv4.Client.5.ReqOption.1.Alias="TestReqOptAliasLen"
|
||||
|
||||
Set ReqOption.{i}.Alias value with len > 64:
|
||||
|
||||
$ R ba-cli 'Device.DHCPv4.Client.5.ReqOption.1.Alias=ReqOptReqOptReqOptReqOptReqOptReqOptReqOptReqOptReqOptReqOptReqOpt' | grep -Ev '^>|^$'
|
||||
ERROR: set Device.DHCPv4.Client.5.ReqOption.1.Alias failed (10 - invalid value)
|
||||
|
||||
Set SentOption.{i}.Alias value of appropriate length:
|
||||
|
||||
$ R ba-cli 'DHCPv4Client.Client.5.SentOption.+ { Alias=TestSentOptAliasLen }' | grep -Ev '^>|^$'
|
||||
DHCPv4Client.Client.5.SentOption.1.
|
||||
DHCPv4Client.Client.5.SentOption.1.Alias="TestSentOptAliasLen"
|
||||
|
||||
Set SentOption.{i}.Alias value with len > 64:
|
||||
|
||||
$ R ba-cli 'Device.DHCPv4.Client.5.SentOption.1.Alias=SentOptSentOptSentOptSentOptSentOptSentOptSentOptSentOptSentOptSentOpt' | grep -Ev '^>|^$'
|
||||
ERROR: set Device.DHCPv4.Client.5.SentOption.1.Alias failed (10 - invalid value)
|
||||
|
||||
Cleanup:
|
||||
|
||||
$ R ba-cli 'Device.DHCPv4.Client.5.-' | grep -Ev '^>|^$'
|
||||
Device.DHCPv4.Client.5.
|
||||
Device.DHCPv4.Client.5.SentOption.
|
||||
Device.DHCPv4.Client.5.SentOption.1.
|
||||
Device.DHCPv4.Client.5.ReqOption.
|
||||
Device.DHCPv4.Client.5.ReqOption.1.
|
||||
Device.DHCPv4.Client.5.Stats.
|
||||
@ -0,0 +1,26 @@
|
||||
Create R alias:
|
||||
|
||||
$ alias R="${CRAM_REMOTE_COMMAND:-}"
|
||||
|
||||
|
||||
Set DSCPMark to negative value:
|
||||
|
||||
$ R ba-cli 'Device.DHCPv4.Client.1.DSCPMark=-1' | grep -Ev '^>|^$'
|
||||
ERROR: set Device.DHCPv4.Client.1.DSCPMark failed (10 - invalid value)
|
||||
|
||||
Set DSCPMark to value bigger than 63:
|
||||
|
||||
$ R ba-cli 'Device.DHCPv4.Client.1.DSCPMark=64' | grep -Ev '^>|^$'
|
||||
ERROR: set Device.DHCPv4.Client.1.DSCPMark failed (10 - invalid value)
|
||||
|
||||
Set DSCPMark to acceptable value:
|
||||
|
||||
$ R ba-cli 'Device.DHCPv4.Client.1.DSCPMark=63' | grep -Ev '^>|^$'
|
||||
Device.DHCPv4.Client.1.
|
||||
Device.DHCPv4.Client.1.DSCPMark=63
|
||||
|
||||
Restore default value:
|
||||
|
||||
$ R ba-cli 'Device.DHCPv4.Client.1.DSCPMark=48' | grep -Ev '^>|^$'
|
||||
Device.DHCPv4.Client.1.
|
||||
Device.DHCPv4.Client.1.DSCPMark=48
|
||||
@ -0,0 +1,38 @@
|
||||
Create R alias:
|
||||
|
||||
$ alias R="${CRAM_REMOTE_COMMAND:-}"
|
||||
|
||||
Disable 4th dhcp client:
|
||||
|
||||
$ R ba-cli 'Device.DHCPv4.Client.4.Enable=0' | grep -Ev '^>|^$'
|
||||
Device.DHCPv4.Client.4.
|
||||
Device.DHCPv4.Client.4.Enable=0
|
||||
|
||||
Set Interface value to incorrect object:
|
||||
|
||||
$ R ba-cli 'Device.DHCPv4.Client.4.Interface=Device.Ethernet.Interface.1.' | grep -Ev '^>|^$'
|
||||
ERROR: set Device.DHCPv4.Client.4.Interface failed (10 - invalid value)
|
||||
|
||||
Set Interface value to path without Device prefix:
|
||||
|
||||
$ R ba-cli 'Device.DHCPv4.Client.4.Interface=IP.Interface.11.' | grep -Ev '^>|^$'
|
||||
Device.DHCPv4.Client.4.
|
||||
Device.DHCPv4.Client.4.Interface="IP.Interface.11"
|
||||
|
||||
Set Interface value to path with Alias instead of index:
|
||||
|
||||
$ R ba-cli 'Device.DHCPv4.Client.4.Interface=Device.IP.Interface.mgmt.' | grep -Ev '^>|^$'
|
||||
Device.DHCPv4.Client.4.
|
||||
Device.DHCPv4.Client.4.Interface="Device.IP.Interface.mgmt"
|
||||
|
||||
Set Interface value to path with Device prefix:
|
||||
|
||||
$ R ba-cli 'Device.DHCPv4.Client.4.Interface=Device.IP.Interface.11.' | grep -Ev '^>|^$'
|
||||
Device.DHCPv4.Client.4.
|
||||
Device.DHCPv4.Client.4.Interface="Device.IP.Interface.11"
|
||||
|
||||
Enable 4th dhcp client:
|
||||
|
||||
$ R ba-cli 'Device.DHCPv4.Client.4.Enable=1' | grep -Ev '^>|^$'
|
||||
Device.DHCPv4.Client.4.
|
||||
Device.DHCPv4.Client.4.Enable=1
|
||||
@ -0,0 +1,30 @@
|
||||
Create R alias:
|
||||
|
||||
$ alias R="${CRAM_REMOTE_COMMAND:-}"
|
||||
|
||||
Create ReqOption with even length and hexBinary value:
|
||||
|
||||
$ R ba-cli 'Device.DHCPv4.Client.1.ReqOption.+ {Enable=0, Alias=TestReq1, Value=12ab}' | grep -Ev '^>|^$'
|
||||
Device.DHCPv4.Client.1.ReqOption.12.
|
||||
Device.DHCPv4.Client.1.ReqOption.12.Alias="TestReq1"
|
||||
|
||||
Try to set Value parameter
|
||||
|
||||
$ R ba-cli 'Device.DHCPv4.Client.1.ReqOption.12.Value=12ba' | grep -Ev '^>|^$'
|
||||
Device.DHCPv4.Client.1.ReqOption.12.
|
||||
Device.DHCPv4.Client.1.ReqOption.12.Value="12ba"
|
||||
|
||||
Create ReqOption with odd length and hexBinary Value:
|
||||
|
||||
$ R ba-cli 'Device.DHCPv4.Client.1.ReqOption.+ {Enable=0, Alias=TestReq2, Value=12abc}' | grep -Ev '^>|^$'
|
||||
ERROR: add Device.DHCPv4.Client.1.ReqOption. failed (10 - invalid value)
|
||||
|
||||
Create ReqOption with even length and non-hexBinary Value:
|
||||
|
||||
$ R ba-cli 'Device.DHCPv4.Client.1.ReqOption.+ {Enable=0, Alias=TestReq2, Value=12ah}' | grep -Ev '^>|^$'
|
||||
ERROR: add Device.DHCPv4.Client.1.ReqOption. failed (10 - invalid value)
|
||||
|
||||
Remove test ReqOption:
|
||||
|
||||
$ R ba-cli 'Device.DHCPv4.Client.1.ReqOption.12.-' | grep -Ev '^>|^$'
|
||||
Device.DHCPv4.Client.1.ReqOption.12.
|
||||
@ -0,0 +1,30 @@
|
||||
Create R alias:
|
||||
|
||||
$ alias R="${CRAM_REMOTE_COMMAND:-}"
|
||||
|
||||
Create disabled SentOption:
|
||||
|
||||
$ R ba-cli 'Device.DHCPv4.Client.1.SentOption.+ {Enable=0}' | grep -Ev '^>|^$'
|
||||
Device.DHCPv4.Client.1.SentOption.4.
|
||||
Device.DHCPv4.Client.1.SentOption.4.Alias="cpe-SentOption-4"
|
||||
|
||||
Set Value to hexbinary string with even length:
|
||||
|
||||
$ R ba-cli 'Device.DHCPv4.Client.1.SentOption.4.Value=12ab' | grep -Ev '^>|^$'
|
||||
Device.DHCPv4.Client.1.SentOption.4.
|
||||
Device.DHCPv4.Client.1.SentOption.4.Value="12ab"
|
||||
|
||||
Set Value to hexbinary string with odd length:
|
||||
|
||||
$ R ba-cli 'Device.DHCPv4.Client.1.SentOption.4.Value=12abc' | grep -Ev '^>|^$'
|
||||
ERROR: set Device.DHCPv4.Client.1.SentOption.4.Value failed (10 - invalid value)
|
||||
|
||||
Set Value to hexbinary string with incorrect char:
|
||||
|
||||
$ R ba-cli 'Device.DHCPv4.Client.1.SentOption.4.Value=12ah' | grep -Ev '^>|^$'
|
||||
ERROR: set Device.DHCPv4.Client.1.SentOption.4.Value failed (10 - invalid value)
|
||||
|
||||
Remove test ReqOption:
|
||||
|
||||
$ R ba-cli 'Device.DHCPv4.Client.1.SentOption.4.-' | grep -Ev '^>|^$'
|
||||
Device.DHCPv4.Client.1.SentOption.4.
|
||||
27
.gitlab/tests/cram/wnc-freedom/tr181-dhcpv4client/stats.t
Normal file
27
.gitlab/tests/cram/wnc-freedom/tr181-dhcpv4client/stats.t
Normal file
@ -0,0 +1,27 @@
|
||||
Create R alias:
|
||||
|
||||
$ alias R="${CRAM_REMOTE_COMMAND:-}"
|
||||
|
||||
Reset Stats:
|
||||
$ R "ba-cli 'Device.DHCPv4.Client.1.Stats.Reset()' | grep -Ev '^>|^$'"
|
||||
Device.DHCPv4.Client.1.Stats.Reset() returned
|
||||
[
|
||||
""
|
||||
]
|
||||
|
||||
Dump Stats object:
|
||||
|
||||
$ R "ba-cli 'dump -p Device.DHCPv4.Client.1.Stats.' | grep -Ev '^>|^$'"
|
||||
.R...... <public> singleton Device.DHCPv4.Client.1.Stats.
|
||||
.R....V. <public> uint32 Device.DHCPv4.Client.1.Stats.Inform=0
|
||||
.R....V. <public> uint32 Device.DHCPv4.Client.1.Stats.FailedPackets=0
|
||||
.R....V. <public> uint32 Device.DHCPv4.Client.1.Stats.Decline=0
|
||||
.R....V. <public> uint32 Device.DHCPv4.Client.1.Stats.OtherMessageTypes=0
|
||||
.R....V. <public> uint32 Device.DHCPv4.Client.1.Stats.NAK=0
|
||||
.R....V. <public> uint32 Device.DHCPv4.Client.1.Stats.Offer=0
|
||||
.R....V. <public> uint32 Device.DHCPv4.Client.1.Stats.CorruptPackets=0
|
||||
.R....V. <public> uint32 Device.DHCPv4.Client.1.Stats.Request=0
|
||||
.R....V. <public> uint32 Device.DHCPv4.Client.1.Stats.Release=0
|
||||
.R....V. <public> uint32 Device.DHCPv4.Client.1.Stats.ForceRenew=0
|
||||
.R....V. <public> uint32 Device.DHCPv4.Client.1.Stats.ACK=0
|
||||
.R....V. <public> uint32 Device.DHCPv4.Client.1.Stats.Discover=0
|
||||
Loading…
Reference in New Issue
Block a user