Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Compliance Tests
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Compliance Tests
Commits
c72b189f
Commit
c72b189f
authored
Feb 07, 2020
by
Jean-Claude BAU
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Manage the slaveOnly key
parent
13b0dde0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
14 deletions
+23
-14
ptp_array_wrs_V2.tcl
ATTEST/Ptp-bc/Net-O2/NECP_LIB/Cli/Ptp/ptp_array_wrs_V2.tcl
+23
-14
No files found.
ATTEST/Ptp-bc/Net-O2/NECP_LIB/Cli/Ptp/ptp_array_wrs_V2.tcl
View file @
c72b189f
...
...
@@ -736,8 +736,12 @@ set action_restart_ppsi "/wr/bin/assembly_ppsi_conf.sh; /etc/init.d/ppsi.sh res
set idx 0
set cli_set_record
(
DUT_PTP_ENABLE_SLAVE_ONLY,ATTEST_SET,
[
incr
idx
])
$action
_restart_ppsi
set cli_set_record
(
DUT_PTP_ENABLE_SLAVE_ONLY,ATTEST_TIME,idx
)
"30"
set cli_set_record
(
DUT_PTP_ENABLE_SLAVE_ONLY,ATTEST_SET,
[
incr
idx
])
"NONE"
set cli_set_record
(
DUT_PTP_ENABLE_SLAVE_ONLY,ATTEST_TIME,idx
)
"30"
set cli_set_record
(
DUT_PTP_ENABLE_SLAVE_ONLY,ATTEST_SET,
[
incr
idx
])
"sleep 10"
set cli_set_record
(
DUT_PTP_ENABLE_SLAVE_ONLY,ATTEST_TIME,idx
)
"30"
set cli_set_record
(
DUT_PTP_ENABLE_SLAVE_ONLY,ATTEST_SET,
[
incr
idx
])
"wrs_dump_shmem | grep -e
\"
^ppsi.defaulDS.slaveOnly
\"
"
set cli_set_record
(
DUT_PTP_ENABLE_SLAVE_ONLY,ATTEST_TIME,idx
)
"30"
set cli_set_record
(
DUT_PTP_ENABLE_SLAVE_ONLY,ATTEST_SET,
[
incr
idx
])
"NONE"
#19.
...
...
@@ -1024,8 +1028,6 @@ set action_restart_ppsi "/wr/bin/assembly_ppsi_conf.sh; /etc/init.d/ppsi.sh res
}
################################################################################
# DUT CHECK FUNCTIONS #
################################################################################
...
...
@@ -1066,7 +1068,6 @@ global env ptp_env
set cli_get_record
(
DUT_PTP_CHECK_PORT_STATE,ATTEST_OUTPUT,
[
incr
idx
])
"wrs_dump_shmem | egrep 'cfg.iface_name:|info.state:'"
set cli_get_record
(
DUT_PTP_CHECK_PORT_STATE,ATTEST_GET,
[
incr
idx
])
"NONE"
#2.
################################################################################
# #
...
...
@@ -1162,7 +1163,6 @@ global env ptp_env
}
################################################################################
# CALL BACK FOR CLI ENABLE FUNCTIONS #
################################################################################
...
...
@@ -2842,8 +2842,8 @@ proc ptp::callback_cli_ptp_enable_slave_only {args} {
if
{[
string
length
$port
]
== 1
}
{
set port
"0
$port
"
}
set config_slave_only
"CONFIG_PTP_SLAVE_ONLY"
set config_ext_port_conf
"CONFIG_PTP_OPT_EXT_PORT_CONFIG_ENABLED"
set config_desirade_state
"CONFIG_PORT
${port}
_INST01_DESIRADE_STATE"
# printLog
"Performing configuration updation in dot-config."
...
...
@@ -2853,16 +2853,16 @@ proc ptp::callback_cli_ptp_enable_slave_only {args} {
## external port configuration enabled
set key
$config
_ext_port_conf
if
{[
regexp
"^
$key
"
$line
]}
{
#
En
able external port configuration
set line
"
${key}
=
yes
"
#
Dis
able external port configuration
set line
"
${key}
=
no
"
printLog
$line
}
## Set
desired state
set key
$config
_
desirade_state
## Set
slave only
set key
$config
_
slave_only
if
{[
regexp
"^
$key
"
$line
]}
{
# Enable
external port configuration
set line
"
${key}
_SLAVE
=yes"
# Enable
slave_only
set line
"
${key}
=yes"
printLog
$line
}
...
...
@@ -2877,7 +2877,7 @@ proc ptp::callback_cli_ptp_enable_slave_only {args} {
sleep
$::dut
_config_delay
return
$result
return
$result
}
...
...
@@ -3318,6 +3318,7 @@ proc ptp::callback_cli_ptp_disable_slave_only {args} {
if
{[
string
length
$port
]
== 1
}
{
set port
"0
$port
"
}
set config_slave_only
"CONFIG_PTP_SLAVE_ONLY"
set config_ext_port_conf
"CONFIG_PTP_OPT_EXT_PORT_CONFIG_ENABLED"
set config_desirade_state
"CONFIG_PORT
${port}
_INST01_DESIRADE_STATE"
set config_bmca_mode
"CONFIG_PORT
${port}
_BMODE_AUTO"
...
...
@@ -3327,6 +3328,13 @@ proc ptp::callback_cli_ptp_disable_slave_only {args} {
foreach line
[
split
$config
"
\n
"
]
{
## slave only
set key
$config
_slave_only
if
{[
regexp
"^
$key
"
$line
]}
{
# Disable slave only
set line
"
${key}
=no"
printLog
$line
}
## external port configuration enabled
set key
$config
_ext_port_conf
if
{[
regexp
"^
$key
"
$line
]}
{
...
...
@@ -3810,3 +3818,4 @@ proc ptp::callback_ipv4_remove_ip_interface {args} {
return 2
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment