-
Notifications
You must be signed in to change notification settings - Fork 77
Script to enable interfaces inorder to send/receive LLDP #512
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
Conversation
|
Please squash and rebase the commits. |
|
Requires #512 |
|
Thanks, just did. |
| ip= 100+count | ||
| string += "auto " + subdirname | ||
| string += "\niface " + subdirname +" inet static" | ||
| string += "\naddress 10.0.0." + str(ip) |
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.
@mtannous : please confirm the arbitrary IP address is OK for LLDP?
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.
@yyscamper yes having the arbitrary IP address is fine for LLDP. I verified and this is just to get the interface up
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.
@mtannous : please add some comment, so other developer will be aware of this is not a magic IP address, actually any one is OK.
|
jenkins: ok to test |
data/templates/set_interfaces.py
Outdated
| for dirname, dirnames, filenames in os.walk('/sys/class/net/'): | ||
| for subdirname in dirnames: | ||
| if subdirname != "lo": | ||
| //Here we are assigning an arbitrary IP which could be a different one. This is just to get the interface up |
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.
@mtannous : for python, the comment symbol is # not //
|
Can this be merged please :-) |
|
test this please |
This script iterates through all the interfaces in the microkernel and sets their default IP address, netmask, gateway. Once all the interfaces are set, then the script makes sure that all interfaces are up.
Referencing this pull request:
RackHD/on-tasks#367