profiles: prpl_core.yml: feed_amx: amx-cli: bump stdin fix

Bump feed_amx to f44cd0908bf6 ("amx-cli: bump to PCF-2445 stdin fix")
so prpl_core uses the amx-cli PCF-2445 MR head.

This brings the reviewed runtime change series:
- 7c78345ad543 ("ci: enable support for Cobertura XML report generation")
- 93740e7127a4 ("include_priv: align private header guards")
- 6f245591b78e ("amx-cli: ignore stdin after positional command")

The amx-cli change makes positional amx-cli and ba-cli commands exit
after the requested command instead of reading inherited stdin. This
prevents cram-over-ssh scripts from having their remaining test input
consumed by ba-cli.

Add a generic cram regression test that verifies positional ba-cli
commands preserve inherited stdin and do not wait on an open stdin pipe,
while explicit automated stdin-script mode still reads stdin.

The cram expectations for existing ba-cli calls still modeled the old
interactive output shape: prompt/header text, command output, and a
trailing prompt or blank line from the inherited stdin session. After
the stdin fix, one-shot ba-cli commands emit only command output, so
those filters either drop real data or keep obsolete blank-line
expectations.  Adjust the affected tests to filter only prompts and
empty lines so they match the corrected one-shot contract.

One syslog cram check also reuses the TR-181 PatternMatch value as a
grep -E expression. That value is stored with syslog-ng/basic-regex
escaped grouping, so the prompt cleanup left grep -E comparing DHCP log
lines against \(o|tr181-|dnsmasq-\)?dhcp. Extract only the PatternMatch
assignment and translate escaped parentheses before using the value as an
ERE, otherwise valid DHCP log lines are reported as unexpected output.

References: PCF-2445, PCF-2495, PPM-4088
Signed-off-by: Petr Štetiar <petr.stetiar@prplfoundation.org>
signed-off-by: Hela Saadani <hela.saadani_ext@softathome.com>
This commit is contained in:
Petr Štetiar 2026-05-29 14:44:55 +02:00 committed by Hela Saadani
parent 5c664a92d9
commit e893e4d4f2
59 changed files with 283 additions and 401 deletions

View File

@ -258,17 +258,17 @@ To disable wireless, disable instances of Network.AccessPoint{i} and call Access
Restore Security.ModeEnabled for AccessPoints used in the test
$ R "ba-cli \"WiFi.AccessPoint.[RadioReference == 'Device.WiFi.Radio.1'].Security.ModeEnabled='WPA3-Personal-Transition'\"" | grep 'ModeEnabled=' | sed '/^$/d' | grep -v '>'
$ R "ba-cli \"WiFi.AccessPoint.[RadioReference == 'Device.WiFi.Radio.1'].Security.ModeEnabled='WPA3-Personal-Transition'\"" | grep 'ModeEnabled=' | sed '/^$/d' | grep -Ev '^(>|$)'
WiFi.AccessPoint.\d+.Security.ModeEnabled="WPA3-Personal-Transition" (re)
WiFi.AccessPoint.\d+.Security.ModeEnabled="WPA3-Personal-Transition" (re)
WiFi.AccessPoint.\d+.Security.ModeEnabled="WPA3-Personal-Transition" (re)
$ R "ba-cli \"WiFi.AccessPoint.[RadioReference == 'Device.WiFi.Radio.2'].Security.ModeEnabled='WPA3-Personal-Transition'\"" | grep 'ModeEnabled=' | sed '/^$/d' | grep -v '>'
$ R "ba-cli \"WiFi.AccessPoint.[RadioReference == 'Device.WiFi.Radio.2'].Security.ModeEnabled='WPA3-Personal-Transition'\"" | grep 'ModeEnabled=' | sed '/^$/d' | grep -Ev '^(>|$)'
WiFi.AccessPoint.\d+.Security.ModeEnabled="WPA3-Personal-Transition" (re)
WiFi.AccessPoint.\d+.Security.ModeEnabled="WPA3-Personal-Transition" (re)
WiFi.AccessPoint.\d+.Security.ModeEnabled="WPA3-Personal-Transition" (re)
$ R "ba-cli \"WiFi.AccessPoint.[RadioReference == 'Device.WiFi.Radio.3'].Security.ModeEnabled='WPA3-Personal'\"" | grep 'ModeEnabled=' | sed '/^$/d' | grep -v '>'
$ R "ba-cli \"WiFi.AccessPoint.[RadioReference == 'Device.WiFi.Radio.3'].Security.ModeEnabled='WPA3-Personal'\"" | grep 'ModeEnabled=' | sed '/^$/d' | grep -Ev '^(>|$)'
WiFi.AccessPoint.\d+.Security.ModeEnabled="WPA3-Personal" (re)
WiFi.AccessPoint.\d+.Security.ModeEnabled="WPA3-Personal" (re)
WiFi.AccessPoint.\d+.Security.ModeEnabled="WPA3-Personal" (re)
@ -301,17 +301,17 @@ Check that SSIDs did not change:
Restore Security Mode to default values
$ R "ba-cli \"WiFi.AccessPoint.[RadioReference == 'Device.WiFi.Radio.1'].Security.ModeEnabled='WPA3-Personal-Transition'\"" | grep 'ModeEnabled=' | sed '/^$/d' | grep -v '>'
$ R "ba-cli \"WiFi.AccessPoint.[RadioReference == 'Device.WiFi.Radio.1'].Security.ModeEnabled='WPA3-Personal-Transition'\"" | grep 'ModeEnabled=' | sed '/^$/d' | grep -Ev '^(>|$)'
WiFi.AccessPoint.\d+.Security.ModeEnabled="WPA3-Personal-Transition" (re)
WiFi.AccessPoint.\d+.Security.ModeEnabled="WPA3-Personal-Transition" (re)
WiFi.AccessPoint.\d+.Security.ModeEnabled="WPA3-Personal-Transition" (re)
$ R "ba-cli \"WiFi.AccessPoint.[RadioReference == 'Device.WiFi.Radio.2'].Security.ModeEnabled='WPA3-Personal-Transition'\"" | grep 'ModeEnabled=' | sed '/^$/d' | grep -v '>'
$ R "ba-cli \"WiFi.AccessPoint.[RadioReference == 'Device.WiFi.Radio.2'].Security.ModeEnabled='WPA3-Personal-Transition'\"" | grep 'ModeEnabled=' | sed '/^$/d' | grep -Ev '^(>|$)'
WiFi.AccessPoint.\d+.Security.ModeEnabled="WPA3-Personal-Transition" (re)
WiFi.AccessPoint.\d+.Security.ModeEnabled="WPA3-Personal-Transition" (re)
WiFi.AccessPoint.\d+.Security.ModeEnabled="WPA3-Personal-Transition" (re)
$ R "ba-cli \"WiFi.AccessPoint.[RadioReference == 'Device.WiFi.Radio.3'].Security.ModeEnabled='WPA3-Personal'\"" | grep 'ModeEnabled=' | sed '/^$/d' | grep -v '>'
$ R "ba-cli \"WiFi.AccessPoint.[RadioReference == 'Device.WiFi.Radio.3'].Security.ModeEnabled='WPA3-Personal'\"" | grep 'ModeEnabled=' | sed '/^$/d' | grep -Ev '^(>|$)'
WiFi.AccessPoint.\d+.Security.ModeEnabled="WPA3-Personal" (re)
WiFi.AccessPoint.\d+.Security.ModeEnabled="WPA3-Personal" (re)
WiFi.AccessPoint.\d+.Security.ModeEnabled="WPA3-Personal" (re)

View File

@ -11,13 +11,11 @@ Prepare the test setup
$ R "${S} && add_user_role --rolename full_caps --capabilities \"CAP_AUDIT_CONTROL,CAP_AUDIT_READ,CAP_AUDIT_WRITE,CAP_BLOCK_SUSPEND,CAP_BPF,CAP_CHECKPOINT_RESTORE,CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_DAC_READ_SEARCH,CAP_FOWNER,CAP_FSETID,CAP_IPC_LOCK,CAP_IPC_OWNER,CAP_KILL,CAP_LEASE,CAP_LINUX_IMMUTABLE,CAP_MAC_ADMIN,CAP_MAC_OVERRIDE,CAP_MKNOD,CAP_NET_ADMIN,CAP_NET_BIND_SERVICE,CAP_NET_BROADCAST,CAP_NET_RAW,CAP_PERFMON,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_ADMIN,CAP_SYS_BOOT,CAP_SYS_CHROOT,CAP_SYS_MODULE,CAP_SYS_NICE,CAP_SYS_PACCT,CAP_SYS_PTRACE,CAP_SYS_RAWIO,CAP_SYS_RESOURCE,CAP_SYS_TIME,CAP_SYS_TTY_CONFIG,CAP_SYSLOG,CAP_WAKE_ALARM\""
{"Device.Users.Role.*.":{"Alias":"full_caps","RoleName":"full_caps"}} (glob)
$ R "${S} && set_ee_roles --userroles \"full_caps\""
SoftwareModules.ExecEnv.1.ModifyAvailableRoles() returned
["",{"err_code":0,"err_msg":""}]
Install test container:
@ -66,14 +64,12 @@ Remove the role from the ExecutionEnvironment
SoftwareModules.ExecEnv.1.ModifyAvailableRoles() returned
["",{"err_code":0,"err_msg":""}]
Remove full_caps from Devices.User.Role
$ R "${S} && remove_user_role --rolename full_caps"
["Device.Users.Role.*."] (glob)
Cleanup test environment:

View File

@ -76,7 +76,6 @@ Utilize set in firewall rule:
$ (R "ba-cli Firewall.Chain.2.Rule.1.Status?") | sed 's|[>,]||g'
Firewall.Chain.2.Rule.1.Status?
Firewall.Chain.2.Rule.1.Status="Enabled"
$ (R "iptables -L FORWARD_L_Low") | sed 's|[0123456789,]||g'
Chain FORWARD_L_Low ( references)
@ -93,7 +92,6 @@ Not enabled set in firewall rule:
$ (R "ba-cli Firewall.Chain.2.Rule.1.Status?") | sed 's|[>,]||g'
Firewall.Chain.2.Rule.1.Status?
Firewall.Chain.2.Rule.1.Status="Error_Misconfigured"
$ (R "ba-cli Firewall.Chain.2.Rule.1.SourceMatchSet=\"\"") >> /dev/null
@ -104,11 +102,10 @@ Exclude set parameter:
$ (R "ba-cli Firewall.Chain.2.Rule.1.Status?") | sed 's|[>,]||g'
Firewall.Chain.2.Rule.1.Status?
Firewall.Chain.2.Rule.1.Status="Enabled"
$ (R "iptables -L FORWARD_L_Low") | sed 's|[0123456789,]||g'
Chain FORWARD_L_Low ( references)
target prot opt source destination
ACCEPT all -- anywhere anywhere ! match-set exclude src
$ (R "ba-cli Firewall.Chain.2.Rule.1.SourceMatchSetExclude=\"\"") >> /dev/null
$ (R "ba-cli Firewall.Chain.2.Rule.1.SourceMatchSetExclude=\"\"") >> /dev/null

View File

@ -39,7 +39,7 @@ Check that certs are in place as expected:
Check that certificate can be disabled (PCF-1054):
$ R "ba-cli 'Security.Certificate.[SignatureAlgorithm==\"ecdsa-with-SHA512\"].Enable=0' | sed -n '3p'"
$ R "ba-cli 'Security.Certificate.[SignatureAlgorithm==\"ecdsa-with-SHA512\"].Enable=0' | grep -Ev '^(>|$)' | grep 'Enable=0'"
Security.Certificate.\d+.Enable=0 (re)
$ R "ba-cli --json 'Security.Certificate.[SignatureAlgorithm==\"ecdsa-with-SHA512\" && Enable==False].?' | sed -n '2p'" | jq --sort-keys .[0] | grep -v -E '(NotAfter|NotBefore|LastModif)'
@ -57,7 +57,7 @@ Check that certificate can be disabled (PCF-1054):
Check that certificate can be enabled (PCF-1054):
$ R "ba-cli 'Security.Certificate.[SignatureAlgorithm==\"ecdsa-with-SHA512\"].Enable=1' | sed -n '3p'"
$ R "ba-cli 'Security.Certificate.[SignatureAlgorithm==\"ecdsa-with-SHA512\"].Enable=1' | grep -Ev '^(>|$)' | grep 'Enable=1'"
Security.Certificate.\d+.Enable=1 (re)
$ R "ba-cli --json 'Security.Certificate.[SignatureAlgorithm==\"ecdsa-with-SHA512\" && Enable==True].?' | sed -n '2p'" | jq --sort-keys .[0] | grep -v -E '(NotAfter|NotBefore|LastModif)'
@ -93,13 +93,12 @@ Check that CABundle are presents:
$ R "echo '%populate{object Security{object CABundle{instance add(){parameter Enable=1; parameter Name=cram; parameter CAFileURI=\"/tmp/server-cert.crt\";}}}}' > /etc/amx/tr181-security/defaults.d/01_cram_periodic_transfer.odl" ; sleep 1
$ R '/etc/init.d/tr181-security restart'
$ R 'ba-cli Security.CABundleNumberOfEntries?' | grep -v '>'
$ R 'ba-cli Security.CABundleNumberOfEntries?' | grep -Ev '^(>|$)'
Security.CABundleNumberOfEntries=1
Check CABundle RPC:
$ R "ba-cli 'Security.CABundle.1.CAFile()'" | grep -v '>'
$ R "ba-cli 'Security.CABundle.1.CAFile()'" | grep -Ev '^(>|$)'
Security.CABundle.1.CAFile() returned
[
"",
@ -107,8 +106,7 @@ Check CABundle RPC:
CAFile = "/tmp/server-cert.crt"
}
]
$ R "ba-cli 'Security.CABundle.1.CADir()'" | grep -v '>'
$ R "ba-cli 'Security.CABundle.1.CADir()'" | grep -Ev '^(>|$)'
Security.CABundle.1.CADir() returned
[
"",
@ -116,9 +114,8 @@ Check CABundle RPC:
CADir = ""
}
]
$ R "ba-cli 'Security.CABundle.1.CADirURI=/tmp'" >/dev/null
$ R "ba-cli 'Security.CABundle.1.CADir()'" | grep -v '>'
$ R "ba-cli 'Security.CABundle.1.CADir()'" | grep -Ev '^(>|$)'
Security.CABundle.1.CADir() returned
[
"",
@ -126,7 +123,6 @@ Check CABundle RPC:
CADir = "/tmp"
}
]
Restore the state of the system:

View File

@ -34,9 +34,8 @@ Get current tr181-led manager PID:
Add test for checking tr181-leds manager using PID:
$ R "ba-cli 'ProcessMonitor.Test+{Type=Process,Name=tr181-led,Subject=/var/run/tr181-led.pid,FailAction=RESTART,TestInterval=30,MaxFailNum=1,ProcessMonitoringEnabled=0}' | grep -v '^>'"
$ R "ba-cli 'ProcessMonitor.Test+{Type=Process,Name=tr181-led,Subject=/var/run/tr181-led.pid,FailAction=RESTART,TestInterval=30,MaxFailNum=1,ProcessMonitoringEnabled=0}' | grep -Ev '^(>|$)'"
ProcessMonitor.Test.\d+. (re)
Check the LED manager check datamodel settings:

View File

@ -52,7 +52,7 @@ Check if core dump has been created:
Cleanup only if entry is from this test:
$ number_of_entries="$( R "ba-cli -l 'ProcessFaults.ProcessFaultNumberOfEntries?' | sed -n '2p'")"
$ number_of_entries="$( R "ba-cli -l 'ProcessFaults.ProcessFaultNumberOfEntries?' | grep -Ev '^(>|$)'")"
$ if [ "$number_of_entries" -eq 1 ]; then R "ba-cli 'ProcessFaults.RemoveAllProcessFaults()' >/dev/null"; fi
Check if dump files have really been removed:
@ -61,7 +61,7 @@ Check if dump files have really been removed:
Ensure that ProcessFaults does not contain any crashes, expected LastUpgradeCount to be 1 because of the simulated crash
$ R "ba-cli ProcessFaults.? | grep -v '^>' | head -n -1 | sort"
$ R "ba-cli ProcessFaults.? | grep -Ev '^(>|$)' | sort"
ProcessFaults.
ProcessFaults.LastUpgradeCount=1
ProcessFaults.MaxProcessFaultEntries=5

View File

@ -67,7 +67,6 @@ Check that Rlyeh has no container images:
$ R "ba-cli -l -j 'Rlyeh.Images.?'"
[{}]
Check that registry.gitlab.com is accessible:
@ -79,7 +78,6 @@ Check that Rlyeh can download testing container:
Rlyeh.pull() returned
[""]
$ R 'i=1; while [ $i -lt 10 ] && [ "$(ba-cli -lj "Rlyeh.Images.[DUID == \"0f032bd7-54bd-5b81-b14e-9441d730092f\"].DUID?" | jsonfilter -e @[*].*.DUID)" != "0f032bd7-54bd-5b81-b14e-9441d730092f" ]; do i=$((i+1)); sleep 1; done'
@ -96,7 +94,6 @@ Remove testing container:
Rlyeh.remove() returned
[""]
$ R "ba-cli -l -j 'Rlyeh.Images.[DUID == \"0f032bd7-54bd-5b81-b14e-9441d730092f\"].?' | jsonfilter -e @[*].*.MarkForRemoval"
1
@ -105,14 +102,12 @@ Remove testing container:
Rlyeh.gc() returned
[""]
Check that Rlyeh has no container images:
$ R "ba-cli -l -j 'Rlyeh.Images.?'"
[{}]
Check that testing image is gone from the filesystem as well:

View File

@ -17,10 +17,9 @@ upnp-client definitions:
Allow Reserved WAN IP Addresses:
$ R "ba-cli 'Device.UPnP.X_PRPLWARE-COM_IGDConfig.AllowReservedAddr=1'" | grep -v '^>'
$ R "ba-cli 'Device.UPnP.X_PRPLWARE-COM_IGDConfig.AllowReservedAddr=1'" | grep -Ev '^(>|$)'
Device.UPnP.X_PRPLWARE-COM_IGDConfig.
Device.UPnP.X_PRPLWARE-COM_IGDConfig.AllowReservedAddr=1
$ sleep 3
Verify UPnP IGD is present in the network:
@ -41,49 +40,43 @@ Ged Description URL:
Check there are no NAT PortMapping rules:
$ R "ba-cli 'Device.NAT.PortMapping.?'" | grep -v '^>'
$ R "ba-cli 'Device.NAT.PortMapping.?'" | grep -Ev '^(>|$)'
No data found
Create NAT PortMapping rules:
$ R "ba-cli 'Device.NAT.PortMapping.+{Alias=testrule1,Enable=1,Interface=Device.IP.Interface.2,Origin=UPnP,RemoteHost=1.1.1.1,ExternalPort=12345,InternalPort=12345,InternalClient=192.168.1.123}'" | grep -v '^>' | sed -E 's/\.PortMapping\.[0-9]+\./.PortMapping.X./'
$ R "ba-cli 'Device.NAT.PortMapping.+{Alias=testrule1,Enable=1,Interface=Device.IP.Interface.2,Origin=UPnP,RemoteHost=1.1.1.1,ExternalPort=12345,InternalPort=12345,InternalClient=192.168.1.123}'" | grep -Ev '^(>|$)' | sed -E 's/\.PortMapping\.[0-9]+\./.PortMapping.X./'
Device.NAT.PortMapping.X.
Device.NAT.PortMapping.X.Alias="testrule1"
Device.NAT.PortMapping.X.ExternalPort=12345
Device.NAT.PortMapping.X.Protocol="TCP"
Device.NAT.PortMapping.X.RemoteHost="1.1.1.1"
$ R "ba-cli 'Device.NAT.PortMapping.+{Alias=testrule2,Enable=1,Interface=Device.IP.Interface.2,Origin=UPnP,RemoteHost=1.1.1.1,ExternalPort=23456,InternalPort=23456,InternalClient=192.168.1.123}'" | grep -v '^>' | sed -E 's/\.PortMapping\.[0-9]+\./.PortMapping.X./'
$ R "ba-cli 'Device.NAT.PortMapping.+{Alias=testrule2,Enable=1,Interface=Device.IP.Interface.2,Origin=UPnP,RemoteHost=1.1.1.1,ExternalPort=23456,InternalPort=23456,InternalClient=192.168.1.123}'" | grep -Ev '^(>|$)' | sed -E 's/\.PortMapping\.[0-9]+\./.PortMapping.X./'
Device.NAT.PortMapping.X.
Device.NAT.PortMapping.X.Alias="testrule2"
Device.NAT.PortMapping.X.ExternalPort=23456
Device.NAT.PortMapping.X.Protocol="TCP"
Device.NAT.PortMapping.X.RemoteHost="1.1.1.1"
$ R "ba-cli 'Device.NAT.PortMapping.+{Alias=testrule3,Enable=1,Interface=Device.IP.Interface.2,Origin=UPnP,RemoteHost=1.1.1.1,ExternalPort=34567,InternalPort=34567,InternalClient=192.168.1.123}'" | grep -v '^>' | sed -E 's/\.PortMapping\.[0-9]+\./.PortMapping.X./'
$ R "ba-cli 'Device.NAT.PortMapping.+{Alias=testrule3,Enable=1,Interface=Device.IP.Interface.2,Origin=UPnP,RemoteHost=1.1.1.1,ExternalPort=34567,InternalPort=34567,InternalClient=192.168.1.123}'" | grep -Ev '^(>|$)' | sed -E 's/\.PortMapping\.[0-9]+\./.PortMapping.X./'
Device.NAT.PortMapping.X.
Device.NAT.PortMapping.X.Alias="testrule3"
Device.NAT.PortMapping.X.ExternalPort=34567
Device.NAT.PortMapping.X.Protocol="TCP"
Device.NAT.PortMapping.X.RemoteHost="1.1.1.1"
$ R "ba-cli 'Device.NAT.PortMapping.+{Alias=testrule4,Enable=1,Interface=Device.IP.Interface.2,Origin=Controller,RemoteHost=1.1.1.1,ExternalPort=45678,InternalPort=45678,InternalClient=192.168.1.123}'" | grep -v '^>' | sed -E 's/\.PortMapping\.[0-9]+\./.PortMapping.X./'
$ R "ba-cli 'Device.NAT.PortMapping.+{Alias=testrule4,Enable=1,Interface=Device.IP.Interface.2,Origin=Controller,RemoteHost=1.1.1.1,ExternalPort=45678,InternalPort=45678,InternalClient=192.168.1.123}'" | grep -Ev '^(>|$)' | sed -E 's/\.PortMapping\.[0-9]+\./.PortMapping.X./'
Device.NAT.PortMapping.X.
Device.NAT.PortMapping.X.Alias="testrule4"
Device.NAT.PortMapping.X.ExternalPort=45678
Device.NAT.PortMapping.X.Protocol="TCP"
Device.NAT.PortMapping.X.RemoteHost="1.1.1.1"
Delete the second NAT PortMapping rules:
$ R "ba-cli 'Device.NAT.PortMapping.testrule2.-'" | grep -v '^>' | sed -E 's/\.PortMapping\.[0-9]+\./.PortMapping.X./'
$ R "ba-cli 'Device.NAT.PortMapping.testrule2.-'" | grep -Ev '^(>|$)' | sed -E 's/\.PortMapping\.[0-9]+\./.PortMapping.X./'
Device.NAT.PortMapping.X.
Rtrieve NAT PortMapping with index 0:
@ -137,14 +130,11 @@ Retrieve NAT PortMapping with index 3:
Clean up:
$ R "ba-cli 'Device.NAT.PortMapping.testrule1.-'" | grep -v '^>' | sed -E 's/\.PortMapping\.[0-9]+\./.PortMapping.X./'
$ R "ba-cli 'Device.NAT.PortMapping.testrule1.-'" | grep -Ev '^(>|$)' | sed -E 's/\.PortMapping\.[0-9]+\./.PortMapping.X./'
Device.NAT.PortMapping.X.
$ R "ba-cli 'Device.NAT.PortMapping.testrule3.-'" | grep -v '^>' | sed -E 's/\.PortMapping\.[0-9]+\./.PortMapping.X./'
$ R "ba-cli 'Device.NAT.PortMapping.testrule3.-'" | grep -Ev '^(>|$)' | sed -E 's/\.PortMapping\.[0-9]+\./.PortMapping.X./'
Device.NAT.PortMapping.X.
$ R "ba-cli 'Device.NAT.PortMapping.testrule4.-'" | grep -v '^>' | sed -E 's/\.PortMapping\.[0-9]+\./.PortMapping.X./'
$ R "ba-cli 'Device.NAT.PortMapping.testrule4.-'" | grep -Ev '^(>|$)' | sed -E 's/\.PortMapping\.[0-9]+\./.PortMapping.X./'
Device.NAT.PortMapping.X.

View File

@ -17,10 +17,9 @@ upnp-client definitions:
Allow Reserved WAN IP Addresses:
$ R "ba-cli 'Device.UPnP.X_PRPLWARE-COM_IGDConfig.AllowReservedAddr=1'" | grep -v '^>'
$ R "ba-cli 'Device.UPnP.X_PRPLWARE-COM_IGDConfig.AllowReservedAddr=1'" | grep -Ev '^(>|$)'
Device.UPnP.X_PRPLWARE-COM_IGDConfig.
Device.UPnP.X_PRPLWARE-COM_IGDConfig.AllowReservedAddr=1
$ sleep 3
Verify UPnP IGD is present in the network:
@ -41,19 +40,17 @@ Ged Description URL:
Check there are no NAT PortMapping rules:
$ R "ba-cli 'Device.NAT.PortMapping.?'" | grep -v '^>'
$ R "ba-cli 'Device.NAT.PortMapping.?'" | grep -Ev '^(>|$)'
No data found
Create 1 NAT PortMapping rule with non-UPnP origin:
$ R "ba-cli 'Device.NAT.PortMapping.+{Alias=testrule1,Enable=1,Interface=Device.IP.Interface.2,Origin=Controller,RemoteHost=1.1.1.1,ExternalPort=12345,InternalPort=12345,InternalClient=192.168.1.123}'" | grep -v '^>' | sed -E 's/\.PortMapping\.[0-9]+\./.PortMapping.X./'
$ R "ba-cli 'Device.NAT.PortMapping.+{Alias=testrule1,Enable=1,Interface=Device.IP.Interface.2,Origin=Controller,RemoteHost=1.1.1.1,ExternalPort=12345,InternalPort=12345,InternalClient=192.168.1.123}'" | grep -Ev '^(>|$)' | sed -E 's/\.PortMapping\.[0-9]+\./.PortMapping.X./'
Device.NAT.PortMapping.X.
Device.NAT.PortMapping.X.Alias="testrule1"
Device.NAT.PortMapping.X.ExternalPort=12345
Device.NAT.PortMapping.X.Protocol="TCP"
Device.NAT.PortMapping.X.RemoteHost="1.1.1.1"
Retrieve NAT PortMapping with index 0:
@ -98,9 +95,8 @@ Rtrieve NAT PortMapping with index 0:
Clean up:
$ R "ba-cli 'Device.NAT.PortMapping.testrule1.-'" | grep -v '^>' | sed -E 's/\.PortMapping\.[0-9]+\./.PortMapping.X./'
$ R "ba-cli 'Device.NAT.PortMapping.testrule1.-'" | grep -Ev '^(>|$)' | sed -E 's/\.PortMapping\.[0-9]+\./.PortMapping.X./'
Device.NAT.PortMapping.X.
$ upnp-client call-action $DESC_URL WANIPConn1/DeletePortMapping NewRemoteHost=2.2.2.2 NewExternalPort=23456 NewProtocol=TCP >/dev/null

View File

@ -17,10 +17,9 @@ upnp-client definitions:
Allow Reserved WAN IP Addresses:
$ R "ba-cli 'Device.UPnP.X_PRPLWARE-COM_IGDConfig.AllowReservedAddr=1'" | grep -v '^>'
$ R "ba-cli 'Device.UPnP.X_PRPLWARE-COM_IGDConfig.AllowReservedAddr=1'" | grep -Ev '^(>|$)'
Device.UPnP.X_PRPLWARE-COM_IGDConfig.
Device.UPnP.X_PRPLWARE-COM_IGDConfig.AllowReservedAddr=1
$ sleep 3
Verify UPnP IGD is present in the network:

View File

@ -17,10 +17,9 @@ upnp-client definitions:
Allow Reserved WAN IP Addresses:
$ R "ba-cli 'Device.UPnP.X_PRPLWARE-COM_IGDConfig.AllowReservedAddr=1'" | grep -v '^>'
$ R "ba-cli 'Device.UPnP.X_PRPLWARE-COM_IGDConfig.AllowReservedAddr=1'" | grep -Ev '^(>|$)'
Device.UPnP.X_PRPLWARE-COM_IGDConfig.
Device.UPnP.X_PRPLWARE-COM_IGDConfig.AllowReservedAddr=1
$ sleep 3
Verify UPnP IGD is present in the network:

View File

@ -21,10 +21,9 @@ upnp-client definitions:
Allow Reserved WAN IP Addresses:
$ R "ba-cli 'Device.UPnP.X_PRPLWARE-COM_IGDConfig.AllowReservedAddr=1'" | grep -v '^>'
$ R "ba-cli 'Device.UPnP.X_PRPLWARE-COM_IGDConfig.AllowReservedAddr=1'" | grep -Ev '^(>|$)'
Device.UPnP.X_PRPLWARE-COM_IGDConfig.
Device.UPnP.X_PRPLWARE-COM_IGDConfig.AllowReservedAddr=1
$ sleep 3
Verify UPnP IGD is present in the network:

View File

@ -12,9 +12,8 @@ Ensure avahi-daemon is running:
Ensure DNS.SD service is enabled on HGW:
$ R "ba-cli 'DNSSD.Enable?'" | grep -v '>'
$ R "ba-cli 'DNSSD.Enable?'" | grep -Ev '^(>|$)'
DNSSD.Enable=1
Test 1: Service Advertisement (mDNS announcement):
@ -74,13 +73,12 @@ Wait for removal to propagate:
Verify entry is removed from TR-181:
$ R 'ba-cli "Device.DNS.SD.Service.[InstanceName==\"CramTestService1\"].?"' 2>&1 | grep -v '>'
$ R 'ba-cli "Device.DNS.SD.Service.[InstanceName==\"CramTestService1\"].?"' 2>&1 | grep -Ev '^(>|$)'
No data found
Verify entry is removed from gmap datamodel:
$ R 'ba-cli "Devices.Device.*.mDNSService.[Name==\"CramTestService1\"].?"' | grep -v '>' | grep 'CramTestService1' || echo "Not found"
$ R 'ba-cli "Devices.Device.*.mDNSService.[Name==\"CramTestService1\"].?"' | grep -Ev '^(>|$)' | grep 'CramTestService1' || echo "Not found"
Not found
Cleanup:

View File

@ -153,7 +153,6 @@ Check LocalTimeZone correctly filter wrong TZ:
Time.LocalTimeZone=JST-9
Time.
Time.LocalTimeZone="JST-9"
$ (R "date +%Z")
JST
@ -161,14 +160,12 @@ Check LocalTimeZone correctly filter wrong TZ:
Time.LocalTimeZone=UTC0
Time.
Time.LocalTimeZone="UTC0"
$ (R "date +%Z")
UTC
$ (R "ba-cli Time.LocalTimeZone=\"NOTAVALIDETZ\"") | sed 's|[>,]||g'
Time.LocalTimeZone=NOTAVALIDETZ
ERROR: set Time.LocalTimeZone failed (10 - invalid value)
$ (R "date +%Z")
UTC
@ -176,14 +173,12 @@ Check LocalTimeZone correctly filter wrong TZ:
Time.LocalTimeZone=GMT0
Time.
Time.LocalTimeZone="GMT0"
$ (R "date +%Z")
GMT
$ (R "ba-cli Time.LocalTimeZone=\"/usr/share/zoneinfo/Universal\"") | sed 's|[>,]||g'
Time.LocalTimeZone=/usr/share/zoneinfo/Universal
ERROR: set Time.LocalTimeZone failed (10 - invalid value)
$ (R "date +%Z")
GMT
@ -193,7 +188,6 @@ Set back default timezone:
Time.LocalTimeZone=GMT0
Time.
Time.LocalTimeZone="GMT0"
$ (R "date +%Z")
GMT

View File

@ -17,11 +17,12 @@ Check logs appears in /var/log/messages with expected format:
Check that filtering and command are working as expected (testing dhcp):
$ dhcplogfile=$(R "ba-cli 'Syslog.Action.[Alias==\"dhcp\"].LogFile.FilePath?'" | grep -v '^>' | head -n -2 | sed -E 's|.*"file://(.*)"|\1|')
$ dhcplogfile=$(R "ba-cli 'Syslog.Action.[Alias==\"dhcp\"].LogFile.FilePath?'" | grep -Ev '^(>|$)' | sed -E 's|.*"file://(.*)"|\1|')
$ R "test -s $dhcplogfile && echo 'log file is non empty'"
log file is non empty
$ dhcppattern=$(R "ba-cli 'Syslog.Filter.[Alias==\"dhcp\"].PatternMatch?'" | grep -v '^>' | head -n -2 | sed -E 's|.*="\^?(.+?)"|\1|')
$ dhcppattern=$(R "ba-cli 'Syslog.Filter.[Alias==\"dhcp\"].PatternMatch?'" | sed -nE 's|.*PatternMatch="?\^?([^"]*)"?$|\1|p' | sed -E 's|\\([()])|\1|g')
$ test -n "$dhcppattern"
$ R "grep -v -E '^$datepattern [^ ]+ $dhcppattern' $dhcplogfile" || echo "Only expect filtered log found"
Only expect filtered log found

View File

@ -5,7 +5,7 @@ Create R alias:
Enable Captive Portal (not activated by default):
$ R "ba-cli 'CaptivePortal.Enable=1'" >/dev/null
$ R "ba-cli 'CaptivePortal.Status?' | sed -n '2p'"
$ R "ba-cli 'CaptivePortal.Status?' | grep -Ev '^(>|$)'"
CaptivePortal.Status="Enabled"
$ sleep 1
@ -26,7 +26,7 @@ Wait for status change:
Check openNDS http interface has been opened on br-lan:
$ R "ba-cli 'UserInterface.HTTPAccess.[Alias==\"captive\"].Interface?' | sed -n '2p'"
$ R "ba-cli 'UserInterface.HTTPAccess.[Alias==\"captive\"].Interface?' | grep -Ev '^(>|$)'"
UserInterface.HTTPAccess.3.Interface="Device.IP.Interface.3"
Send a curl http request to detectportal.firefox.com and check we have a 307 temporary redirect:
@ -36,9 +36,9 @@ Send a curl http request to detectportal.firefox.com and check we have a 307 tem
Reenable WAN:
$ R "ba-cli -lj 'Device.IP.Interface.[Alias==\"wan\"].Enable=1' | sed -n '2p'"
$ R "ba-cli -lj 'Device.IP.Interface.[Alias==\"wan\"].Enable=1' | grep -Ev '^(>|$)'"
[{"Device.IP.Interface.2.":{"Enable":1}}]
$ R "ba-cli 'CaptivePortal.Status?' | sed -n '2p'"
$ R "ba-cli 'CaptivePortal.Status?' | grep -Ev '^(>|$)'"
CaptivePortal.Status="Enabled"
Cleanup:

View File

