RDKB-63270 Test migration from non dhcp-manager to dhcp manager scena…#66
RDKB-63270 Test migration from non dhcp-manager to dhcp manager scena…#66
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a new shell script to support migration testing from non-DHCP-manager to DHCP-manager scenarios by checking and setting PSM (Persistent Storage Manager) values for virtual interfaces.
Changes:
- Added DHCPMgrPSMValueCheck.sh script to validate and initialize PSM records for DHCPv4 and DHCPv6 interfaces across virtual interfaces
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
304adbc to
62e5d12
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
config/DHCPMgrPSMValueCheck.sh
Outdated
| ####################################################################################### | ||
| if [ -e /etc/log_timestamp.sh ] | ||
| then | ||
| source /etc/log_timestamp.sh |
There was a problem hiding this comment.
This script is declared as #!/bin/sh but uses source, which isn’t specified by POSIX sh (portable form is . /etc/log_timestamp.sh). If this runs under a stricter /bin/sh, it may fail before doing any checks.
| source /etc/log_timestamp.sh | |
| . /etc/log_timestamp.sh |
config/DHCPMgrPSMValueCheck.sh
Outdated
| virtifcount=`psmcli get dmsb.wanmanager.if.1.VirtualInterfaceifcount` | ||
| [ "$virtifcount" -eq 0 ] && { echo_t "[DHCP Manager PSM Check] virtual interface count is 0" >> $LOG_FILE; exit 1; } | ||
|
|
||
| echo_t "[DHCP Manager PSM Check] No of virtual interface count is ${virtifcount}" >> $LOG_FILE |
There was a problem hiding this comment.
Log message grammar: "No of virtual interface count" is awkward/unclear; consider changing to something like "Number of virtual interfaces" to make logs easier to read and search.
| echo_t "[DHCP Manager PSM Check] No of virtual interface count is ${virtifcount}" >> $LOG_FILE | |
| echo_t "[DHCP Manager PSM Check] Number of virtual interfaces is ${virtifcount}" >> $LOG_FILE |
1a124cd to
3790206
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
config/DHCPMgrPSMValueCheck.sh
Outdated
| else | ||
| echo_t() | ||
| { | ||
| echo "`date +"%y%m%d-%T.%6N"` $1" |
There was a problem hiding this comment.
Backticks for command substitution are deprecated in modern shell scripting. The preferred syntax is dollar-parentheses which is more readable and POSIX compliant. Replace the backticks with dollar-parentheses syntax.
| echo "`date +"%y%m%d-%T.%6N"` $1" | |
| echo "$(date +"%y%m%d-%T.%6N") $1" |
config/DHCPMgrPSMValueCheck.sh
Outdated
| virtifcount=$(psmcli get dmsb.wanmanager.if.1.VirtualInterfaceifcount) | ||
| [ "$virtifcount" -eq 0 ] && { echo_t "[DHCP Manager PSM Check] virtual interface count is 0" >> $LOG_FILE; exit 1; } | ||
|
|
||
| echo_t "[DHCP Manager PSM Check] No of virtual interface count is ${virtifcount}" >> $LOG_FILE |
There was a problem hiding this comment.
Grammar issue: "No of" should be "Number of" for proper English.
| echo_t "[DHCP Manager PSM Check] No of virtual interface count is ${virtifcount}" >> $LOG_FILE | |
| echo_t "[DHCP Manager PSM Check] Number of virtual interfaces is ${virtifcount}" >> $LOG_FILE |
…rio. Added new script DHCPMgrPSMValueCheck.sh to check the PSM values of virtual interfaces
3790206 to
610cd84
Compare
…rio.
Added new script DHCPMgrPSMValueCheck.sh to check the PSM values of virtual interfaces