-
Notifications
You must be signed in to change notification settings - Fork 10
RDKB-63270 Test migration from non dhcp-manager to dhcp manager scena… #66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
Copilot
AI
Feb 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
Copilot
AI
Feb 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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" |
Copilot
AI
Feb 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
Copilot
AI
Feb 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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