@ -136,9 +136,8 @@ Check command tree is available:
Check that no deployment units exist:
$ R "ba-cli 'SoftwareModules.DeploymentUnit.?'" | tail -n +2
$ R "ba-cli 'SoftwareModules.DeploymentUnit.?'" | grep -Ev '^(>|$)'
No data found
Check that registry.gitlab.com is accessible:
@ -155,7 +154,7 @@ Set Input for InstallDU command:
> AllocatedMemory=\"-1\", \\
> Privileged=\"1\", \\
> ModuleVersion=\"v1\" \\
> }" | tail -n +2
> }" | grep -Ev '^(>|$)'
X_PRPLWARE-COM_SoftwareModules.InstallDUCmd.Input.
X_PRPLWARE-COM_SoftwareModules.InstallDUCmd.Input.AllocatedCPUPercent=100
X_PRPLWARE-COM_SoftwareModules.InstallDUCmd.Input.AllocatedDiskSpace=-1
@ -165,18 +164,16 @@ Set Input for InstallDU command:
X_PRPLWARE-COM_SoftwareModules.InstallDUCmd.Input.Privileged=1
X_PRPLWARE-COM_SoftwareModules.InstallDUCmd.Input.URL="docker://registry.gitlab.com/prpl-foundation/prplos/prplos/prplos/*:prplos-v1" (glob)
X_PRPLWARE-COM_SoftwareModules.InstallDUCmd.Input.UUID="00000000-0000-5000-b000-000000000001"
Run InstallDU command and wait:
$ R "ba-cli X_PRPLWARE-COM_SoftwareModules.InstallDUCmd.State='Requested'" | tail -n +2; sleep 30
$ R "ba-cli X_PRPLWARE-COM_SoftwareModules.InstallDUCmd.State='Requested'" | grep -Ev '^(>|$)'; sleep 30
X_PRPLWARE-COM_SoftwareModules.InstallDUCmd.
X_PRPLWARE-COM_SoftwareModules.InstallDUCmd.State="Requested"
Check new DeploymentUnit:
$ R "ba-cli 'SoftwareModules.DeploymentUnit.[ UUID == \"00000000-0000-5000-b000-000000000001\" ].?'" | tail -n +2
$ R "ba-cli 'SoftwareModules.DeploymentUnit.[ UUID == \"00000000-0000-5000-b000-000000000001\" ].?'" | grep -Ev '^(>|$)'
SoftwareModules.DeploymentUnit.*. (glob)
SoftwareModules.DeploymentUnit.*.Alias="*" (glob)
SoftwareModules.DeploymentUnit.*.DUID="*" (glob)
@ -195,29 +192,25 @@ Check new DeploymentUnit:
SoftwareModules.DeploymentUnit.*.VendorConfigList="" (glob)
SoftwareModules.DeploymentUnit.*.VendorLogList="" (glob)
SoftwareModules.DeploymentUnit.*.Version="prplos-v1" (glob)
Get index of the new DeploymentUnit:
$ du_index=$(R "ba-cli 'SoftwareModules.DeploymentUnit.*.UUID?'" | tail -n +2 | awk -F'.' '{print $3}')
$ du_index=$(R "ba-cli 'SoftwareModules.DeploymentUnit.*.UUID?'" | grep -Ev '^(>|$)' | awk -F'.' '{print $3}')
Remove new DeploymentUnit and wait:
$ R "ba-cli X_PRPLWARE-COM_SoftwareModules.DeploymentUnitUninstallCmd.CmdPath='Device.SoftwareModules.DeploymentUnit.${du_index}'" | tail -n +2
$ R "ba-cli X_PRPLWARE-COM_SoftwareModules.DeploymentUnitUninstallCmd.CmdPath='Device.SoftwareModules.DeploymentUnit.${du_index}'" | grep -Ev '^(>|$)'
X_PRPLWARE-COM_SoftwareModules.DeploymentUnitUninstallCmd.
X_PRPLWARE-COM_SoftwareModules.DeploymentUnitUninstallCmd.CmdPath="Device.SoftwareModules.DeploymentUnit.*" (glob)
$ R "ba-cli X_PRPLWARE-COM_SoftwareModules.DeploymentUnitUninstallCmd.State='Requested'" | tail -n +2; sleep 10
$ R "ba-cli X_PRPLWARE-COM_SoftwareModules.DeploymentUnitUninstallCmd.State='Requested'" | grep -Ev '^(>|$)'; sleep 10
X_PRPLWARE-COM_SoftwareModules.DeploymentUnitUninstallCmd.
X_PRPLWARE-COM_SoftwareModules.DeploymentUnitUninstallCmd.State="Requested"
Check that new DeploymentUnit is deleted:
$ R "ba-cli 'SoftwareModules.DeploymentUnit.?'" | tail -n +2
$ R "ba-cli 'SoftwareModules.DeploymentUnit.?'" | grep -Ev '^(>|$)'
No data found
Set Input for InstallDU command with error (AllocatedCPUPercent should <= 100):
@ -230,7 +223,7 @@ Set Input for InstallDU command with error (AllocatedCPUPercent should <= 100):
> AllocatedMemory=\"-1\", \\
> Privileged=\"1\", \\
> ModuleVersion=\"v1\" \\
> }" | tail -n +2
> }" | grep -Ev '^(>|$)'
X_PRPLWARE-COM_SoftwareModules.InstallDUCmd.Input.
X_PRPLWARE-COM_SoftwareModules.InstallDUCmd.Input.AllocatedCPUPercent=500
X_PRPLWARE-COM_SoftwareModules.InstallDUCmd.Input.AllocatedDiskSpace=-1
@ -240,35 +233,28 @@ Set Input for InstallDU command with error (AllocatedCPUPercent should <= 100):
X_PRPLWARE-COM_SoftwareModules.InstallDUCmd.Input.Privileged=1
X_PRPLWARE-COM_SoftwareModules.InstallDUCmd.Input.URL="docker://registry.gitlab.com/prpl-foundation/prplos/prplos/prplos/*:prplos-v1" (glob)
X_PRPLWARE-COM_SoftwareModules.InstallDUCmd.Input.UUID="00000000-0000-5000-b000-000000000001"
Run InstallDU command and wait:
$ R "ba-cli X_PRPLWARE-COM_SoftwareModules.InstallDUCmd.State='Requested'" | tail -n +2; sleep 30
$ R "ba-cli X_PRPLWARE-COM_SoftwareModules.InstallDUCmd.State='Requested'" | grep -Ev '^(>|$)'; sleep 30
X_PRPLWARE-COM_SoftwareModules.InstallDUCmd.
X_PRPLWARE-COM_SoftwareModules.InstallDUCmd.State="Requested"
Check error:
$ R "ba-cli 'X_PRPLWARE-COM_SoftwareModules.InstallDUCmd.State?'" | tail -n +2
$ R "ba-cli 'X_PRPLWARE-COM_SoftwareModules.InstallDUCmd.State?'" | grep -Ev '^(>|$)'
X_PRPLWARE-COM_SoftwareModules.InstallDUCmd.State="Error"
$ R "ba-cli 'X_PRPLWARE-COM_SoftwareModules.InstallDUCmd.ErrorCode?'" | tail -n +2
$ R "ba-cli 'X_PRPLWARE-COM_SoftwareModules.InstallDUCmd.ErrorCode?'" | grep -Ev '^(>|$)'
X_PRPLWARE-COM_SoftwareModules.InstallDUCmd.ErrorCode="7004"
$ R "ba-cli 'X_PRPLWARE-COM_SoftwareModules.InstallDUCmd.ErrorMessage?'" | tail -n +2
$ R "ba-cli 'X_PRPLWARE-COM_SoftwareModules.InstallDUCmd.ErrorMessage?'" | grep -Ev '^(>|$)'
X_PRPLWARE-COM_SoftwareModules.InstallDUCmd.ErrorMessage="CPU should be between 0 and 100 [not 500]"
$ R "ba-cli 'SoftwareModules.DeploymentUnit.?'" | tail -n +2
$ R "ba-cli 'SoftwareModules.DeploymentUnit.?'" | grep -Ev '^(>|$)'
No data found
Check that only generic ExecEnv is present:
$ R "ba-cli 'SoftwareModules.ExecEnv.*.Name?'" | tail -n +2
$ R "ba-cli 'SoftwareModules.ExecEnv.*.Name?'" | grep -Ev '^(>|$)'
SoftwareModules.ExecEnv.1.Name="generic"
Set Input for AddExecEnv command:
@ -281,7 +267,7 @@ Set Input for AddExecEnv command:
> AllocatedMemory='-1', \\
> AllocatedDiskSpace='-1', \\
> AllocatedCPUPercent='100' \\
> }" | tail -n +2
> }" | grep -Ev '^(>|$)'
X_PRPLWARE-COM_SoftwareModules.AddExecEnvCmd.Input.
X_PRPLWARE-COM_SoftwareModules.AddExecEnvCmd.Input.AllocatedCPUPercent=100
X_PRPLWARE-COM_SoftwareModules.AddExecEnvCmd.Input.AllocatedDiskSpace=-1
@ -291,43 +277,37 @@ Set Input for AddExecEnv command:
X_PRPLWARE-COM_SoftwareModules.AddExecEnvCmd.Input.ParentExecEnv="SoftwareModules.ExecEnv.1"
X_PRPLWARE-COM_SoftwareModules.AddExecEnvCmd.Input.Vendor="test_vendor"
X_PRPLWARE-COM_SoftwareModules.AddExecEnvCmd.Input.Version="1"
Run AddExecEnv command:
$ R "ba-cli X_PRPLWARE-COM_SoftwareModules.AddExecEnvCmd.State='Requested'" | tail -n +2
$ R "ba-cli X_PRPLWARE-COM_SoftwareModules.AddExecEnvCmd.State='Requested'" | grep -Ev '^(>|$)'
X_PRPLWARE-COM_SoftwareModules.AddExecEnvCmd.
X_PRPLWARE-COM_SoftwareModules.AddExecEnvCmd.State="Requested"
Check that new ExecEnv is present:
$ R "ba-cli 'SoftwareModules.ExecEnv.*.Name?'" | tail -n +2
$ R "ba-cli 'SoftwareModules.ExecEnv.*.Name?'" | grep -Ev '^(>|$)'
SoftwareModules.ExecEnv.1.Name="generic"
SoftwareModules.ExecEnv.*.Name="TestEnv01" (glob)
Get index of the new ExecEnv:
$ exec_env_index=$(R "ba-cli 'SoftwareModules.ExecEnv.*.Name?'" | tail -n +2 | grep -v 'ExecEnv\.1\.' | awk -F'.' '{print $3}')
$ exec_env_index=$(R "ba-cli 'SoftwareModules.ExecEnv.*.Name?'" | grep -Ev '^(>|$)' | grep -v 'ExecEnv\.1\.' | awk -F'.' '{print $3}')
Remove new ExecEnv:
$ R "ba-cli X_PRPLWARE-COM_SoftwareModules.ExecEnvDeleteCmd.CmdPath='Device.SoftwareModules.ExecEnv.${exec_env_index}'" | tail -n +2
$ R "ba-cli X_PRPLWARE-COM_SoftwareModules.ExecEnvDeleteCmd.CmdPath='Device.SoftwareModules.ExecEnv.${exec_env_index}'" | grep -Ev '^(>|$)'
X_PRPLWARE-COM_SoftwareModules.ExecEnvDeleteCmd.
X_PRPLWARE-COM_SoftwareModules.ExecEnvDeleteCmd.CmdPath="Device.SoftwareModules.ExecEnv.*" (glob)
$ R "ba-cli X_PRPLWARE-COM_SoftwareModules.ExecEnvDeleteCmd.State='Requested'" | tail -n +2
$ R "ba-cli X_PRPLWARE-COM_SoftwareModules.ExecEnvDeleteCmd.State='Requested'" | grep -Ev '^(>|$)'
X_PRPLWARE-COM_SoftwareModules.ExecEnvDeleteCmd.
X_PRPLWARE-COM_SoftwareModules.ExecEnvDeleteCmd.State="Requested"
Check that new ExecEnv is deleted:
$ R "ba-cli 'SoftwareModules.ExecEnv.*.Name?'" | tail -n +2
$ R "ba-cli 'SoftwareModules.ExecEnv.*.Name?'" | grep -Ev '^(>|$)'
SoftwareModules.ExecEnv.1.Name="generic"
Cleanup:
@ -336,4 +316,3 @@ Cleanup:
$ R "/etc/init.d/data-model-mapper stop" > /dev/null 2>&1
$ R "opkg remove -V0 data-model-mapper >/dev/null 2>&1;echo $?"
0

View File

@ -13,4 +13,3 @@ Check Kernelfaults root datamodel:
KernelFaults.MinFreeSpace=[0-9]* (re)
KernelFaults.PreviousBootCount=[0-9]* (re)
KernelFaults.StoragePath="/data/oops"

View File

@ -35,10 +35,10 @@ Sleep for a moment to ensure subscriber is ready before publishing messages:
Add MQTT client and subscription:
$ R "ba-cli 'MQTT.Client.+{Alias=\"local_broker\", BrokerAddress=\"127.0.0.1\", Enable=\"true\"}' | grep -v '>' | grep 'local_broker'"
$ R "ba-cli 'MQTT.Client.+{Alias=\"local_broker\", BrokerAddress=\"127.0.0.1\", Enable=\"true\"}' | grep -Ev '^(>|$)' | grep 'local_broker'"
MQTT.Client.[0-9]+.Alias="local_broker" (re)
$ R "ba-cli 'MQTT.Client.local_broker.Subscription.+{Topic=\"SAH_CRAM_tests\", Enable=\"true\"}' | grep -v '>' | grep 'Topic'"
$ R "ba-cli 'MQTT.Client.local_broker.Subscription.+{Topic=\"SAH_CRAM_tests\", Enable=\"true\"}' | grep -Ev '^(>|$)' | grep 'Topic'"
MQTT.Client.[0-9]+.Subscription.1.Topic="SAH_CRAM_tests" (re)
$ sleep 2 # Wait for MQTT client to connect and subscribe

View File

@ -32,7 +32,7 @@ Check BulkData root datamodel:
Enable BulkData and check object status:
$ R "ba-cli 'BulkData.Enable=1' | grep -v '>' | grep 'Enable'"
$ R "ba-cli 'BulkData.Enable=1' | grep -Ev '^(>|$)' | grep 'Enable'"
BulkData.Enable=1
$ R "ba-cli 'BulkData.Status?' | grep '='"
@ -40,19 +40,19 @@ Enable BulkData and check object status:
Check added new Profile:
$ alias=$(R "ba-cli 'BulkData.Profile.+{Protocol=USPEventNotif, Enable=true}' | grep -v '>' | grep 'Alias'| sed -E 's/.*Alias=\"([^\"]+)\"/\1/'")
$ alias=$(R "ba-cli 'BulkData.Profile.+{Protocol=USPEventNotif, Enable=true}' | grep -Ev '^(>|$)' | grep 'Alias'| sed -E 's/.*Alias=\"([^\"]+)\"/\1/'")
$ echo "$alias"
cpe-Profile-[0-9]+ (re)
Check adding ReportingInterval value:
$ R "ba-cli 'BulkData.Profile.$alias.ReportingInterval=15' | sort | grep 'BulkData' | grep -v '>'"
$ R "ba-cli 'BulkData.Profile.$alias.ReportingInterval=15' | sort | grep 'BulkData' | grep -Ev '^(>|$)'"
BulkData.Profile.[0-9]+. (re)
BulkData.Profile.[0-9]+.ReportingInterval=15 (re)
Check adding Reference information:
$ R "ba-cli "BulkData.Profile.$alias.Parameter.+{Reference="Device.DeviceInfo.SerialNumber"}" | sort | grep 'BulkData' | grep -v '>'"
$ R "ba-cli "BulkData.Profile.$alias.Parameter.+{Reference="Device.DeviceInfo.SerialNumber"}" | sort | grep 'BulkData' | grep -Ev '^(>|$)'"
BulkData.Profile.[0-9]+.Parameter.[0-9]+. (re)
Check push notification:

View File

@ -41,7 +41,7 @@ Disable time synchronization and restart tr181-bulkdata to test BulkData module
Enable BulkData and check object status:
$ R "ba-cli 'BulkData.Enable=1' | grep -v '>' | grep 'Enable'"
$ R "ba-cli 'BulkData.Enable=1' | grep -Ev '^(>|$)' | grep 'Enable'"
BulkData.Enable=1
$ R "ba-cli 'BulkData.Status?' | grep '='"
@ -50,37 +50,37 @@ Enable BulkData and check object status:
1-HTTP Profile to send JSON report
Check adding an object with HTTP profile to send JSON report:
$ R "ba-cli 'BulkData.Profile.+{Alias="http-json", EncodingType="JSON", Name="http-json", Protocol="HTTP", Enable="false", ReportingInterval = 30}' | grep -v '>' | grep 'http-json'"
$ R "ba-cli 'BulkData.Profile.+{Alias="http-json", EncodingType="JSON", Name="http-json", Protocol="HTTP", Enable="false", ReportingInterval = 30}' | grep -Ev '^(>|$)' | grep 'http-json'"
BulkData.Profile.[0-9]+.Alias="http-json" (re)
Check to update HTTP object:
$ R "ba-cli 'BulkData.Profile.http-json.HTTP.URL="https://postman-echo.com/post/"' | grep -v '>' | grep '='"
$ R "ba-cli 'BulkData.Profile.http-json.HTTP.URL="https://postman-echo.com/post/"' | grep -Ev '^(>|$)' | grep '='"
BulkData.Profile.[0-9]+.HTTP.URL="https://postman-echo.com/post/" (re)
$ R "ba-cli 'BulkData.Profile.http-json.HTTP.Method="POST"' | grep -v '>' | grep '='"
$ R "ba-cli 'BulkData.Profile.http-json.HTTP.Method="POST"' | grep -Ev '^(>|$)' | grep '='"
BulkData.Profile.[0-9]+.HTTP.Method="POST" (re)
$ R "ba-cli 'BulkData.Profile.http-json.HTTP.UseDateHeader=1' | grep -v '>' | grep '='"
$ R "ba-cli 'BulkData.Profile.http-json.HTTP.UseDateHeader=1' | grep -Ev '^(>|$)' | grep '='"
BulkData.Profile.[0-9]+.HTTP.UseDateHeader=1 (re)
Check to update JSON object:
$ R "ba-cli 'BulkData.Profile.http-json.JSONEncoding.ReportFormat="ObjectHierarchy"' | grep -v '>' | grep '='"
$ R "ba-cli 'BulkData.Profile.http-json.JSONEncoding.ReportFormat="ObjectHierarchy"' | grep -Ev '^(>|$)' | grep '='"
BulkData.Profile.[0-9]+.JSONEncoding.ReportFormat="ObjectHierarchy" (re)
$ R "ba-cli 'BulkData.Profile.http-json.JSONEncoding.ReportTimestamp="Unix-Epoch"' | grep -v '>' | grep '='"
$ R "ba-cli 'BulkData.Profile.http-json.JSONEncoding.ReportTimestamp="Unix-Epoch"' | grep -Ev '^(>|$)' | grep '='"
BulkData.Profile.[0-9]+.JSONEncoding.ReportTimestamp="Unix-Epoch" (re)
Check adding a parameter to be sent in the report:
$ R "ba-cli 'BulkData.Profile.http-json.Parameter.+{Name="Contacts", Reference="Phonebook.Contact."}' | grep -v '>' | grep '.'"
$ R "ba-cli 'BulkData.Profile.http-json.Parameter.+{Name="Contacts", Reference="Phonebook.Contact."}' | grep -Ev '^(>|$)' | grep '.'"
BulkData.Profile.[0-9]+.Parameter.[0-9]+. (re)
Check after enabling the configured profile:
$ sleep 5 # wait for object creation
$ R "ba-cli 'BulkData.Profile.http-json.Enable="true"' | grep -v '>' | grep '='"
$ R "ba-cli 'BulkData.Profile.http-json.Enable="true"' | grep -Ev '^(>|$)' | grep '='"
BulkData.Profile.[0-9]+.Enable=1 (re)
Check traces:
@ -93,44 +93,44 @@ Check adding an object with HTTP profile to send CSV report:
$ R "ba-cli 'BulkData.Profile.*.-'" > /dev/null
$ R "ba-cli 'BulkData.Profile.+{Alias="http-csv", EncodingType="CSV", Name="http-csv", Protocol="HTTP", Enable="false", ReportingInterval = 30}' | grep -v '>' | grep 'http-csv'"
$ R "ba-cli 'BulkData.Profile.+{Alias="http-csv", EncodingType="CSV", Name="http-csv", Protocol="HTTP", Enable="false", ReportingInterval = 30}' | grep -Ev '^(>|$)' | grep 'http-csv'"
BulkData.Profile.[0-9]+.Alias="http-csv" (re)
Check to update HTTP object:
$ R "ba-cli 'BulkData.Profile.http-csv.HTTP.URL="https://postman-echo.com/post/"' | grep -v '>' | grep '='"
$ R "ba-cli 'BulkData.Profile.http-csv.HTTP.URL="https://postman-echo.com/post/"' | grep -Ev '^(>|$)' | grep '='"
BulkData.Profile.[0-9]+.HTTP.URL="https://postman-echo.com/post/" (re)
$ R "ba-cli 'BulkData.Profile.http-csv.HTTP.Method="POST"' | grep -v '>' | grep '='"
$ R "ba-cli 'BulkData.Profile.http-csv.HTTP.Method="POST"' | grep -Ev '^(>|$)' | grep '='"
BulkData.Profile.[0-9]+.HTTP.Method="POST" (re)
$ R "ba-cli 'BulkData.Profile.http-csv.HTTP.UseDateHeader=1' | grep -v '>' | grep '='"
$ R "ba-cli 'BulkData.Profile.http-csv.HTTP.UseDateHeader=1' | grep -Ev '^(>|$)' | grep '='"
BulkData.Profile.[0-9]+.HTTP.UseDateHeader=1 (re)
$ R "ba-cli 'BulkData.Profile.http-csv.CSVEncoding.EscapeCharacter="\&quot"' | grep -v '>' | grep '='"
$ R "ba-cli 'BulkData.Profile.http-csv.CSVEncoding.EscapeCharacter="\&quot"' | grep -Ev '^(>|$)' | grep '='"
BulkData.Profile.[0-9]+.CSVEncoding.EscapeCharacter="&quot" (re)
$ R "ba-cli 'BulkData.Profile.http-csv.CSVEncoding.FieldSeparator=\"\,\"' | grep -v '>' | grep '='"
$ R "ba-cli 'BulkData.Profile.http-csv.CSVEncoding.FieldSeparator=\"\,\"' | grep -Ev '^(>|$)' | grep '='"
BulkData.Profile.[0-9]+.CSVEncoding.FieldSeparator="," (re)
$ R "ba-cli 'BulkData.Profile.http-csv.CSVEncoding.ReportFormat="ParameterPerRow"' | grep -v '>' | grep '='"
$ R "ba-cli 'BulkData.Profile.http-csv.CSVEncoding.ReportFormat="ParameterPerRow"' | grep -Ev '^(>|$)' | grep '='"
BulkData.Profile.[0-9]+.CSVEncoding.ReportFormat="ParameterPerRow" (re)
$ R "ba-cli 'BulkData.Profile.http-csv.CSVEncoding.RowSeparator=\"&#13;&#10;\"' | grep -v '>' | grep '='"
$ R "ba-cli 'BulkData.Profile.http-csv.CSVEncoding.RowSeparator=\"&#13;&#10;\"' | grep -Ev '^(>|$)' | grep '='"
BulkData.Profile.[0-9]+.CSVEncoding.RowSeparator="&#13;&#10;" (re)
$ R "ba-cli 'BulkData.Profile.http-csv.CSVEncoding.RowTimestamp="Unix-Epoch"' | grep -v '>' | grep '='"
$ R "ba-cli 'BulkData.Profile.http-csv.CSVEncoding.RowTimestamp="Unix-Epoch"' | grep -Ev '^(>|$)' | grep '='"
BulkData.Profile.[0-9]+.CSVEncoding.RowTimestamp="Unix-Epoch" (re)
Check adding a parameter to be sent in the report:
$ R "ba-cli 'BulkData.Profile.http-csv.Parameter.+{Name="Contacts", Reference="Phonebook.Contact."}' | grep -v '>' | grep '.'"
$ R "ba-cli 'BulkData.Profile.http-csv.Parameter.+{Name="Contacts", Reference="Phonebook.Contact."}' | grep -Ev '^(>|$)' | grep '.'"
BulkData.Profile.[0-9]+.Parameter.[0-9]+. (re)
Check after enabling the configured profile:
$ sleep 5 # wait for object creation
$ R "ba-cli 'BulkData.Profile.http-csv.Enable="true"' | grep -v '>' | grep '='"
$ R "ba-cli 'BulkData.Profile.http-csv.Enable="true"' | grep -Ev '^(>|$)' | grep '='"
BulkData.Profile.[0-9]+.Enable=1 (re)
Check traces:
@ -143,26 +143,26 @@ Check adding an object with MQTT profile:
$ R "ba-cli 'BulkData.Profile.*.-'" > /dev/null
$ R "ba-cli 'BulkData.Profile.+{Alias="mqtt-json", EncodingType="JSON", Name="mqtt-json", Protocol="USPEventNotif", Enable="false", ReportingInterval = 10}' | grep -v '>' | grep 'mqtt-json'"
$ R "ba-cli 'BulkData.Profile.+{Alias="mqtt-json", EncodingType="JSON", Name="mqtt-json", Protocol="USPEventNotif", Enable="false", ReportingInterval = 10}' | grep -Ev '^(>|$)' | grep 'mqtt-json'"
BulkData.Profile.[0-9]+.Alias="mqtt-json" (re)
Check to update JSON object:
$ R "ba-cli 'BulkData.Profile.mqtt-json.JSONEncoding.ReportFormat="ObjectHierarchy"' | grep -v '>' | grep '='"
$ R "ba-cli 'BulkData.Profile.mqtt-json.JSONEncoding.ReportFormat="ObjectHierarchy"' | grep -Ev '^(>|$)' | grep '='"
BulkData.Profile.[0-9]+.JSONEncoding.ReportFormat="ObjectHierarchy" (re)
$ R "ba-cli 'BulkData.Profile.mqtt-json.JSONEncoding.ReportTimestamp="Unix-Epoch"' | grep -v '>' | grep '='"
$ R "ba-cli 'BulkData.Profile.mqtt-json.JSONEncoding.ReportTimestamp="Unix-Epoch"' | grep -Ev '^(>|$)' | grep '='"
BulkData.Profile.[0-9]+.JSONEncoding.ReportTimestamp="Unix-Epoch" (re)
Check adding a parameter to be sent in the report:
$ R "ba-cli 'BulkData.Profile.mqtt-json.Parameter.+{Name="Contacts", Reference="Phonebook.Contact."}' | grep -v '>' | grep '.'"
$ R "ba-cli 'BulkData.Profile.mqtt-json.Parameter.+{Name="Contacts", Reference="Phonebook.Contact."}' | grep -Ev '^(>|$)' | grep '.'"
BulkData.Profile.[0-9]+.Parameter.[0-9]+. (re)
Check after enabling the configured profile:
$ sleep 5 # wait for object creation
$ R "ba-cli 'BulkData.Profile.mqtt-json.Enable="true"' | grep -v '>' | grep '='"
$ R "ba-cli 'BulkData.Profile.mqtt-json.Enable="true"' | grep -Ev '^(>|$)' | grep '='"
BulkData.Profile.[0-9]+.Enable=1 (re)
Check traces:

