Skip to content

RDKB-63270 Test migration from non dhcp-manager to dhcp manager scena…#66

Open
vpriya623 wants to merge 1 commit intodevelopfrom
feature/RDKB-63270
Open

RDKB-63270 Test migration from non dhcp-manager to dhcp manager scena…#66
vpriya623 wants to merge 1 commit intodevelopfrom
feature/RDKB-63270

Conversation

@vpriya623
Copy link

…rio.

Added new script DHCPMgrPSMValueCheck.sh to check the PSM values of virtual interfaces

Copy link

Copilot AI left a 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.

@vpriya623 vpriya623 force-pushed the feature/RDKB-63270 branch 2 times, most recently from 304adbc to 62e5d12 Compare February 6, 2026 13:47
Copilot AI review requested due to automatic review settings February 6, 2026 13:47
Copy link

Copilot AI left a 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.

#######################################################################################
if [ -e /etc/log_timestamp.sh ]
then
source /etc/log_timestamp.sh
Copy link

Copilot AI Feb 6, 2026

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.

Suggested change
source /etc/log_timestamp.sh
. /etc/log_timestamp.sh

Copilot uses AI. Check for mistakes.
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
Copy link

Copilot AI Feb 6, 2026

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.

Suggested change
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

Copilot uses AI. Check for mistakes.
@vpriya623 vpriya623 force-pushed the feature/RDKB-63270 branch 2 times, most recently from 1a124cd to 3790206 Compare February 6, 2026 14:36
Copilot AI review requested due to automatic review settings February 6, 2026 14:36
Copy link

Copilot AI left a 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.

else
echo_t()
{
echo "`date +"%y%m%d-%T.%6N"` $1"
Copy link

Copilot AI Feb 6, 2026

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.

Suggested change
echo "`date +"%y%m%d-%T.%6N"` $1"
echo "$(date +"%y%m%d-%T.%6N") $1"

Copilot uses AI. Check for mistakes.
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
Copy link

Copilot AI Feb 6, 2026

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.

Suggested change
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

Copilot uses AI. Check for mistakes.
…rio.

Added new script DHCPMgrPSMValueCheck.sh to check the PSM values of
virtual interfaces
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant