Skip to content

Conversation

@mtannous
Copy link
Contributor

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

@benbp
Copy link
Contributor

benbp commented Oct 25, 2016

Please squash and rebase the commits.

@benbp
Copy link
Contributor

benbp commented Oct 25, 2016

Requires #512

@mtannous
Copy link
Contributor Author

Thanks, just did.

ip= 100+count
string += "auto " + subdirname
string += "\niface " + subdirname +" inet static"
string += "\naddress 10.0.0." + str(ip)
Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor

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.

@yyscamper
Copy link
Contributor

jenkins: ok to test

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
Copy link
Contributor

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 //

@nucklehead
Copy link
Contributor

Can this be merged please :-)

@changev
Copy link
Member

changev commented Dec 28, 2016

test this please

@rolandpoulter rolandpoulter merged commit c11c367 into RackHD:master Jan 7, 2017
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.

6 participants