View File

@ -42,7 +42,7 @@ Disable time synchronization and restart tr181-bulkdata to test BulkData module
Enable BulkData and check object status:
$ R "ba-cli 'Device.BulkData.Enable=1' | grep -v '>' | grep 'Enable'"
$ R "ba-cli 'Device.BulkData.Enable=1' | grep -Ev '^(>|$)' | grep 'Enable'"
Device.BulkData.Enable=1
$ R "ba-cli 'Device.BulkData.Status?' | grep '='"
@ -50,7 +50,7 @@ Enable BulkData and check object status:
Create MQTT client:
$ R "ba-cli 'Device.MQTT.Client.+{Alias=\"local_broker\", BrokerAddress=\"127.0.0.1\", Enable=\"true\"}' | grep -v '>' | grep 'local_broker'"
$ R "ba-cli 'Device.MQTT.Client.+{Alias=\"local_broker\", BrokerAddress=\"127.0.0.1\", Enable=\"true\"}' | grep -Ev '^(>|$)' | grep 'local_broker'"
Device.MQTT.Client.[0-9]+.Alias="local_broker" (re)
$ sleep 1 # Wait for MQTT client to connect and subscribe
@ -64,20 +64,20 @@ Check MQTT client connection status:
Create MQTT profile:
$ R "ba-cli 'Device.BulkData.Profile.+{Alias=\"mqtt_profile\", EncodingType=\"JSON\", Protocol=\"MQTT\", Enable=\"false\", ReportingInterval = 5}' | grep -v '>' | grep 'mqtt_profile'"
$ R "ba-cli 'Device.BulkData.Profile.+{Alias=\"mqtt_profile\", EncodingType=\"JSON\", Protocol=\"MQTT\", Enable=\"false\", ReportingInterval = 5}' | grep -Ev '^(>|$)' | grep 'mqtt_profile'"
Device.BulkData.Profile.[0-9]+.Alias="mqtt_profile" (re)
Set the MQTT parameters:
$ R "ba-cli 'Device.BulkData.Profile.mqtt_profile.MQTT.PublishTopic=\"bulkdata/mqtt_profile\"' | grep -v '>' | grep 'PublishTopic'"
$ R "ba-cli 'Device.BulkData.Profile.mqtt_profile.MQTT.PublishTopic=\"bulkdata/mqtt_profile\"' | grep -Ev '^(>|$)' | grep 'PublishTopic'"
Device.BulkData.Profile.[0-9]+.MQTT.PublishTopic="bulkdata/mqtt_profile" (re)
$ R "ba-cli 'Device.BulkData.Profile.mqtt_profile.MQTT.Reference=\"Device.MQTT.Client.local_broker.\"' | grep -v '>' | grep 'Reference'"
$ R "ba-cli 'Device.BulkData.Profile.mqtt_profile.MQTT.Reference=\"Device.MQTT.Client.local_broker.\"' | grep -Ev '^(>|$)' | grep 'Reference'"
Device.BulkData.Profile.[0-9]+.MQTT.Reference="Device.MQTT.Client.local_broker." (re)
Add new parameters to collect:
$ R "ba-cli 'Device.BulkData.Profile.mqtt_profile.Parameter.+{Name=\"SN\", Reference=\"DeviceInfo.SerialNumber\"}' | grep -v '>' | grep 'Parameter'"
$ R "ba-cli 'Device.BulkData.Profile.mqtt_profile.Parameter.+{Name=\"SN\", Reference=\"DeviceInfo.SerialNumber\"}' | grep -Ev '^(>|$)' | grep 'Parameter'"
Device.BulkData.Profile.[0-9]+.Parameter.[0-9]+. (re)
Start mosquitto_sub in the background to listen for published messages:
@ -89,7 +89,7 @@ Start mosquitto_sub in the background to listen for published messages:
Enable the mqtt profile:
$ R "ba-cli 'Device.BulkData.Profile.mqtt_profile.Enable=\"true\"' | grep -v '>' | grep '='"
$ R "ba-cli 'Device.BulkData.Profile.mqtt_profile.Enable=\"true\"' | grep -Ev '^(>|$)' | grep '='"
Device.BulkData.Profile.[0-9]+.Enable=1 (re)
Wait for 6 seconds:

View File

@ -18,7 +18,7 @@ Check PeriodicFileTransfer profile creation in the data model:
$ R "ba-cli 'Device.PeriodicFileTransfer.Profile+{Alias=\"cram-Profile-1\"}'" > /dev/null
$ R "ba-cli 'Device.PeriodicFileTransfer.Profile.cram-Profile-1.HTTP.URL=\"http://$SERVER_IP:8181\"'" > /dev/null
$ R 'ba-cli "Device.PeriodicFileTransfer.Profile.cram-Profile-1.HTTP.Compression=\"None\""' > /dev/null; sleep 1
$ R 'ba-cli "Device.PeriodicFileTransfer.Profile.cram-Profile-1.?"' | grep -v '>'
$ R 'ba-cli "Device.PeriodicFileTransfer.Profile.cram-Profile-1.?"' | grep -Ev '^(>|$)'
Device.PeriodicFileTransfer.Profile.(.+). (re)
Device.PeriodicFileTransfer.Profile.(.+).Alias="cram-Profile-1" (re)
Device.PeriodicFileTransfer.Profile.(.+).Name="" (re)
@ -37,14 +37,13 @@ Check PeriodicFileTransfer profile creation in the data model:
Device.PeriodicFileTransfer.Profile.(.+).HTTP.RetryMinimumWaitInterval=5 (re)
Device.PeriodicFileTransfer.Profile.(.+).HTTP.URL="http://(.*):8181" (re)
Device.PeriodicFileTransfer.Profile.(.+).HTTP.Username="" (re)
Check PeriodicFileTransfer transfer instance creation:
$ R 'ba-cli "Device.PeriodicFileTransfer.Transfer.+{Alias=\"cram-Transfer-1\", ProfileReference=\"Device.PeriodicFileTransfer.Profile.cram-Profile-1\", Type=\"KernelFaults\"}"' > /dev/null
$ R 'ba-cli "Device.PeriodicFileTransfer.Transfer.cram-Transfer-1.UploadInterval=3600"' > /dev/null
$ R 'ba-cli "Device.PeriodicFileTransfer.Transfer.cram-Transfer-1.Enable=1"' > /dev/null; sleep 1
$ R 'ba-cli "Device.PeriodicFileTransfer.Transfer.cram-Transfer-1.?0"' | grep -v '>'
$ R 'ba-cli "Device.PeriodicFileTransfer.Transfer.cram-Transfer-1.?0"' | grep -Ev '^(>|$)'
Device.PeriodicFileTransfer.Transfer.(.+). (re)
Device.PeriodicFileTransfer.Transfer.(.+).Alias="cram-Transfer-1" (re)
Device.PeriodicFileTransfer.Transfer.(.+).Enable=1 (re)
@ -57,37 +56,33 @@ Check PeriodicFileTransfer transfer instance creation:
Device.PeriodicFileTransfer.Transfer.(.+).Type="KernelFaults" (re)
Device.PeriodicFileTransfer.Transfer.(.+).UploadInterval=3600 (re)
Device.PeriodicFileTransfer.Transfer.(.+).X_PRPLWARE-COM_ForceTransfer=0 (re)
Check PeriodicFileTransfer on demand file upload:
$ R 'ba-cli "Device.PeriodicFileTransfer.Transfer.cram-Transfer-1.ForceTransfer()"' | grep -v '>'; sleep 1
$ R 'ba-cli "Device.PeriodicFileTransfer.Transfer.cram-Transfer-1.ForceTransfer()"' | grep -Ev '^(>|$)'; sleep 1
Device.PeriodicFileTransfer.Transfer.cram-Transfer-1.ForceTransfer() returned
[
{
data = "Transfer ended with error code (0)"
}
]
$ ls /tmp/130-periodicfileuploads/; rm /tmp/130-periodicfileuploads/*
oops.tar
Check PeriodicFileTransfer on demand file upload with GZIP compression:
$ R 'ba-cli "Device.PeriodicFileTransfer.Profile.cram-Profile-1.HTTP.Compression=GZIP"' | grep -v '>'; sleep 1
$ R 'ba-cli "Device.PeriodicFileTransfer.Profile.cram-Profile-1.HTTP.Compression=GZIP"' | grep -Ev '^(>|$)'; sleep 1
Device.PeriodicFileTransfer.Profile.(.+).HTTP. (re)
Device.PeriodicFileTransfer.Profile.(.+).HTTP.Compression="GZIP" (re)
$ R 'ba-cli "Device.PeriodicFileTransfer.Transfer.cram-Transfer-1.ForceTransfer()"' | grep -v '>'
$ R 'ba-cli "Device.PeriodicFileTransfer.Transfer.cram-Transfer-1.ForceTransfer()"' | grep -Ev '^(>|$)'
Device.PeriodicFileTransfer.Transfer.cram-Transfer-1.ForceTransfer() returned
[
{
data = "Transfer ended with error code (0)"
}
]
$ ls /tmp/130-periodicfileuploads/; rm /tmp/130-periodicfileuploads/*
oops.tar
@ -96,10 +91,9 @@ Check PeriodicFileTransfer on demand file upload with GZIP compression:
Check PeriodicFileTransfer periodic upload with configured intervals
$ R 'ba-cli "Device.PeriodicFileTransfer.Transfer.cram-Transfer-1.Enable=0"' > /dev/null
$ R 'ba-cli "Device.PeriodicFileTransfer.Transfer.cram-Transfer-1.UploadInterval=3"' | grep -v '>'; sleep 1
$ R 'ba-cli "Device.PeriodicFileTransfer.Transfer.cram-Transfer-1.UploadInterval=3"' | grep -Ev '^(>|$)'; sleep 1
Device.PeriodicFileTransfer.Transfer.(.+). (re)
Device.PeriodicFileTransfer.Transfer.(.+).UploadInterval=3 (re)
$ R 'ba-cli "Device.PeriodicFileTransfer.Transfer.cram-Transfer-1.Enable=1"' > /dev/null; sleep 7
$ ls /tmp/130-periodicfileuploads/ |wc -l ; rm /tmp/130-periodicfileuploads/*
2
@ -113,7 +107,7 @@ Check PeriodicFileTransfer retry mechanism for failed uploads:
$ R 'ba-cli "Device.PeriodicFileTransfer.Profile.cram-Profile-1.HTTP.RetryIntervalMultiplier=2000"' > /dev/null
$ R 'ba-cli "Device.PeriodicFileTransfer.Profile.cram-Profile-1.HTTP.RetryMinimumWaitInterval=3"' > /dev/null
$ R 'ba-cli "Device.PeriodicFileTransfer.Profile.cram-Profile-1.HTTP.RetryEnable=1"' > /dev/null; sleep 1
$ R 'ba-cli "Device.PeriodicFileTransfer.Profile.cram-Profile-1.?"' | grep -v '>'
$ R 'ba-cli "Device.PeriodicFileTransfer.Profile.cram-Profile-1.?"' | grep -Ev '^(>|$)'
Device.PeriodicFileTransfer.Profile.(.+). (re)
Device.PeriodicFileTransfer.Profile.(.+).Alias="cram-Profile-1" (re)
Device.PeriodicFileTransfer.Profile.(.+).Name="" (re)
@ -132,11 +126,9 @@ Check PeriodicFileTransfer retry mechanism for failed uploads:
Device.PeriodicFileTransfer.Profile.(.+).HTTP.RetryMinimumWaitInterval=3 (re)
Device.PeriodicFileTransfer.Profile.(.+).HTTP.URL="http://(.*):8181" (re)
Device.PeriodicFileTransfer.Profile.(.+).HTTP.Username="" (re)
$ sleep 2
$ R 'ba-cli "Device.PeriodicFileTransfer.Transfer.cram-Transfer-1.Status?0"' | grep -v '>'
$ R 'ba-cli "Device.PeriodicFileTransfer.Transfer.cram-Transfer-1.Status?0"' | grep -Ev '^(>|$)'
Device.PeriodicFileTransfer.Transfer.(.+).Status="Retrying" (re)
$ servefile -u /tmp/130-periodicfileuploads/ -p 8181 >/dev/null 2>&1 &
$ servefile_pid="$!"
$ sleep 6
@ -157,14 +149,13 @@ Check PeriodicFileTransfer over HTTPS:
$ R 'ba-cli "Device.PeriodicFileTransfer.Profile.cram-Profile-1.Protocol=HTTPS"' > /dev/null; sleep 1
$ R 'ba-cli "Device.PeriodicFileTransfer.Profile.cram-Profile-1.HTTP.CABundle=Device.Security.CABundle.cram"' > /dev/null; sleep 1
$ R "ba-cli 'Device.PeriodicFileTransfer.Profile.cram-Profile-1.HTTP.URL=\"https://$SERVER_IP:8181\"'" > /dev/null; sleep 1
$ R 'ba-cli "Device.PeriodicFileTransfer.Transfer.cram-Transfer-1.ForceTransfer()"' | grep -v '>' ; sleep 1
$ R 'ba-cli "Device.PeriodicFileTransfer.Transfer.cram-Transfer-1.ForceTransfer()"' | grep -Ev '^(>|$)' ; sleep 1
Device.PeriodicFileTransfer.Transfer.cram-Transfer-1.ForceTransfer() returned
[
{
data = "Transfer ended with error code (0)"
}
]
Check PeriodicFileTransfer error code reporting for various failure scenarios:
@ -172,7 +163,7 @@ Check PeriodicFileTransfer error code reporting for various failure scenarios:
$ R 'ba-cli "Device.PeriodicFileTransfer.Profile.cram-Profile-1.Protocol=HTTP"' > /dev/null; sleep 1
$ R 'ba-cli "Device.PeriodicFileTransfer.Profile.cram-Profile-1.HTTP.CABundle="' > /dev/null; sleep 1
$ R "ba-cli 'Device.PeriodicFileTransfer.Profile.cram-Profile-1.HTTP.URL=\"http://$SERVER_IP:8181\"'" > /dev/null; sleep 1
$ R 'ba-cli "Device.PeriodicFileTransfer.Transfer.cram-Transfer-1.ForceTransfer()"' | grep -v '>'
$ R 'ba-cli "Device.PeriodicFileTransfer.Transfer.cram-Transfer-1.ForceTransfer()"' | grep -Ev '^(>|$)'
ERROR: call (null) failed with status 1 - unknown error
Device.PeriodicFileTransfer.Transfer.cram-Transfer-1.ForceTransfer() returned
[
@ -180,11 +171,10 @@ Check PeriodicFileTransfer error code reporting for various failure scenarios:
data = "Transfer ended with error code (9015)"
}
]
$ servefile -u /tmp/130-periodicfileuploads/ -p 8181 -a prpl:prpl >/dev/null 2>&1 &
$ servefile_pid="$!"
$ sleep 1
$ R 'ba-cli "Device.PeriodicFileTransfer.Transfer.cram-Transfer-1.ForceTransfer()"' | grep -v '>'; sleep 1
$ R 'ba-cli "Device.PeriodicFileTransfer.Transfer.cram-Transfer-1.ForceTransfer()"' | grep -Ev '^(>|$)'; sleep 1
ERROR: call (null) failed with status 1 - unknown error
Device.PeriodicFileTransfer.Transfer.cram-Transfer-1.ForceTransfer() returned
[
@ -192,14 +182,13 @@ Check PeriodicFileTransfer error code reporting for various failure scenarios:
data = "Transfer ended with error code (9012)"
}
]
$ kill -9 "$servefile_pid"
$ servefile -u /tmp/130-periodicfileuploads/ -p 8181 --ssl >/dev/null 2>&1 &
$ servefile_pid="$!"
$ sleep 1
$ R 'ba-cli "Device.PeriodicFileTransfer.Profile.cram-Profile-1.Protocol=HTTPS"' > /dev/null; sleep 1
$ R "ba-cli 'Device.PeriodicFileTransfer.Profile.cram-Profile-1.HTTP.URL=\"https://$SERVER_IP:8181\"'" > /dev/null; sleep 1
$ R 'ba-cli "Device.PeriodicFileTransfer.Transfer.cram-Transfer-1.ForceTransfer()"' | grep -v '>'; sleep 1
$ R 'ba-cli "Device.PeriodicFileTransfer.Transfer.cram-Transfer-1.ForceTransfer()"' | grep -Ev '^(>|$)'; sleep 1
ERROR: call (null) failed with status 1 - unknown error
Device.PeriodicFileTransfer.Transfer.cram-Transfer-1.ForceTransfer() returned
[
@ -207,7 +196,6 @@ Check PeriodicFileTransfer error code reporting for various failure scenarios:
data = "Transfer ended with error code (9003)"
}
]
Cleanup test instances:

View File

@ -23,23 +23,22 @@ Check read-only parameters:
Check ChangePowerMode function:
$ alias=$(R "ba-cli 'Ethernet.Interface.1.PowerCapability?' | grep -v '>' | grep 'PowerCapability'| sed -E 's/.*PowerCapability=\"([^\"]+)\"/\1/'")
$ alias=$(R "ba-cli 'Ethernet.Interface.1.PowerCapability?' | grep -Ev '^(>|$)' | grep 'PowerCapability'| sed -E 's/.*PowerCapability=\"([^\"]+)\"/\1/'")
$ first=${alias%%,*}
$ R "ba-cli 'Ethernet.Interface.1.ChangePowerMode(PowerState = \"$first\")' | grep -v '>'"
$ R "ba-cli 'Ethernet.Interface.1.ChangePowerMode(PowerState = \"$first\")' | grep -Ev '^(>|$)'"
Ethernet.Interface.1.ChangePowerMode() returned
[
""
]
Check invalid value for ChangePowerMode function:
$ R "ba-cli 'Ethernet.Interface.1.ChangePowerMode(PowerState = "InvalidState")' | grep -v '>' | grep 'ERROR'"
$ R "ba-cli 'Ethernet.Interface.1.ChangePowerMode(PowerState = "InvalidState")' | grep -Ev '^(>|$)' | grep 'ERROR'"
ERROR: call (null) failed with status 1 - unknown error
Check PowerStatus after ChangePowerMode:
$ status=$(R "ba-cli 'Ethernet.Interface.1.PowerStatus?' | grep -v '>' | sed -E 's/.*PowerStatus=\"([^\"]+)\".*/\1/'")
$ status=$(R "ba-cli 'Ethernet.Interface.1.PowerStatus?' | grep -Ev '^(>|$)' | sed -E 's/.*PowerStatus=\"([^\"]+)\".*/\1/'")
$ if [ "$status" = "$first" ]; then
> echo "PowerStatus has been updated successfully"

View File

