Skip to content

[ZTP] Improvements to the connectivity-check plugin#38

Open
rajendra-dendukuri wants to merge 3 commits intosonic-net:masterfrom
rajendra-dendukuri:connectivity_plugin
Open

[ZTP] Improvements to the connectivity-check plugin#38
rajendra-dendukuri wants to merge 3 commits intosonic-net:masterfrom
rajendra-dendukuri:connectivity_plugin

Conversation

@rajendra-dendukuri
Copy link
Collaborator

  • The user can now specify arguments that can be passed on to ping command when performing the connectivity check. The "args" field in the configuration section of the ztp.json needs to be specified.

  • The user can choose to restart dhcp if connectivity check fails in its first attempt. This is useful when the switch has rebooted and all the in-band interfaces are not yet active. Use "dhcp" : true in the configuration section of the ztp.json.

  • Added unit test cases

@dgsudharsan
Copy link
Contributor

@liorghub Can you please review?

iter_list = list(_host_list)
# Loop through current host list
for host in iter_list:
if interface is not None and not isString(interface):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this check required? The interface is parsed as string in line 130 and cannot be other type right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Removed this redundant check.

break

if dhcp:
logger.info('Restarting networking to establish connectivity')
Copy link

@liorghub liorghub Oct 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider change to "Restarting networking service to kickstart DHCP".

 - The user can now specify arguments that can be passed on to ping command
   when performing the connectivity check. The "args" field in the configuration
   section of the ztp.json needs to be specified.

 - The user can choose to restart dhcp if connectivity check fails in its first attempt.
   This is useful when the switch has rebooted and all the in-band interfaces are not
   yet active. Use "dhcp" : true in the configuration section of the ztp.json.

 - Added unit test cases
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.

3 participants