-
Notifications
You must be signed in to change notification settings - Fork 32
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
[ZTP] Improvements to the connectivity-check plugin #38
base: master
Are you sure you want to change the base?
[ZTP] Improvements to the connectivity-check plugin #38
Conversation
@liorghub Can you please review? |
@@ -61,30 +61,48 @@ class ConnectivityCheck: | |||
iter_list = list(_host_list) | |||
# Loop through current host list | |||
for host in iter_list: | |||
if interface is not None and not isString(interface): |
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.
Is this check required? The interface is parsed as string in line 130 and cannot be other type right?
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.
Agreed. Removed this redundant check.
else: | ||
# Discard invalid hosts | ||
_host_list.remove(host) | ||
|
||
if len(_host_list) == 0: | ||
break | ||
|
||
if dhcp: | ||
logger.info('Restarting networking to establish connectivity') |
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.
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
6fdec8d
to
2fdc1f2
Compare
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