@ -23,23 +23,22 @@ Check read-only parameters:
Check ChangePowerMode function:
$ alias=$(R "ba-cli 'USB.Port.1.PowerCapability?' | grep -v '>' | grep 'PowerCapability'| sed -E 's/.*PowerCapability=\"([^\"]+)\"/\1/'")
$ alias=$(R "ba-cli 'USB.Port.1.PowerCapability?' | grep -Ev '^(>|$)' | grep 'PowerCapability'| sed -E 's/.*PowerCapability=\"([^\"]+)\"/\1/'")
$ first=${alias%%,*}
$ R "ba-cli 'USB.Port.1.ChangePowerMode(PowerState = \"$first\")' | grep -v '>'"
$ R "ba-cli 'USB.Port.1.ChangePowerMode(PowerState = \"$first\")' | grep -Ev '^(>|$)'"
USB.Port.1.ChangePowerMode() returned
[
""
]
Check invalid value for ChangePowerMode function:
$ R "ba-cli 'USB.Port.1.ChangePowerMode(PowerState = "InvalidState")' | grep -v '>' | grep 'ERROR'"
$ R "ba-cli 'USB.Port.1.ChangePowerMode(PowerState = "InvalidState")' | grep -Ev '^(>|$)' | grep 'ERROR'"
ERROR: call (null) failed with status 10 - invalid value
Check PowerStatus after ChangePowerMode:
$ status=$(R "ba-cli 'USB.Port.1.PowerStatus?' | grep -v '>' | sed -E 's/.*PowerStatus=\"([^\"]+)\".*/\1/'")
$ status=$(R "ba-cli 'USB.Port.1.PowerStatus?' | grep -Ev '^(>|$)' | sed -E 's/.*PowerStatus=\"([^\"]+)\".*/\1/'")
$ if [ "$status" = "$first" ]; then
> echo "PowerStatus has been updated successfully"

View File

@ -18,12 +18,12 @@ Add a dummy PowerSensor instance and restart the tr181-powerstatus service:
Check the current number of PowerSensor instances:
$ R "ba-cli 'PowerStatus.PowerSensorNumberOfEntries?' | grep -v '>' | grep '='"
$ R "ba-cli 'PowerStatus.PowerSensorNumberOfEntries?' | grep -Ev '^(>|$)' | grep '='"
PowerStatus.PowerSensorNumberOfEntries=[0-9]+ (re)
Check the dummy PowerSensor instance:
$ R "ba-cli 'PowerStatus.PowerSensor.[Alias==\"dummy-sensor\"].?' | grep -v '>' | grep '=' | sort"
$ R "ba-cli 'PowerStatus.PowerSensor.[Alias==\"dummy-sensor\"].?' | grep -Ev '^(>|$)' | grep '=' | sort"
PowerStatus.PowerSensor.[0-9]+.Alias="dummy-sensor" (re)
PowerStatus.PowerSensor.[0-9]+.Current=0 (re)
PowerStatus.PowerSensor.[0-9]+.Enable=0 (re)
@ -35,7 +35,7 @@ Check the dummy PowerSensor instance:
Disable the dummy PowerSensor instance:
$ R "ba-cli 'PowerStatus.PowerSensor.[Alias==\"dummy-sensor\"].Enable=0' | grep -v '>' | grep '='"
$ R "ba-cli 'PowerStatus.PowerSensor.[Alias==\"dummy-sensor\"].Enable=0' | grep -Ev '^(>|$)' | grep '='"
PowerStatus.PowerSensor.[0-9]+.Enable=0 (re)
Check the status of dummy PowerSensor instance:
@ -45,7 +45,7 @@ Check the status of dummy PowerSensor instance:
Enable the dummy PowerSensor instance:
$ R "ba-cli 'PowerStatus.PowerSensor.[Alias==\"dummy-sensor\"].Enable=1' | grep -v '>' | grep '='"
$ R "ba-cli 'PowerStatus.PowerSensor.[Alias==\"dummy-sensor\"].Enable=1' | grep -Ev '^(>|$)' | grep '='"
PowerStatus.PowerSensor.[0-9]+.Enable=1 (re)
Check the status of dummy PowerSensor instance:
@ -61,13 +61,13 @@ Create a mock power file and verify the sensor becomes enabled:
Configure protected parameters and enable the sensor:
$ R "ba-cli 'PowerStatus.PowerSensor.[Alias==\"dummy-sensor\"].PowerPath=\"/tmp/mock_power\"' | grep -v '>' | grep '='"
$ R "ba-cli 'PowerStatus.PowerSensor.[Alias==\"dummy-sensor\"].PowerPath=\"/tmp/mock_power\"' | grep -Ev '^(>|$)' | grep '='"
PowerStatus.PowerSensor.[0-9]+.PowerPath="/tmp/mock_power" (re)
$ R "ba-cli 'PowerStatus.PowerSensor.[Alias==\"dummy-sensor\"].PollingInterval=1' | grep -v '>' | grep '='"
$ R "ba-cli 'PowerStatus.PowerSensor.[Alias==\"dummy-sensor\"].PollingInterval=1' | grep -Ev '^(>|$)' | grep '='"
PowerStatus.PowerSensor.[0-9]+.PollingInterval=1 (re)
$ R "ba-cli 'PowerStatus.PowerSensor.[Alias==\"dummy-sensor\"].Enable=1' | grep -v '>' | grep '='"
$ R "ba-cli 'PowerStatus.PowerSensor.[Alias==\"dummy-sensor\"].Enable=1' | grep -Ev '^(>|$)' | grep '='"
PowerStatus.PowerSensor.[0-9]+.Enable=1 (re)
Check the status of dummy PowerSensor instance:

View File

@ -4,7 +4,7 @@ Create R alias:
Check GetBusStats() function:
$ R "ba-cli 'DeviceInfo.GetBusStats()' | grep -v '>'"
$ R "ba-cli 'DeviceInfo.GetBusStats()' | grep -Ev '^(>|$)'"
DeviceInfo.GetBusStats() returned
[
{
@ -102,7 +102,6 @@ Check GetBusStats() function:
}
}
]
Check stats after doing an action:

View File

@ -51,13 +51,13 @@ Check that we have expected datamodel:
Verify ScheduleNumberOfEntries is updated correctly:
$ R "ba-cli Device.Schedules.ScheduleNumberOfEntries?" | tail -n +2 | head -n -1
$ R "ba-cli Device.Schedules.ScheduleNumberOfEntries?" | grep -Ev '^(>|$)'
Device.Schedules.ScheduleNumberOfEntries=2
Verify all Schedules.Schedule.*.Status parameters are set to StackDisabled
$ R "ba-cli Device.Schedules.Enable=0" > /dev/null 2>&1
$ R "ba-cli Device.Schedules.Schedule.*.Status?" | tail -n +2 | sed -E 's/\.Schedule\.[0-9]+\./.Schedule.X./' | head -n -1
$ R "ba-cli Device.Schedules.Schedule.*.Status?" | grep -Ev '^(>|$)' | sed -E 's/\.Schedule\.[0-9]+\./.Schedule.X./'
Device.Schedules.Schedule.X.Status="StackDisabled"
Device.Schedules.Schedule.X.Status="StackDisabled"
@ -65,7 +65,7 @@ Verify all Schedules.Schedule.*.Status parameters are set to Disabled
$ R "ba-cli Device.Schedules.Enable=1" > /dev/null 2>&1
$ R "ba-cli Device.Schedules.Schedule.*.Enable=0" > /dev/null 2>&1
$ R "ba-cli Device.Schedules.Schedule.*.Status?" | tail -n +2 | sed -E 's/\.Schedule\.[0-9]+\./.Schedule.X./' | head -n -1
$ R "ba-cli Device.Schedules.Schedule.*.Status?" | grep -Ev '^(>|$)' | sed -E 's/\.Schedule\.[0-9]+\./.Schedule.X./'
Device.Schedules.Schedule.X.Status="X_PRPLWARE-COM_Disabled"
Device.Schedules.Schedule.X.Status="X_PRPLWARE-COM_Disabled"
@ -76,12 +76,11 @@ Test InverseMode functionality:
$ R "ba-cli ${SCHEDULE_PATH_WH}.InverseMode?"
* (glob)
Device.Schedules.Schedule.*.InverseMode=0 (glob)
* (glob)
Verify initial status and TimeLeft (InverseMode=0):
$ INITIAL_STATUS=$(R "ba-cli ${SCHEDULE_PATH_WH}.Status?" | tail -n +2 | head -n -1 | cut -d= -f2 | tr -d '"')
$ INITIAL_TIMELEFT=$(R "ba-cli ${SCHEDULE_PATH_WH}.TimeLeft?" | tail -n +2 | head -n -1 | cut -d= -f2)
$ INITIAL_STATUS=$(R "ba-cli ${SCHEDULE_PATH_WH}.Status?" | grep -Ev '^(>|$)' | cut -d= -f2 | tr -d '"')
$ INITIAL_TIMELEFT=$(R "ba-cli ${SCHEDULE_PATH_WH}.TimeLeft?" | grep -Ev '^(>|$)' | cut -d= -f2)
$ [ ${INITIAL_TIMELEFT} -ge 0 ]
Enable InverseMode and verify status changes:
@ -90,11 +89,10 @@ Enable InverseMode and verify status changes:
$ R "ba-cli ${SCHEDULE_PATH_WH}.InverseMode?"
* (glob)
Device.Schedules.Schedule.*.InverseMode=1 (glob)
* (glob)
Verify status is inverted:
$ INVERSE_STATUS=$(R "ba-cli ${SCHEDULE_PATH_WH}.Status?" | tail -n +2 | head -n -1 | cut -d= -f2 | tr -d '"')
$ INVERSE_STATUS=$(R "ba-cli ${SCHEDULE_PATH_WH}.Status?" | grep -Ev '^(>|$)' | cut -d= -f2 | tr -d '"')
$ [ "${INITIAL_STATUS}" != "${INVERSE_STATUS}" ]
Disable InverseMode again:
@ -106,28 +104,27 @@ Test Duration and TimeLeft:
$ R "ba-cli ${SCHEDULE_PATH_WH}.Duration?"
* (glob)
Device.Schedules.Schedule.*.Duration=32400 (glob)
* (glob)
Verify TimeLeft is a non-negative integer:
$ TIMELEFT=$(R "ba-cli ${SCHEDULE_PATH_WH}.TimeLeft?" | tail -n +2 | head -n -1 | cut -d= -f2)
$ TIMELEFT=$(R "ba-cli ${SCHEDULE_PATH_WH}.TimeLeft?" | grep -Ev '^(>|$)' | cut -d= -f2)
$ [ ${TIMELEFT} -ge 0 ]
Verify TimeLeft changes over time:
$ sleep 2
$ TIMELEFT2=$(R "ba-cli ${SCHEDULE_PATH_WH}.TimeLeft?" | tail -n +2 | head -n -1 | cut -d= -f2)
$ TIMELEFT2=$(R "ba-cli ${SCHEDULE_PATH_WH}.TimeLeft?" | grep -Ev '^(>|$)' | cut -d= -f2)
$ [ ${TIMELEFT2} -ge 0 ]
Verify TimeLeft is within valid range (0 to Duration):
$ TIMELEFT_ACTUAL=$(R "ba-cli ${SCHEDULE_PATH_WH}.TimeLeft?" | tail -n +2 | head -n -1 | cut -d= -f2)
$ DURATION=$(R "ba-cli ${SCHEDULE_PATH_WH}.Duration?" | tail -n +2 | head -n -1 | cut -d= -f2)
$ TIMELEFT_ACTUAL=$(R "ba-cli ${SCHEDULE_PATH_WH}.TimeLeft?" | grep -Ev '^(>|$)' | cut -d= -f2)
$ DURATION=$(R "ba-cli ${SCHEDULE_PATH_WH}.Duration?" | grep -Ev '^(>|$)' | cut -d= -f2)
$ [ ${TIMELEFT_ACTUAL} -ge 0 ] && [ ${TIMELEFT_ACTUAL} -le $((DURATION + 86400)) ]
Test Schedule deletion and cleanup:
$ R "ba-cli Device.Schedules.ScheduleNumberOfEntries?" | tail -n +2 | head -n -1
$ R "ba-cli Device.Schedules.ScheduleNumberOfEntries?" | grep -Ev '^(>|$)'
Device.Schedules.ScheduleNumberOfEntries=2
Delete the first schedule:
@ -136,7 +133,7 @@ Delete the first schedule:
Verify ScheduleNumberOfEntries is decremented:
$ R "ba-cli Device.Schedules.ScheduleNumberOfEntries?" | tail -n +2 | head -n -1
$ R "ba-cli Device.Schedules.ScheduleNumberOfEntries?" | grep -Ev '^(>|$)'
Device.Schedules.ScheduleNumberOfEntries=1
Delete the remaining schedule:
@ -145,5 +142,5 @@ Delete the remaining schedule:
Verify ScheduleNumberOfEntries is now 0:
$ R "ba-cli Device.Schedules.ScheduleNumberOfEntries?" | tail -n +2 | head -n -1
$ R "ba-cli Device.Schedules.ScheduleNumberOfEntries?" | grep -Ev '^(>|$)'
Device.Schedules.ScheduleNumberOfEntries=0

View File

@ -48,7 +48,7 @@ Check AccessControl initial state:
Find the LAN test device in Hosts datamodel:
$ R "ba-cli Device.Hosts.HostNumberOfEntries?" | tail -n +2 | head -n -1
$ R "ba-cli Device.Hosts.HostNumberOfEntries?" | grep -Ev '^(>|$)'
Device.Hosts.HostNumberOfEntries=\d+ (re)
Get our LAN IP address from the LAN interface:
@ -57,12 +57,12 @@ Get our LAN IP address from the LAN interface:
Get MAC address of this LAN test device from Hosts datamodel:
$ HOST_MAC=$(R "ba-cli 'Device.Hosts.Host.[IPAddress==\"${MY_IP}\"].PhysAddress?' | grep -v '^>' | grep -v '^root' | grep -v '^$' | head -1 | cut -d'=' -f2 | tr -d '\"'" 2>/dev/null)
$ HOST_MAC=$(R "ba-cli 'Device.Hosts.Host.[IPAddress==\"${MY_IP}\"].PhysAddress?' | grep -Ev '^(>|$)' | grep -v '^root' | grep -v '^$' | head -1 | cut -d'=' -f2 | tr -d '\"'" 2>/dev/null)
Set PhysAddress for the AccessControl using the discovered MAC:
$ R "ba-cli ${AC_PATH}.PhysAddress='${HOST_MAC}'" > /dev/null 2>&1
$ R "ba-cli ${AC_PATH}.PhysAddress?" | tail -n +2 | head -n -1
$ R "ba-cli ${AC_PATH}.PhysAddress?" | grep -Ev '^(>|$)'
Device.Hosts.AccessControl.*.PhysAddress="([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}" (re)
Verify baseline connectivity before access control:
@ -86,7 +86,7 @@ Link the schedule to AccessControl via ScheduleRef:
Verify ScheduleRef is set:
$ R "ba-cli ${AC_PATH}.ScheduleRef?" | tail -n +2 | head -n -1
$ R "ba-cli ${AC_PATH}.ScheduleRef?" | grep -Ev '^(>|$)'
Device.Hosts.AccessControl.*.ScheduleRef="Device.Schedules.Schedule.*" (glob)
Enable the AccessControl:
@ -113,12 +113,12 @@ Verify AccessControl is enabled with schedule:
Check Schedule status:
$ R "ba-cli ${SCHED_PATH}.Status?" | tail -n +2 | head -n -1
$ R "ba-cli ${SCHED_PATH}.Status?" | grep -Ev '^(>|$)'
Device.Schedules.Schedule.*.Status="Active" (glob)
Check Schedule TimeLeft:
$ TIMELEFT=$(R "ba-cli ${SCHED_PATH}.TimeLeft?" | tail -n +2 | head -n -1 | cut -d= -f2)
$ TIMELEFT=$(R "ba-cli ${SCHED_PATH}.TimeLeft?" | grep -Ev '^(>|$)' | cut -d= -f2)
$ [ ${TIMELEFT} -ge 0 ]
Test connectivity with AccessControl and Schedule enabled:
@ -129,10 +129,10 @@ Test connectivity with AccessControl and Schedule enabled:
Test InverseMode effect on schedule and access:
$ INITIAL_STATUS=$(R "ba-cli ${SCHED_PATH}.Status?" | tail -n +2 | head -n -1 | cut -d= -f2 | tr -d '"')
$ INITIAL_STATUS=$(R "ba-cli ${SCHED_PATH}.Status?" | grep -Ev '^(>|$)' | cut -d= -f2 | tr -d '"')
$ R "ba-cli ${SCHED_PATH}.InverseMode=1" > /dev/null 2>&1
$ sleep 5
$ INVERSE_STATUS=$(R "ba-cli ${SCHED_PATH}.Status?" | tail -n +2 | head -n -1 | cut -d= -f2 | tr -d '"')
$ INVERSE_STATUS=$(R "ba-cli ${SCHED_PATH}.Status?" | grep -Ev '^(>|$)' | cut -d= -f2 | tr -d '"')
$ [ "${INITIAL_STATUS}" != "${INVERSE_STATUS}" ]
Test ping after InverseMode enabled (should be blocked):
@ -153,7 +153,7 @@ Reset InverseMode and verify connectivity restored:
Change AccessPolicy to Deny and test:
$ R "ba-cli ${AC_PATH}.AccessPolicy=Deny" > /dev/null 2>&1
$ R "ba-cli ${AC_PATH}.AccessPolicy?" | tail -n +2 | head -n -1
$ R "ba-cli ${AC_PATH}.AccessPolicy?" | grep -Ev '^(>|$)'
Device.Hosts.AccessControl.*.AccessPolicy="Deny" (glob)
$ sleep 5
@ -173,12 +173,12 @@ Delete the schedule and verify cleanup:
Verify ScheduleRef is cleared in AccessControl:
$ R "ba-cli ${AC_PATH}.ScheduleRef?" | tail -n +2 | head -n -1
$ R "ba-cli ${AC_PATH}.ScheduleRef?" | grep -Ev '^(>|$)'
Device.Hosts.AccessControl.*.ScheduleRef="" (glob)
Verify ScheduleNumberOfEntries is back to 0:
$ R "ba-cli Device.Schedules.ScheduleNumberOfEntries?" | tail -n +2 | head -n -1
$ R "ba-cli Device.Schedules.ScheduleNumberOfEntries?" | grep -Ev '^(>|$)'
Device.Schedules.ScheduleNumberOfEntries=0
Cleanup - Delete the AccessControl entry:
@ -187,7 +187,7 @@ Cleanup - Delete the AccessControl entry:
Verify AccessControlNumberOfEntries is decremented:
$ R "ba-cli Device.Hosts.AccessControlNumberOfEntries?" | tail -n +2 | head -n -1
$ R "ba-cli Device.Hosts.AccessControlNumberOfEntries?" | grep -Ev '^(>|$)'
Device.Hosts.AccessControlNumberOfEntries=0
Test if connectivity is back:
@ -195,4 +195,3 @@ Test if connectivity is back:
$ R "iptables -L FORWARD_Hosts_Block -n | grep -ic ${HOST_MAC}"
0
[1]

View File

@ -5,12 +5,12 @@ Create R alias:
Check initial DHCPv6Client configuration:
$ R "ba-cli 'DHCPv6Client.Client.1.Enable?' | grep -v '>' | grep 'Enable'"
$ R "ba-cli 'DHCPv6Client.Client.1.Enable?' | grep -Ev '^(>|$)' | grep 'Enable'"
DHCPv6Client.Client.1.Enable=1
Check current ForceSolicitPolicy value:
$ R "ba-cli 'DHCPv6Client.Client.1.X_PRPLWARE-COM_ForceSolicitPolicy?' | grep -v '>' | grep 'ForceSolicitPolicy'"
$ R "ba-cli 'DHCPv6Client.Client.1.X_PRPLWARE-COM_ForceSolicitPolicy?' | grep -Ev '^(>|$)' | grep 'ForceSolicitPolicy'"
DHCPv6Client.Client.1.X_PRPLWARE-COM_ForceSolicitPolicy=0
Start tcpdump in background to capture DHCPv6 packets on testbed WAN interface:
@ -31,7 +31,7 @@ Enable ForceSolicitPolicy to trigger DHCPv6 Solicit message ( a restart of the c
Verify the parameter was set correctly:
$ R "ba-cli 'DHCPv6Client.Client.1.X_PRPLWARE-COM_ForceSolicitPolicy?' | grep -v '>' | grep 'ForceSolicitPolicy'"
$ R "ba-cli 'DHCPv6Client.Client.1.X_PRPLWARE-COM_ForceSolicitPolicy?' | grep -Ev '^(>|$)' | grep 'ForceSolicitPolicy'"
DHCPv6Client.Client.1.X_PRPLWARE-COM_ForceSolicitPolicy=1
Wait for DHCPv6 Solicit message to be sent and captured:
@ -53,5 +53,5 @@ Reset ForceSolicitPolicy to original value:
Verify reset:
$ R "ba-cli 'DHCPv6Client.Client.1.X_PRPLWARE-COM_ForceSolicitPolicy?' | grep -v '>' | grep 'ForceSolicitPolicy'"
$ R "ba-cli 'DHCPv6Client.Client.1.X_PRPLWARE-COM_ForceSolicitPolicy?' | grep -Ev '^(>|$)' | grep 'ForceSolicitPolicy'"
DHCPv6Client.Client.1.X_PRPLWARE-COM_ForceSolicitPolicy=0

View File

@ -0,0 +1,53 @@
Create R alias:
$ alias R="${CRAM_REMOTE_COMMAND:-}"
Check that one-shot positional ba-cli commands do not consume inherited stdin:
$ R " \
> rm -f /tmp/test-ba-cli-stdin.out; \
> printf '%s\n' 'BA_CLI_STDIN_SENTINEL' | ba-cli -- help > /tmp/test-ba-cli-stdin.out 2>&1; \
> if grep -q 'BA_CLI_STDIN_SENTINEL' /tmp/test-ba-cli-stdin.out; then \
> echo stdin-consumed; \
> else \
> echo stdin-preserved; \
> fi \
> " </dev/null
stdin-preserved
Check that one-shot positional ba-cli commands do not wait for open stdin:
$ R " \
> rm -f /tmp/test-ba-cli-open-stdin.fifo /tmp/test-ba-cli-open-stdin.out /tmp/test-ba-cli-open-stdin.rc; \
> mkfifo /tmp/test-ba-cli-open-stdin.fifo; \
> (sleep 5 > /tmp/test-ba-cli-open-stdin.fifo) & writer=\$!; \
> (ba-cli -- help < /tmp/test-ba-cli-open-stdin.fifo > /tmp/test-ba-cli-open-stdin.out 2>&1; echo \$? > /tmp/test-ba-cli-open-stdin.rc) & cli=\$!; \
> for _ in 1 2 3; do [ -s /tmp/test-ba-cli-open-stdin.rc ] && break; sleep 1; done; \
> if [ ! -s /tmp/test-ba-cli-open-stdin.rc ]; then \
> kill \$cli 2>/dev/null || true; \
> echo positional-hung; \
> else \
> echo positional-exited; \
> fi; \
> kill \$writer 2>/dev/null || true; \
> rm -f /tmp/test-ba-cli-open-stdin.fifo /tmp/test-ba-cli-open-stdin.rc \
> " </dev/null
positional-exited
Check that explicit automated stdin-script mode still reads stdin:
$ R " \
> rm -f /tmp/test-ba-cli-automated-stdin.out /tmp/test-ba-cli-automated-stdin.rc; \
> (printf '%s\n' '!amx exit' | ba-cli -a > /tmp/test-ba-cli-automated-stdin.out 2>&1; echo \$? > /tmp/test-ba-cli-automated-stdin.rc) & cli=\$!; \
> for _ in 1 2 3; do [ -s /tmp/test-ba-cli-automated-stdin.rc ] && break; sleep 1; done; \
> if [ ! -s /tmp/test-ba-cli-automated-stdin.rc ]; then \
> kill \$cli 2>/dev/null || true; \
> echo automated-stdin-hung; \
> elif [ \"\$(cat /tmp/test-ba-cli-automated-stdin.rc)\" = 0 ]; then \
> echo automated-stdin-exited; \
> else \
> echo automated-stdin-failed; \
> fi; \
> rm -f /tmp/test-ba-cli-automated-stdin.rc \
> " </dev/null
automated-stdin-exited

View File

@ -11,13 +11,11 @@ Set-up the test configuration:
$ R "${S} && add_user_role --rolename full_caps --capabilities \"CAP_AUDIT_CONTROL,CAP_AUDIT_READ,CAP_AUDIT_WRITE,CAP_BLOCK_SUSPEND,CAP_BPF,CAP_CHECKPOINT_RESTORE,CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_DAC_READ_SEARCH,CAP_FOWNER,CAP_FSETID,CAP_IPC_LOCK,CAP_IPC_OWNER,CAP_KILL,CAP_LEASE,CAP_LINUX_IMMUTABLE,CAP_MAC_ADMIN,CAP_MAC_OVERRIDE,CAP_MKNOD,CAP_NET_ADMIN,CAP_NET_BIND_SERVICE,CAP_NET_BROADCAST,CAP_NET_RAW,CAP_PERFMON,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_ADMIN,CAP_SYS_BOOT,CAP_SYS_CHROOT,CAP_SYS_MODULE,CAP_SYS_NICE,CAP_SYS_PACCT,CAP_SYS_PTRACE,CAP_SYS_RAWIO,CAP_SYS_RESOURCE,CAP_SYS_TIME,CAP_SYS_TTY_CONFIG,CAP_SYSLOG,CAP_WAKE_ALARM\""
{"Device.Users.Role.*.":{"Alias":"full_caps","RoleName":"full_caps"}} (glob)
$ R "${S} && set_ee_roles --userroles \"full_caps\""
SoftwareModules.ExecEnv.1.ModifyAvailableRoles() returned
["",{"err_code":0,"err_msg":""}]
### PRIVILEGED CONTAINER SECTION ###
Install the container and check its status:
@ -111,13 +109,11 @@ Remove the role from the ExecutionEnvironment
SoftwareModules.ExecEnv.1.ModifyAvailableRoles() returned
["",{"err_code":0,"err_msg":""}]
Remove full_caps from Devices.User.Role
$ R "${S} && remove_user_role --rolename full_caps"
["Device.Users.Role.*."] (glob)
Cleanup test environment:

View File

@ -65,7 +65,6 @@ Remove the role foo from the EE and check it cannot be used to install a contain
ERROR: call (null) failed with status 1 - unknown error
SoftwareModules.InstallDU() returned
["",{"err_code":7032,"err_msg":"Role not found in 'Device.LocalAgent.ControllerTrust.Role.' or in the 'AvailableRoles': 'foo'"}]
Container with UUID=00000000-0000-5000-b000-000000000001 is not found

View File

@ -13,12 +13,10 @@ Create user roles with capabilities
$ R "${S} && add_user_role --rolename testrole1 --capabilities \"CAP_NET_RAW,CAP_MKNOD\""
{"Device.Users.Role.*.":{"Alias":"testrole1","RoleName":"testrole1"}} (glob)
$ R "${S} && add_user_role --rolename testrole2 --capabilities \"CAP_KILL\""
{"Device.Users.Role.*.":{"Alias":"testrole2","RoleName":"testrole2"}} (glob)
Add two user roles to the ExecutionEnvironment
@ -26,7 +24,6 @@ Add two user roles to the ExecutionEnvironment
SoftwareModules.ExecEnv.1.ModifyAvailableRoles() returned
["",{"err_code":0,"err_msg":""}]
Two roles will be added
$ R "${S} && check_available_user_roles"
@ -39,7 +36,6 @@ Add three user roles to the ExecutionEnvironment, this should fail since one rol
ERROR: call (null) failed with status 1 - unknown error
SoftwareModules.ExecEnv.1.ModifyAvailableRoles() returned
["",{"err_code":7004,"err_msg":"User role [norole] does not exist in Device.Users.Role."}]
Two roles should still be present
$ R "${S} && check_available_user_roles"
@ -51,7 +47,6 @@ Install a privileged container without required user
SoftwareModules.InstallDU() returned
["",{"err_code":0,"err_msg":""}]
Check that the container has no capabilities
$ R "${S} && execute_in_container --uuid --cmd 'grep CapEff /proc/1/status'"
@ -68,7 +63,6 @@ Install an unprivileged container without required user
SoftwareModules.InstallDU() returned
["",{"err_code":0,"err_msg":""}]
Check that the container has no capabilities
$ R "${S} && execute_in_container --uuid --cmd 'grep CapEff /proc/1/status'"
@ -86,7 +80,6 @@ Install a container with user role that is not available. this should fail
ERROR: call (null) failed with status 1 - unknown error
SoftwareModules.InstallDU() returned
["",{"err_code":7037,"err_msg":"Sandbox [generic] does not have the required role [norole]"}]
Install a container with user role that is available. this should succeed
@ -94,7 +87,6 @@ Install a container with user role that is available. this should succeed
SoftwareModules.InstallDU() returned
["",{"err_code":0,"err_msg":""}]
Check that the container has the required capabilities
@ -112,7 +104,6 @@ Update the container to also require testrole2
SoftwareModules.DeploymentUnit.*.Update() returned (glob)
["",{"err_code":0,"err_msg":""}]
Check that the container has the required capabilities
@ -130,14 +121,12 @@ Try removing active testrole2 from Devices.User.Role
$ R "${S} && remove_user_role --rolename testrole2"
ERROR: del Device.Users.Role.[Alias=="testrole2"]. failed * (glob)
Update the container to use no user roles
$ R "${S} && update_ctr --version prplos-v1 --ee --uuid --privileged true --userroles"
SoftwareModules.DeploymentUnit.*.Update() returned (glob)
["",{"err_code":0,"err_msg":""}]
$ R "${S} && get_container_parameter --uuid --param RequiredUserRoles"
@ -151,7 +140,6 @@ Update the container to also require testrole2
SoftwareModules.DeploymentUnit.*.Update() returned (glob)
["",{"err_code":0,"err_msg":""}]
$ R "${S} && get_container_parameter --uuid --param RequiredUserRoles"
Device.Users.Role.[RoleName=="testrole1"]
@ -161,7 +149,6 @@ Update the container without required users parameter
SoftwareModules.DeploymentUnit.*.Update() returned (glob)
["",{"err_code":0,"err_msg":""}]
Previously configured user role should still be present
$ R "${S} && get_container_parameter --uuid --param RequiredUserRoles"
@ -177,7 +164,6 @@ Remove the role again from the ExecutionEnvironment
SoftwareModules.ExecEnv.1.ModifyAvailableRoles() returned
["",{"err_code":0,"err_msg":""}]
No user roles should be present
$ R "${S} && check_available_user_roles"
@ -186,10 +172,8 @@ Remove testrole1 from Devices.User.Role
$ R "${S} && remove_user_role --rolename testrole1"
["Device.Users.Role.*."] (glob)
Remove testrole2 from Devices.User.Role
$ R "${S} && remove_user_role --rolename testrole2"
["Device.Users.Role.*."] (glob)

View File

@ -20,13 +20,11 @@ Add the source
$ R "ba-cli -l -j 'Device.Syslog.Source.+{Alias = \"C-1-1\", UnixDomainSocket.Enable = 1, UnixDomainSocket.Path = \"file:///tmp/volatile.sock\"}'"
{"Device.Syslog.Source.*.":{"Alias":"C-1-1"}} (glob)
Add the action
$ R "ba-cli -l -j 'Device.Syslog.Action.+{Alias = \"C-1-1\", SourceRef = \"Device.Syslog.Source.[ Alias == \\\"C-1-1\\\" ]\", LogFile.Enable = 1, LogFile.FilePath = \"file:///tmp/volatile.log\"}'"
{"Device.Syslog.Action.*.":{"Alias":"C-1-1"}} (glob)
Sleep so the socket can be created
$ R "sleep 1"
@ -41,12 +39,10 @@ Remove the added Source and Action
$ R "ba-cli -l -j 'Device.Syslog.Action.[Alias == \"C-1-1\"].-'"
["Device.Syslog.Action.*.","Device.Syslog.Action.*.LogFile.","Device.Syslog.Action.*.LogRemote."] (glob)
$ R "ba-cli -l -j 'Device.Syslog.Source.[Alias == \"C-1-1\"].-'"
["Device.Syslog.Source.*.","Device.Syslog.Source.*.Network.","Device.Syslog.Source.*.UnixDomainSocket."] (glob)
C-1-2 test /lcm/volatile_log.sock
#################################
@ -55,13 +51,11 @@ Add the source
$ R "ba-cli -l -j 'Device.Syslog.Source.+{Alias = \"C-1-2\", UnixDomainSocket.Enable = 1, UnixDomainSocket.Path = \"file:///lcm/volatile.sock\"}'"
{"Device.Syslog.Source.*.":{"Alias":"C-1-2"}} (glob)
Add the action
$ R "ba-cli -l -j 'Device.Syslog.Action.+{Alias = \"C-1-2\", SourceRef = \"Device.Syslog.Source.[ Alias == \\\"C-1-2\\\" ]\", LogFile.Enable = 1, LogFile.FilePath = \"file:///lcm/volatile.log\"}'"
{"Device.Syslog.Action.*.":{"Alias":"C-1-2"}} (glob)
Sleep so the socket can be created
$ R "sleep 1"
@ -76,12 +70,10 @@ Remove the add Source and Action
$ R "ba-cli -l -j 'Device.Syslog.Action.[Alias == \"C-1-2\"].-'"
["Device.Syslog.Action.*.","Device.Syslog.Action.*.LogFile.","Device.Syslog.Action.*.LogRemote."] (glob)
$ R "ba-cli -l -j 'Device.Syslog.Source.[Alias == \"C-1-2\"].-'"
["Device.Syslog.Source.*.","Device.Syslog.Source.*.Network.","Device.Syslog.Source.*.UnixDomainSocket."] (glob)
C-2: Test Syslog Plugin Default Configuration
@ -106,7 +98,6 @@ Create the container
SoftwareModules.InstallDU() returned
["",{"err_code":0,"err_msg":""}]
Check the syslog source
$ R "ba-cli -l -j \"Device.Syslog.Source.[ Alias == \\\"cpe-917362a3-86e8-5332-bcfd-a4223f0e65e6\\\"].UnixDomainSocket.?\" | jsonfilter -e @[*].*.Enable -e @[*].*.Path"
@ -202,7 +193,6 @@ Create the container
SoftwareModules.InstallDU() returned
["",{"err_code":0,"err_msg":""}]
Check the syslog source
$ R "ba-cli -l -j \"Device.Syslog.Source.[ Alias == \\\"cpe-917362a3-86e8-5332-bcfd-a4223f0e65e6\\\"].UnixDomainSocket.?\" | jsonfilter -e @[*].*.Enable -e @[*].*.Path"

View File

@ -12,12 +12,10 @@ Set-up the test configuration:
SoftwareModules.InstallDU() returned
["",{"err_code":0,"err_msg":""}]
$ R "${S} && install_ctr --version prplos-v2 --ee --uuid \"00000000-0000-5000-b000-000000000006\" --privileged true"
SoftwareModules.InstallDU() returned
["",{"err_code":0,"err_msg":""}]
$ R "rm -rf /usr/rlyeh_save"
$ R "cp -R /lcm/rlyeh /usr/rlyeh_save"
$ R "ba-cli 'SoftwareModules.DeploymentUnit.*.Uninstall()'"
@ -30,7 +28,6 @@ Set-up the test configuration:
[
""
]
$ R "/etc/init.d/cthulhu stop"
$ R "/etc/init.d/rlyeh stop"
$ R "/etc/init.d/timingila stop"
@ -75,19 +72,15 @@ wait for cthulhu to terminate all containers and itself, before clear its data
$ R "ba-cli -l 'Device.SoftwareModules.DeploymentUnitNumberOfEntries?'"
0
$ R "ba-cli -l 'Device.SoftwareModules.ExecEnvNumberOfEntries?'"
1
$ R "ba-cli -l 'Device.SoftwareModules.ExecutionUnitNumberOfEntries?'"
0
$ R "ba-cli 'Device.SoftwareModules.ExecEnv.1.Status?'"
? Device.SoftwareModules.ExecEnv.1.Status? (glob)
Device.SoftwareModules.ExecEnv.1.Status="Up"
$ R "lxc-ls -f"
### INSTALL current containers ###
@ -96,17 +89,14 @@ wait for cthulhu to terminate all containers and itself, before clear its data
SoftwareModules.InstallDU() returned
["",{"err_code":0,"err_msg":""}]
$ R "${S} && install_ctr --url_arch 3_14_alpine --ee --uuid \"00000000-0000-5000-b000-000000000002\" --privileged true --moduleversion 1.0.0 --envvar '[{Key = \"EnvVar1\", Value = \"VarValue1\"}, {Key = \"EnvVar2\" , Value = \"VarValue2\"}]' "
SoftwareModules.InstallDU() returned
["",{"err_code":0,"err_msg":""}]
$ R "${S} && install_ctr --url_arch 3_16_alpine_libcap_shadow --ee --uuid \"00000000-0000-5000-b000-000000000004\" --privileged true --moduleversion 0.1.0"
SoftwareModules.InstallDU() returned
["",{"err_code":0,"err_msg":""}]
$ R "sleep 3"
$ R "lxc-ls -f"
NAME STATE AUTOSTART GROUPS IPV4 IPV6 UNPRIVILEGED
@ -118,13 +108,11 @@ wait for cthulhu to terminate all containers and itself, before clear its data
Device.SoftwareModules.DeploymentUnit.*.Status="Installed" (glob)
Device.SoftwareModules.DeploymentUnit.*.Status="Installed" (glob)
Device.SoftwareModules.DeploymentUnit.*.Status="Installed" (glob)
$ R "ba-cli 'Device.SoftwareModules.ExecutionUnit.*.Status?'"
* Device.SoftwareModules.ExecutionUnit.*.Status? (glob)
Device.SoftwareModules.ExecutionUnit.*.Status="Active" (glob)
Device.SoftwareModules.ExecutionUnit.*.Status="Active" (glob)
Device.SoftwareModules.ExecutionUnit.*.Status="Active" (glob)
### perform backup ###
@ -132,19 +120,16 @@ wait for cthulhu to terminate all containers and itself, before clear its data
* Device.X_PRPLWARE-COM_PersistentConfiguration.Service.cthulhu_Cthulhu.ImportStatus="None" (glob)
Device.X_PRPLWARE-COM_PersistentConfiguration.Service.*. (glob)
Device.X_PRPLWARE-COM_PersistentConfiguration.Service.*.ImportStatus="None" (glob)
$ R "ba-cli 'Device.X_PRPLWARE-COM_PersistentConfiguration.Service.cthulhu_Cthulhu.ExportStatus=\"None\"'"
* Device.X_PRPLWARE-COM_PersistentConfiguration.Service.cthulhu_Cthulhu.ExportStatus="None" (glob)
Device.X_PRPLWARE-COM_PersistentConfiguration.Service.*. (glob)
Device.X_PRPLWARE-COM_PersistentConfiguration.Service.*.ExportStatus="None" (glob)
$ R "ba-cli 'Device.X_PRPLWARE-COM_PersistentConfiguration.Backup()'"
* Device.X_PRPLWARE-COM_PersistentConfiguration.Backup() (glob)
Device.X_PRPLWARE-COM_PersistentConfiguration.Backup() returned
[
""
]
### terminate LCM and remove all boot-persistent data that is not upgrade-persistent. ###
### Stopping Cthulhu by sending a signal to the main process, as the init script kills the process (forcefully) after a timeout. The stopping of the containers is done in parallel, thus depending on the number of containers to stop and the configured graceful shutdown.
@ -215,29 +200,23 @@ wait for cthulhu to terminate all containers and itself, before clear its data
$ R "ba-cli 'Device.SoftwareModules.DeploymentUnit.[UUID == \"00000000-0000-5000-b000-000000000001\"].ModuleVersion?'"
? Device.SoftwareModules.DeploymentUnit.[UUID == "00000000-0000-5000-b000-000000000001"].ModuleVersion? (glob)
Device.SoftwareModules.DeploymentUnit.*.ModuleVersion="3.16.1" (glob)
$ R "ba-cli 'Device.SoftwareModules.DeploymentUnit.[UUID == \"00000000-0000-5000-b000-000000000002\"].?'"
? Device.SoftwareModules.DeploymentUnit.[UUID == "00000000-0000-5000-b000-000000000002"].? (glob)
No data found
$ R "ba-cli 'Device.SoftwareModules.DeploymentUnit.[UUID == \"00000000-0000-5000-b000-000000000004\"].Status?'"
? Device.SoftwareModules.DeploymentUnit.[UUID == "00000000-0000-5000-b000-000000000004"].Status? (glob)
Device.SoftwareModules.DeploymentUnit.*.Status="Installed" (glob)
$ R "ba-cli 'Device.SoftwareModules.DeploymentUnit.[UUID == \"00000000-0000-5000-b000-000000000006\"].Status?'"
? Device.SoftwareModules.DeploymentUnit.[UUID == "00000000-0000-5000-b000-000000000006"].Status? (glob)
Device.SoftwareModules.DeploymentUnit.*.Status="Installed" (glob)
$ R "ba-cli 'Device.SoftwareModules.ExecutionUnit.*.Status?'"
? Device.SoftwareModules.ExecutionUnit.*.Status? (glob)
Device.SoftwareModules.ExecutionUnit.*.Status="Active" (glob)
Device.SoftwareModules.ExecutionUnit.*.Status="Active" (glob)
Device.SoftwareModules.ExecutionUnit.*.Status="Active" (glob)
$ R "ba-cli -l 'Device.SoftwareModules.LocalManagement.ActionNumberOfEntries?'"
3
$ R "ba-cli 'Device.SoftwareModules.LocalManagement.Action.[UUID == \"00000000-0000-5000-b000-000000000006\"].?'"
* Device.SoftwareModules.LocalManagement.Action.[UUID == "00000000-0000-5000-b000-000000000006"].? (glob)
Device.SoftwareModules.LocalManagement.Action.*. (glob)
@ -249,7 +228,6 @@ wait for cthulhu to terminate all containers and itself, before clear its data
Device.SoftwareModules.LocalManagement.Action.*.PreviousModuleVersion="<none>" (glob)
Device.SoftwareModules.LocalManagement.Action.*.Status="Success" (glob)
Device.SoftwareModules.LocalManagement.Action.*.UUID="00000000-0000-5000-b000-000000000006" (glob)
$ R "ba-cli 'Device.SoftwareModules.LocalManagement.Action.[UUID == \"00000000-0000-5000-b000-000000000001\"].?'"
* Device.SoftwareModules.LocalManagement.Action.[UUID == "00000000-0000-5000-b000-000000000001"].? (glob)
@ -262,7 +240,6 @@ wait for cthulhu to terminate all containers and itself, before clear its data
Device.SoftwareModules.LocalManagement.Action.*.PreviousModuleVersion="3.16.0" (glob)
Device.SoftwareModules.LocalManagement.Action.*.Status="Success" (glob)
Device.SoftwareModules.LocalManagement.Action.*.UUID="00000000-0000-5000-b000-000000000001" (glob)
$ R "ba-cli 'Device.SoftwareModules.LocalManagement.Action.[UUID == \"00000000-0000-5000-b000-000000000002\"].?'"
* Device.SoftwareModules.LocalManagement.Action.[UUID == "00000000-0000-5000-b000-000000000002"].? (glob)
@ -275,7 +252,6 @@ wait for cthulhu to terminate all containers and itself, before clear its data
Device.SoftwareModules.LocalManagement.Action.*.PreviousModuleVersion="1.0.0" (glob)
Device.SoftwareModules.LocalManagement.Action.*.Status="Success" (glob)
Device.SoftwareModules.LocalManagement.Action.*.UUID="00000000-0000-5000-b000-000000000002" (glob)
## clean up all containers ##
$ R "ba-cli 'SoftwareModules.DeploymentUnit.*.Uninstall()'"
@ -292,5 +268,3 @@ wait for cthulhu to terminate all containers and itself, before clear its data
[
""
]

View File

@ -30,7 +30,7 @@ Stop prplmesh:
Provisory: update Security.ModesAvailable as required by PPM-3660; waiting for PCF-2259 to add WPA3-CM to 6GHz VAPs
$ R "ba-cli \"WiFi.AccessPoint.[RadioReference == 'Device.WiFi.Radio.3'].Security.ModesAvailable='WPA3-Personal,WPA3-Personal-Compatibility,OWE'\"" | grep 'ModesAvailable=' | sed '/^$/d' | grep -v '>'
$ R "ba-cli \"WiFi.AccessPoint.[RadioReference == 'Device.WiFi.Radio.3'].Security.ModesAvailable='WPA3-Personal,WPA3-Personal-Compatibility,OWE'\"" | grep 'ModesAvailable=' | sed '/^$/d' | grep -Ev '^(>|$)'
WiFi.AccessPoint.\d+.Security.ModesAvailable="WPA3-Personal,WPA3-Personal-Compatibility,OWE" (re)
WiFi.AccessPoint.\d+.Security.ModesAvailable="WPA3-Personal,WPA3-Personal-Compatibility,OWE" (re)
WiFi.AccessPoint.\d+.Security.ModesAvailable="WPA3-Personal,WPA3-Personal-Compatibility,OWE" (re)

View File

@ -253,17 +253,17 @@ Check that wireless is disabled:
Restore Security Mode to default values
$ R "ba-cli \"WiFi.AccessPoint.[RadioReference == 'Device.WiFi.Radio.1'].Security.ModeEnabled='WPA3-Personal-Transition'\"" | grep 'ModeEnabled=' | sed '/^$/d' | grep -v '>'
$ R "ba-cli \"WiFi.AccessPoint.[RadioReference == 'Device.WiFi.Radio.1'].Security.ModeEnabled='WPA3-Personal-Transition'\"" | grep 'ModeEnabled=' | sed '/^$/d' | grep -Ev '^(>|$)'
WiFi.AccessPoint.\d+.Security.ModeEnabled="WPA3-Personal-Transition" (re)
WiFi.AccessPoint.\d+.Security.ModeEnabled="WPA3-Personal-Transition" (re)
WiFi.AccessPoint.\d+.Security.ModeEnabled="WPA3-Personal-Transition" (re)
$ R "ba-cli \"WiFi.AccessPoint.[RadioReference == 'Device.WiFi.Radio.2'].Security.ModeEnabled='WPA3-Personal-Transition'\"" | grep 'ModeEnabled=' | sed '/^$/d' | grep -v '>'
$ R "ba-cli \"WiFi.AccessPoint.[RadioReference == 'Device.WiFi.Radio.2'].Security.ModeEnabled='WPA3-Personal-Transition'\"" | grep 'ModeEnabled=' | sed '/^$/d' | grep -Ev '^(>|$)'
WiFi.AccessPoint.\d+.Security.ModeEnabled="WPA3-Personal-Transition" (re)
WiFi.AccessPoint.\d+.Security.ModeEnabled="WPA3-Personal-Transition" (re)
WiFi.AccessPoint.\d+.Security.ModeEnabled="WPA3-Personal-Transition" (re)
$ R "ba-cli \"WiFi.AccessPoint.[RadioReference == 'Device.WiFi.Radio.3'].Security.ModeEnabled='WPA3-Personal'\"" | grep 'ModeEnabled=' | sed '/^$/d' | grep -v '>'
$ R "ba-cli \"WiFi.AccessPoint.[RadioReference == 'Device.WiFi.Radio.3'].Security.ModeEnabled='WPA3-Personal'\"" | grep 'ModeEnabled=' | sed '/^$/d' | grep -Ev '^(>|$)'
WiFi.AccessPoint.\d+.Security.ModeEnabled="WPA3-Personal" (re)
WiFi.AccessPoint.\d+.Security.ModeEnabled="WPA3-Personal" (re)
WiFi.AccessPoint.\d+.Security.ModeEnabled="WPA3-Personal" (re)

View File

@ -98,10 +98,10 @@ Create one instances of Network.AccessPoint with WPA3-Personal enabled and push
$ R logger -t cram "Create instances of Network.AccessPoint and push them to the agent"
$ R "ba-cli \"X_PRPLWARE-COM_WiFiController.Network.AccessPoint+(Band2_4G=1,Band5GH=1,Band5GL=1,Band6G=1,MultiApMode=\"Fronthaul+Backhaul\",X_PRPLWARE_VapType=\"home\",SSID=\"SSID_WPA3CM\",Security.ModeEnabled=\"WPA3-Personal\",Security.KeyPassphrase=\"password\",Enable=1)\"" | tail -n +2 | sed '/^$/d'
$ R "ba-cli \"X_PRPLWARE-COM_WiFiController.Network.AccessPoint+(Band2_4G=1,Band5GH=1,Band5GL=1,Band6G=1,MultiApMode=\"Fronthaul+Backhaul\",X_PRPLWARE_VapType=\"home\",SSID=\"SSID_WPA3CM\",Security.ModeEnabled=\"WPA3-Personal\",Security.KeyPassphrase=\"password\",Enable=1)\"" | grep -Ev '^(>|$)'
X_PRPLWARE-COM_WiFiController.Network.AccessPoint.* (re)
$ R "ba-cli \"X_PRPLWARE-COM_WiFiController.Network.AccessPointCommit()\"" | tail -n +2 | sed '/^$/d'
$ R "ba-cli \"X_PRPLWARE-COM_WiFiController.Network.AccessPointCommit()\"" | grep -Ev '^(>|$)'
X_PRPLWARE-COM_WiFiController.Network.AccessPointCommit() returned
[
""
@ -151,7 +151,7 @@ Push WPA3-Personal-Compatibility:
$ R "ba-cli -l X_PRPLWARE-COM_WiFiController.Network.AccessPoint.1.Security.ModeEnabled=\"WPA3-Personal-Compatibility\"" | sed '/^$/d'
WPA3-Personal-Compatibility
$ R "ba-cli \"X_PRPLWARE-COM_WiFiController.Network.AccessPointCommit()\"" | tail -n +2 | sed '/^$/d'
$ R "ba-cli \"X_PRPLWARE-COM_WiFiController.Network.AccessPointCommit()\"" | grep -Ev '^(>|$)'
X_PRPLWARE-COM_WiFiController.Network.AccessPointCommit() returned
[
""
@ -202,7 +202,7 @@ Restore security modes in two steps: WPA3 Transition to 2.4GHz/5GHz and then WPA
$ R "ba-cli -l \"X_PRPLWARE-COM_WiFiController.Network.AccessPoint.1.Security.ModeEnabled=\"WPA3-Personal-Transition\"\"" | sed '/^$/d'
WPA3-Personal-Transition
$ R "ba-cli \"X_PRPLWARE-COM_WiFiController.Network.AccessPointCommit()\"" | tail -n +2 | sed '/^$/d'
$ R "ba-cli \"X_PRPLWARE-COM_WiFiController.Network.AccessPointCommit()\"" | grep -Ev '^(>|$)'
X_PRPLWARE-COM_WiFiController.Network.AccessPointCommit() returned
[
""
@ -210,7 +210,7 @@ Restore security modes in two steps: WPA3 Transition to 2.4GHz/5GHz and then WPA
$ sleep 5
$ R "ba-cli \"X_PRPLWARE-COM_WiFiController.Network.AccessPoint.1.{Band2_4G=0,Band5GH=0,Band5GL=0,Band6G=1}\"" | sed '/^$/d' | tail -n +3
$ R "ba-cli \"X_PRPLWARE-COM_WiFiController.Network.AccessPoint.1.{Band2_4G=0,Band5GH=0,Band5GL=0,Band6G=1}\"" | grep -Ev '^(>|$)' | sed '1d'
X_PRPLWARE-COM_WiFiController.Network.AccessPoint.1.Band2_4G=0
X_PRPLWARE-COM_WiFiController.Network.AccessPoint.1.Band5GH=0
X_PRPLWARE-COM_WiFiController.Network.AccessPoint.1.Band5GL=0
@ -219,7 +219,7 @@ Restore security modes in two steps: WPA3 Transition to 2.4GHz/5GHz and then WPA
$ R "ba-cli -l \"X_PRPLWARE-COM_WiFiController.Network.AccessPoint.1.Security.ModeEnabled=\"WPA3-Personal\"\"" | sed '/^$/d'
WPA3-Personal
$ R "ba-cli \"X_PRPLWARE-COM_WiFiController.Network.AccessPointCommit()\"" | tail -n +2 | sed '/^$/d'
$ R "ba-cli \"X_PRPLWARE-COM_WiFiController.Network.AccessPointCommit()\"" | grep -Ev '^(>|$)'
X_PRPLWARE-COM_WiFiController.Network.AccessPointCommit() returned
[
""

View File

@ -47,18 +47,17 @@ Verify CPUs — Data Model of OSPv2 Board:
Enable the Dynamic Voltage and Frequency Scaling (DVFS) feature:
$ R 'ba-cli CPUs.CPU.1.DVFS.Enable=1'| sed -n '3p'
$ R 'ba-cli CPUs.CPU.1.DVFS.Enable=1' | grep -Ev '^(>|$)' | grep 'CPUs.CPU.1.DVFS.Enable='
CPUs.CPU.1.DVFS.Enable=1
Change governor to performance:
$ R 'ba-cli CPUs.CPU.1.DVFS.ScalingGovernor="performance"'| sed -n '3p'
$ R 'ba-cli CPUs.CPU.1.DVFS.ScalingGovernor="performance"' | grep -Ev '^(>|$)' | grep 'CPUs.CPU.1.DVFS.ScalingGovernor='
CPUs.CPU.1.DVFS.ScalingGovernor="performance"
Check that the governor was changed to performance in datamodel:
$ R "ba-cli CPUs.CPU.*.DVFS.ScalingGovernor?" | tail -n+2 | LC_ALL=C sort
$ R "ba-cli CPUs.CPU.*.DVFS.ScalingGovernor?" | grep -Ev '^(>|$)' | LC_ALL=C sort
CPUs.CPU.1.DVFS.ScalingGovernor="performance"
CPUs.CPU.2.DVFS.ScalingGovernor="powersave"
@ -70,13 +69,12 @@ Check that the governor was changed in sysfs:
Change governor back to powersave:
$ R 'ba-cli CPUs.CPU.1.DVFS.ScalingGovernor="powersave"'| sed -n '3p'
$ R 'ba-cli CPUs.CPU.1.DVFS.ScalingGovernor="powersave"' | grep -Ev '^(>|$)' | grep 'CPUs.CPU.1.DVFS.ScalingGovernor='
CPUs.CPU.1.DVFS.ScalingGovernor="powersave"
Check that the governor was changed back to powersave in datamodel:
$ R "ba-cli CPUs.CPU.*.DVFS.ScalingGovernor?" | tail -n+2 | LC_ALL=C sort
$ R "ba-cli CPUs.CPU.*.DVFS.ScalingGovernor?" | grep -Ev '^(>|$)' | LC_ALL=C sort
CPUs.CPU.1.DVFS.ScalingGovernor="powersave"
CPUs.CPU.2.DVFS.ScalingGovernor="powersave"
@ -88,13 +86,12 @@ Check that the governor was changed back to powersave in sysfs:
Check that its not possible to use unavailable conservative governor:
$ R 'ba-cli CPUs.CPU.1.DVFS.ScalingGovernor="Test"'| sed -n '2p'
$ R 'ba-cli CPUs.CPU.1.DVFS.ScalingGovernor="Test"' | grep -Ev '^(>|$)' | grep 'ERROR:'
ERROR: set CPUs.CPU.1.DVFS.ScalingGovernor failed (10 - invalid value)
Check that the governor is still set to powersave in datamodel:
$ R "ba-cli CPUs.CPU.*.DVFS.ScalingGovernor?" | tail -n+2 | LC_ALL=C sort
$ R "ba-cli CPUs.CPU.*.DVFS.ScalingGovernor?" | grep -Ev '^(>|$)' | LC_ALL=C sort
CPUs.CPU.1.DVFS.ScalingGovernor="powersave"
CPUs.CPU.2.DVFS.ScalingGovernor="powersave"
@ -102,4 +99,4 @@ Check that the governor was is still set to powersave in sysfs:
$ R "cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor"
powersave
powersave
powersave

View File

@ -21,10 +21,10 @@ Check that there are no signs of crashes:
Ensure that ProcessFaults does not contain any crashes:
$ R "ba-cli ProcessFaults.ProcessFault.? | grep -v '^>' | head -n -1 | sort"
$ R "ba-cli ProcessFaults.ProcessFault.? | grep -Ev '^(>|$)' | sort"
No data found
Ensure that there are no core dumps in the system:
$ storage_path=$(R "ba-cli -l ProcessFaults.StoragePath?" | tr -d '\n')
$ R "test ! -f \"${storage_path}/count\""
$ R "test ! -f \"${storage_path}/count\""

View File

@ -118,7 +118,7 @@ Check that managing pWHM and prplMesh works:
# Waiting for agent to complete statup
$ R "amx_wait_for "X_PRPLWARE-COM_Agent.Info." "
$ R "ba-cli X_PRPLWARE-COM_ProcessManager.? | grep -v '>'"
$ R "ba-cli X_PRPLWARE-COM_ProcessManager.? | grep -Ev '^(>|$)'"
X_PRPLWARE-COM_ProcessManager.
X_PRPLWARE-COM_ProcessManager.PWHM.
X_PRPLWARE-COM_ProcessManager.PWHM.Enable=1
@ -134,7 +134,6 @@ Check that managing pWHM and prplMesh works:
X_PRPLWARE-COM_ProcessManager.Sensing.Enable=1
X_PRPLWARE-COM_ProcessManager.Sensing.FaultCode="NoFault"
X_PRPLWARE-COM_ProcessManager.Sensing.Status="Active"
# NOTE:
# This test restarts PWHM and prplMesh services.
# As a result, the system requires ~30 seconds to fully recover and stabilize.

View File

@ -50,9 +50,8 @@ Check that managing WiFi Sensing works:
Check Sensing datamodel again:
$ R "ba-cli X_PRPLWARE-COM_ProcessManager.Sensing.? | grep -v '>'"
$ R "ba-cli X_PRPLWARE-COM_ProcessManager.Sensing.? | grep -Ev '^(>|$)'"
X_PRPLWARE-COM_ProcessManager.Sensing.
X_PRPLWARE-COM_ProcessManager.Sensing.Enable=1
X_PRPLWARE-COM_ProcessManager.Sensing.FaultCode="NoFault"
X_PRPLWARE-COM_ProcessManager.Sensing.Status="Active"

View File

@ -144,7 +144,7 @@ Schedule a network activation at T1 with 1 minute duration:
Check Wifi schedule is running:
$ R "ba-cli 'Device.X_PRPLWARE-COM_WiFiScheduler.Network.Schedule.1.Running?'" | sed '/^$/d' | tail -n +2
$ R "ba-cli 'Device.X_PRPLWARE-COM_WiFiScheduler.Network.Schedule.1.Running?'" | grep -Ev '^(>|$)'
Device.X_PRPLWARE-COM_WiFiScheduler.Network.Schedule.1.Running=1
Wait few seconds before checking wifi activation:

View File

@ -53,7 +53,7 @@ Check sessions number:
Check AddExchange API:
Note: To fully test this API an associated station is required but let's test with a dummy MAC so we check that the API is reacting
$ R "ba-cli -j -l 'X_PRPLWARE-COM_WiFiSensing.Session.$SessionID.AddExchange(Transmitter = "AA:AA:AA:AA:AA:AA")'" | sed '/^$/d' | tail -n +2
$ R "ba-cli -j -l 'X_PRPLWARE-COM_WiFiSensing.Session.$SessionID.AddExchange(Transmitter = "AA:AA:AA:AA:AA:AA")'" | grep -Ev '^(>|$)' | sed -n '2p'
[{"ExchangeID":0,"ErrorCode":"NOT_PRESENT"}]
Delete session using SessionID:

View File

@ -257,17 +257,17 @@ To disable wireless, disable instances of Network.AccessPoint{i} and call Access
Restore Security.ModeEnabled for AccessPoints used in the test
$ R "ba-cli \"WiFi.AccessPoint.[RadioReference == 'Device.WiFi.Radio.1'].Security.ModeEnabled='WPA3-Personal-Transition'\"" | grep 'ModeEnabled=' | sed '/^$/d' | grep -v '>'
$ R "ba-cli \"WiFi.AccessPoint.[RadioReference == 'Device.WiFi.Radio.1'].Security.ModeEnabled='WPA3-Personal-Transition'\"" | grep 'ModeEnabled=' | sed '/^$/d' | grep -Ev '^(>|$)'
WiFi.AccessPoint.\d+.Security.ModeEnabled="WPA3-Personal-Transition" (re)
WiFi.AccessPoint.\d+.Security.ModeEnabled="WPA3-Personal-Transition" (re)
WiFi.AccessPoint.\d+.Security.ModeEnabled="WPA3-Personal-Transition" (re)
$ R "ba-cli \"WiFi.AccessPoint.[RadioReference == 'Device.WiFi.Radio.2'].Security.ModeEnabled='WPA3-Personal-Transition'\"" | grep 'ModeEnabled=' | sed '/^$/d' | grep -v '>'
$ R "ba-cli \"WiFi.AccessPoint.[RadioReference == 'Device.WiFi.Radio.2'].Security.ModeEnabled='WPA3-Personal-Transition'\"" | grep 'ModeEnabled=' | sed '/^$/d' | grep -Ev '^(>|$)'
WiFi.AccessPoint.\d+.Security.ModeEnabled="WPA3-Personal-Transition" (re)
WiFi.AccessPoint.\d+.Security.ModeEnabled="WPA3-Personal-Transition" (re)
WiFi.AccessPoint.\d+.Security.ModeEnabled="WPA3-Personal-Transition" (re)
$ R "ba-cli \"WiFi.AccessPoint.[RadioReference == 'Device.WiFi.Radio.3'].Security.ModeEnabled='WPA3-Personal'\"" | grep 'ModeEnabled=' | sed '/^$/d' | grep -v '>'
$ R "ba-cli \"WiFi.AccessPoint.[RadioReference == 'Device.WiFi.Radio.3'].Security.ModeEnabled='WPA3-Personal'\"" | grep 'ModeEnabled=' | sed '/^$/d' | grep -Ev '^(>|$)'
WiFi.AccessPoint.\d+.Security.ModeEnabled="WPA3-Personal" (re)
WiFi.AccessPoint.\d+.Security.ModeEnabled="WPA3-Personal" (re)
WiFi.AccessPoint.\d+.Security.ModeEnabled="WPA3-Personal" (re)

View File

@ -98,10 +98,10 @@ Create one instances of Network.AccessPoint with WPA3-Personal enabled and push
$ R logger -t cram "Create instances of Network.AccessPoint and push them to the agent"
$ R "ba-cli \"X_PRPLWARE-COM_WiFiController.Network.AccessPoint+(Band2_4G=1,Band5GH=1,Band5GL=1,Band6G=1,MultiApMode=\"Fronthaul+Backhaul\",X_PRPLWARE_VapType=\"home\",SSID=\"SSID_WPA3CM\",Security.ModeEnabled=\"WPA3-Personal\",Security.KeyPassphrase=\"password\",Enable=1)\"" | tail -n +2 | sed '/^$/d'
$ R "ba-cli \"X_PRPLWARE-COM_WiFiController.Network.AccessPoint+(Band2_4G=1,Band5GH=1,Band5GL=1,Band6G=1,MultiApMode=\"Fronthaul+Backhaul\",X_PRPLWARE_VapType=\"home\",SSID=\"SSID_WPA3CM\",Security.ModeEnabled=\"WPA3-Personal\",Security.KeyPassphrase=\"password\",Enable=1)\"" | grep -Ev '^(>|$)'
X_PRPLWARE-COM_WiFiController.Network.AccessPoint.* (re)
$ R "ba-cli \"X_PRPLWARE-COM_WiFiController.Network.AccessPointCommit()\"" | tail -n +2 | sed '/^$/d'
$ R "ba-cli \"X_PRPLWARE-COM_WiFiController.Network.AccessPointCommit()\"" | grep -Ev '^(>|$)'
X_PRPLWARE-COM_WiFiController.Network.AccessPointCommit() returned
[
""
@ -151,7 +151,7 @@ Push WPA3-Personal-Compatibility:
$ R "ba-cli -l X_PRPLWARE-COM_WiFiController.Network.AccessPoint.1.Security.ModeEnabled=\"WPA3-Personal-Compatibility\"" | sed '/^$/d'
WPA3-Personal-Compatibility
$ R "ba-cli \"X_PRPLWARE-COM_WiFiController.Network.AccessPointCommit()\"" | tail -n +2 | sed '/^$/d'
$ R "ba-cli \"X_PRPLWARE-COM_WiFiController.Network.AccessPointCommit()\"" | grep -Ev '^(>|$)'
X_PRPLWARE-COM_WiFiController.Network.AccessPointCommit() returned
[
""
@ -202,7 +202,7 @@ Restore security modes in two steps: WPA3 Transition to 2.4GHz/5GHz and then WPA
$ R "ba-cli -l \"X_PRPLWARE-COM_WiFiController.Network.AccessPoint.1.Security.ModeEnabled=\"WPA3-Personal-Transition\"\"" | sed '/^$/d'
WPA3-Personal-Transition
$ R "ba-cli \"X_PRPLWARE-COM_WiFiController.Network.AccessPointCommit()\"" | tail -n +2 | sed '/^$/d'
$ R "ba-cli \"X_PRPLWARE-COM_WiFiController.Network.AccessPointCommit()\"" | grep -Ev '^(>|$)'
X_PRPLWARE-COM_WiFiController.Network.AccessPointCommit() returned
[
""
@ -210,7 +210,7 @@ Restore security modes in two steps: WPA3 Transition to 2.4GHz/5GHz and then WPA
$ sleep 5
$ R "ba-cli \"X_PRPLWARE-COM_WiFiController.Network.AccessPoint.1.{Band2_4G=0,Band5GH=0,Band5GL=0,Band6G=1}\"" | sed '/^$/d' | tail -n +3
$ R "ba-cli \"X_PRPLWARE-COM_WiFiController.Network.AccessPoint.1.{Band2_4G=0,Band5GH=0,Band5GL=0,Band6G=1}\"" | grep -Ev '^(>|$)' | sed '1d'
X_PRPLWARE-COM_WiFiController.Network.AccessPoint.1.Band2_4G=0
X_PRPLWARE-COM_WiFiController.Network.AccessPoint.1.Band5GH=0
X_PRPLWARE-COM_WiFiController.Network.AccessPoint.1.Band5GL=0
@ -219,7 +219,7 @@ Restore security modes in two steps: WPA3 Transition to 2.4GHz/5GHz and then WPA
$ R "ba-cli -l \"X_PRPLWARE-COM_WiFiController.Network.AccessPoint.1.Security.ModeEnabled=\"WPA3-Personal\"\"" | sed '/^$/d'
WPA3-Personal
$ R "ba-cli \"X_PRPLWARE-COM_WiFiController.Network.AccessPointCommit()\"" | tail -n +2 | sed '/^$/d'
$ R "ba-cli \"X_PRPLWARE-COM_WiFiController.Network.AccessPointCommit()\"" | grep -Ev '^(>|$)'
X_PRPLWARE-COM_WiFiController.Network.AccessPointCommit() returned
[
""

View File

@ -71,7 +71,7 @@ First call of AccessPointCommit, controller should push empty config to agents:
$ R logger -t cram "first call of AccessPointCommit pushes empty config, global teardown"
$ R "ba-cli \"X_PRPLWARE-COM_WiFiController.Network.AccessPointCommit()\"" | tail -n +2 | sed '/^$/d'
$ R "ba-cli \"X_PRPLWARE-COM_WiFiController.Network.AccessPointCommit()\"" | grep -Ev '^(>|$)'
X_PRPLWARE-COM_WiFiController.Network.AccessPointCommit() returned
[
""
@ -83,10 +83,10 @@ Create one instances of Network.AccessPoint and push it to the agent:
$ R logger -t cram "create instances of Network.AccessPoint and push them to the agent"
$ R "ba-cli \"X_PRPLWARE-COM_WiFiController.Network.AccessPoint+(MLDUnit=0,Band5GH=1,Band5GL=1,MultiApMode=\"Fronthaul+Backhaul\",X_PRPLWARE_VapType=\"home\",SSID=\"SSIDforStaticPunct\",Security.ModeEnabled=\"WPA3-Personal\",Security.KeyPassphrase=\"password\",Enable=1)\"" | tail -n +2 | sed '/^$/d'
$ R "ba-cli \"X_PRPLWARE-COM_WiFiController.Network.AccessPoint+(MLDUnit=0,Band5GH=1,Band5GL=1,MultiApMode=\"Fronthaul+Backhaul\",X_PRPLWARE_VapType=\"home\",SSID=\"SSIDforStaticPunct\",Security.ModeEnabled=\"WPA3-Personal\",Security.KeyPassphrase=\"password\",Enable=1)\"" | grep -Ev '^(>|$)'
X_PRPLWARE-COM_WiFiController.Network.AccessPoint.* (re)
$ R "ba-cli \"X_PRPLWARE-COM_WiFiController.Network.AccessPointCommit()\"" | tail -n +2 | sed '/^$/d'
$ R "ba-cli \"X_PRPLWARE-COM_WiFiController.Network.AccessPointCommit()\"" | grep -Ev '^(>|$)'
X_PRPLWARE-COM_WiFiController.Network.AccessPointCommit() returned
[
""

View File

@ -35,7 +35,7 @@ Restore defaults:
$ R "ba-cli -l \"X_PRPLWARE-COM_WiFiController.Network.AccessPoint.1.Security.ModeEnabled=\"WPA3-Personal-Transition\"\"" | sed '/^$/d'
WPA3-Personal-Transition
$ R "ba-cli \"X_PRPLWARE-COM_WiFiController.Network.AccessPointCommit()\"" | tail -n +2 | sed '/^$/d'
$ R "ba-cli \"X_PRPLWARE-COM_WiFiController.Network.AccessPointCommit()\"" | grep -Ev '^(>|$)'
X_PRPLWARE-COM_WiFiController.Network.AccessPointCommit() returned
[
""

View File

@ -79,18 +79,17 @@ Verify CPUs — Data Model of Freedom Board:
Enable the Dynamic Voltage and Frequency Scaling (DVFS) feature:
$ R 'ba-cli CPUs.CPU.1.DVFS.Enable=1'| sed -n '3p'
$ R 'ba-cli CPUs.CPU.1.DVFS.Enable=1' | grep -Ev '^(>|$)' | grep 'CPUs.CPU.1.DVFS.Enable='
CPUs.CPU.1.DVFS.Enable=1
Change governor to performance:
$ R 'ba-cli CPUs.CPU.1.DVFS.ScalingGovernor="performance"'| sed -n '3p'
$ R 'ba-cli CPUs.CPU.1.DVFS.ScalingGovernor="performance"' | grep -Ev '^(>|$)' | grep 'CPUs.CPU.1.DVFS.ScalingGovernor='
CPUs.CPU.1.DVFS.ScalingGovernor="performance"
Check that the governor was changed to performance in datamodel:
$ R "ba-cli CPUs.CPU.*.DVFS.ScalingGovernor?" | tail -n+2 | LC_ALL=C sort
$ R "ba-cli CPUs.CPU.*.DVFS.ScalingGovernor?" | grep -Ev '^(>|$)' | LC_ALL=C sort
CPUs.CPU.1.DVFS.ScalingGovernor="performance"
CPUs.CPU.2.DVFS.ScalingGovernor="performance"
CPUs.CPU.3.DVFS.ScalingGovernor="performance"
@ -106,13 +105,12 @@ Check that the governor was changed in sysfs:
Change governor back to powersave:
$ R 'ba-cli CPUs.CPU.1.DVFS.ScalingGovernor="powersave"'| sed -n '3p'
$ R 'ba-cli CPUs.CPU.1.DVFS.ScalingGovernor="powersave"' | grep -Ev '^(>|$)' | grep 'CPUs.CPU.1.DVFS.ScalingGovernor='
CPUs.CPU.1.DVFS.ScalingGovernor="powersave"
Check that the governor was changed back to powersave in datamodel:
$ R "ba-cli CPUs.CPU.*.DVFS.ScalingGovernor?" | tail -n+2 | LC_ALL=C sort
$ R "ba-cli CPUs.CPU.*.DVFS.ScalingGovernor?" | grep -Ev '^(>|$)' | LC_ALL=C sort
CPUs.CPU.1.DVFS.ScalingGovernor="powersave"
CPUs.CPU.2.DVFS.ScalingGovernor="powersave"
CPUs.CPU.3.DVFS.ScalingGovernor="powersave"
@ -128,13 +126,12 @@ Check that the governor was changed back to powersave in sysfs:
Check that its not possible to use unavailable conservative governor:
$ R 'ba-cli CPUs.CPU.1.DVFS.ScalingGovernor="Test"'| sed -n '2p'
$ R 'ba-cli CPUs.CPU.1.DVFS.ScalingGovernor="Test"' | grep -Ev '^(>|$)' | grep 'ERROR:'
ERROR: set CPUs.CPU.1.DVFS.ScalingGovernor failed (10 - invalid value)
Check that the governor is still set to powersave in datamodel:
$ R "ba-cli CPUs.CPU.*.DVFS.ScalingGovernor?" | tail -n+2 | LC_ALL=C sort
$ R "ba-cli CPUs.CPU.*.DVFS.ScalingGovernor?" | grep -Ev '^(>|$)' | LC_ALL=C sort
CPUs.CPU.1.DVFS.ScalingGovernor="powersave"
CPUs.CPU.2.DVFS.ScalingGovernor="powersave"
CPUs.CPU.3.DVFS.ScalingGovernor="powersave"
@ -150,14 +147,13 @@ Check that the governor was is still set to powersave in sysfs:
Set the governor back to performance to avoid affecting other tests:
$ R 'ba-cli CPUs.CPU.1.DVFS.ScalingGovernor="performance"'| sed -n '3p'
$ R 'ba-cli CPUs.CPU.1.DVFS.ScalingGovernor="performance"' | grep -Ev '^(>|$)' | grep 'CPUs.CPU.1.DVFS.ScalingGovernor='
CPUs.CPU.1.DVFS.ScalingGovernor="performance"
Check that the governor was changed to performance in datamodel:
$ R "ba-cli CPUs.CPU.*.DVFS.ScalingGovernor?" | tail -n+2 | LC_ALL=C sort
$ R "ba-cli CPUs.CPU.*.DVFS.ScalingGovernor?" | grep -Ev '^(>|$)' | LC_ALL=C sort
CPUs.CPU.1.DVFS.ScalingGovernor="performance"
CPUs.CPU.2.DVFS.ScalingGovernor="performance"
CPUs.CPU.3.DVFS.ScalingGovernor="performance"
CPUs.CPU.4.DVFS.ScalingGovernor="performance"
CPUs.CPU.4.DVFS.ScalingGovernor="performance"

View File

@ -4,19 +4,16 @@ Create R alias:
Add a VLAN with unique ID:
$ R ba-cli Bridging.Bridge.lan.VLAN.+{VLANID=100, Enable=1}? | grep -v '^>'
$ R ba-cli Bridging.Bridge.lan.VLAN.+{VLANID=100, Enable=1}? | grep -Ev '^(>|$)'
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 '^>'
$ R "ba-cli 'Bridging.Bridge.lan.VLAN.+{VLANID=100, Enable=1}?'" | grep -Ev '^(>|$)'
ERROR: add Bridging.Bridge.lan.VLAN. failed (13 - duplicate)
Cleanup:
$ R "ba-cli Bridging.Bridge.lan.VLAN.[VLANID==100].-" | grep -v '^>'
$ R "ba-cli Bridging.Bridge.lan.VLAN.[VLANID==100].-" | grep -Ev '^(>|$)'
Bridging.Bridge.1.VLAN.1.

View File

@ -19,9 +19,8 @@ Check lan bridge ports:
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 '^>'
$ R ba-cli 'Device.Bridging.Bridge.lan.Port.12.Name?' | grep -Ev '^(>|$)'
Device.Bridging.Bridge.1.Port.12.Name="wan"
Check lan bridge ports:
@ -41,7 +40,6 @@ Check lan bridge ports:
Restore:
$ R ba-cli 'Device.Bridging.Bridge.lan.Port.12.LowerLayers=Device.Ethernet.Interface.5' | grep -v '^>'
$ R ba-cli 'Device.Bridging.Bridge.lan.Port.12.LowerLayers=Device.Ethernet.Interface.5' | grep -Ev '^(>|$)'
Device.Bridging.Bridge.1.Port.12.
Device.Bridging.Bridge.1.Port.12.LowerLayers="Device.Ethernet.Interface.5"

View File

@ -4,20 +4,17 @@ Create R alias:
Add an entry with a unique name:
$ R ba-cli 'Device.Bridging.Bridge.lan.Port.+{Name="eth100"}' | grep -v '^>'
$ R ba-cli 'Device.Bridging.Bridge.lan.Port.+{Name="eth100"}' | grep -Ev '^(>|$)'
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 '^>'
$ R ba-cli 'Device.Bridging.Bridge.lan.Port.+{Name="eth100"}' | grep -Ev '^(>|$)'
ERROR: add Device.Bridging.Bridge.lan.Port. failed (13 - duplicate)
Restore:
$ R "ba-cli 'Device.Bridging.Bridge.lan.Port.[Name==\"eth100\"].-'" | grep -v '^>'
$ R "ba-cli 'Device.Bridging.Bridge.lan.Port.[Name==\"eth100\"].-'" | grep -Ev '^(>|$)'
Device\.Bridging\.Bridge\.1\.Port\.\d+\. (re)
Device\.Bridging\.Bridge\.1\.Port\.\d+\.Stats\. (re)

View File

@ -6,42 +6,35 @@ 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 '^>'
$ R "ba-cli 'Device.Bridging.Bridge.lan.Port.1.PriorityRegeneration=\"0,1,2,3,4,5,6,-1\"'" | grep -Ev '^(>|$)'
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 '^>'
$ R "ba-cli 'Device.Bridging.Bridge.lan.Port.1.PriorityRegeneration=\"0,1,2,3,4,5,6,7,7\"'" | grep -Ev '^(>|$)'
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 '^>'
$ R "ba-cli 'Device.Bridging.Bridge.lan.Port.1.PriorityRegeneration=\"0,1,2,3,4,5,6\"'" | grep -Ev '^(>|$)'
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 '^>'
$ R "ba-cli 'Device.Bridging.Bridge.lan.Port.1.PriorityRegeneration=\"0,1,2,3,4,5,6,6\"'" | grep -Ev '^(>|$)'
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 '^>'
$ R "ba-cli 'Device.Bridging.Bridge.lan.Port.1.PriorityRegeneration=\"0,1,2,3,4,5,6,7\"'" | grep -Ev '^(>|$)'
Device.Bridging.Bridge.1.Port.1.
Device.Bridging.Bridge.1.Port.1.PriorityRegeneration="0,1,2,3,4,5,6,7"

View File

@ -4,32 +4,27 @@ Create R alias:
Check default value:
$ R ba-cli Bridging.Bridge.lan.STP.BridgePriority? | grep -v '^>'
$ R ba-cli Bridging.Bridge.lan.STP.BridgePriority? | grep -Ev '^(>|$)'
Bridging.Bridge.1.STP.BridgePriority=32768
Try to set a negative value:
$ R ba-cli Bridging.Bridge.lan.STP.BridgePriority=-1 | grep -v '^>'
$ R ba-cli Bridging.Bridge.lan.STP.BridgePriority=-1 | grep -Ev '^(>|$)'
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 '^>'
$ R ba-cli Bridging.Bridge.lan.STP.BridgePriority=61441 | grep -Ev '^(>|$)'
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 '^>'
$ R ba-cli Bridging.Bridge.lan.STP.BridgePriority=61440 | grep -Ev '^(>|$)'
Bridging.Bridge.1.STP.
Bridging.Bridge.1.STP.BridgePriority=61440
Restore:
$ R ba-cli Bridging.Bridge.lan.STP.BridgePriority=32768 | grep -v '^>'
$ R ba-cli Bridging.Bridge.lan.STP.BridgePriority=32768 | grep -Ev '^(>|$)'
Bridging.Bridge.1.STP.
Bridging.Bridge.1.STP.BridgePriority=32768

View File

@ -4,7 +4,6 @@ Create R alias:
Check DSCPMark value:
$ R "ba-cli Device.DHCPv6.Client.1.DSCPMark?" | grep -v '^>'
$ R "ba-cli Device.DHCPv6.Client.1.DSCPMark?" | grep -Ev '^(>|$)'
Device.DHCPv6.Client.1.DSCPMark=48

View File

@ -5,6 +5,5 @@ Create R alias:
Set unexistent interface:
$ R "ba-cli Device.DHCPv6.Client.1.Interface=Device.IP.Interface.99" | grep -v '^>'
$ R "ba-cli Device.DHCPv6.Client.1.Interface=Device.IP.Interface.99" | grep -Ev '^(>|$)'
ERROR: set Device.DHCPv6.Client.1.Interface failed (21 - invalid path)

View File

@ -4,7 +4,6 @@ Create R alias:
$ alias R="${CRAM_REMOTE_COMMAND:-}"
Check DSCPMark value:
$ R "ba-cli Device.DHCPv6.Server.Pool.1.DSCPMark?" | grep -v '^>'
$ R "ba-cli Device.DHCPv6.Server.Pool.1.DSCPMark?" | grep -Ev '^(>|$)'
Device.DHCPv6.Server.Pool.1.DSCPMark=48

View File

@ -3,7 +3,7 @@ description: A minimal set of prpl packages and configs (no WAN support, no LCM,
feeds:
- name: feed_amx
uri: https://gitlab.com/prpl-foundation/prplos/feeds/feed_amx.git
revision: main@0f228e1165a3bd9c530e4b20f3cdbd10d313ffa8
revision: main@9581259339defc48d1023351b38a5bebbd15d973
- name: feed_prplmesh
uri: https://gitlab.com/prpl-foundation/prplos/feeds/feed-prplmesh.git